;+ ; ; @categories ; Utilities ; ; @uses ; cm_general ; ; @version ; $Id$ ; ;- PRO demomode_compatibility ; compile_opt idl2, strictarrsubs ; @cm_general ; ; 1) remove all cm_demomode_used.pro found in !path to_rm = find('cm_demomode_used') IF to_rm[0] NE 'NOT FOUND' THEN file_delete, to_rm ; ; 2) copy oldcm_full(_empty) to myuniquetmpdir+'oldcm_used.pro' ; select which file should be copied to oldcm_used.pro IF lmgr(/demo) EQ 1 THEN BEGIN democm = find('cm_demomode') file_copy, democm, myuniquetmpdir + 'cm_demomode_used.pro', /overwrite ENDIF ELSE BEGIN ; create an empty file... ; close the journal if already open IF !journal NE 0 THEN journal ; open a new one journal, myuniquetmpdir + 'cm_demomode_used.pro' ; close it (-> it will be empty) journal ENDELSE ; update the path cache to include cm_demomode_used path_cache, /rebuild return END