Skip to content

Commit

Permalink
Stephane Peter (Codehost) - Thu Sep 26 18:38:02 PDT 2002
Browse files Browse the repository at this point in the history
 * Added 'tag' tag for <option>, and have SETUP_OPTIONTAGS environment
   variable in scripts to be able to determine the set of user options.
Stephane Peter (Codehost) - Wed Oct  9 17:46:25 PDT 2002
 * Preliminary AIX 5.1 port
Stephane Peter (Codehost) - Fri Oct 18 16:26:18 PDT 2002
 * Deprecated 'nobinaries' tag.
  • Loading branch information
megastep committed Oct 19, 2002
1 parent 6bf783d commit 8a11cc9
Show file tree
Hide file tree
Showing 59 changed files with 375 additions and 283 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ Ryan C. Gordon (Epic Games) - Thu Sep 19 17:05:48 EDT 2002
Stephane Peter (Codehost) - Fri Sep 20 15:46:23 PDT 2002
* Added --disable-dialog flag to configure script to
avoid compiling the dialog UI in if necesary.
Stephane Peter (Codehost) - Thu Sep 26 18:38:02 PDT 2002
* Added 'tag' tag for <option>, and have SETUP_OPTIONTAGS environment
variable in scripts to be able to determine the set of user options.
Ryan C. Gordon (Epic Games) - Sat Oct 5 18:36:46 EDT 2002
* Fixed typo in makeself-header.sh ... needed to escape $PATH reference.
Stephane Peter (Codehost) - Wed Oct 9 17:46:25 PDT 2002
* Preliminary AIX 5.1 port
Stephane Peter (Codehost) - Fri Oct 18 16:26:18 PDT 2002
* Deprecated 'nobinaries' tag.

1.6.1:
Stephane Peter (Codehost) - Sun Mar 31 22:46:57 PST 2002
Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ CC = @CC@
# This indicates where the 'setupdb' CVS module is checked out
SETUPDB = @SETUPDB@

IMAGE = ../../spp/private/image
BRAND = codehost
IMAGE = @IMAGE@
BRAND = @BRAND@
UPDATES = /loki/updates/loki_uninstall
CONVERT_IMAGE = /loki/patch-tools/convert-image

Expand Down
28 changes: 11 additions & 17 deletions README.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ There are several optional attributes of the install element:
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
Expand Down Expand Up @@ -403,6 +405,10 @@ There are several optional attributes of the option element:
is ignored if this is not a meta-installation, and required if it is.
See the section 'About Meta-Installations' below for more details.

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.

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
Expand Down Expand Up @@ -627,20 +633,6 @@ There are several optional attributes of the files element:
against this checksum. Installation will abort in the case of an invalid
checksum, indicating corruption.

process You can optionally manually uncompress (or otherwise post-process) a
file through an arbitrary shell command specified in this tag. %s in the
string will be substituted (twice) with the actual file name. The current directory
for the command will be that of the directory containing the file to be processed.

target Use this optional tag with 'process' above, to specify the resulting file
name of the uncompressed/processed file. If this tag is in effect, then the
original file will be removed, if it is still present. %s can optionally be used
to substitute the original file name (or any other valid %s pattern according to
printf).

Use caution when using the "uncompress" as file sizes won't be able to be determined automatically.
Hence, you are much better off specifying the uncompressed size of the options in the XML file.

The SCRIPT element:

The script element contains shell commands which are executed when the
Expand Down Expand Up @@ -681,6 +673,8 @@ The following environment variables are defined while in the shell script:
are to be installed from CD-ROM.
SETUP_DISTRO : If an OS distribution was detected, this is its
name.
SETUP_OPTIONTAGS : A blank-separated list of the option tags for the
<option>'s selected for installation.

About localization :

Expand Down Expand Up @@ -713,9 +707,9 @@ versions of the same major number), and 'exact' (for the exact specification).

Currently, the recognized distribution names are :

Linux: redhat, mandrake, suse, debian, slackware, caldera, linuxppc, yellowdog, linux

UNIX: freebsd, solaris, hpux, irix, sco, aix
Linux: redhat, mandrake, suse, debian, slackware, caldera, linuxppc, yellowdog,
turbo, linux
UNIX: freebsd, solaris, hpux, irix, sco, aix

'linux' is a special distribution name that can be used to differentiate between a GNU/Linux
system and other UNIX flavors. The 'linux' version numbers correspond to the kernel version.
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
autoheader
autoconf -f
autoconf

