Environment > Distributing IDL Applications > Runtime Mode Applications > Licensing Options

# Licensing Options for Runtime Mode Applications

When you have an application that uses IDL and you want to distribute it to users who do not have an IDL development license, you have the following choices:

- Ask your users to install the free IDL Virtual Machine and run your application in the Virtual Machine.
- Purchase a runtime or embedded license from IDL that enables you to bundle IDL with your application.
- If your end user has an existing runtime license for another application, your application can run using that license.

## Free Runtime License (IDL Virtual Machine)

The IDL Virtual Machine is a runtime version of IDL that can execute IDL SAVE files without an IDL license. Users install the IDL Virtual Machine with the IDL Installer available on an IDL distribution CD-ROM or from the IDL download Web site.

## Purchased Runtime and Embedded Licenses

You can purchase runtime mode licenses from IDL. Runtime mode licenses provide a way for you to include a licensed IDL installation with your IDL application or Callable IDL application. There are two types of runtime mode licenses available: runtime and embedded.

When you distribute a licensed version of IDL with your application, you provide your users with IDL functionality, but do not provide access to the IDL command line, the IDL Workbench, or the ability to compile IDL .pro files. Runtime and embedded licenses are appropriate for:

- Vertical-market packages developed in IDL but which appear to the user as stand-alone applications
- Software designed for use by operators or technicians who do not need programmatic access to IDL’s full range of analytical tools
- Situations in which the you do not want end users to be able to modify functions written in the IDL language
- Organizations with existing investments in IDL code, where some mixture of distributable and development IDL licenses may be cost-effective

If your users need access to the full scope of IDL’s features or advanced analytical tools outside the scope of your application, you might choose to distribute your application with an IDL development license. Contact your sales representative to purchase copies that you can distribute.

### Runtime Licensing

A runtime license allows you to run an IDL application that cannot display the IDL Workbench or IDL command line and which cannot compile `.pro` files. This type of licensing offers developers who have smaller customer bases the opportunity to buy single distribution licenses as they are needed, paying a small fee for each license. The license is either a node-locked license tied to the specific machine on which your application will run (which means you will need to obtain information about your customer’s machine), or a more costly but less restricted floating license that will run on any machine.

building\distrib_idl.fm, building\distrib_callable.fm, building\distrib_activex.fm

When using runtime licensing, you can distribute licenses to your users in two ways:

- If you wish to distribute a licensed application to each customer, you can perform the necessary licensing steps for each license you purchase and distribute a ready-to-run application to each customer. This saves your customers from having to perform the licensing themselves, but forces you to create separate distributions for each customer.
- If you would rather create a single unlicensed distribution that you can distribute to all your customers, you can purchase a license for each customer and provide that license along with the information necessary for the customer to license your application.

#### Ensuring That Your License is Used

To ensure that your application will run with your runtime license and not in the IDL Virtual Machine, add code similar to the following to your application before preparing your application distribution:

isVM = LMGR(/VM)

IF isVM THEN BEGIN

void = DIALOG_MESSAGE(['Please contact the author', $

'for licensing instructions'])

RETURN

ENDIF

#### Obtaining and Installing Runtime Licenses

Runtime applications are licensed using either node-locked licenses or floating single-user licenses. Node-locked licenses are tied to the specific computer on which the application will run, while floating licenses will run on any computer.

To license your runtime application, do the following:

1. Get information about the specific computer on which your application will run. The process for retrieving the required information depends on the end user’s operating system, as described below.
2. Send this information to Exelis VIS. We will generate a license file and send it to you.
3. Install the license file in a license subdirectory in your application’s distribution, or provide instructions to your end user describing how to install the license file.

#### Custom Features

You can request that your own custom feature license be added to your runtime license. Using a custom feature license allows you to specify that your application will only run if the custom feature license is present. Contact your Exelis VIS sales representative for information on adding custom features to your runtime license.

#### Obtaining a Windows License

To obtain the information needed to generate a node-locked license file, your end user must run the application `lmtools.exe` on the machine for which your application will be licensed. If your end user has already installed an unlicensed copy of your application, he or she will have access to the `lmtools.exe` application. Otherwise, you will need to provide the end user with a copy of the lmtools.exe file, which can be found in the `bin/bin.platform` directory of your IDL distribution.

Provide your end user with the following instructions:

