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:
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:
.sav files must be created using IDL version 6.0 or later.
| Note |
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:
.sav files from one or more compiled .pro files with the SAVE procedure. For instructions, seeUsing SAVE and RESTORE. Refer to Saving Compiled IDL Programs and Data for details, and refer to SAVE..sav files from a project by selecting Project ® Export with the Save File (.sav) option specified. For instructions, see Using Project ® Export, and refer to Creating IDL Projects for details.make_rt script. For instructions, see Using the make_rt Script (UNIX only).
| Note |
.sav files of object-oriented programs requires the use of RESOLVE_ALL with the CLASS keyword.
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.
| Note |
.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 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:
To open a .sav file from the IDL Virtual Machine:
To run a .sav file from the command line prompt:
cmd.\bin\bin.x86 directoryidlrt -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 |
.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 users must launch the IDL Virtual Machine from the UNIX command line.
To run a .sav file in the IDL Virtual Machine:
idl -vm=<path><filename>.savwhere
<path>is the complete path to the.savfile and<filename>is the name of the.savfile. The IDL Virtual Machine window is displayed.
.sav file.
To launch the IDL Virtual Machine and use the file selection menu to locate the .sav file to run:
To distribute the example IDL application as a .sav file to be run in the IDL Virtual Machine:
myApp.sav file. See Example Native IDL Application.myApp.sav file to your users, providing instructions for them to install the IDL Virtual Machine and run myApp.sav in the Virtual Machine.