From Open Watcom
←Older revision | Newer revision→
The installer used for Open Watcom C/C++ and F77 version 1.4 and later allows unattended (automated) installation.
The installer is typically started without any arguments, allowing the user to set installation options interactively. However, it can be run with options to facilitate unattended installation. The syntax is as follows:
setup -f=<var_file> -d<name=val) -i -s -np -ns
The options are case insensitive. Their description follows:
- var_file is n file which contains presets overriding the default variable settings determined by the setup script. The override file can be used to change the initial selection for interactive installs, but is typically used for unattended installation.
- sets variable name to val. Note that the set of variables which can be controlled by -d is different from the variables controlled by the -f option.
- skips initial dialogs but shows installation progress. If -s is used, the setup utility will perform an unattended install.
- invisible install. Same as -s, but additionally hides output.
- no GUI shell icons or shortcuts are created.
- no startup files or Registry entries are modified. Environment variables may need to be manually set.
The override file passed to the installer via the -f option can be used to control the default component selection. If the -f option is not specified, the installer makes default choices based on the host operating system and other factors. The selection is directed by so-called automatic variables. Note that if an override file is used, any automatic variable which is not explicitly set in the override file will be cleared (i.e., false).
Automatic variables for the Open Watcom C/C++ product:
- small model 16-bit libraries
- medium model 16-bit libraries
- compact model 16-bit libraries
- large model 16-bit libraries
- huge model 16-bit libraries
- register calling convention 32-bit libraries
- stack calling convention 32-bit libraries
- install 16-bit tools and libraries
- install C++ components
- DOS host tools
- Win16 host tools
- Windows NT and 9x host tools
- OS/2 host tools
- Linux host tools
- DOS target files
- Win16 target files
- Win32 target files
- OS/2 target files
- Linux target files
- Novell NLM target files
- install online help (affects xxx_helpfiles variables)
- help files in Win16 .hlp format
- help files in Win32 .hlp format
- help files in whelp .ihp format
- help files in OS/2 .hlp/.inf format
- documentation in PDF format
- run-time library startup source
- sample source code
A sample override file (called override.inf in this example) follows:
# Install small and large model libs ms=true ml=true tools16=true # Install only register call 32-bit libs 3r=true # Install C++ development support cplusplus=true # Install only Win32 host and target wnthost=true wnttarg=true # Install PDF help files helpfiles=true pdf_helpfiles=true
Note that the choice to install a component typically depends on two or more variables. Thus, given the above override file, no 16-bit libraries will be installed because even if the installation of small and medium model libraries was enabled, the Windows NT target does not include any 16-bit libraries. However, 16-bit compiler executables for the Windows NT host will be installed because the 'tools16' variable was set.
Running the setup program with -f=override.inf and no other options (assuming that override.inf is in the current directory) allows an easy review of the effect of the override file by examining the default component selection in the installer.
The -d option allows the user to set variables which affect fundamental aspects of the installer operation. When using the -d option, boolean variables (i.e. variables which may be either true or false) should be set to 0 or 1.
A non-exhaustive list of variables for Open Watcom C/C++ follows. Note: these variables are intended for controlling unattended installation (i.e., running setup with the -s or -i option). Use of these variables with interactive setup may result in unpredictable behavior.
- install all source files
- install all source files except online help
- uninstall previously installed product
- destination directory for installation
The destination directory for Open Watcom C/C++ is controlled by the WATCOM environment variable. If the environment variable does not exist, the default directory is 'c:\watcom'. Setting DstDir overrides the default.
setup -s -dDstDir=x:\MyDir -dFullCDInstall=1
The above will install into a x:\MyDir directory and all components except online help will be selected. No user input will be required or allowed.