How to write configuration files in XML for GEMSetup 2.0

Written by Joachim Fornallaz and Bengy Collins


0 Elements

0.1 General information

File or folder path values

These values are always treated as relative paths to the configuration file.


1 File header

<?XML version="1.0"?>

This means that the base file format is XML 1.0. GEMSetup only reads Atari character encoding.

<!DOCTYPE gemsetup SYSTEM>

The specification of the higher level file format. The type must be "gemsetup", no other type is accepted.


2 Root element

As the document type is "gemsetup", the root element must be "GEMSETUP"

Attributes:

name value type description example required
version char string Version number of GEMSetup the XML file is intended for <GEMSETUP version="2.0.0"> yes

Tag type:

Start & end tag.

Content:


2.1 Head Element

The head element contains global information for the installation

Attributes

No.

Tag type:

Start & end tag.

Content:


2.1.1 Application element

This element contains information about the application you want to install

Attributes:

name value type description example required
file string File name of the application file="mozilla.app" yes
path path Destination path of the application. A '$dest' stands for the target path path="$dest\" no
name string Name of the application name="Mozilla" yes
version string Version of the application version="5.00" no
xacc 2 char string xacc type of the application. See OLGA documentation for more information. xacc="DT" yes

Tag type:

Empty tag

Content:

No.


2.1.2 Setup element

This element contains information about the installation mode

Attributes:

name value type description example required / default value
folder string The name of the folder in which the application will be installed. The user is able to change this variable prior to installation. folder="Mozilla" no
default string Default language of the application. Required when using the multi language feature of GEMSetup. default="english" yes
rootpath boolean If true, GEMSetup displays a popup to choose the target drive instead of the path field. Needed for OS setup. rootpath=TRUE no / FALSE
serialize boolean If true, GEMSetup displays a serial number dialog. The s/n routines are handled by an extra plug-in. serialize=TRUE no / FALSE
calcsize boolean If true, GEMSetup displays the disk space that is needed for the installation. calcsize=TRUE no / set by GSU_TOOL
arcssize integer Size of all lzh archives used for the installation arcssize=4719 no / set by GSU_TOOL

Tag type:

Empty tag

Content:

No.


2.1.3 Icon element

This element contains information about the icons used by your application

Attributes:

name value type description example required / default value
rsc path file path of the resource containing the icons rsc="data\stdicons.rsc" no
nr integer object number minus 1 of the application icon nr=0 no

Tag type:

Empty tag

Content:

No.


2.1.4 Readme element

This element contains information about readme and license files that GEMSetup can display before or after the setup procedure

Attributes:

name value type description example required / default value
onstart path path of the readme text to be displayed before the main GEMSetup window is opened onstart="data\readme.txt" no
onquit path path of the readme text to be displayed after the main GEMSetup window is closed onquit="$DEST\thanks.txt" no
license path path of the license text, which will be displayed after the 'onstart' text license="$LOCAL\license.txt" no

Tag type:

Empty tag

Content:

No.


2.1.5 Hypertext element

This element contains information regarding hypertext installation

Attributes:

name value type description example required / default value
file path path of ST-Guide hypertext file file="mozilla.hyp" no
page char string page name of the ST-Guide hyp. file to be opened by default page="Setup of Mozilla" no
html url Homepage location of your application html="http://www.mozilla.org/" no

Tag type:

Empty tag

Content:

No.


2.2 Body Element

The body element contains all setup entries

Attributes

No.

Tag type:

Start & end tag.

Content:


2.2.1 Entry element

This element contains information about the Entry attributes

Attributes:

name value type description example required / default value
type char string All subentries can either be normal checkboxes or radio boxes. type=CHECKBOX no / CHECKBOX
name char string Unused by now. name="Entry 1" no
chck path Path of the check program that is called before proceeding the subentries. The program is called using the system call Pexec(0,..) with the path of your application as parameter (-p) and should return 1, to let GEMSetup install all items in this entry. All other return values mean that the installation of the entry is not allowed. If the program returns -10, GEMSetup shows an alert, so the user knows an entry can not be installed on the actual system.
Example of the parameter string that is given to the check program:
-p 'D:\Internet\Mozilla\'
check="chckmagx.ovl" no

Values for type:

Tag type:

Start & end tag.

Content:


2.2.1.1 Text element

This element contains the Text of the entry.

Name

text

Attributes:

No.

Tag type:

Start & end tag.

Content:

Text


2.2.1.2 Bubble element

This element contains the bubble help text of the entry.

Name