4 changes: 3 additions & 1 deletion check.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Check and Rescue Tool for Loki Setup packages. Verifies the consistency of the files,
* and optionally restores them from the original installation medium.
*
* $Id: check.c,v 1.4 2002-09-17 22:40:45 megastep Exp $
* $Id: check.c,v 1.5 2002-10-19 07:41:09 megastep Exp $
*/

#include <stdlib.h>
Expand Down Expand Up @@ -290,6 +290,8 @@ on_media_ok_clicked (GtkButton *button,
gtk_widget_set_sensitive(glade_xml_get_widget(check_glade, "rescue_button"), FALSE);
gtk_widget_hide(glade_xml_get_widget(rescue_glade, "media_select"));

message_dialog(_("Files successfully restored !"), _("Success"));

/* Unmount filesystems that may have been mounted */
unmount_filesystems();
}
Expand Down
55 changes: 45 additions & 10 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PROG_INSTALL

AC_PATH_X
AC_PATH_XTRA
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(strings.h)
AC_CHECK_HEADERS(pwd.h)
Expand All @@ -33,6 +33,7 @@ AC_CHECK_HEADERS(sys/dir.h)
AC_CHECK_HEADERS(sys/statfs.h)
AC_CHECK_HEADERS(sys/statvfs.h)
AC_CHECK_HEADERS(sys/vfs.h)
AC_CHECK_HEADERS(sys/mount.h)
AC_CHECK_HEADERS(dir.h)
AC_CHECK_HEADERS(util.h)
AC_CHECK_HEADERS(libutil.h)
Expand All @@ -57,8 +58,11 @@ CFLAGS="-fsigned-char -funroll-loops -Wall -g -O2 -I. $X_CFLAGS"
CONSOLE_LIBS=""
if test -d /usr/codehost/lib; then
LIBS="-L/usr/codehost/lib"
elif test -d /opt/codehost/lib; then
LIBS="-L/opt/codehost/lib"
else
LIBS="$LIBS -L/usr/local/lib"
fi
LIBS="$LIBS -L/usr/local/lib"

# Build some static binaries by default when possible
STATIC="-static"
Expand All @@ -74,6 +78,7 @@ case "$target" in
CFLAGS="$CFLAGS -Dsco"
RDYNAMIC="-Wl,-Bexport"
EXTRA_LIBS="-lsocket -lnsl -lresolv -lcdfs"
AC_DEFINE(USE_BSD_PTY, 1, Use BSD-style ptys)
AC_DEFINE(NO_XOPEN_SOURCE, 1, XOPEN source breaks)
AC_DEFINE(NO_POSIX_C_SOURCE, 1, POSIX C source breaks)
AC_DEFINE(NO_POSIX_SOURCE, 1, POSIX source breaks)
Expand All @@ -84,12 +89,27 @@ case "$target" in
RDYNAMIC="-Wl,-Bexport"
LIBDL=""
EXTRA_LIBS="-L/udk/usr/lib -lsocket -lnsl -lresolv -lgen"
AC_DEFINE(USE_BSD_PTY, 1, Use BSD-style ptys)
AC_DEFINE(NO_XOPEN_SOURCE, 1, XOPEN source breaks)
AC_DEFINE(NO_POSIX_C_SOURCE, 1, POSIX C source breaks)
AC_DEFINE(NO_POSIX_SOURCE, 1, POSIX source breaks)
ARCH=x86 ;;
*aix*)
STATIC=""
BSTATIC=""
BDYNAMIC=""
RDYNAMIC="-Wl,-bexpall"
AC_DEFINE(NO_XOPEN_SOURCE, 1, XOPEN source breaks)
AC_DEFINE(NO_POSIX_C_SOURCE, 1, POSIX C source breaks)
AC_DEFINE(NO_POSIX_SOURCE, 1, POSIX source breaks)
ARCH=`uname -p`
if test "$ARCH" = powerpc; then
ARCH=ppc
fi
;;
*i?86*freebsd*)
LIBDL=""
AC_DEFINE(USE_BSD_PTY, 1, Use BSD-style ptys)
ARCH=x86 ;;
*i?86*)
ARCH=x86 ;;
Expand Down Expand Up @@ -120,9 +140,9 @@ case "$target" in
STATIC=""
RDYNAMIC="-Wl,-export-dynamic"
LIBDL=""
ARCH=`uname -m` ;;
ARCH=`uname -p` ;;
*)
ARCH=`uname -m` ;;
ARCH=`uname -p 2> /dev/null || uname -m` ;;
esac

