Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

The IDL Virtual Machine


The IDL Virtual Machine is designed to provide IDL users with a simple, no-cost method for distributing IDL applications. It runs on all IDL supported platforms, and does not require a license to run. This utility allows you to easily distribute IDL .sav files to your colleagues or your customers, without requiring them to own an IDL runtime license.

Beginning with IDL 6.0, the IDL Virtual Machine is included with all IDL distributions. During installation, you can choose to install just the IDL Virtual Machine or a full installation of IDL (which includes the IDL Virtual Machine). For the benefit of developers who need to debug applications designed to run in this environment, the IDL Virtual Machine can be started explicitly. Otherwise, if a .sav file program is run without an IDL license, IDL defaults to the IDL Virtual Machine mode.

To distribute an application for the IDL Virtual Machine, follow these steps:

  1. Provide your users with instructions for installing the IDL Virtual Machine. See the Installing and Licensing IDL 6.1 manual.
  2. Provide your users with instructions for running your IDL application in the IDL Virtual Machine. See Running a .sav File in the IDL Virtual Machine.
  3. Distribute your application.

Limitations of Applications that Run
in the IDL Virtual Machine

The IDL Virtual Machine will run a compiled IDL .sav file even if no IDL license is present. RSI's aim with the IDL Virtual Machine is to facilitate IDL code collaboration and application distribution. However, a few restrictions exist:

Note
The IDL Virtual Machine installation program does not install the IDL DataMiner, IDLffDicomEX feature, IDL-Java bridge, or high resolution maps. If your application uses any of these features, users must install the full version of IDL (including the desired optional features) rather than the default IDL Virtual Machine installation. Although an IDL license will not be required to run in IDL Virtual Machine mode, certain features may require a special license.

Building an Application that Runs
in the IDL Virtual Machine

An IDL program compiled in IDL 6.0 or later that does not use the EXECUTE function can be saved as a .sav file that will run in the IDL Virtual Machine. If a program is to be run in the IDL Virtual Machine, it is not necessary to include an IDL distribution with the .sav file because IDL Virtual Machine is installed on the user's machine. The .sav file need only include your own code, creating a smaller file that is easier to distribute.

To create .sav files to run in the IDL Virtual Machine, do one of the following:

Note
Creating .sav files of object-oriented programs requires the use of RESOLVE_ALL with the CLASS keyword.

Version Compatibility of .sav Files

The IDL Virtual Machine will execute IDL routines stored in .sav files created with IDL version 6.0 and later. Any .sav files created with previous versions of IDL must be recompiled using IDL 6.0 or later for them to run with the Virtual Machine.

Running a .sav File in the IDL Virtual Machine

Note
When a .sav file is executed in the IDL Virtual Machine, the current working directory will be the directory that contains the .sav file.

How you run a .sav file in the IDL Virtual Machine depends on your operating system:

Windows

Windows users can drag and drop the .sav file onto the IDL Virtual Machine desktop icon, launch the IDL Virtual Machine and open the .sav file, or launch the.sav file in the IDL Virtual Machine from the command line.

To use drag and drop:

  1. Locate and select the .sav file in Windows Explorer.
  2. Drag the file icon from the Windows Explorer list and drop it onto the IDL Virtual Machine 6.1 icon that has been created for you on the desktop.
  3. Click anywhere in the window to dismiss the IDL Virtual Machine splash screen and run the .sav file.

To open a .sav file from the IDL Virtual Machine:

  1. Do either of the following to launch the IDL Virtual Machine and display the IDL Virtual Machine window:
    • Select Start ® Programs ® RSI IDL 6.1 ® IDL Virtual Machine or Start ® Programs ® RSI IDL Virtual Machine 6.1 ® IDL
    • Double-click the IDL Virtual Machine 6.1 desktop icon.
  2. Click anywhere in the window to dismiss the IDL Virtual Machine splash screen and display the file selection menu.
  3. Locate and select the .sav file, and double-click or click Open to run it.

To run a .sav file from the command line prompt:

  1. Open a command line prompt. Select Run from the Start menu, and enter cmd.
  2. Change directories to the RSI-DIR\bin\bin.x86 directory
  3. Enter the following at the command line prompt:
  4. idlrt -vm=<path><filename> 
    

    where <path> is the path to the .sav file, and <filename> is the name of the .sav file. If you omit the path and filename (leaving only the -vm flag), IDL will open a file selection dialog allowing you to select the .sav file.

    Note
    If a license is available on the machine running the .sav file, double-clicking the .sav file will run it in the licensed version of IDL. To force the .sav file to run in the Virtual Machine, either drag and drop the .sav file on the IDL Virtual Machine icon or run it from the command line with the -vm argument.

UNIX and Mac OS X

UNIX and Mac OS X users must launch the IDL Virtual Machine from the UNIX command line.

To run a .sav file in the IDL Virtual Machine:

  1. Enter the following at the UNIX command line:
  2. idl -vm=<path><filename>.sav 
    

    where <path> is the complete path to the .sav file and <filename> is the name of the .sav file. The IDL Virtual Machine window is displayed.

  3. Click anywhere in the window to dismiss the IDL Virtual Machine splash screen and run the .sav file.

To launch the IDL Virtual Machine and use the file selection menu to locate the .sav file to run:

  1. Enter the following at the UNIX command line:
  2. idl -vm 
    

    The IDL Virtual Machine window is displayed.

  3. Click anywhere in the IDL Virtual Machine window to dismiss the IDL Virtual Machine splash screen and display the file selection menu.
  4. Locate and select the .sav file, and click Open.

Example

To distribute the example IDL application as a .sav file to be run in the IDL Virtual Machine:

  1. Build the application and create the myApp.sav file. See Example Native IDL Application.
  2. Distribute the myApp.sav file to your users, providing instructions for them to install the IDL Virtual Machine and run myApp.sav in the Virtual Machine.


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]