Environment > Distributing IDL Applications > Creating a Runtime Distribution > Creating a Distribution Using MAKE_RT

# Creating a Distribution Using MAKE_RT

The MAKE_RT procedure creates an IDL distribution for one or more target platforms.

Note: You do not need to create a SAVE file in order to use MAKE_RT, but application launch scripts will only be created if a SAVE file is included.

To create a runtime distribution for your application, you will do the following:

1. Collect Required Information
2. Modify or Create a Manifest File
3. Run the MAKE_RT Procedure
4. Add Required Files to Your Distribution
5. Modify the Launch Scripts

## Collect Required Information

Before using the MAKE_RT procedure to create a runtime distribution, you will need to collect the following information and make several decisions about how your application will run. You will need to:

- Choose a name for your runtime application. The application name will be used as the name of the directory that contains the runtime distribution, and will be used as the base name for any launch scripts created by MAKE_RT.
- Know the full path to the output directory where your distribution will be created. This directory must exist and you must have the appropriate permissions to write files into it. A directory with the same name as your application will be created in the output directory.
- Know the full path to the SAVE file that contains your application code, if one exists. If you specify a SAVE file, launch scripts will be created to run the application it contains.
- Decide which platforms you want your application to run on. You must have access to an installed IDL distribution for every platform you want to include in your runtime distribution. (Note that you do not need to have licenses for all of the platforms; an installed distribution is all that is required.)
- Decide whether your application should use an IDL license, if one is available. By default, MAKE_RT will create launch scripts that will use an IDL license if one is present; if no license is present, the application will run in the IDL Virtual Machine. If you want to ensure that your application runs in the Virtual Machine even if an IDL license is available, specify the VM keyword to the MAKE_RT procedure.
- Know the full path to your custom manifest file, if you are using one. Manifest files are described in the following section.

## Modify or Create a Manifest File

The default manifest file, `IDL_DIR/bin/make_rt/manifest_rt.txt` (where `IDL_DIR` is the IDL installation directory) contains entries for all of the files necessary to create a runtime IDL distribution for all supported platforms. In most cases, you can use the `manifest_rt.txt` file without modification, and the MAKE_RT procedure will select the appropriate files to build the distribution you specify.

In some cases, however, you may need to modify or add to the list of files contained in manifest_rt.txt.

## Run the MAKE_RT Procedure

Run the MAKE_RT procedure to create the runtime distribution.

### Creating Mixed UNIX/Windows Distributions

The MAKE_RT procedure allows you to create a single runtime distribution that supports multiple platforms. In order to created a mixed-platform distribution, MAKE_RT must have access to an IDL installation directory that contains all of the required files.

On UNIX platforms (Solaris, Macintosh OS X, and Linux), a single installation directory can contain files for multiple operating systems. If you are running IDL on a UNIX platform and wish to create a runtime distribution for one or more UNIX platforms (but not Microsoft Windows), MAKE_RT can create the distribution in a single operation. On Microsoft Windows platforms, an IDL installation directory can only contain Windows files.

If you want to create a runtime distribution that includes both Microsoft Windows and one or more UNIX platforms, you will need to run the MAKE_RT procedure at least twice: once to create the Windows distribution and one or more additional times to create distributions for the UNIX platforms. You can use the same target directory for all invocations of MAKE_RT; any files that are duplicated in the selected platforms’ distributions will be quietly overwritten.

For example, suppose you want to create a runtime distribution that supports 32-bit Windows, Macintosh OS X, 64-bit Solaris, and both 32- and 64-bit Linux. IDL is installed on the Windows machine, on the Macintosh machine, and in a shared location for the Linux and Solaris machines. The process of creating a mixed runtime distribution would look something like this:

1. On the Windows machine, run IDL and give the following command:

       MAKE_RT, 'myApp', Outdir, SAVEFILE=sfile

   where `Outdir` is a directory on a network drive that is accessible to all systems, and `sfile` is the full path to the IDL SAVE file that comprises your application.

2. On the Macintosh, run IDL and give the following command:

       MAKE_RT, 'myApp', Outdir, SAVEFILE=sfile

   where `Outdir` is a directory on a network drive that is accessible to all systems, and `sfile` is the full path to the IDL SAVE file that comprises your application.

   Note: Although your SAVE file has already been copied to the `application` directory, you must include the SAVEFILE keyword to MAKE_RT again here in order to create the Macintosh launch scripts for the application.

3. On either a Linux or a Solaris machine, run IDL and give the following command:

       MAKE_RT, 'myApp', Outdir, SAVEFILE=sfile, /LIN32, /LIN64, /SUN64

   where `Outdir` is a directory on a network drive that is accessible to all systems, and `sfile` is the full path to the IDL SAVE file that comprises your application.

   Note: Again, you must include the SAVEFILE keyword to MAKE_RT here in order to create the UNIX launch script for the application.

## Add Required Files to Your Distribution

After you have created a distribution using MAKE_RT, any files that are not part of the IDL distribution, as well as any required IDL files that you did not add to the manifest, must be manually copied to your distribution. Do the following:

1. If your application requires any data files that are not in the IDL distribution, including ASCII, binary, or image files, add them to your distribution.
2. If your application includes more than one SAVE file, add the files to the distribution.
3. If your application includes help files or other documentation, add the files to the distribution.

See Creating SAVE Files of Programs and Data for more information.

## Modify the Launch Scripts

The MAKE_RT procedure will generate launch scripts for each of the platforms supported by your runtime distribution. The launch scripts are named with the string specified as the Appname argument to MAKE_RT, and several values within the launch scripts are modified.

If you specify a value for the SAVEFILE keyword, the launch scripts will automatically invoke the application contained in the SAVE file. If the SAVEFILE keyword is not present, the launch scripts will simply launch IDL in runtime or virtual machine mode, which presents a file selection dialog allowing the end-user to select a SAVE file to restore and execute.

Note: The launch scripts will work without any modification, but you may want to customize them.

The launch scripts are described in detail in Runtime Application Launch Scripts. That section describes some additional modifications you may want to make.

### Windows

The launch script for Windows platforms is named `Appname.exe`, where `Appname` is the value of the Appname argument to MAKE_RT. The launch script is configured via an initialization file named `Appname.ini`. You may want edit `Appname.ini` to modify the text used in the application launch dialog.

If your application runs on both 32- and 64-bit IDL, you may want to create separate buttons to launch the different versions.

See Distributing Runtime Applications on Removable Media for more information.

### Macintosh

The launch script for Macintosh platforms is an AppleScript named `Appname.app`, where `Appname` is the value of the Appname argument to MAKE_RT.

### Linux/Solaris

The launch script for Linux and Solaris platforms is a shell script named `Appname`, where `Appname` is the value of the Appname argument to MAKE_RT.

## See Also

Distributing Runtime Applications on Removable Media