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

Distributing Your Application on a CD


Under Microsoft Windows, you can allow your users to run your IDL Virtual Machine application directly from a CD-ROM that you create. This allows users with Windows machines to run your application without needing to install IDL.

To create a CD-ROM containing the IDL Virtual Machine distribution and your application files, you will do the following:

Note
You can distribute multiple IDL Virtual Machine applications on a single CD-ROM.

Note
Additional installation steps are required to configure the IDL DataMiner, IDLffDicomEX feature, and IDL-Java bridge. Applications that use these features cannot be distributed on a CD-ROM as described in this section.

Create a CD-ROM Image Directory

Begin by creating a CD-ROM image directory on your hard drive. This directory will serve as the root directory of the CD-ROM you create, and will contain both the IDL Virtual Machine distribution and your application files.

Copy the IDL Virtual Machine Distribution

Insert the IDL for Windows Installation CD-ROM in your CD-ROM drive, and copy the entire

X:\setup\x86\RSI\IDL61 

directory (where X: is the drive letter of your CD-ROM drive) into your CD-ROM image directory.

Copy and Rename the idlvm.exe File

Copy the file

X:\setup\x86\RSI\idlvm.exe 

(where X: is the drive letter of your CD-ROM drive) into your CD-ROM image directory. If you want, rename idlvm.exe to reflect the name of your application. For example, if your application is named "HydroPlot," you could rename the idlvm.exe file as hydroplot.exe.

Warning
If you rename idlvm.exe, be sure to retain the .exe extension.

Copy and Rename the idlvm.ini File

When the user loads your CD-ROM and clicks on the executable file (idlvm.exe or whatever you have renamed it), the executable searches for and reads a .ini file with the same base name as the executable. If you renamed idlvm.exe, you will also need to rename the .ini file with the same base name. For example, if you renamed idlvm.exe as hydroplot.exe, you would rename idlvm.ini as hydroplot.ini.

Copy the file

X:\setup\x86\RSI\idlvm.ini 

(where X: is the drive letter of your CD-ROM drive) into your CD-ROM image directory. Rename the .ini file to match the name of the executable file, if you have changed it from idlvm.exe.

Copy your Application Files

Copy your application files into your CD-ROM image directory. While you can copy the files anywhere in the directory hierarchy on the CD-ROM, you might want to create an application directory to contain your files. This can be especially convenient if you are delivering multiple applications on a single CD-ROM.

Modify the idlvm.ini File

The .ini file (idlvm.ini or whatever you have renamed it) specifies what will happen when the user runs the .exe file. You must modify this file to launch your application. See Format of the .ini File for a complete description of the .ini file.

Copy and Modify the autorun.inf File

If you want your application to launch automatically when the user inserts your CD-ROM, you must modify the autorun.inf file. The autorun.inf file contains the following lines:

[autorun] 
open = idlvm.exe 
icon = idl.ico 

If you want your application to launch automatically when the user inserts the CD-ROM, copy the file

X:\setup\x86\RSI\autorun.inf 

(where X: is the drive letter of your CD-ROM drive) into your CD-ROM image directory and modify the

open = idlvm.exe 

line to reflect the name of the executable file you want to launch automatically. For example, if you renamed idlvm.exe to hydroplot.exe, change the line to read:

open = hydroplot.exe 

If your executable file displays a dialog, you might want to modify the

icon = idl.ico 

line to specify an icon that will be displayed in the Windows task bar. If you specify an icon file in your autorun.inf file, you must ensure that the icon file is included in the root directory of your CD-ROM.

Remove the reg.dat File

When IDL for Windows runs, it creates a hidden file named reg.dat in the bin/bin.x86 subdirectory of the IDL distribution. This file contains information used by IDL to locate entries in the Windows registry. If you have tested your CD-ROM image directory by running your IDL Virtual Machine application, the bin/bin.x86 subdirectory of the IDL distribution will contain a reg.dat file.

Warning
You must remove this file before you create your CD-ROM. Including this file in the distribution you send to users may cause errors when IDL attempts to locate registry entries in the location specified by the reg.dat file.

Since reg.dat is a hidden file, you may need to select the options appropriate for your Windows version in Windows Explorer to see it.

Create and Test the CD-ROM

Use your CD-ROM creation software to create a CD-ROM from the contents of the CD-ROM image directory. To test the CD-ROM - specifically to determine whether your application will run from the IDL Virtual Machine distribution on the disk - you might want to do the following:

  1. Exit IDL, if it is running.
  2. Change the name of the IDL directory so that IDL will not be found on your hard drive. For example, change the name of the IDL 6.1 directory to IDL61_x. Windows might warn you that changing the directory name may cause some programs not to function correctly; click Yes to accept the change.
  3. Insert your CD-ROM and test your application.
  4. After testing your application, rename your IDL directory to IDL61.

Format of the .ini File

The idlvm.exe file can either run a single application immediately or display a dialog with up to four buttons, each of which invokes a different application. The configuration of the dialog (including whether or not it is displayed at all) is controlled by the .ini file (idlvm.ini or whatever you have renamed it).

The .ini file contains five sections, one labelled [DIALOG] and four labelled [BUTTONn] (where n is a number between 1 and 4). The contents of each type of section are described below.

DIALOG Section
[DIALOG] 
Show=False 
BackColor=&H6B1F29 
Caption=<any string> 
Picture=.\splash.bmp 
DefaultAction=<path to application> 
Show

This field can contain the string True or the string False. If Show=True, the dialog is displayed, and the DefaultAction is not executed. If Show=False, the dialog is not displayed, and the DefaultAction is executed immediately when the user double-clicks on the idlvm.exe icon.

BackColor

This field contains an RGB color triplet specified in hexadecimal notation. This color will be used in any part of the dialog that is not covered by the image specified as the value of the Picture field. To make the background white, set BackColor=&HFFFFFF.

Caption

This field contains a string that will be displayed in the title bar of the dialog, if Show=True.

Picture

This field contains the relative path to a Windows bitmap file that will be displayed in the dialog if Show=True. The image will be positioned with its upper left corner in the upper left corner of the dialog window. To completely fill the dialog, the image contained in the bitmap file should be 480 x 335 pixels. Any area of the dialog that is not filled by the image will be displayed in the color specified in the BackColor field.

DefaultAction

This field contains the command that should be executed when idlvm.exe is run if Show=False. In most cases, you will need to specify the relative path to the idlrt.exe file in the IDL distribution on your CD-ROM, followed by the -vm flag and the relative path to your application's SAVE file.

For example, if you have placed the SAVE file for the application hydroplot.sav in the root directory of the CD-ROM along with the idlvm.exe application, the following DefaultAction would launch hydroplot.sav in the IDL Virtual Machine when the user double clicks on the idlvm.exe icon:

DefaultAction=.\IDL61\bin\bin.x86\idlrt.exe -vm=.\hydroplot.sav 
BUTTON Sections

There can be up to four [BUTTON] sections. The format is the same for any section of this type.

Note
If the Show field of the [DIALOG] section is set to False, no buttons will be displayed, regardless of the content of the [BUTTON] sections.

[BUTTON1] 
Show=True 
Caption=<any string> 
Action=<path to application> 
Show

This field can contain the string True or the string False. If Show=True, the button will be displayed on the dialog.

Caption

This field contains a string that will be displayed on the button, if Show=True.

Action

This field contains the command that should be executed when the user clicks on the button, if Show=True. See DefaultAction above for an explanation of the format of the command string.

To create a button that simply closes the dialog without executing anything, set Action=Exit on the button.


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