Guide to writing a VMS installable Product INTRODUCTION - VMSINSTAL.COM is used to install products - Kit consists of one or more BACKUP savesets - KITINSTAL.COM drives the installation - Installation Verification Procedure KIT CONVENTIONS - facvvu.s o fac - Facility code o vv - Major version number o u - Update number o s - Sequence letter - VMS041.A - KITINSTAL.COM must be on primary saveset INITIALIZATION - Working directory create - Detailor if necessary - Saveset A restored - Invoke KITINSTAL.COM o @KITINSTAL VMI$_INSTALL kit-debug KITINSTAL - Check P1 to handle request code o VMI$_INSTALL o VMI$_IVP - Install product using Callbacks - Exit status o VMI$_SUCCESS o VMI$_FAILURE o VMI$_UNSUPPORTED LOGICAL NAMES - VMI$KWD - Kit's working directory - VMI$ROOT - Top level system directory - VMI$SPECIFIC - The system specific top level directory GLOBAL SYMBOLS - TRUE - FALSE - VMI$CALLBACK - VMI$VMS_VERSION o "RELEASED,nntt" - VMI$_SUCCESS - VMI$_FAILURE - VMI$_UNSUPPORTED DEFAULTS - All message components enabled - All privileges enabled except BYPASS - Protection - (S:RWED,O:RWED,G:RWED,W:RE) - UIC [1,4] - Default device/directory MISSING:[MISSING] IVP - @VMI$KWD:KITINSTAL VMI$_IVP - All file in final resting place - Assume no default device/directory - IVP can not use Callbacks - Exit with status o VMI$_SUCCESS o VMI$_FAILURE Callback overview ASK $ VMI$CALLBACK ASK symbol prompt [default] [options] [help] Parameters: o symbol - Global symbol equated to the answer o prompt - Quoted prompt string o default - Default answer o options - List of options o help - Help invocation string $ VMI$CALLBACK ASK ans$ - "Are you installing Mytest on a homogeneous VAXcluster" - "No" - BR - "@VMI$KWD:KITINSTAL help_question_1" ! ! Begining of KITINSTAL.COM ! ! $ IF P1 .EQS. "VMI$_INSTALL" THEN $GOTO install_product ! $ IF P1 .EQS. "VMI$_IVP" THEN $GOTO run_ivp ! $ IF P1 .EQS. "help_question_1" THEN $GOTO question_1 CHECK_NET_UTILIZATION $ VMI$CALLBACK CHECK_NET_UTILIZATION symbol blocks Parameters: o symbol - Symbol where sucess or failure is to be returned o blocks - Number of free blocks needed ! ! Check for disk space. Exit if not enough ! $ VMI$CALLBACK CHECK_NET_UTILIZATION enough 1000 $ IF NOT enough THEN $EXIT VMI$_FAILURE CONTROL_Y $ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y CREATE_DIRECTORY $ VMI$CALLBACK CREATE_DIRECTORY {SYSTEM hierarchy} [qualifiers] {USER dd } Parameters: o SYSTEM heirarchy - Name of system directory to be created o USER dd - Name of user diectory to be created o qualifiers - CREATE/DIRECTORY qualifiers ! ! Create a system directory with a version limit of 2 ! $VMI$CALLBACK CREATE_DIRECTORY SYSTEM sysmgr.mytest "/VERSION_LIMIT=2" DELETE_FILE $ VMI$CALLBACK DELETE_FILE ddnt Parameters: o ddnt - The specification of the file to be deleted ! ! Delete the CLD file once it is no longer needed ! $ VMI$CALLBACK DELETE_FILE VMI$KWD:mytest.cld FIND_FILE $ VMI$CALLBACK FIND_FILE logical ddnt [default] locate [symbol] Parameters: o logical - Logical name which will point to the file o ddnt - The specification of the file to be located o default - The default file specification o locate - Specifies how the file will be located o symbol - Reflects the result of the callback ! ! Type test.dat ! $ VMI$CALLBACK FIND_FILE tstfile test.dat - vmi$root:[systest] S $ TYPE tstfile MESSAGE $ VMI$CALLBACK MESSAGE severity id text ... Parameters: o severity - The severity of the message o id - The mnemonic identification of the message o text - The actual text of the message(s) ! ! Inform the installer that RSX must be installed ! $ VMI$CALLBACK MESSAGE E NORSX - "the VAX-11 RSX option must be installed" %TEST-E-NORSX, the VAX-11 RSX option must be installed PATCH_IMAGE $ VMI$CALLBACK PATCH_IMAGE logical patch-nt [image-ddnt] - [options] Parameters: o logical - Logical name which will point to the image o patch-nt - Specification of the file which contains the patch commands o image-ddnt - The specification of the image to be patched o options - A list of options ! ! Patch the test image. ! $ VMI$CALLBACK PATCH_IMAGE image$ptr VMI$KWD:impatch.com PRINT_FILE $ VMI$CALLBACK PRINT_FILE ddnt [copies] Parameters: o ddnt - The specification of the file to be printed o copies - The number of copies to be printed ! ! Print one copy of the release notes ! $ VMI$CALLBACK PRINT_FILE VMI$KWD:release_notes.txt 1 PROVIDE_DCL_COMMAND $ VMI$CALLBACK PROVIDE_DCL_COMMAND nt Parameters: o nt - The specification of the CLD file ! ! Add Mytest to the command tables ! $ VMI$CALLBACK PROVIDE_DCL_COMMAND VMI$KWD:mytest.cld PROVIDE_DCL_HELP $ VMI$CALLBACK PROVIDE_DCL_HELP nt Parameters: o nt - Specification of the help text file ! ! Add system help for Mytest ! $ VMI$CALLBACK PROVIDE_DCL_HELP VMI$KWD:mytest.hlp PROVIDE_FILE $ VMI$CALLBACK PROVIDE_FILE logical nt dd [options] Parameters: o logical - Logical name which will point to the file o nt - The specification of the file to be provided o dd - The target disk and directory for the file o options - A list of options ! ! Move my macro library to SYS$LIBRARY ! $ VMI$CALLBACK PROVIDE_FILE mytest$file mytest.mlb VMI$ROOT:[SYSLIB] PROVIDE_IMAGE $ VMI$CALLBACK PROVIDE_IMAGE logical nt dd [options] [eco-list] Parameters: o logical - Logical name which will point to the file o nt - The specification of the image being provided o dd - The target disk and directory for the image o options - A comma-separated list of options o eco-list - List of ECO levels to be set ! ! Add a copy of my sharable image to the system ! $ VMI$CALLBACK PROVIDE_IMAGE mytest$image mytestshr.exe - VMI$ROOT:[SYSLIB] I RENAME_FILE $ VMI$CALLBACK RENAME_FILE ddnt new-nt Parameters: o ddnt - The specification of the file to be renamed o new-nt - The new file name and type for the file ! ! Rename my macro library ! $ VMI$CALLBACK RENAME_FILE mytest$file VMI$ROOT:[SYSLIB]mytest_old.mlb RESTORE_SAVESET $ VMI$CALLBACK RESTORE_SAVESET saveset [options] Parameters: o saveset - Identification of saveset to be restored o options - A list of options ! ! Restore product saveset B ! $ VMI$CALLBACK RESTORE_SAVESET B SECURE_FILE $ VMI$CALLBACK SECURE_FILE ddnt [owner-uic] [protection] Parameters: o ddnt - The full specification of the file to be altered o owner-uic - New UIC for the file o protection - The new protection for the file ! ! Change the owner and protection of mytest.exe ! $ VMI$CALLBACK SECURE_FILE mytest$image [63,04] W:E SET IVP $ VMI$CALLBACK SET IVP {YES} [options] {NO } {ASK} Parameters: o YES - Run the IVP o NO - There is no IVP supplied with this product o ASK - There is an IVP, but ask the user if it should be run o options - A list of options SET PURGE $ VMI$CALLBACK SET PURGE {YES} [options] {NO } {ASK} Parameters: o YES - Purge all files during or after the installation o NO - Do not purge file during or after the installation o ASK - Ask the user o options - A list of options UPDATE_LIBRARY $ VMI$CALLBACK UPDATE_LIBRARY logical lib-ddnt type - qualifiers [file-ddnt] Parameters: o logical - Logical name that will point to the library o lib-ddnt - The complete specification of the library to be updated o type - The type of the library o qualifiers - A sequence of qualifiers for the librarian o file-ddnt - Specifcation of the input/output file for the librarian ! ! Replace a module in starlet ! $ VMI$CALLBACK UPDATE_LIBRARY librar$logical - VMI$ROOT:[SYSLIB]STARLET.OLB - OBJECT "/REPLACE" VMI$KWD:mymodule.obj VMSINSTAL OPTIONS A - Auto answer L - File Log R - Alternate root G - Get saveset K - Kit debug S - Statistics report SPKITBLD - Builds kit savesets - In SYS$UPDATE - @SPKITBLD [facvvu] [device] [a-files]