1. For `lmtools.exe` to retrieve the correct information, your system must have a properly-configured network interface card installed.
2. Run the `lmtools.exe` application. The Lmtools dialog appears.
3. Select the System Settings tab.
4. Click the Save HOSTID Info to a File button, then save the information to your desktop with the file name `hostid.txt`.
5. Send the `hostid.txt` file saved in the previous step to your application vendor.

When your end user has provided you with the information obtained by lmtools.exe, email this information to register@exelisvis.com or fax the information to Exelis VIS at (303) 786-9909. If you did not purchase IDL directly from Exelis VIS, send the file to your local distributor.

We will then send you a license file called `license.dat`.

#### Obtaining a UNIX License

To obtain the information needed to generate a node-locked license file, your end user must run the application lmhostid on the machine for which your application will be licensed. If your end user has already installed a copy of IDL, he or she will have access to lmhostid application.

If your end user does not already have an IDL installation, you can provide a copy of the lmhostid file, located in the `bin/bin.platform` directory of your IDL distribution where `platform` is the platform-specific `bin` directory. Note that you must provide the executable for the platform on which your end user will run IDL.

Provide the end user with the following instructions:

1. Execute the command lmhostid. If the user has an IDL installation, the `lmhostid` file can be found in the `bin` subdirectory of that installation. Text similar to the following will be displayed:

    The FLEXlm host ID of this machine is "80598a67"

2. Provide the host ID returned by `lmhostid`, along with the hostname of the machine to your application vendor. (To obtain the hostname, enter the command hostname.)

When your end user has provided you with the information returned by lmhostid and the hostname of the machine, e-mail this information to register@exelisvis.com or fax the information to Exelis VIS at (303) 786-9909. If you did not purchase IDL directly from Exelis VIS, send the file to your local distributor.

We will then send you a license file called `license.dat`.

#### Installing the License File

Once you have received a `license.dat` file from Exelis VIS, you must ensure that it is installed in a `license` subdirectory in your application’s distribution. You can either:

- Create a custom distribution for each individual end user by placing the `license.dat` file in the `license` subdirectory of your application’s distribution tree prior to packaging it for the end user. Your end user will not need to perform any licensing steps manually. This is a good solution if you have a small number of end users.
- Create a single unlicensed distribution that you provide to all your end users along with instructions to place the `license.dat` file you provide separately in the license subdirectory. This is a good solution if you have a relatively large number of end users, since it removes the need to create a custom distribution for each end user.

#### IDL_LMGRD_LICENSE_FILE and LM_LICENSE_FILE Environment Variables

By default, when your application runs, IDL searches for a directory named `license` that contains a file named `license.dat`. It will use the first valid license it encounters; if no licences are found, the application will either run in unlicensed mode or exit.

If the end user has defined either the IDL_LMGRD_LICENSE_FILE or the LM_LICENSE_FILE environment variable, IDL will check only the license files specified by the environment variable. This means that if the end user has defined either the IDL_LMGRD_LICENSE_FILE or the LM_LICENSE_FILE environment variable for any reason, IDL might not find your application’s license file even if it is placed correctly in a license subdirectory of your distribution.

### Embedded Licensing

An embedded license allows your application to run without an IDL license. It can be distributed to multiple users and will run on any system supported by IDL. Licensing an IDL application with an embedded license is the simplest form of licensing.

To create applications with embedded licenses, you must purchase a special IDL Developer’s Kit license from Exelis VIS. The Developer’s Kit license gives your copy of IDL the ability to automatically embed a license in your application’s SAVE file. See Creating an Application Distribution for information on embedding the license information in your application’s SAVE file.

Note: Licenses for Callable IDL applications are embedded directly in the application code.

#### Optional Embedded Features

When you purchase an IDL Developer’s Kit license from Exelis VIS, you can request that one or more optional features be included in the license. Optional feature licenses control access to additional-cost IDL modules, such as the IDL DICOM toolkit or the IDL DataMiner.

When your application attempts to use an additional-cost IDL module, IDL first checks to see if a license for the module is included in your application’s embedded license. If no license for the module is included in the embedded license, IDL will check any `license.dat` files located in `license` directories in its search path, or in files specified by the LM_LICENSE_FILE environment variable. If no license for the module is available, attempts to use that module’s features will not succeed.