pro idl_vm_startup ;+ ; NAME: ; IDL_vm_startup ; PURPOSE: ; Initialize IDL session ; CATEGORY: ; Startup ; CALLING SEQUENCE: ; Invoked when IDL session is started ; INPUTS: ; (none) ; OUTPUTS: ; (none) ; CALLS: ; defsysv_smei, IDL_postop_win, IDL_postop_linux, IDL_postop_vms ; PROCEDURE: ; > Environment variables: ; SMEI: ; The environment variable 'SMEI' MUST be defined, and point to the top ; of the SMEI software tree. ; SYS, EXE, COM: ; Will be defined by this procedure if they don't exist yet. Both are ; subdirectories in 'SMEI' with the same name as the environment variable. ; TUB, DAT: ; Temporary and data directory. Both are best defined externally. ; No attempt is made to define them here ; ; VMS: The startup file should be defined as a logical at LOGIN ; '$DEFINE IDL_STARTUP DSK_NAME::[DIR_NAME]IDL_STARTUP.PRO' ; ; LINUX: Set startup file in the IDL development environment to this file. ; Also set the working directory to the $SMEI directory ; at the top of the software tree (where this file is located). ; ; WIN Same as Linux ; MODIFICATION HISTORY: ; FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- ;=================================================== ; Set up the IDL path. Note that the environment variable 'SMEI' MUST be ; properly defined, or we are in deep trouble. smei = getenv('SMEI') if smei eq '' then message, 'environment variable "SMEI" not defined' defsysv, '!sun', exists=exists if exists then return ; Our IDL code uses SSW environment variables. To be able to run outside SSW ; define them here if they don't exist yet. ; If this startup file is run from inside the SSW startup (by setting it ; as the personal startup file (in environment variable ssw_personal_startup) ; then SSW_SMEI has already been defined at this point as $SSW/smei. If smei ; is not part of the local SSW tree then this assignment will be useless. ; So make sure that directory 'SSW_SMEI' exists; if not, then clear the value, ; and use the environment variable 'SMEI'. ssw_smei = getenv('SSW_SMEI') if ssw_smei ne '' then if not checkdir(ssw_smei) then ssw_smei = '' if ssw_smei eq '' then setenv, 'SSW_SMEI=' + filepath(root=smei,'') if ssw_smei eq '' then setenv, 'SSW_SMEI_DAT='+ filepath(root=getenv('DAT' ),'') ;=================================================== ; Define a few system variables (defsysv_smei calls Time* functions, so it ; needs to called after the path has been set up. defsysv_smei ;=================================================== ; Do any remaining platform-dependent setup chores (hope to remove this ; sometime). Currently this sets the printer device (!ThePrinter), calls ; 'reset_colors' and sets the starting directory. if strlowcase(!version.os_family) eq 'windows' then IDL_postop_win if strlowcase(!version.os_family) eq 'unix' then IDL_postop_linux if strlowcase(!version.os_family) eq 'vms' then IDL_postop_vms return & end