Creating a Callable IDL Application Distribution
This section discusses the process of creating an application distribution that includes the files necessary to run IDL, allowing you to distribute your application to users who do not already have IDL installed.
First, see Creating an Application Distribution for information on creating an IDL application distribution. The steps you will take after creating the IDL runtime distribution depend on the platform on which your Callable IDL application will run.
Windows
Once you have created an IDL runtime distribution, you must do the following:
- Add your Callable IDL application executables to the
bin/bin.platformsubdirectory of the distribution whereplatformis the name of the platform for which you created the application. - If your application uses preferences, edit the
resource/pref/idl.preffile to contain the correct preference values. - If you are using the launch script generated by the MAKE_RT procedure, modify the launcher's
.inifile to invoke your Callable IDL application rather than theidlrt.exeexecutable. Alternately, you can simply provide instructions detailing how to execute your Callable IDL executable file.
UNIX
Once you have created an IDL runtime distribution, you must do the following:
- Add your Callable IDL application executables to the
bin.platform directory, where platform is the name of the platform for which you created the application. If you are distributing your application on multiple platforms, copy the executable for each platform to the correspondingbin.platform directory. Placing your executables in thebin.platform directory offers a couple of advantages: - It simplifies application startup, especially if your application is distributed for multiple platforms. The application startup script calls a script in the
bindirectory. This script is designed to start the correct executable, depending on the platform on which it is being executed. This allows the user to start the application on any platform by simply executing the startup script in the top-level directory, thereby saving the user from having to know the directory in which the executable is located. - It saves the user, or your installation script, from having to set the LD_LIBRARY_PATH environment variable because sharable libraries are located in the
bin.platform directory. - Rename the
idlscript. Theidlscript is located in thebindirectory of your distribution. For Callable IDL applications, this script must use the same name as your application executable in thebin.platform directory. For example, if your application executable in thebin.platform directory is calledmyapp, rename theidlscript in thebindirectory tomyapp. - Edit the startup script. In the top-level directory of your application distribution, there is a startup script with the name specified by the
startcommandparameter you specified when you ran themake_rtscript. Make the following changes to this script: - Edit the startup script to execute the script in the
bindirectory that you renamed in the previous step. For example, if your application executable in thebin.platform directory is calledmyapp, and you therefore renamed theidlscript in thebindirectory tomyapp, you would edit the startup script in the top-level directory as follows: - In order to allow your application to find the correct executable (either IDL or a Callable IDL executable), the IDL_DIR environment variable must be set on the user's machine to point to the top-level directory of your application. Because this location is not known until the user installs your application, IDL_DIR must be set by either an installation script or by the user.
- If your application uses preferences, edit the
resource/pref/idl.preffile to contain the correct preference values.
./bin/myappNote
The above command requires the user to execute the startup script from the top-level directory of your application distribution. To allow the user to launch your application from a different directory, the user (or your installation script) could change the command to use the full path to the script in thebindirectory. See the example after the following step.
If there are other ITT Visual Information Solutions products installed on the user's machine, IDL_DIR may already be set. For this reason, IDL_DIR should be set for the instance of the shell that will be used to start your application, but should not be set in the user's login scripts such as .cshrc or .profile. This allows IDL_DIR to be set properly for your application, without conflicting with the IDL_DIR setting for other products the user may have installed.
The most convenient way to set IDL_DIR on the user's machine is to have your installation script (or the user) edit the startup script. This saves the user from having to manually set IDL_DIR prior to launching your application. You can either provide the user with instructions on adding the necessary commands to the startup script, or you can have your installation script modify the startup script. For example, if an application called myapp is installed in the /home/apps directory, your startup script would resemble the following:
IDL_DIR=/home/apps export IDL_DIR /home/apps/bin/myappIf you do not modify the startup script, the user must set IDL_DIR at the command prompt prior to launching your application. For example, if your application is installed in the user's
setenv IDL_DIR /home/myapp/home/myappdirectory, the user could execute the following command at the C shell prompt: