Skip to content

Commit

Permalink
First post-Loki release, sync with the Codehost tree.
Browse files Browse the repository at this point in the history
MANY bugfixes, but most notable feature enhancements :


1.6.0:
Stephane Peter (Codehost) - Tue Aug 21 20:22:10 PDT 2001
 * Added distribution detection: "distro" attribute, SETUP_DISTRO environment
   variable in scripts.
 * Automatic selection of options using the "command" attribute.
Stephane Peter (Codehost) - Fri Aug 31 00:07:40 PDT 2001
 * Included the "dialog" source code and added a dialog-based UI.
 * Added the "superuser" attribute for root-only installations.
Stephane Peter (Codehost) - Fri Sep 14 00:41:04 PDT 2001
 * Added two optional installation classes, through the "express" install XML keyword.
   'Recommended' is an express, non-interactive, installation based on defaults.
Stephane Peter (Codehost) - Fri Sep 14 18:25:24 PDT 2001
 * Added the "require" element that allows to set prerequisites for the installation
   through the use of arbitrary commands.
Stephane Peter (Codehost) - Tue Oct  9 19:48:29 PDT 2001
 * Allow the 'arch', 'glibc' and 'distro' attributes in conjunction with 'files' elements.
Stéphane Peter (Codehost) - Thu Oct 18 00:29:40 PDT 2001
 * Added the 'gui' value to the 'play' attribute to binaries to specify binaries that require
   an X11 environment to be able to be started.
Stephane Peter (Codehost) - Fri Oct 19 18:39:12 PDT 2001
 * Added the 'once' attribute to the global 'install' element, to explicitly prevent multiple
   installations of the same product.
Stephane Peter (Codehost) - Tue Oct 23 11:48:32 PDT 2001
 * Support transparent pixmaps correctly for splash images.
Stephane Peter (Codehost) - Mon Nov 26 16:48:01 PST 2001
 * Allow the 'arch', 'glibc' and 'distro' attributes on all elements : files, binaries,
   scripts and 'require' (to allow for very specific requirement checks).
 * Extended the 'distro' matching with 'up', 'exact' and 'major' matching policies.
Stephane Peter (Codehost) - Tue Dec  4 22:49:21 PST 2001
 * Added the 'binarypath' attribute to the root 'install' element to specify a default
   binary path from the configuration file.
Stéphane Peter (Codehost) - Thu Dec  6 02:30:28 PST 2001
 * Added support for the Debian menus systems (update-menus command) that is also
   used in Mandrake to install desktop menu entries.
  • Loading branch information
megastep committed Jan 28, 2002
1 parent 9a4b653 commit a78439a
Show file tree
Hide file tree
Showing 97 changed files with 18,050 additions and 4,788 deletions.
35 changes: 35 additions & 0 deletions CHANGES
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,38 @@
1.6.0:
Stephane Peter (Codehost) - Tue Aug 21 20:22:10 PDT 2001
* Added distribution detection: "distro" attribute, SETUP_DISTRO environment
variable in scripts.
* Automatic selection of options using the "command" attribute.
Stephane Peter (Codehost) - Fri Aug 31 00:07:40 PDT 2001
* Included the "dialog" source code and added a dialog-based UI.
* Added the "superuser" attribute for root-only installations.
Stephane Peter (Codehost) - Fri Sep 14 00:41:04 PDT 2001
* Added two optional installation classes, through the "express" install XML keyword.
'Recommended' is an express, non-interactive, installation based on defaults.
Stephane Peter (Codehost) - Fri Sep 14 18:25:24 PDT 2001
* Added the "require" element that allows to set prerequisites for the installation
through the use of arbitrary commands.
Stephane Peter (Codehost) - Tue Oct 9 19:48:29 PDT 2001
* Allow the 'arch', 'glibc' and 'distro' attributes in conjunction with 'files' elements.
St�phane Peter (Codehost) - Thu Oct 18 00:29:40 PDT 2001
* Added the 'gui' value to the 'play' attribute to binaries to specify binaries that require
an X11 environment to be able to be started.
Stephane Peter (Codehost) - Fri Oct 19 18:39:12 PDT 2001
* Added the 'once' attribute to the global 'install' element, to explicitly prevent multiple
installations of the same product.
Stephane Peter (Codehost) - Tue Oct 23 11:48:32 PDT 2001
* Support transparent pixmaps correctly for splash images.
Stephane Peter (Codehost) - Mon Nov 26 16:48:01 PST 2001
* Allow the 'arch', 'glibc' and 'distro' attributes on all elements : files, binaries,
scripts and 'require' (to allow for very specific requirement checks).
* Extended the 'distro' matching with 'up', 'exact' and 'major' matching policies.
Stephane Peter (Codehost) - Tue Dec 4 22:49:21 PST 2001
* Added the 'binarypath' attribute to the root 'install' element to specify a default
binary path from the configuration file.
St�phane Peter (Codehost) - Thu Dec 6 02:30:28 PST 2001
* Added support for the Debian menus systems (update-menus command) that is also
used in Mandrake to install desktop menu entries.

