3 Documentation for 1.24 Installer
4 Last Revised: January 12th, 1993
7 (C) Copyright 1991-93 Commodore-Amiga,Inc. All Rights Resrved
15 2.1 Standard Invocation
18 2.4 Installation Actions
20 3 Scripting Language Tutorial
23 3.3 Symbols (Variables)
30 4 Installer Language Reference
33 4.3 Control Statements
34 4.4 Debugging Statements
35 4.5 User-Defined Procedures
37 4.7 Summary of Parameters
38 4.8 Pre-Defined Variables
40 5 Installer Language Quick Reference
42 5.2 Quick Language Overview
43 5.3 Pre-Defined Variables
44 5.4 Default Help String Variables
51 Installation of applications from floppy disks onto a hard disk has proven to be
52 a very inconsistent and often frustrating endeavor for most end-users. This has
53 been caused by many factors, some of which are:
55 a. Many products do not come with any utility or script to install an
56 application on a hard disk.
58 b. Many products assume a great deal of familiarity with the startup process
59 of the Amiga and applications, including assigns, device names (as
60 opposed to volume names), etc.
62 c. The installation scripts or utilities included with some products vary
63 widely in their ability to deal with different environments and systems.
65 About a year ago, Commodore set out to remedy this situation, by developing a
66 standard tool that developers can include with their products, which provides
67 the user with a standard way to install applications. The Installer's features
68 were based on a number of assumptions:
70 a. Installation requirements vary widely---some need assigns, some need new
71 drawers created, some install pieces in system drawers such as a fonts
72 drawer, a `product' might be just an upgrade and the installation must
73 check to see which version (if any) they currently have installed, etc.
75 b. Different users have different levels of comfort and expertise when
76 attempting to install software, and the Installer should be able to
77 accommodate a range of users. Many installation scripts assume a great
78 deal of knowledge, which is very intimidating for a novice.
80 c. The installer tool must be very flexible internally, but present a
81 consistent pleasant graphical user interface to the user that only shows
82 the user information or prompts that they need to see. The Installer
83 should be resolution, color and font sensitive.
85 d. Writing scripts to install an application will require some effort, but
86 certainly no more than writing an AmigaDOS shell script equivalent, and
87 the resulting installation procedure will be more friendly, flexible, and
88 much better looking than the latter.
90 e. Not everyone will be running 2.0 by the time the tool becomes available,
91 so it must run under 1.3 and 2.0.
96 The Installer is a script driven program, that presents a consistent
97 installation environment to the end user. The user never sees the script.
98 Instead they are presented with simple yes/no choices, and may be asked to
99 specify locations to put things on their system.
101 To accommodate different user levels, they can choose to run the tool in novice,
102 average or expert modes. Scripts can include help text to explain any choices
103 that the user must make. At each step the user is given the option of aborting
109 2.1 Standard Invocation
111 The Installer program requires a 10000 byte stack. Project icons for Installer
112 script should indicate a stack size of 10000. If starting Installer from a CLI,
113 first do a "Stack 10000".
115 The Installer is normally started up from a Workbench Project icon which has the
116 same name as the script to interpret and has a default tool of Installer.
117 A number of tooltypes are available to modify the operation of the Installer:
119 SCRIPT - Path to a script file to be used with Installer.
121 APPNAME - Name of the application being installed (appears in the startup
122 screen). This MUST be given.
124 MINUSER - The minimum possible operation mode of the installation for a
125 script. This will be either NOVICE (all decisions made by
126 Installer), AVERAGE (only important decisions made by user) or
127 EXPERT (user confirms almost all actions). The Default is NOVICE.
129 DEFUSER - Indicates which operation mode button should be initially
130 selected. Same values as MINUSER, with the value of the MINUSER
131 tooltype being the default (which will be NOVICE if MINUSER not
134 NOPRINT - If set to FALSE, then the printer option in the log file settings
137 PRETEND - If set to FALSE, indicates that PRETEND mode not available for
140 LANGUAGE - Used to set the variable @language (default for @language is
141 "english". The use of this variable is left up to the install
144 LOGFILE - The name of the log file that the Installer should use. This must
145 be a full path. The default is "install_log_file".
147 LOG - In NOVICE mode the default is to create a log file (to disk). If this
148 tooltype is set to FALSE, the creation of a log file in NOVICE mode is
151 Although the installer can be started up from the CLI, that is not the
152 recommended mode. CLI invocation is provided mainly for script debugging
153 purposes. The command template is:
155 SCRIPT/k,APPNAME,MINUSER,DEFUSER,LOGFILE,NOLOG/s,NOPRETEND/s,
163 The first thing the installer does is compile the installation script into an
164 internal format that can be easily interpreted. If there are syntax errors in
165 the script, they will be caught during this phase.
172 Next, the Installer asks the user what Installation Mode to run in, either
173 NOVICE, AVERAGE or EXPERT. If the user chooses NOVICE, they will not be asked
174 any more questions (although they may be requested to do things). In the other
175 user levels, a second display appears asking the user if he wants to install
176 "for real" or "do a dry run", and if he wants a transcription of the
177 installation process written to either a file or printer.
182 2.4 Installation Actions
184 Now the Installer interprets its internal version of the script. Any commands
185 that call for a user interface will cause the Installer to algorithmically
186 generate a display, always including buttons to allow for context sensitive help
187 and aborting the installation.
190 Section 3: Scripting Language Tutorial
192 The script language of the Installer is based on LISP. It is not difficult to
193 learn, but requires a lot of parentheses. An Installer script can easily be
194 made to look very readable.
201 The basic elements of the installer language are:
206 hexadecimal integers $a000
207 binary integers %0010010
208 strings "Hello" or 'Hello'
210 comments ; this is a comment
211 ( ) for statement definition
212 space delimits symbols
218 3.2 Escape Characters
220 Escape characters are supported as in the C language:
225 '\n' newline character
226 '\r' return character
235 3.3 Symbols (Variables)
237 A symbol is any sequence of characters surrounded by spaces that is not a quoted
238 string, an integer or a control character. This means that symbols can have
239 punctuation marks and other special characters in them. The following are all
253 There are three types of symbols:
255 a. user-defined symbols. These are created using the "set" function.
257 b. built-in function names. These include things like '+' and '*' as well
258 as textual names such as "delete" or "rename".
260 c. special symbols. These are variables which are created by the installer
261 before the script actually starts to run, and are used to tell the script
262 certain things about the environment. These symbols always begin with an
263 '@' sign. An example is '@default-dest' which tells you the default
264 directory that was selected by the installer.
271 The format of a statement is:
273 (operator <operand1> <operand2> ...)
275 A statement to assign the value '5' to the variable 'x' would be:
279 You can read this as "set x to 5". Note that the variable 'x' does not have to
280 be declared -- it is created by this statement.
282 Note that there is no difference between operators and functions -- the function
283 'set' and the arithmetic operator '+' are both used exactly the same way.
285 Combining statements: A statement can be used as the operand to another
286 statement as follows:
290 In this case, the statement '(+ 3 5)' is evaluated first, and the result is 8.
291 You can think of this as having the '(+ 3 5)' part being replaced by an 8.
292 So now we are left with:
296 which is the same form as the first example.
298 Note that the '(+ 3 5)' part actually produced a value: 8. This is called the
299 "result" of the statement. Many statements return results, even some that might
300 surprise you (such as "set" and "if").
307 All data types in the installer are dynamic, that is to say the type of a
308 variable is determined by the data that is in it. So if you assign the string
309 "Hello, World" to the variable 'x', then 'x' will be of type STRING. Later you
310 can assign an integer to 'x' and x will be of type INTEGER. When using
311 variables in expressions, the interpreter will attempt to convert to the proper
314 Special forms: There are two exceptions to the form of a statement. The first
315 type is used for string substitution: If the first item in parentheses is a text
316 string rather than a function name, the result of that clause is another string
317 that is created by taking the original string and performing a "printf"-like
318 formatting operation on it, using the other arguments of the statement as
319 parameters to the formatting operation.
323 ("My name is %s and I am %ld years old" "Mary" 5)
327 "My name is Mary and I am 5 years old"
329 Note since the formatting operation uses the ROM "RawDoFmt" routine, decimal
330 values must always be specified with "%ld" rather than "%d" (The interpreter
331 always passes numeric quantities as longwords). Note that a variable containing
332 the string may be used rather than the string itself.
334 The second type of exception occurs if the elements in parentheses are
335 themselves statements in parentheses. In this case, the interpreter assumes
336 that all the elements are statements to be executed sequentially.
338 For example, this statement sets the value of three different variables:
339 "var1", "var2" and "var3".
341 ((set var1 5) (set var2 6) (set var3 7))
343 What this feature does is allow the language to have a block structure, where an
344 "if" statement can have multiple statements in its "then" or "else" clause.
345 Note that the result of this statement will be the result of the last statement
348 Complex statements: Here is an example of how statements in the script language
349 can be combined into complex expressions. We will start with an "if" statement.
350 The basic format of an "if" statement is:
352 (if <condition> <then-statement> [<else-statement>])
354 The condition should be a statement which returns a value. The "then" and
355 optional "else" parts should be statements. Note that if the "then" or "else"
356 statements produce a result, then the "if" statement will also have this result.
358 Our first example is a rather strange one: Using an "if" statement to simulate
359 a boolean "not" operator. (Note that there are easier ways in the script
360 language to do this).
362 (set flag 0) ; set a flag to FALSE
364 (set flag (if flag 0 1)) ; a Boolean NOT
366 Basically, the "if" statement tests the variable "flag". If flag is non-zero,
367 it produces the value "0". Otherwise, the result is "1". In either case,
368 "flag" is set to the result of the "if" statement.
370 Now, let's plug some real statements into our "if" statement.
372 (if flag ; conditional test
373 (message "'flag' was non-zero\n") ; "then" clause.
374 (message "'flag' was zero\n") ; "else" clause.
375 ) ; closing parenthesis
377 Note the style of the indenting. This makes for an easier to read program.
379 Now, we'll add a real condition. "=" tests for equality of the two items.
381 (if (= a 2) ; conditional test
382 (message "a is 2\n") ; "then" clause
383 (message "a is not 2\n") ; "else" clause
384 ) ; closing parenthesis
386 Finally, just to make things interesting, we'll make the "else" clause a
389 (if (= a 2) ; conditional test
390 (message "a is 2\n") ; "then" clause
391 ( (message "a is not 2\n") ; "else" compound statement
393 (message "but it is now!\n")
394 ) ; end of compound statement
402 When the Installer first starts up, it attempts to determine the "best" place to
403 install the application. Any volume named "WORK:" is given preference, as this
404 is the standard way that an Amiga comes configured from Commodore.
406 There are two keyboard shortcuts. Whenever there is a "Help" button active,
407 pressing the HELP key will also bring up the help display. Whenever there is an
408 "Abort" button active, pressing ESC brings up the abort requester. Also,
409 whenever the installer is "busy", pressing ESC brings up the abort requester --
410 there is text is the title bar to that effect.
412 If an application must have assigns or other actions performed during system
413 boot, the Installer will add these to a file named "S:user-startup".
414 The installer will then add the lines
416 if exists S:user-startup
417 execute S:user-startup
420 to the user's "startup-sequence". The Installer will attempt to determine the
421 boot volume of the system when looking for the "startup-sequence" and can handle
422 any AmigaDOS scripts executed from "startup-sequence" (up to 10 levels of
425 The Installer can create an assign to just a device, volume or logical
426 assignment. This comes in handy when you want to update an application which
427 comes on a volume named "MyApp:", but the installed version is in a directory
428 with the logical assign "MyApp:"!
430 The Installer always copies files in CLONE mode, meaning all the protection
431 bits, filenotes and file dates are preserved. When copying files the Installer
432 gives a "fuelgauge" readout of the progress of the copy.
434 The Installer can find the version number of any executable file that has either
435 a RomTag with an ID string (such as libraries and devices) or has a version
436 string conforming to that given in the 1990 DevCon notes. The Installer can
437 also checksum files. A separate utility named "instsum" is provided to
438 determine a file's checksum for use with this feature.
445 To perform a set of actions on all the contents of a directory matching a
446 pattern you can use the "foreach" operator. To perform a set of actions on an
447 explicit set of files, the following installer statements can be used as a
451 (while (set thisfile (select n "file1" "file2" "file3" ""))
453 (... your stuff involving this file ...)
457 Note that an empty string is considered a FALSE value to any condition operator.
459 To run an external CLI command which normally requires user input, redirect the
460 input from a file with the needed responses. For example, to format a disk one
461 could combine the statement shown below with a file which contains only a
464 (run "format <nl_file drive DF0: name ToBeEmpty")
467 Section 4: Installer Language Reference
474 a. When the script exits either by comming to the end or via the "exit"
475 statement, a message will be displayed saying where the application was
476 installed and where the logfile (if any) was written. Note that you must store
477 in "@default-dest" where you actually installed the application (see
478 "@default-dest" below).
480 b. A newline character ('\n', 0x0a) will cause a line break when the installer
481 performs word-wrapping. A hard-space (ALT-space, 0xa0) will prevent a word
482 break when the installer performs word-wrapping. Also, quoted sections will be
483 considered one word for word-wrapping purposes. For example, if the following
486 "The disk name \"FrameZapper 2.0\" is needed to complete installation."
488 then the text "FrameZapper 2.0" will not have a word break before the "2".
490 c. The maximum size of a string in a script is 512 bytes. The maximum size of
491 any string variable is 10000 bytes. If you need to create long help text for
492 example, break it into 512 byte chunks and then use the automatic string
493 concatenation ability of the installer to create the final, larger string.
494 Also, don't overlook the the use of line continuation of strings in scripts
495 to make your scripts more manageable. If you ever find that the installer
496 reports a stack overflow error, look to see if it caused by too many small
497 strings being concatenated and merge them into larger blocks.
499 d. The "run" and "execute" statements only return the result of the command run
500 or executed under 2.0; they always return 0 under 1.3. If you must have some
501 result under both 1.3 and 2.0, try this combo:
503 # in the DOS script to execute:
507 setenv installer-result 10
510 setenv installer-result 5
512 setenv installer-result 0
516 # in the installer script
518 (set theResult (getenv "installer-result"))
520 e. Filename and directoryname wildcard patterns specified in a script must be no
521 longer than 64 characters.
526 (set <varname> <value> [<varname2> <value2> ...])
528 Set the variable <varname> to the indicated value. If <varname> does not exist
529 it will be created. Set returns the value of the last assignment.
531 Note: All variables are typeless, and any variable may be used wherever a string
532 could be used. All variables are global.
534 The "set" statement can be used to convert a string to an integer value:
536 (set <integer-var> (+ <string-var>))
538 Use the "cat" statement to do the reverse.
541 (makedir <name> <parameters>)
543 Creates a new directory. Parameters:
545 prompt - tell the user what's going to happen.
546 help - text of help message
547 infos - create an icon for directory
548 confirm - if this option is present, user will be prompted, else the
549 directory will be created silently.
550 safe - make directory even if in PRETEND mode
553 (copyfiles <parameters>)
555 Copies one or more files from the install disk to a target directory. Each file
556 will be displayed with a checkmark next to the name indicating if the file
557 should be copied or not. Note that a write protected file is considered
558 "delete protected" as well. Parameters:
560 prompt, help - as above
561 source - name of source directory or file
562 dest - name of destination directory, which is created if it doesn't exist
563 Note that both source and dest may be relative pathnames.
564 newname - if copying one file only, and file is to be renamed, this is the
566 choices - a list of files/directories to be copied (optional)
567 all - all files/directories in the source directory should be copied
568 pattern - indicates that files/directories from the source dir matching a
569 pattern should be copied. The pattern should be no more than 64
571 Note that only one of "choices", "all" or "pattern" should be
572 used at any one time.
573 files - only copy files. By default the installer will match and copy
575 infos - switch to copy icons along with other files/directories
576 fonts - switch to not display ".font" files, yet still copy any that match
577 a directory that is being copied.
578 (optional <option> <option> ...) - dictates what will be considered a
580 The first three options are mutually exclusive (they may not be
582 "fail" - installer aborts if could not copy (the default)
583 "nofail" - installer continues if could not copy
584 "oknodelete" - aborts if can't copy, unless reason was
586 The next two options may be used with any other "optional" options.
587 "force" - unprotect destination
588 "askuser" - ask user if the file should be unprotected (but not
590 In the case of "askuser", the default for novice mode is an
591 answer of "no". Therefore, you may want to use "force" to make
592 the novice mode default answer appear to be "yes".
593 (delopts <option> <option> ...) - removes options set by "optional"
594 confirm - if this option is present, user will be prompted to indicate
595 which files are to be copied, else the files will be copied
597 safe - copy files even if in PRETEND mode.
600 (copylib <parameters>)
602 Copies one file using version checking; i.e., it only overwrites an existing
603 file if the new file has a higher version/revision number. "Copylib" will
604 create the destination directory as long as there is only one level missing.
605 For example, copying to a non-existent "DEVS:midi" would create the directory
606 "midi", but copying to "DEVS:midi/extra" where neither "midi" nor "extra" exists
607 would fail. Note that a write protected library file is considered "delete
608 protected" as well. Parameters:
610 prompt, help - as above
611 source - name of source directory or file
612 dest - name of destination directory
613 Note that both source and dest may be relative pathnames.
614 newname - if copying one file only, and file is to be renamed,
616 infos - switch to copy icons along with other files
617 (optional <option> <option> ...) - dictates what will be considered a
619 The first three options are mutually exclusive (they may not be
621 "fail" - installer aborts if could not copy (the default)
622 "nofail" - installer continues if could not copy
623 "oknodelete" - aborts if can't copy, unless reason was
625 The next two options may be used with any other "optional" options.
626 "force" - unprotect destination
627 "askuser" - ask user if the file should be unprotected
629 In the case of "askuser", the default for novice mode is an answer
630 of "no". Therefore, you may want to use "force" to make the
631 novice mode default answer appear to be "yes".
632 (delopts <option> <option> ...) - removes options set by "optional"
633 confirm - user will be asked to confirm. Note that an EXPERT user
634 will be able to overwrite a newer file with an older one.
635 safe - copy the file even if in PRETEND mode
638 (startup <appname> <parameters>)
640 This command edits the "S:user-startup" file, which is executed by the user's
641 startup-sequence (Installer will modify the user's startup- sequence if needed,
642 although in a friendly way). The "command" parameter is used to declare
643 AmigaDOS command lines which will be executed. The command lines are grouped by
644 application, using the supplied argument "appname". If there is already an
645 entry in "S:user-startup" for that application, the new command lines will
646 completely replace the old. The command lines for other applications will not
647 be affected. Note: The prompt and help parameters for the "startup" statement
648 are only used by the confirmation display to edit "user-startup". This only
649 happens in EXPERT mode. Parameters:
651 prompt, help - as above
652 command - used to declare an AmigaDOS command line to be
653 executed at system startup.
656 (tooltype <parameters>)
658 Modify an icon's tool type. Normally the new tool type values will be set up
659 in advance by various statements in the install language (i.e. the user does
660 not actually have to type in the tooltype values). For example, you could use
661 an "askchoice" to ask the user what type of screen resolution they want and
662 then format the tooltype string based on their choice. The "tooltype"
663 operation merely asks for a confirmation before actually writing. Parameters:
665 prompt, help - as above
666 dest - the icon to be modified
667 settooltype - the tooltype name and value string.
668 setdefaulttool - default tool for a project
669 setstack - set size of stack
670 noposition - reset to NOICONPOSITION
671 swapcolors - swap first two planes of icon's image if OS rev less than v36
672 confirm - if this option is present, the user will be asked for
673 confirmation, otherwise the modification proceeds
675 safe - make changes even if in PRETEND mode
678 (textfile <parameters>)
680 Creates a text file from other textfiles or computed text strings. This can be
681 used to create configuration files, AREXX programs or execute scripts.
684 help, prompt - as above
685 dest - the name of the text file to be created.
686 append - a string to be appended to the new text file.
687 include - a text file to be appended to the new text file.
688 confirm - if this option is present, the user will be asked for
689 confirmation, otherwise the writing proceeds silently.
690 safe - create file even if in PRETEND mode
693 (execute <argument> ...)
695 Executes an AmigaDOS script with the arguments given. NOTE: Does not ask user
696 for confirmation, however this can be added by using "askchoice" or "askbool".
699 help, prompt - as above
700 confirm - if this option is present, the user will be asked for
701 confirmation, otherwise the execute proceeds silently.
702 safe - execute script even if in PRETEND mode
704 Returns a result if executed under 2.0. Returns 0 under 1.3. See NOTES for
705 workarounds under 1.3.
710 Executes a compiled program with the arguments given. NOTE: Does not ask user
711 for confirmation, however this can be added by using "askchoice" or "askbool".
714 help, prompt - as above
715 confirm - if this option is present, the user will be asked for
716 confirmation, otherwise the run proceeds silently.
717 safe - run program even if in PRETEND mode
719 Returns a result is executed under 2.0. Returns 0 under 1.3. See NOTES for
720 workarounds under 1.3.
723 (rexx <argument> ...)
725 Executes an ARexx script with the arguments given. NOTE: Does not ask user for
726 confirmation, however this can be added by using "askchoice" or "askbool".
727 If the ARexx server is not active, an error will be generated. Parameters:
729 help, prompt - as above
730 confirm - if this option is present, the user will be asked for
731 confirmation, otherwise the rexx script proceeds silently.
732 safe - execute script even if in PRETEND mode
735 (makeassign <assign> [<path>] (parameters))
737 Assigns 'assign' to 'path'. If 'path' is not specified, the assignment is
740 safe - assign even if in PRETEND mode
742 Note: assign must be supplied without a colon; i.e. "ENV" not "ENV:".
745 (rename <oldname> <newname> <parameters>)
747 Renames a file or directory. If the "disk" parameter is given, then this
748 command relabels the disk named oldname to newname. When relabeling a disk,
749 ONLY include a colon in the oldname. Returns 1 if the rename was successful,
750 0 if it failed. Parameters:
752 help, prompt - as above
753 confirm - if this option is present, the user will be asked for
754 confirmation, otherwise the rename proceeds silently.
755 disk - switch to get rename to relabel a disk.
756 safe - rename even if in PRETEND mode
759 (delete <file> <parameters>)
761 Delete a file. Note that a write protected file is considered "delete
762 protected" as well. Parameters:
764 help, prompt - as above
765 confirm - if this option is present, the user will be asked for
766 confirmation, otherwise the delete proceeds silently.
767 (optional <option> <option> ...) - should deletions be forced.
769 "force" - unprotect destination
770 "askuser" - ask user if the file should be unprotected
772 In the case of "askuser", the default for novice mode is an answer
773 of "no". Therefore, you may want to use "force" to make the
774 novice mode default answer appear to be "yes".
775 (delopts <option> <option> ...) - removes options set by "optional"
776 safe - delete even if in PRETEND mode
779 (protect <file> [<string of flags to change>] [<decimal mask>] <parameters>)
781 Either gets the protection status of a file (if a second argument is not
782 given), or sets it. Two methods exist for setting the status: string
783 (e.g. "+r -w +e -d") or numeric (e.g. 5). The string method allows the
784 changing of any of the flags individually, while numeric writes to all flags at
785 once (possibly changing bits unintendedly). The bits in the binary
786 representation of the decimal mask correspond to the flags in the following
789 8 7 6 5 4 3 2 1 <- Bit number
791 h s p a r w e d <- corresponding protection flag
796 | | | | | | +--- | 0 = flag set
797 | | | | | +----- | 1 = flag clear
802 | | +----------- | 0 = flag clear
803 | +------------- | 1 = flag set
806 Note that the meaning of the bits in the numeric value follows the DOS
807 convention that a 1 in the high four bits (flags "hspa") indicates that the
808 flag is set, while a 1 in the lower four bits (flags "rwed") indicates that
811 When setting bits, "protect" returns 1 if the attempt succeeded, else it
812 returns a 0. Getting the bits returns either the numeric value of the
813 protection status (see interpretation, above) or -1 upon failure. Parameters:
815 safe - change protection even if in PRETEND mode
818 (abort <message> <message> ...)
820 Exits the installation procedure with the given messages and then processes the
821 onerror statements (if any).
824 (exit <string> <string> ... (quiet))
826 This causes normal termination of a script. If strings are provided, they are
827 displayed. The "done with installation" message is then displayed. The
828 "onerror" statements are not executed. If (quiet) is specified, the final
829 report display is skipped.
834 This statement is used to inform the user how complete the installation is.
835 The number (which must be between 0 and 100) will be printed in the title bar
836 of the installer window with a '%' sign.
839 (message <string> <string> ...)
841 This statement displays a message to the user in a window, along with Proceed,
842 Abort and optional Help buttons. Note that messages are not printed when
843 running at user level 0 (novice). Parameters:
845 help - optional help text
848 (working <string> <string> ...)
850 The strings will be concatenated to form a message which will appear below a
851 standard line that reads "Working on Installation". Useful if you are doing a
852 long operation other than file copying (which has its own status display).
855 (welcome <string> <string> ...)
856 Installer looks for the occurrence of this statement in a script file during
857 compilation. If it does not exist (as is the case for older scripts) the
858 "Welcome to the <APPNAME> App installation utility" display is presented to the
859 user as soon as compilation has finished. If this statement is present,
860 Installer will not put up the "Welcome..." display until the (welcome)
861 statement is reached. This allows for the execution of code before the first
862 displays come up. Note that the state of the "@user-level" and "@pretend"
863 variables will be based on the initial defaults including any modification by
864 tooltypes. The string arguments are prepended to the standard help text for
865 whichever of the two initial displays appears first.
868 4.3 Control Statements
870 NOTE: Strings can be used as the result of a test expression. An empty string
871 is considered a FALSE value, all others are considered TRUE.
873 (if <expression> <true-statement> <false-statement>)
875 Operates as a standard "if-then" statement.
878 (while <expression> <statement> ... )
880 Operates as a standard "do-while" statement.
883 (until <expression> <statement> ... )
885 Operates as a standard "do-until" statement.
888 (foreach <drawer name> <pattern> <statement>)
890 For each file or directory matching the pattern located in the given drawer
891 statement will be executed. The special variables "@each-name" and
892 "@each-type" will contain the filename and the DOS object type, respectively.
893 (By DOS object type we mean the same value as found in fib_DirEntryType if one
894 were to "Examine" the object.) Patterns specified in a script must be no longer
900 Execute a sequence of statements. The statements in the parentheses will be
901 executed in order -- not needed at topmost level.
904 (trap <trapflags> <statements>)
906 Used for catching errors. Works much like C "longjmp", i.e. when an error
907 occurs, control is passed to the statement after "trap". "Trapflags" determine
908 which errors are trapped. The trap statement itself returns the error type or
909 zero if no error occurred. The current error type values are:
912 2 - ran out of memory
914 4 - DOS error (see @ioerr below)
915 5 - bad parameter data
918 (onerror <statements>)
920 When a fatal error occurs that was not trapped, a set of statements can be
921 called to clean-up after the script. These statements are logged in by using
922 the onerror construct. Note that onerror can be used multiple times to allow
923 context sensitive termination.
926 (select <n> <item1> <item2> ...)
927 Only the selected element will be evaluated. In this manner, "select" can be
928 used as a case select construct.
931 4.4 Debugging Statements
935 Used to change the user level of the current installation. This statement
936 should ONLY be used when debugging scripts. Remove such statements from any
937 script before distribution of your product. Returns the current user level.
940 (debug <anything> <anything> ...)
942 When the Installer is run from a CLI, "debug" will print the values of the
943 parameters with a space between each parameter. For example, the statements
946 (debug "This value of 'myvar' is" myvar)
948 will print "This value of myvar is 2". If the parameter is an uninitialized
949 variable, then debug will print "<NIL>" as its value.
954 4.5 User-Defined Procedures
955 The Installer has user-defined procedures (subroutines). This functionality
956 is currently very primative. There are no local variables. To define a new
957 procedure, use the "procedure" command:
959 (procedure <procedure-name> <statement>)
961 You can then call the procedure like so:
965 Note that <procedure-name> is not a string, just a symbolic name.
971 (<string> <arguments> ...)
973 The "string substitution function". Whenever a text string is the first item
974 in a parenthesized group, the arguments will be substituted into the string
975 using RawDoFmt. Note: This function does no argument type checking.
978 (cat <string> <string> ...)
980 Concatenates the strings and returns the resulting string.
982 To convert an integer to a string, use the "cat" function. All integer
983 arguments to "cat" are converted to strings during concatenation. Use the
984 "set" statement to convert a string to an integer.
987 (substr <string> <start> [<count>])
989 Returns a substring of <string>, beginning with the character at offset <start>
990 (offset begins with 0 for the first character) and including <count> characters.
991 If <count> is omitted, the rest of the string (to its end) is returned.
996 Returns the length of the given string.
999 (transcript <string> <string> ...)
1001 Concatenates the strings, appends a newline and then prints the resulting
1002 string to the transcript file (if any).
1005 (tackon <path> <file>)
1007 Concatenates the filename to the pathname and returns resulting string.
1008 Currently, "tackon" cannot deal with a leading '/' in the <file> parameter.
1009 This may be fixed in a future version.
1014 Returns only the file part of a pathname.
1019 Returns only the non-file part of a pathname.
1024 Returns the full path, given a shortened path. For example, it might expand
1025 "SYS:c" to "System2.x:c".
1028 (askdir <parameters>)
1030 Asks the user for a directory name, with a scrolling list requester. The user
1031 can either create a new directory or specify an existing one. If the user
1032 cancels, the routine will cause an abort. NOTE: It is always best to first
1033 insure that the volume you want is mounted by using the "askdisk" command.
1036 prompt, help - as above
1037 default - default name of directory to be selected. Note that this may be
1038 a relative pathname.
1039 newpath - allows non-existent paths to be supplied as the default drawer.
1040 disk - show drive list first.
1041 assigns - debugging parameter; indicates that logical assigns should
1042 satisfy requests as well. Remove this parameter before
1047 (askfile <parameters>)
1049 Asks the user for a file name, with a scrolling list requester. The default
1050 path can be either reference a file or a drawer. If a file, the filename
1051 gadget is filled in. Parameters:
1053 prompt, help - as above
1054 newpath - allows non-existent paths to be supplied as the default drawer.
1055 disk - show drive list first.
1056 default - default name of file to be selected Note that this may be
1057 a relative pathname.
1060 (askstring <parameters>)
1062 Prompts the user to enter a text string. Parameters:
1064 prompt, help - as above
1065 default - the default text string.
1068 (asknumber <parameters>)
1070 Prompts the user to enter an integer quantity. Prints the allowed range below
1071 the integer gadget if the "range" parameter is given, and prevents the user
1072 from proceeding without entering a valid number. Parameters:
1074 prompt, help - as above
1075 range - valid input range of numbers
1076 default - default value
1079 (askchoice <parameters>)
1081 Ask the user to select one out of N choices, using radio buttons. Parameters:
1083 prompt, help - as above
1084 choices - a list of choice strings, such as "ok" "cancel", etc.
1085 default - the number of the default choice (defaults to 0)
1088 (askoptions <parameters>)
1090 Ask the user to select any number of N choices, using checkbox buttons. A bit
1091 mask is returned as a result, with the first bit indicating the state of the
1092 first choice, etc. Parameters:
1094 prompt, help - as above
1095 choices - a list of choice strings, such as "ok" "cancel", etc.
1096 default - a bit mask of the buttons to be checked (defaults to -1)
1099 (askbool <parameters>)
1101 Ask the user to select yes or no. Parameters:
1103 prompt, help - as above
1104 default - 0 = no, 1 = yes
1105 choices - change the positive and negative text. The defaults are
1106 "Yes" and "No". So to change the text to "Proceed" and "Cancel"
1107 you would use: (choices "Proceed" "Cancel")
1110 (askdisk <parameters>)
1112 Ask the user to insert a disk in a user friendly manner. For instance, the
1113 prompt can describe the disk by its label; e.g. "FooBar Program Disk". This
1114 function will not exit until the correct disk is inserted, or the user aborts.
1116 prompt, help - as above
1117 dest - the volume name of the disk to be inserted
1118 newname - a name to assign to the disk for future reference.
1119 This assignment is done even in Dry Run mode -- it is considered
1120 "safe" disk - switch to get a drive list to be shown initially.
1121 assigns - Debugging option; this indicates that logical assigns should
1122 satisfy the request as well. Remove this parameter before
1124 Note: volume name must be supplied without a colon; i.e. "ENV" not "ENV:".
1127 (exists <filename> (noreq))
1129 Returns 0 if does not exists, 1 if a file, and 2 if a directory. If noreq is
1130 specified, no requester is displayed if the path given is not on a mounted
1131 volume. In this case the result is 0.
1134 (earlier <file-1> <file-2>)
1136 Returns TRUE if file-1 is earlier than file-2.
1139 (getsize <filename>)
1141 Returns the size of a file.
1146 returns the name of the device upon which <path> resides. For example,
1147 "c:mount" as a path might return "WB_2.x".
1150 (getdiskspace <pathname>)
1152 Returns the available space in bytes on the disk given by pathname. Returns -1
1153 if the pathname is bad or information could not be obtained from the filesystem
1154 (even though pathname was valid).
1159 Returns the checksum of a file, for comparing versions.
1162 (getversion <filename> (resident))
1164 If the named file has a RomTag with an ID string or a 2.x version string, this
1165 will return the version number. If filename is not provided, then the version
1166 of the OS is returned instead. Note that this function does NOT assume files
1167 ending with ".library" or ".device" reside in a particular place -- the path
1168 must be included. If "resident" is specified, attempts to return version of
1169 library or device in memory. For example:
1171 (getversion "intuition.library" (resident))
1173 would return the version/revision of intuition. Note that using the "resident"
1174 parameter causes first the library and then the device list to be checked.
1176 The version number is returned as a 32 bit value, where the high order 16 bit
1177 word is the version and the low order word is the revision. Here is some sample
1178 statements to parse a version number:
1180 (set vernum (getversion "c:iconx"))
1181 (set ver (/ vernum 65536))
1182 (set rev (- vernum (* ver 65536) ) )
1185 ("You have version %ld.%ld" ver rev)
1191 Returns the contents of the given ENV: variable.
1194 (getassign <name> <opts>)
1196 Returns the pathname of the object 'name'. The default is for logical
1197 assignments only, but can be changed using an options string where the
1200 'v' - only match volumes
1201 'a' - only match logical assignments
1202 'd' - only match devices
1204 Therefore 'a' would be equivalent to having no options. Returns an empty string
1207 Notes: Name must be supplied without a colon; i.e. "ENV" not "ENV:". A variable
1208 previously set to name may be used in place of name. If a device name is
1209 used as the name and the search is limited to devices, then "getassign"
1210 will return the device or volume name if the device exists, otherwise it
1211 will return an empty string. An example usage would be
1212 (getassign "df1" "d").
1215 (database <feature>)
1217 Returns information about the Amiga that the Installer is running on. "Feature"
1218 is a string. This function always returns a string result, even if the result
1219 looks like a number. If the feature requested is not recognized, the function
1220 returns "unknown". The currently understood features and their possible values
1223 "vblank": "50", "60"
1224 "cpu": "68000", "68010", "68020", "68030", "68040"
1225 "graphics-mem": [returns a string representing the amount of free
1227 "total-mem": [returns a string representing the total amount of
1231 (select <n> <item1> <item2> ...)
1233 Returns the value of the Nth item.
1236 (patmatch <pattern> <string>)
1237 Determines if a string matches an AmigaDOS pattern. Returns either TRUE or
1241 (= <expression-1> <expression-2>)
1242 (> <expression-1> <expression-2>)
1243 (>= <expression-1> <expression-2>)
1244 (< <expression-1> <expression-2>)
1245 (<= <expression-1> <expression-2>)
1246 (<> <expression-1> <expression-2>)
1248 These are the standard relational expressions.
1251 (+ <expression> ...)
1253 Returns the sum of all the arguments.
1256 (- <expression-1> <expression-2>)
1258 Returns the first argument minus the second argument
1261 (* <expression> ...)
1263 Returns the product of all the arguments
1266 (/ <expression-1> <expression-2>)
1268 Returns the first argument divided by the second argument
1271 (AND <expression-1> <expression-2>)
1272 (OR <expression-1> <expression-2>)
1273 (XOR <expression-1> <expression-2>)
1276 Standard logical functions
1279 (BITAND <expression-1> <expression-2>)
1280 (BITOR <expression-1> <expression-2>)
1281 (BITXOR <expression-1> <expression-2>)
1282 (BITNOT <expression>)
1284 Bitwise versions of the standard logical functions
1287 (shiftleft <number> <amount to shift>)
1288 (shiftrght <number> <amount to shift>)
1290 These functions perform a bit-oriented shift by the amount specified. Zeros
1291 are shifted in on the opposite side.
1294 (IN <expression> <bit number-1> ...)
1296 Returns 0 if none of the given bit numbers (starting at 0 for the LSB) is set
1297 in the result of expression, else returns a mask of the bits that were set.
1300 4.7 Summary of Parameters
1305 A debug option used in the "askdisk" statement to indicate that logical assigns
1306 will match the askdisk request as well. This parameter should not be used for
1307 final disks, only for debugging.
1310 (help <string-1> <string-2> ...)
1312 This is used to specify the help text for each action.
1315 (prompt <string-1> <string-2> ...)
1317 This is used to provide the "title" of the screen which explains to the user
1318 what this step does.
1323 This tells the installer that an action not normally performed in Pretend
1324 mode should be performed.
1327 (choices <string-1> <string-2> ...)
1329 Used to display a series of checkmarks. This is used in the "askchoice"
1330 function to indicate what choices the user has. It can also be used in the
1331 "copyfiles" statement to specify that only certain files can be copied. (If
1332 absent, some other criterion will be used to determine which files to copy).
1337 Used in the "copyfiles" statement to specify a wildcard pattern.
1342 In the "copyfiles" statement, specifies that all files are to be copied.
1347 Specifies the file or directory to be read as part of this command.
1352 Specifies the file or directory to be modified as part of the command.
1357 Used in "copyfiles" to specify that a file will have a new name after being
1358 copied. Used in "askdisk" to assign the new name to the inserted disk. Used in
1359 "copylib" to specify that the library will have a new name after being copied.
1364 Used by "askdir" and "askfile" to allows non-existent paths to be supplied as
1368 (confirm <user-level>)
1370 On some statements, the user will only be informed of the action (and allowed to
1371 cancel it) if the "confirm" option is specified. The user level can be "expert"
1372 or "average" ("expert" is the default).
1377 Indicates to the "copyfiles" statement that accompanying ".info" files are to be
1378 copied as well. If the destination drawer does not exist, a default icon will
1379 be made for the drawer the Installer creates.
1384 Indicates to the "copyfiles" statement that accompanying ".font" files are to be
1388 (optional <option> <option> ...)
1390 Indicates to the "copyfiles" and "copylib" statements that it is not a fatal
1391 error to have a copy fail. Used for "delete" to indicate if deletion should be
1395 (delopts <option> <option> ...)
1397 Indicates to the "copyfiles", "copylib" and "delete" statements that the listed
1398 options should be _removed_ from the global internal list of options for this
1399 statement. The default global option is "fail".
1403 When used with the "copyfiles" and "copylib" statements this disables the copy
1407 (settooltype <tooltype> <value>)
1409 Used to modify a tooltype to a certain value. If the tooltype does not exist
1410 it will be created; if the <values> parameter is omitted, the tooltype will be
1411 deleted. A tooltype without a value may be added in the following manner:
1413 (settooltype <tooltype-string> "")
1415 Remember that (tooltype <tooltype-string>) deletes the tooltype given.
1418 (setdefaulttool <value>)
1420 Used to modify the default tool of an icon.
1425 Used to modify the stack size included in an icon.
1430 Used to modify the positioning of an icon to NO_ICON_POSITION.
1435 Used to swap the first two planes of the image of the icon being modified if
1436 the version of the OS if less than 36 (i.e., prior to version 2.0). This does
1437 mean that your icons need to have the 2.0 color scheme on your distribution
1443 When used with the "rename" statement, specifies that a disk relabel operation
1444 is really desired. When used with the "askdir" or "askfile" statement,
1445 specifies that a drive list should be shown initially (instead of a file list).
1450 Within a "textfile" statement, will append the string to the textfile.
1453 (include <filename>)
1455 Within a "textfile" statement, will append the listed file to the textfile.
1460 Specifies the default value of an askchoice, askstring, or asknumber action.
1465 Specifies the range of allowable numbers for an asknum statement.
1468 (command <text> ...)
1470 Specifies the text of a command to be inserted into the S:User-Startup file.
1471 (Argument strings are merged.)
1474 4.9 Pre-Defined Variables
1476 Pre-defined variables are available for use by the install script. They may be
1477 modified on-the-fly, but their type may not be changed (e.g. from strings to
1478 numeric) unless it never had a value to begin with.
1482 Replacement text for the "Abort Install" button.
1485 The APPNAME value given at startup.
1488 The pathname of the icon used to start the installer.
1491 If this variable is set to a valid path, then the installer will change
1492 directory to it whenever a "run" or "execute" statement is performed.
1495 The installer's suggested location for installing an application. If you
1496 installed the application somewhere else (as the result of asking the user)
1497 then you should modify this value -- this will allow the "final" statement to
1498 work properly. Note that creating a drawer and putting the application in that
1499 drawer is considered installing the application somewhere else. Set it to ""
1500 if there really is no definite place that the "application" was installed.
1501 The log file will be copied to the drawer indicated by @default-dest unless it
1505 Used to set the variable @language (default for @language is "english".
1506 The use of this variable is left up to the install script.
1509 The state of the Pretend flag (1 if Pretend mode).
1512 The user-level the script is being run at: 0 for novice, 1 for average,
1516 The text that would have been printed for a fatal error, but was overridden
1517 by a trap statement.
1520 If a script wants to supply its own text for any fatal error at various
1521 points in the script, this variable should be set to that text. The original
1522 error text will be appended to the special-msg within parenthesis. Set this
1523 variable to "" to clear the special-msg handling.
1526 The value of the last DOS error. Can be used in conjunction with the
1527 "trap" statement to learn more about what an error occurred.
1531 Used in a "foreach" loop (see above).
1544 Default help text for various functions. These can be appended to the
1545 explanation provided for a particular action or used as is.
1548 Section 5: Installer Language Quick Reference
1552 Attempts to install in "work:" by default if it exists.
1553 HELP key brings up context-sensitive help.
1554 Esc key brings up the abort requester.
1555 Can add assigns to s:User-Startup, and adds lines to
1556 s:Startup-Sequence (if necessary) to make sure s:User-Startup is executed
1558 Can check versions of files/libraries.
1559 Install can run in "Real" (do it) or "Pretend" (dry run) modes.
1564 5.2 Quick Language Overview
1566 Language is lisp-like (lots of parentheses (()) (-:).
1567 Variables are typeless (a la ARexx), i.e., strings and numbers are treated
1569 Strings are delimited with " or '.
1570 Certain embedded sequences are available for strings:
1571 '\n' newline '\r' return
1573 '\"' double-quote '\\' backslash
1574 Statements go in parentheses ( ). The general format is:
1575 (operator <operand1> <operand2> ...)
1576 E.g., to assign the value '5' to the variable 'x', use
1578 To produce the sum of two numbers, use
1580 Note that there is no difference between operators and functions-- the
1581 function 'set' and the arithmetic operator '+' are both used exactly the
1583 Combining statements: A statement can be used as the operand to another
1586 In this case, the statement '(+ 3 5)' is evaluated first, and the result
1587 is 8. You can think of this as having the '(+ 3 5)' part being replaced
1590 Note that the '(+ 3 5)' part actually produced a value: "8". This is
1591 called the "result" of the statement. Many statements return results,
1592 even some that might surprise you (such as "set" and "if").
1593 Comments are preceded with a semi-colon ";"
1594 Hex numbers are preceded with a $ (e.g. $23).
1595 Binary numbers are preceded with a % (e.g. %0101).
1596 Many statements return a value which can be used in assignments, tests, etc.
1597 Data can be formatted using a string literal with argument placemarkers,
1599 ("I am %ld foot %ld inches tall." 6 3)
1600 ;Produces a string with %ld's replaced with 6 and 3.
1601 ;Remember that decimal values must be specified as longwords.
1606 5.3 Pre-Defined Variables
1608 @icon - pathname of install script icon
1609 @execute-dir - installer will change to this directory before performing
1610 a "run" or "execute" statement.
1611 @default-desk - dir. where install wants to put things by default
1612 @pretend - state of "pretend" (dry run mode) flag 0-Real, 1-Pretend
1613 @language - language specified in tooltypes/CLI (default "english")
1614 @user-level - 0-Novice, 1-Average, 2-Expert
1615 @error-msg - msg that would be displayed if error not trapped (see trap)
1616 @special-msg - custom fatal error message
1617 @each-name, @each-type - used in "foreach" loop
1618 @execute-dir - If set to a valid path, installer will change directory to
1619 it whenever a "run" or "execute" statement is performed.
1624 5.4 Default Help String Variables
1626 @askoptions-help @askchoice-help @asknumber-help
1627 @askstring-help @askdisk-help @askfile-help
1628 @askdir-help @copylib-help @copyfiles-help
1629 @makedir-help @startup-help
1635 Many commands have standard parameters (some optional):
1636 (all) ; specifies all files are to copied
1637 (append <string>) ; add string to text file (for textfile)
1638 (choices <string1> <string2> ...) ; radio button options
1639 (command <string1> <string2>...) ; add to s:user-startup
1640 (confirm <user-level>) ; confirmation
1641 (default <value>) ; default value, choice, string, etc.
1642 (dest <file>) ; output to <file>
1643 (help <string1> <string2> ...) ; define current help info
1644 (include <file>) ; insert file in textfile statement
1645 (infos) ; copy .info files also
1646 (newname <name>) ; specify new file or disk name
1647 (noposition) ; make icon "floating"
1648 (pattern <string>) ; used w/ "files" for patterns
1649 (prompt <string1> <string2> ...) ; text to show user
1650 (range <min> <max>) ; numeric input (asknum) range
1651 (safe) ; force installer to perform action even if in Pretend mode.
1652 (settooltype <tooltype> <value>) ; set icon tool type
1653 (setdefaulttool <value>) ; set icon's default tool
1654 (setstack <value>) ; set icon's stack value
1655 (source <file>) ; read from <file>
1656 (swapcolors) ; swap first two planes of icon's image if OS rev less than v36
1657 (welcome <string> <string> ...) ; Invokes "welcome" display
1659 Note: Custom parameters are shown below in < >, and standard parameters are
1660 show as (param..) where "param" is one of help, prompt, safe, etc. See above
1661 for details on standard parameters.
1664 (abort <string1> <string2> ...)
1665 ; abandon installation
1668 ; display percentage through install in titlebar
1670 (copyfiles (prompt..) (help..) (source..) (dest..) (newname..) (choices..)
1671 (all) (pattern..) (files) (infos) (confirm..) (safe)
1672 (optional <option> <option> ...) (delopts <option> <option> ...) (nogauge))
1673 ; copy files (and subdir's by default). files option say NO subdirectories
1675 (copylib (prompt..) (help..) (source..) (dest..) (newname..) (infos) (confirm)
1676 (safe) (optional <option> <option> ...) (delopts <option> <option> ...)
1678 ; install a library if newer version
1680 (delete file (help..) (prompt..) (confirm..) (optional <option> <option> ...)
1681 (delopts <option> <option> ...) (safe))
1684 (execute <arg> (help..) (prompt..) (confirm) (safe))
1685 ; execute script file
1687 (exit <string> <string> ... (quiet))
1688 ; end installation after displaying strings (if provided)
1690 (foreach <dir> <pattern> <statements>)
1691 ;do for entries in directory
1693 (if expr truestatements falsestatements)
1696 (makeassign <assign> <path> (safe)) ; note: <assign> doesn't need `:'
1697 ; create an assignment
1699 (makedir <name> (prompt..) (help..) (infos) (confirm..) (safe))
1702 (message <string1> <string2>...)
1703 ; display message with Proceed, Abort buttons
1705 (onerror (<statements>))
1706 ; general error trap
1708 (protect <file> [<string of flags to change>] [<decimal mask>] <parameters>)
1709 ; Get/Set file protection flags
1711 (rename <old> <new> (help..) (prompt..) (confirm..) (safe))
1714 (rexx <arg> (help..) (prompt..) (confirm..) (safe))
1715 ; execute ARexx script
1717 (run <arg> (help..) (prompt..) (confirm..) (safe))
1720 (set <varname> <expression>)
1721 ; assign a value to a variable
1723 (startup (prompt..) (command..))
1724 ; add a command to the boot scripts (startup-sequence, user-startup)
1726 (textfile (prompt..) (help..) (dest..) (append) (include..) (confirm..) (safe))
1727 ; create text file from other text files and strings
1729 (tooltype (prompt..) (help..) (dest..) (settooltype..) (setstack..)
1730 (setdefaulttool..) (noposition) (confirm..) (safe))
1733 (trap <flags> <statements>)
1734 ; trap errors. flags: 1-abort, 2-nomem, 3-error, 4-dos, 5-badargs
1736 (until <expr> <statements>)
1737 ; do-until conditional structure (test end of loop)
1739 (welcome <string> <string> ...)
1740 ; Allow Installation to commence.
1742 (while <expr> <statements>)
1743 ; do-while conditional structure (test top of loop)
1746 ; indicate to user that installer is busy doing things
1751 (= <expr1> <expr2>) ; equality test (returns 0 or 1)
1753 (> <expr1> <expr2>) ; greater than test (returns 0 or 1)
1755 (>= <expr1> <expr2>) ; greater than or equal test (returns 0 or 1)
1757 (< <expr1> <expr2>) ; less than test (returns 0 or 1)
1759 (<= <expr1> <expr2>) ; less than or equal test
1761 (+ <expr1> <expr2> ...) ; returns sum of expressions
1763 (- <expr1> <expr2>) ; returns <expr1> minus <expr2>
1765 (* <expr1> <expr2> ...) ; returns product of expressions
1767 (/ <expr1> <expr2>) ; returns <expr1> divided by <expr2>
1769 (AND <expr1> <expr2>) ; returns logical AND of <expr1> and <expr2>
1771 (OR <expr1> <expr2>) ; returns logical OR of <expr1> and <expr2>
1773 (XOR <expr1> <expr2>) ; returns logical XOR of <expr1> and <expr2>
1775 (NOT <expr>) ; returns logical NOT of <expr>
1777 (BITAND <expr1> <expr2>) ; returns bitwise AND of <expr1> and <expr2>
1779 (BITOR <expr1> <expr2>) ; returns bitwise OR of <expr1> and <expr2>
1781 (BITXOR <expr1> <expr2>) ; returns bitwise XOR of <expr1> and <expr2>
1783 (BITNOT <expr>) ; returns bitwise NOT of <expr>
1785 (shiftleft <number> <amount to shift>) ; logical shift left
1787 (shiftrght <number> <amount to shift>) ; logical shift right
1789 (IN <expr> <bit-number> <bitnumber>...) ; returns <expr> AND bits
1791 (<format string> <arg1> <arg2> ...) ; printf clone
1793 (askdir (prompt..) (help..) (default..) (newpath) (disk))
1794 ; ask for directory name
1796 (askfile (prompt..) (help..) (default..) (newpath) (disk))
1799 (askstring (prompt..) (help..) (default..)) ; ask for a string
1801 (asknumber (prompt..) (help..) (range..) (default..)) ; ask for a number
1803 (askchoice (prompt..) (choices..) (default..)) ; choose 1 options
1805 (askoptions (prompt (help..) (choices..) default..)) ; choose n options
1807 (askbool (prompt..) (help..) (default..) (choices..)) ; 0=no, 1=yes
1809 (askdisk (prompt..) (help..) (dest..) (newname..) (assigns))
1811 (cat <string1> <string2>...) ; returns concatenation of strings
1813 (exists <filename> (noreq)) ; 0 if no, 1 if file, 2 if dir
1815 (expandpath <path>) ; Expands a short path to its full path equivalent
1817 (earlier <file1> <file2>) ; true if file1 earlier than file2
1819 (fileonly <path>) ; return file part of path (see pathonly)
1821 (getassign <name> <opts>) ; return value of logical name (no `:')
1822 ; <opts: 'v'-volumes, 'a'-logical, 'd'-devices
1824 (getdevice <path>) ; returns name of device upon which <path> resides
1826 (getdiskspace <path>) ; return available space
1828 (getenv <name>) ; return value of environment variable
1830 (getsize <file>) ; return size
1832 (getsum <file>) ; return checksum of file for comparison purposes
1834 (getversion <file> (resident))
1835 ; return version/revision of file, library, etc. as 32 bit num
1837 (pathonly <path>) ; return dir part of path (see fileonly)
1839 (patmatch <pattern> <string>) ; Does <pattern> match <string> ? TRUE : FALSE
1841 (select <n> <item1> <item2> ...) ; return n'th item
1843 (strlen <string>) ; string length
1845 (substr <string> <start> [<count>]) ; returns a substring of <string>
1847 (transcript <string1> <string2>) ; puts concatenated strings in log file
1849 (tackon <path> <file>) ; return properly concatenated file to path