$!************************************************************************* $! * $! © Copyright 2005 Hewlett-Packard Development Company, L.P. * $! * $! Confidential computer software. Valid license from HP required for * $! possession, use or copying. Consistent with FAR 12.211 and 12.212, * $! Commercial Computer Software, Computer Software Documentation, and * $! Technical Data for Commercial Items are licensed to the U.S. * $! Government under vendor's standard commercial license. * $! * $!************************************************************************* $! $ verify = 'F$VERIFY(0)' $ completion_code = 1 $ ON ERROR THEN GOTO save_status $ ON CONTROL_Y THEN GOTO abort $!++ $! Facility: $! XLSE $! $! Abstract: $! Builds XLSE files on site. $! $! Author: $! W. Ward Clark, LinkWorks Project $! $! Creation Date: 20-Mar-88 $! $!+ $! Initialization $!- $ target_dir = P1 $ $ analyze = "ANALYZE" $ copy = "COPY" $ create = "CREATE" $ define = "DEFINE" $ delete = "DELETE" $ mail = "MAIL" $ read = "READ" $ write = "WRITE" $!+ $! Locate the XLSE source file directory and make it $! the default target directory. $!- $ source_dir = F$ENVIRONMENT("PROCEDURE") $ source_dir = F$PARSE(source_dir,,,"DEVICE") + - F$PARSE(source_dir,,,"DIRECTORY") $ $ default_target = source_dir $!+ $! Indicate XLSE installation is beginning. $!- $ WRITE sys$output "" $ WRITE sys$output " Installing XLSE $ WRITE sys$output "" $!+ $! Ask for a target directory. $!- $ IF target_dir .NES. "" THEN GOTO ask_target_end $ask_target: $ READ sys$command target_dir /END=save_status - /PROMPT=" Target device and directory? [''default_target'] " $ target_dir = F$EDIT(target_dir,"COLLAPSE,UPCASE") $ IF target_dir .EQS. "" THEN target_dir = default_target $ $ test_spec = F$PARSE(target_dir,"XLSE_CREATE.TEST") $ IF test_spec .EQS. "" THEN GOTO bad_target_spec $ IF F$PARSE(test_spec,,,"NODE","SYNTAX_ONLY") .NES. "" - THEN GOTO bad_target_spec $ IF F$PARSE(test_spec,,,"NAME","SYNTAX_ONLY") .NES. "XLSE_CREATE" - THEN GOTO bad_target_spec $ IF F$PARSE(test_spec,,,"TYPE","SYNTAX_ONLY") .NES. ".TEST" - THEN GOTO bad_target_spec $ IF F$PARSE(test_spec,,,"VERSION","SYNTAX_ONLY") .NES. ";" - THEN GOTO bad_target_spec $ $ CREATE 'test_spec' $ IF .NOT. $STATUS THEN GOTO ask_target $ DELETE 'test_spec' $ $ target_dir = F$PARSE(test_spec,,,"DEVICE","SYNTAX_ONLY") + - F$PARSE(test_spec,,,"DIRECTORY","SYNTAX_ONLY") $ GOTO ask_target_end $ $bad_target_spec: $ WRITE sys$error " ""''target_dir'"" is an invalid directory specification" $ WRITE sys$output "" $ IF F$MODE() .EQS. "INTERACTIVE" $ THEN $ GOTO ask_target $ ELSE $ WRITE sys$error "" $ WRITE sys$error " Specify /PARAMETER=dir-spec on your SUBMIT command" $ EXIT %X10000004 $ ENDIF $ask_target_end: $!+ $! Build XLSE's section files, environment file and help libraries. $!- $ save_source = F$TRNLNM("build$source") $ save_executable = F$TRNLNM("build$executable") $ DEFINE build$source 'source_dir' /NOLOG $ DEFINE build$executable 'target_dir' /NOLOG $ $ @'source_dir'XLSE_SECTION.BUI $ @'source_dir'XLSE_ENV.BUI $ @'source_dir'XLSE_HELP.BUI $ $ WRITE sys$output "" $ WRITE sys$output " Copying the LaTeX Help Library (LATEX_HELPLIB.HLB)" $ WRITE sys$output "" $ COPY 'source_dir'LATEX_HELPLIB.HLB 'target_dir' /PROTECT=WORLD=RE /LOG $ $! WRITE sys$output "" $! WRITE sys$output " Copying the XLSE Initialization files" $! WRITE sys$output " (XLSE_INITIALIZE.COM, XLSE_DW_STARTUP.COM)" $! WRITE sys$output "" $! COPY 'source_dir'XLSE_INITIALIZE.COM,XLSE_DW_STARTUP.COM 'target_dir'/PROTECT=WORLD=RE/LOG $ $ IF save_source .NES. "" - THEN DEFINE build$source 'save_source' /NOLOG $ IF save_executable .NES. "" - THEN DEFINE build$executable 'save_executable' /NOLOG $ $! Indicate installation is complete. $!- $ WRITE sys$output "" $ WRITE sys$output " XLSE installation is complete" $ WRITE sys$output "" $ GOTO done $! $!+ $! Report that the user did a ^Y. $!- $abort: $ WRITE sys$error "" $ WRITE sys$error " XLSE building terminated by ^Y" $ GOTO cleanup $!+ $! Return the value of $STATUS in the event of a command error. $!- $save_status: $ completion_code = $STATUS .OR. %X10000000 $ WRITE sys$error "" $ WRITE sys$error " XLSE building abnormally terminated" $ GOTO cleanup $!+ $! Cleanup after an error. $!- $cleanup: $!+ $! Return to caller. $!- $done: $ EXIT completion_code + 0*F$VERIFY(verify)