1.5.9: 1.5.9:
Sam Lantinga - Thu Mar 8 18:09:29 PST 2001 Sam Lantinga - Thu Mar 8 18:09:29 PST 2001
* Don't prompt for menu items if the "nobinaries" option is set * Don't prompt for menu items if the "nobinaries" option is set
Expand Down
59 changes: 48 additions & 11 deletions Makefile.in
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CC = @CC@
# This indicates where the 'setupdb' CVS module is checked out # This indicates where the 'setupdb' CVS module is checked out
SETUPDB = @SETUPDB@ SETUPDB = @SETUPDB@


IMAGE = /loki/patch-tools/setup-image IMAGE = ../../spp/image
UPDATES = /loki/updates/loki_uninstall UPDATES = /loki/updates/loki_uninstall
CONVERT_IMAGE = /loki/patch-tools/convert-image CONVERT_IMAGE = /loki/patch-tools/convert-image


Expand All @@ -33,19 +33,23 @@ OPTIONS = -DSTUB_UI -DSETUP_VERSION_MAJOR=@SETUP_VERSION_MAJOR@ \
CFLAGS += $(OPTIMIZE) $(HEADERS) $(OPTIONS) CFLAGS += $(OPTIMIZE) $(HEADERS) $(OPTIONS)


COMMON_OBJS = log.o install_log.o COMMON_OBJS = log.o install_log.o
OBJS = $(COMMON_OBJS) main.o detect.o plugins.o network.o install.o copy.o file.o loki_launchurl.o CORE_OBJS = detect.o plugins.o network.o install.o copy.o file.o loki_launchurl.o
OBJS = $(COMMON_OBJS) $(CORE_OBJS) main.o
LOKI_UNINSTALL_OBJS = loki_uninstall.o uninstall_ui.o LOKI_UNINSTALL_OBJS = loki_uninstall.o uninstall_ui.o
UNINSTALL_OBJS = uninstall.o UNINSTALL_OBJS = uninstall.o
CONSOLE_OBJS = $(OBJS) console_ui.o CHECK_OBJS = $(COMMON_OBJS) $(CORE_OBJS) check.o
CONSOLE_OBJS = $(OBJS) console_ui.o dialog_ui.o
GUI_OBJS = $(OBJS) gtk_ui.o GUI_OBJS = $(OBJS) gtk_ui.o


SRCS = $(OBJS:.o=.c) $(CONSOLE_OBJS:.o=.c) $(GUI_OBJS:.o=.c) SRCS = $(OBJS:.o=.c) $(CONSOLE_OBJS:.o=.c) $(GUI_OBJS:.o=.c)


LIBS = plugins/libplugins.a $(SETUPDB)/$(arch)/libsetupdb.a @LIBS@ -lz COMMON_LIBS = plugins/libplugins.a dialog/libdialog.a \
GUI_LIBS = plugins/libplugins.a $(SETUPDB)/$(arch)/libsetupdb.a @GUI_LIBS@ -lz $(SETUPDB)/$(arch)/libsetupdb.a
CONSOLE_LIBS = $(LIBS) LIBS = $(COMMON_LIBS) @LIBS@ -lz -lm
GUI_LIBS = $(COMMON_LIBS) @GUI_LIBS@ -lz
CONSOLE_LIBS = $(LIBS) -lncurses -lgpm


