5296
Creating IDL VM or RT distributions for platforms different than your development IDL session (using MAKE_RT)
Topic:
The IDL "MAKE_RT" routine can be used to create an IDL Virtual Machine (VM) (or IDL Runtime (RT)) distribution to host an IDL VM (or IDL RT) application save file. To do this, the MAKE_RT routine must be used from a *licensed*, development session of IDL.
Additionally, the MAKE_RT routine run from a IDL session on one platform, can also be used to create IDL VM distributions for operating systems different than the development IDL session host operating system. This article discusses about creating multiple platform IDL VM distributions from one development IDL session on a single platform.
Although the information in this article targets IDL Virtual Machine distributions, the information can also be generally be applied to creating IDL Runtime (RT) distributions. See the documentation for the "/VM" keyword for the MAKE_RT for details about generating IDL VM verses IDL RT distributions.
Additional information about creating and distributing IDL VM and RT applications (including information about customizing the MAKE_RT output by modifying "manifest_rt.txt") can be found in the IDL Help under the documentation for the MAKE_RT procedure and under the IDL 8 Help Contents topic "Creating a Distribution Using MAKE_RT " or on the Exelis VIS documentation center at http://www.harrisgeosptial.com/docs/CreatingDistributionUsingMAKE_RT.html |
Discussion:
Below are some general notes about successfully creating cross-platform IDL VM distributions with MAKE_RT:
- Licensing. MAKE_RT will only function in a licensed development session of IDL.
- Distribution source files for target platform. A requirement for creating cross-platform IDL VM distributions with MAKE_RT, is that a copy of a full IDL installation for the target operating system(s) must be available to the IDL session running MAKE_RT.
- Windows IDL Source Files for a UNIX IDL Session. In the case of accessing a copy of an IDL for Windows installation to create an IDL VM for Windows distribution via an IDL session running on one of the supported UNIX platforms, IDL for Windows can be installed to a network shared partition that is accessible to the IDL for UNIX session, or installed to a Windows system and then copied to a location that is accessible to the IDL for UNIX session.
- UNIX IDL Source Files for a Windows IDLSession. Likewise, if your development session of IDL is hosted on a Windows system, and you would like to create an IDL VM distribution for a UNIX platform, an IDL for UNIX installation can be placed on a shared network directory, or installed and then copied a drive location that is available to the Windows IDL machine. (* Also be sure to see the note below titled "Creating OS X IDL VM Distributions.")
- Source and Destination Directories of Dual UNIX and Windows IDL VM Distributions. Although both Windows and UNIX (Solaris, Linux, Mac OS X) distributions can be created from a single platform session of IDL, because of potential differences between these platform classes, we recommend that both the IDL installation source and the MAKE_RT destination output remain under separate IDL directory trees for Windows and UNIXes. (DIfferent UNIX platform installation source and distribution output can be safely combined under a single IDL directory tree.)
- Creating Mixed Solaris, Linux and Mac OS X IDL VM Distributions. The IDL UNIX-style installer can be used to install all or some of the UNIX platform versions of IDL (i.e., for Solaris Sparc, Solaris x86_64, Linux and Mac OS X) to a single IDL installation location.
- Creating Mac OS X Applescripts with your IDL VM Distribution. If Mac OS X is a target platform for your IDL VM application, and you would like for MAKE_RT to create an Applescript to launch your application, it is necessary to use the MAKE_RT command from a licensed IDL development session running on Mac OS X. Creating other UNIX or even Windows MAKE_RT distributions from Mac OS X will also be successful.
- Pitfall of creating UNIX IDL VM Distributions from Windows. Note that attempting to create a UNIX IDL VM distribution from a Windows session of IDL will cause the creation of a DOS text formatted application UNIX startup shell script (which is named after the prefix portion of the application save file name) in the main directory of the IDL VM distribution tree. A shell script with a DOS text file format cannot be executed from a UNIX shell.
To allow this startup script to be functional on UNIX platforms, the file must be convered to a UNIX style text file format using a utility such as "dos2unix".
Alternatively, the "make_rt.pro" library source code file can be altered such that the following lines of code:
for i=0, n_elements(launcherTxt)-1 do begin
PRINTF, startout, launcherTxt[i]
endfor
--can be replaced with the following workaround line of code:
PRINTF,startout,STRJOIN(launcherTxt,STRING(10B)),FORMAT='($,a)'
Example:
For example, suppose that you only have a licensed Mac OS X version of IDL but need to create a Windows IDL VM distribution, to host your IDL VM application save file. The following might be done to create an IDL VM distribution for Windows from a Mac OS X session of IDL.
- Install IDL on a supported Windows system.
- Copy the entire IDL directory tree (for example: "C:\Program Files\Exelis\idl84") from the Windows machine to a drive location that is accessible to your IDL session on Mac.
- Launch a licensed IDL development session on Mac.
- Issue a MAKE_RT command that explicitly references the "IDLDIR" or main IDL directory location of the copy of the IDL for Windows installation tree. For example, suppose the source copy of the Windows IDL 8.4 main directory is located at "/Users/joe/myapp/win/IDL84", the IDL VM application save file is located at "/Users/joe/myapp/save/myapp.sav", and the destination folder for your IDL VM Windows distribution is "/Users/joe/myapp/dist/win". In this case, the IDL "MAKE_RT" command to export the IDL VM distribution for Windows (64-bit) might look like the following:
MAKE_RT, 'myapp', '/Users/joe/myapp/dist/win', $
/VM, /WIN64, $
IDLDIR="/Users/joe/myapp/win/IDL84", $
SAVEFILE="/Users/joe/myapp/save/myapp.sav"
In this example, the resulting IDL VM Windows distribution would be written to the directory
/Users/joe/myapp/dist/win/myapp