mm_ScriptInstaller v1.00
*** Important Requirements for Windows users: This script require access to python libraries that are not shipped by default with Modo in Windows. You will need to install a full distribution of Python 2.4.3 (not Python 2.5) such as the one from ActiveState ***
Zip Contains: mm_ScriptInstaller.py
*********************************************************************************
Note: this is a utility script for the installation of script archives (zip files) that have been specifically
set up by their authors to use it. End users should not use it with any (script) zip file that has not been
certified as compatible by it's author. End user instructions are
here.
*********************************************************************************
What is it?
Utility script to install Modo scripts to the correct locations. Extracts and copies all current script types (Perl, Python, LUA) and config files from a zip archive and copies them to the user's script and configs directories. Compatible with both the default and custom scripts/configs locations.
Script Developer Usage:
Pretty straight forward, your end user runs this script from inside Modo using F6 - ie it can be run from anywhere, it doesn't have to be installed to the scripts directory first.
First it will pop up a dialog asking the user if they want to install to the Modo default user location or to a custom location. If the user chooses default, the script will use the default Modo user directory for their particular platform. IE the basepath will be the directory which contains the main user config file and the user scripts and configs directories. If the user clicks 'no' to default, a directory dialog will be displayed with which they can choose a custom basepath. This should be the directory that contains their custom user scripts and configs directories.
Next, a file dialog will displayed for them to choose the zip archive containing the files to be installed. On selecting the zip file and clicking 'ok', the contents of the zip will be extracted and saved to chosen locations.
Creating a Zip Archive:
The best way to set up the zip archive would be to create a holding directory, then create a 'Scripts directory and a 'Configs' (if there are any associated config files) inside that. Copy the script files into the scripts dir and any configs into the configs dir. Select the Scripts and Configs (if there is one) directories and create a zip from them. For distribution, you can then place this script along with the zip archive and any documetation for your script into a containing archive.
The script will, in fact, support the incusion and extraction of any kind of file type and the creation of any directory/file path under the base directory. So, for example, if you wanted to create a thumbnails directory containg graphics in the user directory, user configs directory or user scripts directory you would just create it at the appropriate level and add your thumbnails etc. before zipping it all up. EG:
Scripts
myScript.py
Configs
myScriptConfig.cfg
Thumbs
thumb01.png
thumb02.png
or
Scripts
Thumbs
thumb01.png
thumb02.png
myScript.py
Configs
myScriptConfig.cfg
End User Instructions:
If you have downloaded a script that has been set up to use mm_ScriptInstaller you will find a copy of mm_ScriptInstaller.py along with a zip archive containing the script files that need to be installed. Do Not unzip this archive (unless you wish to install the files manually). Instead, open Modo and prss 'F6' to open the 'Select Script to Run' dialog. Navigate to wherever you have saved the mm_ScriptInstaller script* and the zip archive. Select the mm_ScriptInstaller file and click OK/Open.
You should now be presented with a dialog asking you if you would like to install the script files to the deafult location. If you are using custom scripts and configs directories and wish to install to these you should click 'no' otherwise click 'yes'
If you are installing to a custom location and clicked 'no' in the previous dialog you will be presented with a Directory dialog to find the custom location. This should be the directory that contains the custom scripts and configs directories.
The next dialog will ask you to locate the installation zip archive that you received with mm_ScriptInstaller. Click OK/Open to install the script files.
*Note: You will probably have downloaded the script you want to install as a zip or other form of archive that contains the mm_ScriptInstaller.py file and the zip containing the script files, so you will need to extract that archive first.