GTK_STATIC=$BSTATIC
Expand Down Expand Up @@ -165,7 +185,14 @@ GTK_LIBS=$GTK_STATIC

LIBS="$LIBS $EXTRA_LIBS"

AC_CHECK_LIB(intl, gettext, USE_LIBINTL=yes,
AC_CHECK_LIB(iconv, iconv_open,
LIBINTL="-liconv"
LIBS="$LIBS $LIBINTL"
)

AC_CHECK_LIB(intl, gettext,
USE_LIBINTL=yes
LIBINTL="-lintl $LIBINTL",
if test -f /opt/gettext/lib/libintl.a; then
LIBINTL="/opt/gettext/lib/libintl.a /opt/libiconv/lib/libiconv.a"
LIBS="$LIBS $LIBINTL"
Expand Down Expand Up @@ -348,11 +375,7 @@ fi
LIBS="$LIBS $BZ2LIB"

if test ! -z "$USE_LIBINTL"; then
LIBINTL="$BSTATIC -L/usr/local/lib -lintl"
AC_CHECK_LIB(iconv, libiconv,
LIBINTL="$LIBINTL -liconv"
)
LIBINTL="$LIBINTL -lz $BDYNAMIC"
LIBINTL="$BSTATIC $LIBINTL -lz $BDYNAMIC"
LIBS="$LIBS $LIBINTL"
GUI_LIBS="$GUI_LIBS $LIBINTL"
else
Expand Down Expand Up @@ -406,6 +429,16 @@ if test x$enable_dynamic = xyes; then
AC_DEFINE(DYNAMIC_PLUGINS, 1, Dynamic plugin support.)
fi

AC_ARG_WITH(image,
[ --with-image specifiy the CD image path [default=../../spp/private/image]],
, with_image=../../spp/private/image)
IMAGE="$with_image"

AC_ARG_WITH(brand,
[ --with-brand specifiy the brand prefix [default=codehost]],
, with_brand=codehost)
BRAND="$with_brand"

#dnl enable the Outrage plugin (proprietary)
#AC_ARG_ENABLE(outrage,
#[ --enable-outrage enable the Outrage plugin [default=no]],
Expand Down Expand Up @@ -441,6 +474,8 @@ AC_SUBST(SETUP_VERSION_MINOR)
AC_SUBST(SETUP_VERSION_RELEASE)
AC_SUBST(BRANDELF)
AC_SUBST(DO_DIALOG)
AC_SUBST(IMAGE)
AC_SUBST(BRAND)

AC_OUTPUT(Makefile plugins/Makefile dialog/Makefile)

Expand Down
4 changes: 1 addition & 3 deletions console_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ static install_state console_setup(install_info *info)

if ( express_setup ) {
/* Install desktop menu items */
if ( !GetProductHasNoBinaries(info) &&
has_binaries(info, info->config->root->childs)) {
if ( !GetProductHasNoBinaries(info) ) {
info->options.install_menuitems = 1;
}
return SETUP_INSTALL;
Expand Down Expand Up @@ -496,7 +495,6 @@ static install_state console_setup(install_info *info)

/* Ask for desktop menu items */
if ( !GetProductHasNoBinaries(info) &&
has_binaries(info, info->config->root->childs) &&
console_prompt(_("Do you want to install startup menu entries?"),
RESPONSE_YES) == RESPONSE_YES ) {
info->options.install_menuitems = 1;
Expand Down
14 changes: 4 additions & 10 deletions copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,29 +680,23 @@ ssize_t copy_node(install_info *info, xmlNodePtr node, const char *dest,
if ( !strcmp(node->name, "option") ) {
str = xmlNodeListGetString(info->config, node->childs, 1);
parse_line(&str, tmppath, sizeof(tmppath));
current_option = add_option_entry(current_component, tmppath);
current_option = add_option_entry(current_component, tmppath, xmlGetProp(node, "tag"));
}

size = 0;
node = node->childs;
while ( node ) {
const char *path = xmlGetProp(node, "path");
const char *srcpath = xmlGetProp(node, "srcpath");
const char *lang_prop;
/* "cdrom" tag is redundant now */
const char *from_cdrom = xmlGetProp(node, "cdromid");
int lang_matched = 1;
int lang_matched = match_locale(xmlGetProp(node, "lang"));
int strip_dirs = 0;

if ( !from_cdrom && GetProductCDROMRequired(info) ) {
from_cdrom = info->name;
}

lang_prop = xmlGetProp(node, "lang");
if (lang_prop) {
lang_matched = MatchLocale(lang_prop);
}

if (!path)
path = dest;
else {
Expand Down Expand Up @@ -932,7 +926,7 @@ ssize_t size_readme(install_info *info, xmlNodePtr node)
const char *lang_prop;

lang_prop = xmlGetProp(node, "lang");
if (lang_prop && MatchLocale(lang_prop) ) {
if (lang_prop && match_locale(lang_prop) ) {
return size_list(info, 0, ".", xmlNodeListGetString(info->config, node->childs, 1));
}
return 0;
Expand Down Expand Up @@ -972,7 +966,7 @@ ssize_t size_node(install_info *info, xmlNodePtr node)

lang_prop = xmlGetProp(node, "lang");
if (lang_prop) {
lang_matched = MatchLocale(lang_prop);
lang_matched = match_locale(lang_prop);
}
/* Now, if necessary, scan all the files to install */
if ( size == 0 ) {
Expand Down
20 changes: 12 additions & 8 deletions detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include <string.h>
#include <ctype.h>
#include <sys/param.h>
#include <sys/mount.h>
#ifdef HAVE_SYS_MOUNT_H
# include <sys/mount.h>
#endif
#include <sys/utsname.h>

#ifdef __FreeBSD__
Expand Down Expand Up @@ -39,10 +41,12 @@
#ifndef MNTTYPE_CDROM
#ifdef __FreeBSD__
#define MNTTYPE_CDROM "cd9660"
#elif defined(__svr4__)
#define MNTTYPE_CDROM "hsfs"
#elif defined(hpux)
#define MNTTYPE_CDROM "cdfs"
#elif defined(_AIX)
#define MNTTYPE_CDROM "cdrfs"
#elif defined(__svr4__)
#define MNTTYPE_CDROM "hsfs"
#else
#define MNTTYPE_CDROM "iso9660"
#endif
Expand All @@ -63,9 +67,9 @@
#endif

#ifdef MNTTAB
#define FSTAB MNTTAB
#define SETUP_FSTAB MNTTAB
#else
#define FSTAB _PATH_MNTTAB
#define SETUP_FSTAB _PATH_MNTTAB
#endif

/* The filesystems that were mounted by setup */
Expand Down Expand Up @@ -269,7 +273,7 @@ int detect_and_mount_cdrom(char *path[SETUP_MAX_DRIVES])
mount_cmd = "/usr/sbin/pfs_mount";
mnttype = "pfs-rrip";
} else {
fstab = FSTAB;
fstab = SETUP_FSTAB;
mtab = MOUNTS_FILE;
mnttype = MNTTYPE_CDROM;
mount_cmd = "mount";
Expand Down Expand Up @@ -318,7 +322,7 @@ int detect_and_mount_cdrom(char *path[SETUP_MAX_DRIVES])
struct mntent *mntent;

/* Try to mount unmounted CDROM filesystems */
mountfp = setmntent( FSTAB, "r" );
mountfp = setmntent( SETUP_FSTAB, "r" );
if( mountfp != NULL ) {
while( (mntent = getmntent( mountfp )) != NULL ){
if ( !strcmp(mntent->mnt_type, MNTTYPE_CDROM)
Expand Down Expand Up @@ -495,7 +499,7 @@ void DetectLocale(void)

/* Matches a locale string against the current one */

int MatchLocale(const char *str)
int match_locale(const char *str)
{
if ( ! str )
return 1;
Expand Down
2 changes: 1 addition & 1 deletion detect.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extern int match_distro(struct _install_info *info, const char *wanted);
/* Detect the locale settings */
extern void DetectLocale(void);
/* Matches a locale string against the current one */
extern int MatchLocale(const char *str);
extern int match_locale(const char *str);

/* Indicates if any filesystems were mounted by setup */
int mounted_filesystems(void);
Expand Down
2 changes: 1 addition & 1 deletion dialog/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.3 2002-09-17 22:40:46 megastep Exp $
# $Id: Makefile.in,v 1.4 2002-10-19 07:41:10 megastep Exp $
# template makefile for DIALOG
#
SHELL = /bin/sh
Expand Down
Loading

0 comments on commit 8a11cc9

Please sign in to comment.