bhlp

Attributes:

No.

Tag type:

Start & end tag.

Content:

Text


2.2.1.3 Files element

This element contains files that can be installed. It can either be a single file, files being contained in a lzh archive, or multiple files.

Name

files

Attributes:

name value type description example required / default value
type char string Type of the target folder for the files entry type=APPL no / APPL
arc path LHarc archive containing the files to be installed. If there is no arc attribute, the source files have to be regular, uncompressed files. arc="data\package1.lzh" no
path path Depending if the source files are compressed or not, this attribute has different meanings:
  • no archive: Location of the source file.
  • arc is set: A "filter" determine which files of the archive have to be extracted. Wildcards are allowed.
path="data\mozilla.hyp"

or if arc is set

path=*
yes
dest path Depending if the source files are compressed or not, this attribute has different meanings:
  • no archive: Name of the target file. It can differ from the source file. You can also use a relative path like dest="MyFolder\TheFile.txt", the folder "MyFolder" is created by GEMSetup if it does not already exist.
  • arc is set: If the value ends with a backslash, it indicates the relative path the files of the archive have to be extracted from. If there is no backslash, it works like described above (no archive), provided that there is only 1 file in the archive, or if the filter (path) has no Wildcards. If the value is empty (dest=""), the files of the archive are extracted into the target folder ignoring the internal folder structure of the archive.
dest="mozilla.hyp"

or if arc is set

dest="MyFolder\"
no
repl path Files (separated by comma) to be replaced before installing this files-entry. The files are just renamed and not deleted. repl="mintnp.prg,mint.cnf" no
care path Files (separated by comma) that should not be overwritten without any warning when installing an application over an older version. care=bookmarks.html no
sn path Used for serialization of program files. sn=mozilla.app no
link path Number of the files-entry, that is dependent of this files-entry. When selecting the dependent files-entry, this files-entry is automatically selected too. This method is needed in order to prevent entries that must be installed together from being installed alone. link=1 no
sets number If set to 1, this file-entry is selected by default sets=1 no / 0
fcnt number Amount of files contained in this files-entry fcnt=8 no / set by GSU_TOOL
disc number Number of the floppy (removable) disk in which the source files are located on disc=2 no
icnr number Used for type=FTYP, indicating the object number minus 1 of the icon corresponding to this file type. icnr=3 no
size number Disk space in bytes used for the whole files-entry size=5487 no / set by GSU_TOOL

Values for type:

type target folder
AUTO AUTO folder
CPX CPX folder
ACC Accessory folder
START START folder (MagiC) or 'run' command in N_AES.CNF
STOP STOP folder (MagiC only)
XMGX XTENSION folder (MagiC only)
MINT MULTITOS or MINT folder
SLB Folder for Shared Libraries
TTP Folder for TTP's, usually $PATH
MAN Folder for manual pages
HYP Folder for ST-GUIDE hypertexts
HOME $HOME directory
VFNT Folder for vectorfonts (NVDI)
APPL Target installation path, set by the user
MULTI Means START using MagiC and ACC using TOS. The file is installed in the start folder using MagiC or is installed in the accessory path using TOS/MultiTOS/N.AES. If the file is executable, GEMSetup changes the extension to *.ACC.

There are 3 more types that are a bit different from the others:

name value type description example required / default value
name char string Name of the OLGA object (used for OLGA-InplaceDrawing) name="HTML document" no
path char string Extension of the file type path="html" yes
name value type description example required / default value
name char string Name of the environment variable name="HTMLBROWSER" yes
path char string Value of the variable, $DEST can be used as placeholder for the target path set by the user path="$DEST\Mozilla.app" yes
name value type description example required / default value
name char string Name of the file type (unused by now) name="HTML Document" no
path char string Value of the variable, $DEST can be used as placeholder for the target path set by the user path="*.html" yes
icnr number The object number minus 1 of the icon (see icon element) corresponding to this file type. icnr=3 no

Tag type:

Start & end tag.

Content:


2.2.1.3.1 Text element

This element contains the Text of the files element.

Name

text

Attributes:

No.

Tag type:

Start & end tag.

Content:

Text


2.2.1.3.2 Item element

This element is used to store multiple files-entries in one. Each item element first inherits all values from the parent files element. By adding specific attributes in the item tag, you can override the inherited settings.

Name

item

Attributes:

name value type description example required / default value
type char string see Files element
arc path
path path
dest path
repl path
fcnt number

Tag type:

Empty tag

Content:

No.


Last change on Dec-20 2000