all: do-plugins setup setup.gtk uninstall all: do-plugins do-dialog setup setup.gtk uninstall


testxml: testxml.o testxml: testxml.o
$(CC) -o $@ $^ $(LIBS) $(CC) -o $@ $^ $(LIBS)
Expand All @@ -56,18 +60,24 @@ loki_uninstall.o: uninstall.c
loki_uninstall: $(LOKI_UNINSTALL_OBJS) $(SETUPDB)/$(arch)/libsetupdb.a loki_uninstall: $(LOKI_UNINSTALL_OBJS) $(SETUPDB)/$(arch)/libsetupdb.a
$(CC) -o $@ $^ $(GUI_LIBS) $(CC) -o $@ $^ $(GUI_LIBS)


uninstall: $(UNINSTALL_OBJS) $(SETUPDB)/$(arch)/libsetupdb.a uninstall: $(UNINSTALL_OBJS) $(COMMON_LIBS)
$(CC) -o $@ $^ $(CONSOLE_LIBS) -static $(CC) -o $@ $^ $(CONSOLE_LIBS) -static


setup: $(CONSOLE_OBJS) $(SETUPDB)/$(arch)/libsetupdb.a check: $(CHECK_OBJS) $(COMMON_LIBS)
$(CC) -o $@ $^ $(GUI_LIBS)

setup: $(CONSOLE_OBJS) $(COMMON_LIBS)
$(CC) -o $@ $^ $(CONSOLE_LIBS) -static $(CC) -o $@ $^ $(CONSOLE_LIBS) -static


setup.gtk: $(GUI_OBJS) $(SETUPDB)/$(arch)/libsetupdb.a setup.gtk: $(GUI_OBJS) $(COMMON_LIBS)
$(CC) -o $@ $^ $(GUI_LIBS) $(CC) -o $@ $^ $(GUI_LIBS)


do-plugins: do-plugins:
$(MAKE) -C plugins all $(MAKE) -C plugins all


do-dialog:
$(MAKE) -C dialog all

install.dbg: all install.dbg: all
ifeq ($(DYN_PLUGINS),true) ifeq ($(DYN_PLUGINS),true)
$(MAKE) -C plugins install.dbg $(MAKE) -C plugins install.dbg
Expand Down Expand Up @@ -106,7 +116,7 @@ endif
cp -v uninstall $(IMAGE)/setup.data/bin/$(os)/$(arch); \ cp -v uninstall $(IMAGE)/setup.data/bin/$(os)/$(arch); \
strip $(IMAGE)/setup.data/bin/$(os)/$(arch)/uninstall; \ strip $(IMAGE)/setup.data/bin/$(os)/$(arch)/uninstall; \
brandelf -t $(os) $(IMAGE)/setup.data/bin/$(os)/$(arch)/uninstall; \ brandelf -t $(os) $(IMAGE)/setup.data/bin/$(os)/$(arch)/uninstall; \
if [ $(os) = Linux ]; then \ if [ $(os) = Linux -a -d $(CONVERT_IMAGE) ]; then \
cp -v uninstall $(CONVERT_IMAGE)/bin/$(os)/$(arch); \ cp -v uninstall $(CONVERT_IMAGE)/bin/$(os)/$(arch); \
strip $(CONVERT_IMAGE)/bin/$(os)/$(arch)/uninstall; \ strip $(CONVERT_IMAGE)/bin/$(os)/$(arch)/uninstall; \
brandelf -t $(os) $(CONVERT_IMAGE)/bin/$(os)/$(arch)/uninstall; \ brandelf -t $(os) $(CONVERT_IMAGE)/bin/$(os)/$(arch)/uninstall; \
Expand All @@ -117,6 +127,31 @@ endif
echo No directory to copy the binary files to.; \ echo No directory to copy the binary files to.; \
fi fi


# Pretty LPP-specific
install-check: check
@if [ -d $(IMAGE)/bin/$(arch)/ ]; then \
cp -v check $(IMAGE)/bin/$(arch)/; \
strip $(IMAGE)/bin/$(arch)/check; \
cp -v check.glade $(IMAGE)/misc/; \
else \
echo No directory to copy the binary files to.; \
fi

# Copy loki_uninstall and the required files

