-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
README.xml
1207 lines (903 loc) · 54.6 KB
/
README.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
The setup XML specification has the following format:
-----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<install>
one or more install options
</install>
----
An example product specification file is at the bottom of this document.
The XML file should be a well-formed Unicode file (UTF-8), especially if you
intend to use internationalization features and non-ASCII character sets.
The INSTALL element:
The install element contains one or more OPTION elements specifying
different install options.
All attribute names are case-sensitive, and are lower-case.
There are several required attributes of the install element:
product This is used as the product name and as the default top-level
install directory name.
desc This is used a product description string, and is used in
strings naming the product (title bar, icon description, etc.)
version This is the product version string
There are several optional attributes of the install element:
path This contains the default directory which will contain the
product installation directory. The installation directory
may be changed by the user at installation time.
The default is: /usr/local/games
binarypath This can be used to specify the default binary directory (where
symbolic links to the binaries will be installed), instead of the
first writable entry in the user's $PATH. The action is very similar
to the -b command line argument to setup, and is secondary to it.
preinstall This is a shell script which is executed before any options
are installed. It is run with the installation destination
as a command line argument.
postinstall
This is a shell script which is executed after all options
are installed. It is run with the installation destination
as a command line argument.
Both the preinstall and postinstall scripts are run with
some default environment variables set. Look at the 'SCRIPT'
section below for a detailed list.
preuninstall
This is a shell script which is executed at the very beginning
of the uninstall process. It will be run before any RPM uninstall
scripts. This file is not installed, but is added to the
beginning of uninstall script.
postuninstall
This is a shell script which is executed at the very end of the
uninstall process. It will be run after any RPM uninstall
scripts. This file is not installed, but is added to the
end of the uninstall script.
IMPORTANT: An actual file name for a shell scripts needs to be specified,
not a command, for both pre/postuninstall entries.
"sh script.sh" is incorrect, but "script.sh" is correct.
Both the preuninstall and postuninstall scripts will have access
to the default environment variables. See the 'SCRIPT' section
for details.
Also, these scripts will be run at the very beginning and very
end of the install cleanup if the install is aborted.
eula This is a file which contains a text license agreement that
must be agreed to by the user before the installation will
proceed.
*OBSOLETE* DO NOT USE! Starting from version 1.3.0, use the
EULA element instead (see below).
readme This is the README file for the product, the user will be
prompted to see it before the installation begins. The default
value is "README" if not specified and such a file is
actually present.
*OBSOLETE* DO NOT USE! Starting from version 1.3.0, use the
README element instead (see below).
splash Use this tag to specify an alternate splash image (displayed to
the left of the installer in X11). The image must be in XPM format,
and the default name for this attribute is "splash.xpm".
splashpos This option sets the position that the splash image
will appear on the setup screen. If unspecified, the default is
"left". The only valid options currently are "left" and "top".
url This is a web site which is launched after the install is
completed.
update_url This is the location where updates for this product can be
fetched from.
localurl This is the local HTML file that is loaded if the network
is down, or the web site cannot be reached. It should be
specified as a path relative to the setup working directory.
This is a secondary URL, and should not be specified without
also specifying a primary URL in the "url" attribute.
auto_url This is a flag which tells whether or not to automatically
launch the web browser on the product URL. It can be either
"true" to launch the browser, or "false" to prompt the user.
The default behavior is to prompt the user as to whether or
not to launch the web browser.
cdrom If this attribute has the value "required", then setup will
prompt the user asking them to mount the product CDROM.
*NEW* : The 'cdromfile' attribute must also be set.
cdromfile This is a (now mandatory) unique file that is looked for on the
mounted CDROM to see if it is indeed the product CDROM.
This attribute must always be set if the 'cdrom' attribute is used.
nouninstall This is an optional flag which, if specified, tells setup
not to generate an uninstall script after it runs. It also
doesn't generate any data for product queries and auto-updating.
uninstall This attribute is used to change the name of the generated
'uninstall' script. If not used, the script will always be
named 'uninstall', which can be a problem if you need to
install different products in the same directory.
*THIS ATTRIBUTE IS DEPRECATED AS OF SETUP 1.5.0*
nobinaries When set to "yes", then setup won't prompt the user for a
path for binaries. Set this when this installation won't
actually install any binary file.
*THIS ATTRIBUTE IS DEPRECATED AS OF SETUP 1.6.2*
Not putting a 'binary' tag in the XML file will have the same effect.
promptbinaries When set to "yes", setup will create a checkbox
to allow the user whether or not to create
a symbolic link to the binaries.
This setting has no effect if nobinaries is "yes".
fork If set to "yes", and a binary can be started upon successful installation,
setup will fork() itself, allowing the installer to exit as the program is
running. Note: this may cause problems removing setup binaries within setup.sh
on some platforms.
meta When this attribute is set to "yes", then setup will act as
a meta-installer, i.e. it will allow the user to select a
product and set-up will respawn itself for the selected
product installation.
See the section "About Meta-Installation" below.
component When this attribute is present, its value is the name of the component
that will created by this installer. This means that the files will be added
to an existing installation of the product, and that basic configuration parameters
such as the installation path will be used from the previous installation.
Currently setup is not able to update an existing component, thus if the component
is detected as already installed the installation will fail.
Important: This attribute can't be mixed with <component> elements.
superuser If set to 'yes', then the installer will refuse to start if not run as
the super-user (root).
(CARBON ONLY) This option causes the installer to prompt the user for
appropriate credentials. This is a standard thing for Mac and should
typically be done instead of "running as root".
express If set to 'yes', then the user will have the choice between "Recommended" and
"Expert" classes of installation. "Expert" is the normal mode, when the user has to confirm
all steps of the installation. "Recommended" uses the defaults values and proceeds to the
installation automatically with as less input from the user as possible.
once If set to 'yes', the installer won't allow to install the same product twice, and will ask
the user to uninstall manually a previous instance if it could be detected.
reinstall If set to 'yes', the install will allow the product to be reinstalled. The default behavior
is not to let the user install product options twice.
reinstallnowarning If set to 'no' (the default), the install will warn the user
that a reinstall is about to occur.
reinstallfast If set to 'yes' and this run is a reinstall, the installer will skip the options
screen and go directly to installation. This is good for automatic updates of
previously-installed software. Unless explicitly disabled (see eula's
ignoreonreinstall option), license agreements still need to be explicitly agreed
to before the reinstall can proceed. You still need to set several other options
in the install tag to get a fully automatic reinstall (reinstallnowarning,
nopromptoverwrite, etc).
appbundle (CARBON ONLY) If this is "yes", the destination folder does not include the product
name as part of the path. An application bundle is typically installed much like
a single file would be...and so is treated as such.
The app bundle path usually specified in the "path" attribute of the "files" element,
or it is specified in the archives directly.
category Indicates the product category, used to specify the menu entry on some systems. Defaults
to "Games"
manpages If set to "yes", then the user will be prompted for the install pages installation path.
Should be used when using the MANPAGE element described below.
nopromptoverwrite If set to 'yes' existing files will be overwritten without
prompting the user. This was the default before setup 1.6.4
nomenuitems If set to 'yes', menu items for Gnome/KDE/etc will not be installed, and the
user will not be prompted about installing them.
appbundleid (CARBON ONLY) This string means that you are installing new files into an existing
Application Bundle. If the bundle isn't found, the installation aborts, otherwise, all
files are added relative to the base of the app bundle. The string specified here is
the app bundle's CFBundleIdentifier entry in its Info.plist file. LaunchServices are
used to find the bundle and the user can be prompted to manually locate the product
if LaunchServices fails to find it. This is all MacOS-specific, and unrelated to the
"component" attribute.
appbundledesc (CARBON ONLY) This string is used with the "appbundleid" attribute...it's a human
readable text describing the app bundle in question.
requireosx (CARBON ONLY) This string specifies the minimum version of Mac OS X
that must be installed on the system for the product to be installed.
The CDROM element:
An installer can fetch the necesary data files from one or more CDROM discs. As of setup 1.5.0,
each available CDROM must be described through a <cdrom> element, and the 'cdromid' attributes
of the <binary> and <files> elements.
This element takes two mandatory attributes :
id An unique identifier that will be used to reference this CDROM in other elements.
name A string describing the CDROM, intended to be prompted to the user.
The file name given in the CDROM element is the path to a unique file on the described CDROM that
will be used to identify the media. Here is an example :
<cdrom id="cd1" name="Disc Number One">cdrom1.dat</cdrom>
<cdrom id="cd2" name="Disc Number Two">cdrom2.dat</cdrom>
This describes two CDROMs, and the presence of one of the .dat files at the root of each CDROM will
identify which CDROM is which.
Hint: To avoid useless CD prompts to the user, when using a multiple CDROM installer you should always
specify the size of the files in the XML file directly. This way the user won't have to swap CDs when
the installer is trying to compute the total size of the options.
The user can define at runtime the path to CD images by using the environment variables
SETUP_CDROM_xxx, where xxx is the upper-case ID for the CDROM, i.e. SETUP_CDROM_CD1 for the
first CD of the above example. The SETUP_CDROM environment variable can also be used and it will
be used to match all CDROMs, if you can have all CD images under the same directory.
The COMPONENT element:
Components are used to divide the product in independant entities. Several components can be
installed at the same time by setup, and the user interface will reflect that. The installation
options have to be structured as children of this element.
Please note that components can not be nested. Thus COMPONENT elements have to be direct children
of an INSTALL element.
This element takes two mandatory attributes :
name The name of the component.
version A string describing the version of the component.
There are also optional attributes :
default If 'yes' then the component is marked as being the default component, i.e. the main
component for the product. It has to be defined in one of the components.
showname If 'yes' then the component name will be displayed in the user interface.
arch This component is only available on the specified architectures.
The architecture can be any of:
x86, ppc, alpha, sparc64, etc.
libc This component is only available with the specified version of libC.
The version can be one of:
libc5, glibc-2.0, glibc-2.1, etc.
distro This component is only available with the specified OS distribution.
Look at the end of this file for a list of possible values.
if Specify an expression that has to be satisfied. See the BOOL element for more details.
preuninstall The path to an optional pre-uninstall script for the component.
postuninstall The path to an optional post-uninstall script for the component.
The README and EULA elements:
Those elements are used to mark special files, that are unique for
each program and are always installed in the installation directory.
Those are of course optional. The README tag specifies the program's
README file. The EULA should specify the End-User License Agreement or
license associated with the program, and it will be the first thing
that the user will be prompted with.
Both elements accept these optional attributes :
lang Specify a locale, so that you can have different EULAs and
READMEs translated in many languages in the same distribution.
See 'About localization' below for more details.
keepdirs By default, the file will be copied to the root of the installation
directory. If set to yes, then you can specify a relative path for the
file, and have it installed in a sub-directory.
ignoreonreinstall If set, when reinstalling, the EULA window will be skipped,
as if the user accepted the agreement.
The important thing to remember about those elements is that they are
siblings of the OPTION element described below, and thus direct children
of the INSTALL element. The README elements should NOT be inside an OPTION
element, alongside 'file' and 'binary' elements.
Starting with version 1.6.1, EULA elements CAN be specified for each option
as sub-elements of an OPTION tag. The syntax is identical to global EULA tags.
You may not want to combine multiple EULAs with an "Express" installer, as this
would currently allow the licensing agreements to be bypassed by the user.
There is also no need to have the files designated by those tags explicitly
installed in a FILES section, setup will take care of that for you.
The ENVIRONMENT element :
This element is used to preserve some environment variables between Setup tools
sessions. This is useful if some features of your product can be selected through
such environment variables upon installation, and these need to be set for
uninstallation as well.
You can use this element to inform Setup that their value upon installation must
be saved in the product database. The value will be restored in the environment
before executing any scripts from any of the Setup tools (especially uninstall).
This element should be a direct child of an INSTALL or COMPONENT element.
Hence, there can be component-specific variables. Setup tools will first restore
the global product variables, and then the component-specific variable.
Note: the variable will be saved only if it is set to a non-empty value at the
time of installation.
This element takes one mandatory attribute :
var The name of the environment variable to save.
The BOOL element :
This element allows the user to create some complex expressions to guide the
installer. This element allows the user to define boolean conditions, the values of
which are defined by arbritrary scripts. These booleans can then be used as part
of expressions used by other elements, like FILE or BINARY below, to define conditions.
This element must be a direct child of the root INSTALL element. Booleans are global
to a particular instance of the installer. Additionally, the installer itself defines
a set of standard booleans, as described below.
Booleans are intended to replace the previous filtering mechanisms, using "arch", "libc"
and so on attributes, while providing additional flexibility.
Booleans are case sensitive.
The BOOL element takes one mandatory attribute :
name The symbolic name for the boolean (variable name). May be up to 30 characters
long, and must start with an alphanumerical character. May not contain blank
spaces.
Additionally, one of the following attributes must be used, unless "if" below is in use :
script The command to be run to determine the value of the boolean. In the UNIX
tradition, it should return 0 for a TRUE value.
envvar The name of an environment variable to query for the value of the boolean.
The value must be a non-zero number to map to be TRUE. If the variable is not
set in the environment, the boolean will likewise be set to FALSE.
setenv The name of an environment variable that will be set with the value of the boolean
when running user scripts throughout the installer. The value of that variable will
be 0 or 1. This can be used for advanced scripting querying the internal state of
the installer.
It also recognizes two optional attributes :
later If set to "yes", the script will be executed at the time that the condition
referencing it is evaluated. The default is to run the script once immediately
upon initialization to gather the static value.
if Additionally make this boolean dependent on another boolean expression. This
expression can reference any previously defined boolean. See below for more details
about the syntax. If this expression evaluates to FALSE, then the script won't be
run, or the environment queried, and the value will also be set to FALSE.
Note: if neither "script" or "envvar" are set for the element, the value will be set
to true if the condition is satisfied.
Standard booleans defined by the installer :
- Standard 'true' and 'false' booleans.
- 'is-root' is TRUE if the installer is running as root.
- 'reinstalling' is TRUE if the product is already installed.
- 'bzip2' is TRUE if Bzip2 decompression is available in the installer.
- One boolean corresponding to the selected user interface: gtk1, gtk2, carbon, dialog, console
- One boolean for the CPU architecture: x86, ppc, sparc, alpha, etc
- One boolean for the detected libc version: libc5, glibc-2.1, etc.
- One boolean for the distribution / OS name : redhat, suse, aix, sco, etc.
- A boolean for the OS name as returned by uname.
- Two booleans representing the detection distribution version (not always meaningful) :
distro-major-<number> and distro-minor-<number>.
= Booleans for the detected locale setting and its encoding, e.g. en_US, ISO-8859-1, etc.
- On Linux, 'selinux' indicates whether SELinux is available and enabled.
- If RPM support was compiled in, 'rpm-support' is set. If RPM 3.x, then 'rpm3-support' is
also set to TRUE.
For example, on a Redhat Linux 7.3 sytem, the following bools would be defined to TRUE :
Linux, x86, redhat, distro-major-7, distro-minor-3
For more information about how to write expressions referencing these booleans, refer
to "About Boolean Expressions" below.
The REQUIRE element :
This element allows to set prerequisite conditions for the installer, through the
use of arbitrary commands whose return value is used to determine whether the conditions
are fulfilled.
'require' elements have to be at the top level (right under the root 'install' element), and
are parsed in sequential order. Installation will abort if any of the specified commands return
a non-nil value, unless the 'warn' attribute is set.
This element takes either of the following mandatory attributes :
command Specify the command to be run to determine the condition. A nil value means success.
feature Specify the name of a feature that must be present in the
installer to be able to process this XML file.
condition Specify an expression that has to be satisfied. See the BOOL element for more details.
This element takes some optional attributes :
lang Specify the language for the message. Used for localization. The command will be executed
only if the locale settings match.
arch This requirement applies only on the specified architectures.
The architecture can be any of:
x86, ppc, alpha, sparc64, etc.
libc This requirement applies only to the specified version of libc.
The version can be one of:
libc5, glibc-2.0, glibc-2.1, etc.
distro This component applies only to the specified OS distribution.
Look at the end of this file for a list of possible values.
version [only for feature attribute] the minimum integer version number
required for the specified feature.
warn If set to 'yes', then the user will only be displayed the message as a warning and the
installation may continue regardless.
The text specified in the element will be displayed to the user if the
condition of the command attribute fails. It has no meaning for the feature
attribute.
Examples:
<require command="/bin/false">
This is always failing! Thus this message is always displayed.
</require>
<require condition="Linux">
You need Linux for this installer!
</require>
<require feature="inline-scripts" version="1"/>
The POST_INSTALL_MSG element :
This element displays an optional message to the user at the end of a successful installation.
Whether this message is displayed or not can be conditionned by an external command.
This element takes some optional attributes :
lang Specify the language for the message. Used for localization. The message will be showed
only if the locale settings match.
command A shell commands whose return value will determine whether to display the message.
A return value of 0 must be returned for the message to be displayed.
if Specify an expression that has to be satisfied. See the BOOL element for more details.
nogui If set to 'true', then the message will not be displayed in a GUI environment (X11, Mac)
The REMOVE_MSG element :
This element is used to prompt the user in the Uninstaller tool with a message upon uninstalling
the component. The user can then choose to abort the uninstallation. This element is a simple
text that can be localized.
This element takes one optional attribute :
lang Specify the language for the message. Used for localization. The message will be showed
only if the locale settings match.
The INSTALL_DROP_LIST element:
The install_drop_list element makes it possible to override the default
installation paths supplied in the Installation target drop down box.
Supply a list of drop down paths, space or new line separated.
An example follows:
<install_drop_list>
/opt /usr/local
/var
~
</install_drop_list>
If no install_drop_list element is given, it will default to hard coded
values (see install.c).
Note: Your paths will not be displayed if they are not valid,
writable paths.
The PROGRAM_TO_START element:
The program_to_start element allows you to request that a given
program be started after installation, without that program having
to be a symbolic link.
That is, if you do not wish to have a symlink or primary binary,
but just wish to indicate that a certain program should be launched
at installer end, this element will allow you to do that.
You can use the $INSTALLDIR string and the installer will substitute
the path where the program was installed.
An example looks like this:
<program_to_start>
$INSTALLDIR/my_cool_binary_file
</program_to_start>
The OPTION element:
The option element contains text describing the element, along with
zero or more option, binary, files, and script elements.
There is currently no way to specify relationships of options at the
same level; each may be installed independently of any other. If
an option is dependent upon another option, it must be inside the
body of that option:
<option>
Top-level option
<lang lang="locale">Translated 'Top-level option'</lang>
<option>
First dependent option
<lang lang="locale">Translated 'First dependent option'</lang>
</option>
<option>
Second dependent option
</option>
</option>
Nested options will not be available unless the top-level option is
selected.
There are several optional attributes of the option element:
install If this attribute is set to "true", then the option will
be installed by default. It may be deselected by the user.
Another possible value is "command", in which case the script specified
in the "command" attribute will determine the final value of this
property.
Yet another possible value is "condition" , in which case the expression
specified in the "condition" tag will be evaluated instead.
command This attribute must be set to a shell script if "install" is "command".
If the command returns with a value of 0 (normal), then the option will
be selected (and unselected otherwise).
This can be used for auto-detection purposes.
condition Boolean expression to be evaluated to determine if the option will be
selected. This can also be used for auto-detection purposes.
required If this attribute is set to "true", the option will always
be installed. The user won't be able to disable it.
show If present, this attribute specifies a command to be run whose return
value will determine if this option will be presented to the user at all.
A 0 return value means that the option will be displayed.
A "false" string for this attribute will always hide the option from the user.
All suboptions are also affected by this setting. Note that default values
and actual selection of the option (with the above tags) is not affected.
showif Similar to the "show" attribute, except uses a boolean expression to evaluate
the condition.
help This attribute is a help string which is displayed to the
user if the user requests more information about the option.
This string can be translated to other languages using the 'help'
sub-element explained below.
arch This option is only available on the specified architectures.
The architecture can be any of:
x86, ppc, alpha, sparc64, etc.
libc This option is only available with the specified version of libC.
The version can be one of:
libc5, glibc-2.0, glibc-2.1, etc.
distro This option is only available with the specified OS distribution.
Look at the end of this file for a list of possible values.
if Specify an expression that has to be satisfied. See the BOOL element for more details.
size This is an optional size of the install option. The size can be
expressed in megabytes (with a M suffix), kilobytes (K), gigabytes
(G), or even bytes (B, or no suffix). Please note that versions of
setup earlier than 1.3.0 used to specify the size in MBs only.
If this element isn't specified, setup will try to autodetect
the size of the install option itself.
product If this XML file describes a meta-installation (if the 'meta' attribute
to the root install element has been specified), then the value of this
attribute is used to specify the XML file that will be passed to setup
to install the product described by this option element. This attribute
is ignored if this is not a meta-installation, and required if it is.
See the section 'About Meta-Installations' below for more details.
productdir Valid only together with the 'product' attribute. Specifies the
directory to change to before executing the installer for the new
product.
tag If specified, this string will be included in the SETUP_OPTIONTAGS
environment variable that is set before calling any scripts. This allows
scripts to know what user selections are active.
reinstall If this is a reinstallation, you can individually disable options that can
be reinstalled with this attribute set to "false".
The option element support the LANG sub-element, which is used to specify
translated strings for the option name. The only attribute of this element
is 'lang', which should be the name of the locale to be matched against
the current locale (i.e. "fr", "de", "it", etc...). See 'About localization'
below for more details about locale matching.
If you don't specify translations for alternate locales, then the same
string will be used for all languages encountered by setup. Of course,
you can have several 'lang' elements per 'option' element.
The option element also supports the HELP sub-element, which can be used
to provide translated strings for the 'help' attribute. This element
only supports the 'lang' attribute to specify the locale this translation
applies to. Here is an example to clarify all this :
<option install="true" help="You really need this">
Basic install
<help lang="fr">Vous avez besoin de cela</help>
<help lang="es">Su necesito eso</help>
...
</option>
This provides French and Spanish translations of the "You really need this"
help message. Please forgive my very poor Spanish ;-)
Starting with version 1.6.0, the OPTION element also supports the WARN sub-element.
WARN has a syntax identical to the HELP sub-element, but allows you to specify a
warning message that will be displayed to the user when the corresponding option
is selected. Just like HELP, this warning message can be translated through the use
of the 'lang' attribute.
The EXCLUSIVE element:
This special element is used to describe a set of OPTION elements that are
mutually exclusive, i.e. only one of them may be selected and installed.
Its usage is very simple; just surround the group of options with an
encompassing 'exclusive' element, as such :
<exclusive>
<option install="true">
Option A
</option>
...
<option>
Option X
</option>
</exclusive>
WARNING: You should always define a default option within the group of
exclusive options, by setting its 'install' attribute to 'true'.
The EXCLUSIVE element also supports LANG sub-elements to provide translations.
The EXCLUSIVE element has the following optional attributes :
reinstall If this is a reinstallation, and this is set to "false", then
the choices from the original installation will be preserved
and won't be modifiable by the user.
The BINARY element:
The binary element contains one or more binary files to be installed for
this option. The binary is installed in the top level of the install
directory, and if the symlink attribute is set, a symbolic link is
placed in the system executable path.
The actual file that is copied resides in bin/<os>/<arch>/<libc>/, where
"<os>" is the Operating System string (output from the 'uname -s' command),
"<arch>" is the current architecture string (x86, ppc, alpha, etc.)
and "<libc>" is an optional C library version (glibc-2.0, glibc-2.1, etc.)
For example, if you wanted to install an executable file named "foo"
on a PPC system, you would need it on the install disk as bin/Linux/ppc/foo.
If it depended upon version 2.1 of the GNU C library, you would place
it on the install disk as bin/Linux/ppc/glibc-2.1/foo.
There are several required attributes of the binary element:
arch "any" is synonymous with the current architecture. You can also
use this attribute to force a precise architecture, for example
"ppc" or "sparc64". Matching can be negated with a leading !,
for instance "!x86".
libc "any" is synonymous with the current libc version. This can
also be used to force a libc version for the binary, i.e
"glibc-2.0" or "glibc-2.1". Matching can be negated with a
leading !, for example "!glibc-2.0".
There are several optional attributes of the binary element:
distro Files are only installed with the specified OS distribution.
Look at the end of this file for a list of possible values.
if Specify an expression that has to be satisfied. See the BOOL
element for more details.
symlink This is a symbolic link that is installed in the system path
and points to the installed binary.
play If this attribute has the 'yes' value, then this is the binary
that will be used to optionally launch the game after the
installation program terminates. There can be only one 'binary'
element with this attribute in the whole XML file.
If this attribute has the 'no' value, and a 'symlink' is defined,
then this binary will explicitly not be used to launch after
the installation. The default value for this attribute is 'yes'
for the first binary with a symlink.
The value can also be 'gui', which means that the binary will only
be launched if the installer is in a graphical environment (e.g X11).
icon This is an optional icon file that you should install into
the top level of the install directory. If both a symlink
and an icon are specified for a binary, it will also have a
desktop icon or menu item created for it, if the user wishes.
menu This is an optional submenu that the application menuitem is
installed into. If no submenu is defined, the menu item will
be placed in the "Games" submenu.
name This is an optional name for the menu entry. By default the
name of the product is used.
desc This is an optional description for the menu entry. By default the
description of the product is used.
cdrom If this attribute has a "yes" value, then setup will look for
the file on one of the mounted CDROMs on the system.
*OBSOLETE in setup 1.5.0* DO NOT USE
cdromid Specifies a CDROM from which the file will be pulled.
keepdirs If this attribute has a "yes" value, then the directory structure
specified in the file names for the binaries will be kept. For
example: bin/mybin will be extracted in the 'bin' subdirectory
under the installation directory, instead of being extracted in
the installation directory itself.
lang The files are only installed if the current locale matches the
string of this attribute. See 'About localization' below for
more details.
binpath Specifies an optional directory from which the binaries will be pulled,
instead of the default "bin/<arch>/<libc>" directory.
inrpm If inrpm="true" then setup will not attempt to copy the file, but
it will assume that it was successfully installed by an RPM
package. Setup will set up the symlink and menu items for it.
For this to work, the value inside the <binary> tag should be the
installed location of the binary file. If the RPM is being
relocated to the install directory (see 'FILES' below for details)
you can use a macro $INSTALLDIR which will be expanded at runtime.
So, if you have a file that the RPM installs into [installdir]/bin
the XML would look like this:
<binary inrpm="true" symlink="app">
$INSTALLDIR/bin/app
</binary>
Note that the <files> section which contains the RPM pacakge must
appear before the <binary> tag to ensure that the file exists
before the symlink and menu items are created.
md5sum You can optionally specify a MD5 checksum string (32 characters from
the output of the 'md5sum' command), and the copied file will be verified
against this checksum. Installation will abort in the case of an invalid
checksum, indicating corruption.
mode Use an octal value to specify the permissions of the file once installed (755
is the default for binaries).
args Specify optional arguments to be added on the command line when running the binary.
inline When set to 'yes' the text content of the element is used as script
content instead of a path. The value of 'binarypath' is used as
script name in this case
The FILES element:
The files element contains a list of files and directories, one per line,
which are installed for this option.
You may specify relative paths and shell wildcard patterns for the files.
There are several optional attributes of the files element:
path This is a system path that these files should be installed into.
If the path is relative (i.e. does not begin with '/'), then it
is interpreted as being relative to the installation root for
the product. Thus an empty value ("") can be used to designate
the installation directory.
arch "any" is synonymous with the current architecture. You can also
use this attribute to force a precise architecture, for example
"ppc" or "sparc64". Matching can be negated with a leading !,
for instance "!x86".
libc "any" is synonymous with the current libc version. This can
also be used to force a libc version for the binary, i.e
"glibc-2.0" or "glibc-2.1". Matching can be negated with a
leading !, for example "!glibc-2.0".
distro Files are only installed with the specified OS distribution.
Look at the end of this file for a list of possible values.
if Specify an expression that has to be satisfied. See the BOOL
element for more details.
srcpath This is a directory relative to the top of the CD where the files
for this element should be copied from.
cdrom If this attribute has a "yes" value, then setup will look for
the files on one of the mounted CDROMs on the system.
*OBSOLETE: Do not use. Use 'cdromid' instead.*
cdromid Specifies a CDROM from which the file will be pulled.
mutable If set to "yes", then the file will be considered mutable, i.e. it
will not be considered corrupted if its checksum changes.
lang The files are only installed if the current locale matches the
string of this attribute. See 'About localization' below for
more details.
relocate If relocate="true" and an RPM package file is listed, the install
will force the RPM to be installed into the user-selected install
directory. This is equivalent to installing the RPM like this:
rpm -U --relocate /=INSTALLDIR --badreloc [rpmfile]
This will apply to all RPM files within this <files> tag.
nodeps If nodeps="true" and an RPM package file is listed,then the
--nodeps option will be added to the RPM command when the files
are installed. This will force RPM to install the package, even if
its dependencies are not met. This will apply to all RPM files
within this <files> tag.
autoremove If autoremove="true" and an RPM package file is listed in the
files section, then that RPM package will be automatically removed
("rpm -e package") when the uninstall script is run. If the
autoremove option is not set, then the uninstall script will list
the package name at the end of the uninstall, but it will not
remove it. This will apply to all RPM files within this <files>
tag.
md5sum You can optionally specify a MD5 checksum string (32 characters from
the output of the 'md5sum' command), and the copied file will be verified
against this checksum. Installation will abort in the case of an invalid
checksum, indicating corruption.
mode Use an octal value to specify the permissions of the file once installed (644
is the default for regular files).
When specifying archives handled by a plugin, the plugin may choose to use this
mode for all files uncompressed from the archive.
NOTE: This doesn't apply to directories, which are currently always created with
mode 755.
secontext On Linux systems only. Specify an optional SELinux context string that will be
applied to the files upon creation, by calling the chcon command.
suffix An optional file extension that is forced on all files. Can be used
to make loki-setup recognize e.g. SFX ZIP archives as such even if
they end in .exe.
The MANPAGE element:
If your product comes with man pages (destined to be installed system-wide), they have to be
installed under a man/man<section>/<name>.<section> directory structure inside the image.
Section and name are provided using the following mandatory attributes :
name The name of the command or function the man page refers to. Can be arbitrary.
section The section of the man pages the corresponding page belongs to.
The following attributes are optional :
symlink A comma-separated list of symbolic links to create for this man page, in the same
section. Use this when your man page covers several commands / functions.
arch "any" is synonymous with the current architecture. You can also
use this attribute to force a precise architecture, for example
"ppc" or "sparc64". Matching can be negated with a leading !,
for instance "!x86".
libc "any" is synonymous with the current libc version. This can
also be used to force a libc version for the binary, i.e
"glibc-2.0" or "glibc-2.1". Matching can be negated with a
leading !, for example "!glibc-2.0".
distro Files are only installed with the specified OS distribution.
Look at the end of this file for a list of possible values.
if Specify an expression that has to be satisfied. See the BOOL
element for more details.
Note that the MANPAGE element does not take any children.
Do not forget to set the "manpages" attribute to the root <install> element to "yes" to be able
to use this feature.
The SCRIPT element:
The script element contains shell commands which are executed when the
option is installed. You may interleave multiple script and files
elements, and they will be installed/executed in the order in which
they appear.
If you call a script on the installation medium, remember that the
medium may be mounted without executable permissions, so the script
file should be called using the name of the script interpreter.
For example:
<script>
sh setup.data/stage1.sh
</script>
There supported attributes for the script element are :
lang The script is only installed if the current locale matches the
string of this attribute. See 'About localization' below for
more details.
arch "any" is synonymous with the current architecture. You can also
use this attribute to force a precise architecture, for example
"ppc" or "sparc64". Matching can be negated with a leading !,
for instance "!x86".
libc "any" is synonymous with the current libc version. This can
also be used to force a libc version for the binary, i.e
"glibc-2.0" or "glibc-2.1". Matching can be negated with a
leading !, for example "!glibc-2.0".
distro Files are only installed with the specified OS distribution.
Look at the end of this file for a list of possible values.
if Specify an expression that has to be satisfied. See the BOOL
element for more details.
size If the script handles the installation of some files and you want
the progress bar to reflect it, indicate the size here. The size
is updated when the script finishes. The syntax of this element is the
same as for the size tag for the OPTION element.
message The message to display to the user. By default this is
"Running script"