Resources

The Script Files dialog allows you to add or remove Indigo Rose, or custom created script files (*.lua) to or from your project. The Lua script within these files will be read and included in your install at build time. This enables any code within them to be called anywhere during your install.

This feature allows you to share generic script files that are used by many projects without having to copy the code into the project each time. This also adds the convenience of maintaining the code in one file if future changes need to be made.

To access the Script Files dialog, choose Resources > Script Files... from the program menu.

Each script file that is provided by Indigo Rose contains a summary of its contents at the top of the file which can be viewed in any text editor, such as Notepad. For example, at the beginning of the Detect_Acrobat.lua script file, you will see the following information:

--[[
**********************************************************************************
Function: ir_GetAcrobatVersion()
Purpose: Detects the existence of Adobe Acrobat Reader / Adobe Acrobat
Arguments: None.
Returns: Version number, 0.0.0.0 if Acrobat / Acrobat Reader does not exist
**********************************************************************************
]]

This script file, like many others contains a function that can be called anywhere in your install. To call it, simply add a line in one of the action scripts that calls the function ir_GetAcrobatVersion(), which in this case will return the version number of Adobe Acrobat.

 

For example, if you wanted to abort the install if the user's version of Acrobat is less than 5.0.0.0, the following script could be added to any action event in your project:

-- Get the version of Acrobat that is installed.
strAcroVer = ir_GetAcrobatVersion();

-- Compare the version number from Acrobat with "5.0.0.0" and check if it is less than 5.0.0.0.
if (String.CompareFileVersions(strAcroVer, "5.0.0.0") == -1) then
    -- Exit the setup.   
    Application.Exit(0);
end

 

 


Filename

The full path and filenames of the script files that will be added to your install at build time.

Note: Setup Factory may automatically include script files needed by its runtime. One example of a script file that will automatically be added to your project is called _SUF70_Global_Functions.lua. If this is the case, they should not be modified unless you are sure the project does not require it. Under normal circumstances you should never remove script files you did not add yourself.

Build Configurations

The build configurations that each script file belongs to.

Add

Opens the Global Script File Properties dialog where you can add a new script file to your project. There are a variety of Indigo Rose created script files that are shipped with Setup Factory. All available script files can be found in the Scripts folder, normally located in C:\Program Files\Setup Factory 9\Includes\Scripts. An example of a file that can be found there is Detect_Acrobat.lua.

Remove

Removes the currently selected script file from your project.

Note: Caution should be taken when removing script files. Only custom script files should be removed from a project.

Edit

Opens the Global Script File Properties dialog where you can edit the properties of the currently selected script file. These properties include its file path and build configurations.

Up ( )

Move the selected script file up one position in the script file list.

Down ( )

Move the selected script file down one position in the script file list.

Edit Script(s)

Opens the selected script file(s) in the Indigo Rose Script Editor application where you can edit its contents.