spp: all loki_uninstall install-image install-check
@if [ -d $(IMAGE)/bin/$(arch)/ ]; then \
cp -v loki_uninstall $(IMAGE)/bin/$(arch)/bin/codehost-uninstall; \
strip $(IMAGE)/bin/$(arch)/bin/codehost-uninstall; \
for file in `find image/setup.data -name loki-uninstall.mo -print`; \
do path="$(IMAGE)/`dirname $$file | sed 's,image/setup.data/,,'`"; \
mkdirhier $$path; \
cp -v $$file $$path; \
done; \
else \
echo No directory to copy the binary files to.; \
fi

install-loki_uninstall: loki_uninstall install-loki_uninstall: loki_uninstall
@if [ -d $(IMAGE)/loki_uninstall/bin/$(arch)/$(libc)/ ]; then \ @if [ -d $(IMAGE)/loki_uninstall/bin/$(arch)/$(libc)/ ]; then \
cp -v loki_uninstall $(IMAGE)/loki_uninstall/bin/$(arch)/$(libc)/; \ cp -v loki_uninstall $(IMAGE)/loki_uninstall/bin/$(arch)/$(libc)/; \
Expand Down Expand Up @@ -156,6 +191,7 @@ po-image:


clean: clean:
$(MAKE) -C plugins clean $(MAKE) -C plugins clean
$(MAKE) -C dialog clean
rm -f foo.xml core tags *.o rm -f foo.xml core tags *.o


distclean: clean distclean: clean
Expand Down Expand Up @@ -196,6 +232,7 @@ dep: depend


depend: depend:
$(MAKE) -C plugins depend $(MAKE) -C plugins depend
$(MAKE) -C dialog depend
$(CC) -MM $(CFLAGS) $(SRCS) > .depend $(CC) -MM $(CFLAGS) $(SRCS) > .depend


ifeq ($(wildcard .depend),.depend) ifeq ($(wildcard .depend),.depend)
Expand Down
113 changes: 113 additions & 0 deletions README.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ There are several optional attributes of the install element:
may be changed by the user at installation time. may be changed by the user at installation time.
The default is: /usr/local/games 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 preinstall This is a shell script which is executed before any options
are installed. It is run with the installation destination are installed. It is run with the installation destination
as a command line argument. as a command line argument.
Expand Down Expand Up @@ -143,6 +148,17 @@ There are several optional attributes of the install element:
is detected as already installed the installation will fail. is detected as already installed the installation will fail.
Important: This attribute can't be mixed with <component> elements. 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).

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.

The CDROM element: The CDROM element:


An installer can fetch the necesary data files from one or more CDROM discs. As of setup 1.5.0, An installer can fetch the necesary data files from one or more CDROM discs. As of setup 1.5.0,
Expand Down Expand Up @@ -201,6 +217,9 @@ There are also optional attributes :
The version can be one of: The version can be one of:
libc5, glibc-2.0, glibc-2.1, etc. 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.

The README and EULA elements: The README and EULA elements:


Those elements are used to mark special files, that are unique for Those elements are used to mark special files, that are unique for
Expand All @@ -224,6 +243,41 @@ element, alongside 'file' and 'binary' elements.
There is also no need to have the files designated by those tags explicitly 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. installed in a FILES section, setup will take care of that for you.


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.

This element takes one mandatory attribute :

command Specify the command to be run to determine the condition. A nil value means success.

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.

The text specified in the element will be displayed to the user if the condition fails.
Example:

<require command="/bin/false">
This is always failing! Thus this message is always displayed.
</require>


The INSTALL_DROP_LIST element: The INSTALL_DROP_LIST element:


Expand Down Expand Up @@ -276,6 +330,14 @@ There are several optional attributes of the option element:


install If this attribute is set to "true", then the option will install If this attribute is set to "true", then the option will
be installed by default. It may be deselected by the user. 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.

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.


required If this attribute is set to "true", the option will always required If this attribute is set to "true", the option will always
be installed. The user won't be able to disable it. be installed. The user won't be able to disable it.
Expand All @@ -293,6 +355,9 @@ There are several optional attributes of the option element:
The version can be one of: The version can be one of:
libc5, glibc-2.0, glibc-2.1, etc. 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.

