Creating MAXScript Installers

14 votes
What’s Wrong With .MZP Files?

Having managed tool rollouts at both small (four artists) and large (50+ artists) companies I’ve become increasingly frustrated with MAXScript installation options. MZP files do ake the process less painful, but they have some inherent problems and limitations:

  • They don’t provide any feedback to the user.
    The script that controls an .MZP file’s installation can’t trigger MAXScript dialogs natively. Unless the script author creates a post-installation script and codes a run line into the file there won’t be any feedback to the user. I tried such a method for a while but eventually gave up on it. It’s cumbersome and can leave unused MAXScripts on the user’s hard drive.
  • They require Max to be running.
    This may not seem like a problem, but it goes against the way most users interact with their Windows based computers. Unless a program auto-updates itself a user isn’t conditioned to start a program before they update it. The Windows user experience is usually exactly the opposite of that. A user starts an installer to update a program. If the program being updated is currently running then the installer will ask the user to close it before the update process can continue. The majority of support requests I’ve received regarding script installations stem from the fact that the user is treating the .MZP files as if it were an installer.
  • .MZP files are .zip files, just renamed.
    This can be seen as a benefit and a problem. The problem happens when a user doesn’t know how to properly install an .MZP file but figures out that they can be opened in a zip compression program. Invariably the user puts all of the extracted files someplace incorrect, like the root of c:\3dsmax, or worse, and then either can’t get the script to work in Max or, in the case of scripts with extensions, gets errors when Max starts.
  • Due to a limitation in Max installed icons for toolbars will not show up until Max is restarted.
    This issue has been around for about as long as MacroScripts have been in Max. It’s not possible to force Max to refresh its icon cache. This means that any toolbar bitmap that is added after Max is started will not be visible until the user exits Max and restarts it. This negates whatever benefit Discreet might have seen in having users install scripts from within a running instance of Max. Since an file can not display a dialog (as mentioned above) there isn’t an easy way to tell the user that they’re going to have to close and re-launch Max to truly finish the installation.
  • MZP files are poorly documented in the user’s manual.
    The index for the User Reference help file doesn’t contain any entries for “.mzp”. Doing a search in the help file for “installing a MAXScript” lists eleven topics. The first one is “Particle Flow FAQ”. The first entry that is specifically MAXScript related is #5, “Running Scripts from the Command Line”. There is no entry for installing MAXScripts. The help file entry for the MAXScript “Run Script” menu entry doesn’t even mention that you should use that menu command to install .MZP files. If a user goes to the help file to find information on how to install .MZP files they won’t gain any useful knowledge.
  • MZP files aren’t universally accepted.
    Since the use of MZP files isn’t enforced you can find many scripts that don’t use them. ZIP files with (assumed) proper directory structures are used, ZIP files with no directory structure and a file on how to do a manual installation are used, self extracting ZIP files are used, etc… While using true application installers may be seen as just adding to the problem, they provide a lot of benefits and an easier and more powerful way of doing script installations.

Why Use An Installer?

Because of those problems with MZP files I have moved away from using .MZP files for script delivery of our in-house tools. I now build application installers. True application installers get around all of the problems I listed above:

  • A good installer system will allow for the display of dialogs so that the user can receive information and/or make choices pertaining to the installation process.
  • They follow the accepted Windows actions for installing or updating applications.
  • The files can’t easily be extracted from the archive and manually placed on the hard drive.
  • Max doesn’t have to be running so its icon cache will be updated the first time a user runs the program after installing a new tool. If Max is running during the installation the user can be alerted to the fact that they need to close and re-launch the application.
  • Installer usage is something most people understand so there doesn’t need to be support documentation on how to perform the installation.

There are other benefits to using an application installer:

  • The process can easily add or remove data from the registry and .INI files.
    It has become standard practice for me to add entries into Max’s plugin.ini file for every in-house script I create. Specifically I add new key values into the [help] section that point to documentation for the script. This way the user only has to go to Max’s Help\Additional Help menu to find information on any script they have installed.
  • The installer can be branded with corporate logos.
    This might not seem like much, but if you are releasing your scripts either professionally or for free any branding will help people remember you and the work you’ve done.
  • The installer logic allows for user input.
    You can put many different scripts into one installer package and then present the user with an options dialog that lets them choose which scripts they would like to install. Every quarter I take all of the scripts I’ve released internally over the previous three months and add those to our base art tool install package. The process is very quick and the resulting code is easy to maintain. By doing this new artists and IT personnel outfitting new machines don’t have to hunt around for all of the necessary art tools. One installer contains all of the scripts, tools, plug-ins, etc… they will need to accomplish their job.
Continued in attached PDF file below
Creating Installers for MAXScripts.pdf372.5 KB
Creation Application Installers for MaxScripts.zip162.06 KB