Creating Script Libraries (.obl Files)
InstallShield 2020
InstallScript’s built-in functions are defined in library files (.obl files) to which a script is linked when the script is compiled.
To create a library file for functions that you have defined:
1. | Create one or more .rul files containing the definitions of your functions. |
2. | At the command line, for each of your .rul files, run Compile.exe with the -c switch to compile the file without linking it to any existing library file. This will create an .obs file (rather than the .inx file that is created by compiling without the -c switch). For example, enter the following command line to create the file MyFunc.obs in the current folder. |
Compile MyFunc.rul -c
To create an .obs file with a different name or location, use the -o switch.
3. | Run Compile.exe with the -l switch, and one or more .obs files as parameters, to create the library file. For example, enter the following command line to create the file MyFunc.obl in the current folder. |
Compile MyFunc.obs -l
Entering the following command line creates the file MyFunc1.obl in the current folder.
Compile MyFunc1.obs MyFunc2.obs -l
To create an .obs file with a different name or location, use the -o switch.
Tip:If you have many .obs files, you can shorten the command line by using a command file as in the following example:
Compile @MyObsFiles.txt -l
To quickly create the command file, you can use the MS-DOS command DIR with its /b (bare format) switch and redirect the output to a file. For example:
DIR *.obs /b > MyObsFiles.txt
To compile an installation script using your library file, specify the library file on the command line or—when compiling within InstallShield—on the Compile/Link Tab of the Settings dialog box.
See Also