size This is an optional size of the install option. The size can be size This is an optional size of the install option. The size can be
expressed in megabytes (with a M suffix), kilobytes (K), gigabytes expressed in megabytes (with a M suffix), kilobytes (K), gigabytes
(G), or even bytes (B, or no suffix). Please note that versions of (G), or even bytes (B, or no suffix). Please note that versions of
Expand Down Expand Up @@ -385,6 +450,9 @@ There are several required attributes of the binary element:


There are several optional attributes of the binary element: 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.

symlink This is a symbolic link that is installed in the system path symlink This is a symbolic link that is installed in the system path
and points to the installed binary. and points to the installed binary.


Expand All @@ -396,6 +464,8 @@ There are several optional attributes of the binary element:
then this binary will explicitly not be used to launch after then this binary will explicitly not be used to launch after
the installation. The default value for this attribute is 'yes' the installation. The default value for this attribute is 'yes'
for the first binary with a symlink. 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 icon This is an optional icon file that you should install into
the top level of the install directory. If both a symlink the top level of the install directory. If both a symlink
Expand Down Expand Up @@ -462,6 +532,17 @@ There are several optional attributes of the files element:
the product. Thus an empty value ("") can be used to designate the product. Thus an empty value ("") can be used to designate
the installation directory. 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".

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".

distro Files are only installed with the specified OS distribution.
Look at the end of this file for a list of possible values.

srcpath This is a directory relative to the top of the CD where the files srcpath This is a directory relative to the top of the CD where the files
for this element should be copied from. for this element should be copied from.


Expand Down Expand Up @@ -518,6 +599,10 @@ There only supported attribute for the script element is the 'lang' element:
string of this attribute. See 'About localization' below for string of this attribute. See 'About localization' below for
more details. more details.


It is also possible to filter the scripts on system characteristics, through
the use of the "arch", "glibc" and "distro" attributes, that work just like
for the "files" element.

The following environment variables are defined while in the shell script: The following environment variables are defined while in the shell script:
SETUP_PRODUCTNAME : Product name from the XML file SETUP_PRODUCTNAME : Product name from the XML file
SETUP_PRODUCTVER : Product version from the XML file SETUP_PRODUCTVER : Product version from the XML file
Expand All @@ -529,6 +614,8 @@ The following environment variables are defined while in the shell script:
SETUP_CDROMPATH : Path where the install CD-ROM is mounted, if SETUP_CDROMPATH : Path where the install CD-ROM is mounted, if
the XML file designates that some components the XML file designates that some components
are to be installed from CD-ROM. are to be installed from CD-ROM.
SETUP_DISTRO : If an OS distribution was detected, this is its
name.


About localization : About localization :


Expand All @@ -542,6 +629,32 @@ order for the more specialized locale values to be matched correctly,
the longer values should be be specified last (i.e. if you have different the longer values should be be specified last (i.e. if you have different
translations, list "fr" before "fr_CA" in the XML file). translations, list "fr" before "fr_CA" in the XML file).


About distributions :

It is now possible to have options or components specific to a specific brand
of the operating system (i.e. the Linux distribution). Specifications have
the form:

distribution-major.minor-policy

'major' and 'minor' are both optional and describe the minimal release numbers
for the detected distribution. If specified, versions at least this recent
will match.

'policy' is also an optional string that describes the matching policy for this
version, i.e. if you don't necesarily want to match all later releases of a
distribution. Possible values are 'up' (the default), 'major' (includes all
versions of the same major number), and 'exact' (for the exact specification).

Currently, the recognized distribution names are :

redhat, mandrake, suse, debian, slackware, caldera, linuxppc

Examples: redhat-7.1 (will match RedHat 7.1 and up)
mandrake (will match all versions of Mandrake Linux)
slackware-7 (will match Slackware 7.0 and up)
slackware-7.0-major (will match all Slackware 7.x releases, but not 8.x and up)
caldera-3.1-exact (will match Caldera OpenLinux 3.1 only)


About Meta-Installations : About Meta-Installations :


Expand Down
1 change: 1 addition & 0 deletions autogen.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh #!/bin/sh
autoheader
autoconf autoconf


Loading

0 comments on commit a78439a

Please sign in to comment.