Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

Understanding the script elements



The setup scripts is readable with a text editor. It contains blocks for different items, which can be read by the setup. If you open a setup script file, like setup.inf or setup.ins, you find blocks like

File gid_File_Lib_Db31
Name = "libdb32.dll";
PackedName = "f_0320";
Size = 430080;
Dir = gid_Dir_Program;
Carrier = gid_DataCarrier;
UnixRights = 755;
Date = "23012002";
Time = "0600";
Styles = (PACKED);
End

Each block begins with a special keyword and ends with an „End“. In this case the keyword is „File“, showing that the following definition block describes a file. As already shown in the document Understanding the script language the block definition contains the name of the file, the packed name in the installation set, the size of the unpacked file, the directory in which the file shall be installed, the data carrier, the unix rights, the installation date and time and some special styles. Each definition block has to have a unique name, this is the so called global ID, GID. In the example above, the defintion block is named gid_File_Lib_Db31

There are keywords for many actions the setup can make. Each keyword shows the beginning of a definition block. An installation set only contains definition blocks. You can define the following items:

File: Describing a file in the installation set

Directory: Describes a directory the setup has to create

Profile: Describing an ini- or rc-file, the setup creates and fills during setup

ProfileItem: One line in the form Key = Value in a Profile, written by the setup

RegistryItem: One line in the form Key = Value in the setup registry, written by the setup

Folder: Creates a directory in the Windows system, for example in the start menu directory

FolderItem: Creates the links to files in the created folder, for example in the start menu folder

Shortcut: Defines a link, which has to be created by the setup

Unixlink: Definition of a link in a Unix system, created by the setup

WindowsCustomAction: A custom action that is executed by the Windows Installer service

MergeModule: A merge module defines a Microsoft Merge Module, that is merged into the msi database during packaging process

Module: Defines modules, which can be selected or deselected in a user defined installation. This item is also used to structure the setup script and all scp projects. A module contains lists of Files, Dirs, ... etc. Each product can be defined as a group of modules. There is a special process for modules with language specific files: Language Specific Module.

Installation: This is the start definition in each setup script. It contains some global settings

ScpAction: This will not appear in the setup script in an installation set. It is only important for the packing process.

There are two groups of items. The one group describes GIDs, which have to be connected to modules. The other group describes global definitions. As you can see, the modules have a special position in the setup script.

A module looks like:

Module gid_Module_Prg_Math_Bin
MOD_NAME_DESC ( MODULE_PRG_MATH_BIN );
ParentID = gid_Module_Prg_Math;
Default = YES;
Minimal = YES;
Files = (gid_File_Dtd_Math,gid_File_Exe_Smath,gid_File_Html_W3c_Ipr,gid_File_Lib_Sm,gid_File_Res_Sm);
Unixlinks=(gid_Unixlink_Mylink);
Dirs = (gid_Dir_Mydir);

End



Module dependent items:

This module block defines the module gid_Module_Prg_Math_Bin, which describes the math module, that can be selected or deselected in a userdefined installation. As you can see, the module definition, contains lists of other GIDs. The lists Dirs (item Directory), Files (item: File), Unixlinks (item: Unixlink), contain all GIDs, which describe definitions, that are installed by the setup, if the module is selected. Other items, like Profiles, ConfigurationItems, etc. are not assigned to a module, but have to contain the ModuleID in their definition!

Items without module assignment:

The items Installation and ScpAction are global, they do not belong to a module. The item WindowsCustomAction knows the file, that contains the code of the custom action. Therefore this is assigned to a file, not to a module. The item ShortCut is assigned to a File or to another ShortCut.





Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.