You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
(12) |
Apr
(85) |
May
(15) |
Jun
(2) |
Jul
(18) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: jose g. <ort...@ho...> - 2007-05-02 21:20:30
|
How do I get started I'm looking to put some of my coding skill to work. I am an avid Unreal tournament player. «§^3»¤ÅÑÏÇ-®Ï§¤ |
From: Andy P. <an...@us...> - 2000-07-18 21:49:27
|
Update of setup Modified Files: Changelog README.xml TODO Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image Modified Files: LinuxLogos.tar.gz Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data Modified Files: setup.xml Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86 Modified Files: setup Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86/glibc-2.1 Modified Files: setup.gtk Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/de/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/es/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/makeself Modified Files: makeself.sh Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- [ cvs rdiff -t -u setup/Changelog ] Index: setup/Changelog diff -u setup/Changelog:1.5 setup/Changelog:1.6 --- setup/Changelog:1.5 Sat Apr 22 13:17:39 2000 +++ setup/Changelog Tue Jul 18 14:49:08 2000 @@ -1,8 +1,13 @@ -current (to be 413A) +413A-new +- updated setup to loki 1.3 +- rewrote setup.xml for 1.3 - new directives and defaults +- added desktop icon + +413A - integrated utcp in setup - integrated 413A patch into the setup - updated setup binaries to loki setup 1.2.3 from cvs - updated setup.xml for 1.2.x setup (updated cdrom support, install size) 400A -- initial 400A setup import \ No newline at end of file +- initial 400A setup import [ cvs rdiff -t -u setup/README.xml ] Index: setup/README.xml diff -u setup/README.xml:1.2 setup/README.xml:1.3 --- setup/README.xml:1.2 Sat Apr 22 05:10:11 2000 +++ setup/README.xml Tue Jul 18 14:49:08 2000 @@ -50,11 +50,15 @@ 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). url This is a web site which is launched after the install is completed. @@ -81,7 +85,34 @@ nouninstall This is an optional flag which, if specified, tells setup not to generate an uninstall script after it runs. + 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. + +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 take an optional attribute : + + 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. + +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. Those elements should NOT be inside an OPTION +element, alongside 'file' and 'binary' elements. +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 OPTION element: The option element contains text describing the element, along with @@ -94,8 +125,10 @@ <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 @@ -112,6 +145,8 @@ 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: @@ -121,14 +156,42 @@ The version can be one of: libc5, glibc-2.0, glibc-2.1, etc. - size This is an optional size of the install option in megabytes. + 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. +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 ;-) + The BINARY element: -The binary element contains a single binary file to be installed for +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. @@ -157,6 +220,11 @@ 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. + 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 @@ -172,6 +240,16 @@ cdrom If this attribute has a "yes" value, then setup will look for the file on one of the mounted CDROMs on the system. + 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. + The FILES element: The files element contains a list of files and directories, one per line, @@ -186,6 +264,9 @@ cdrom If this attribute has a "yes" value, then setup will look for the files on one of the mounted CDROMs on the system. + lang The files are only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The SCRIPT element: @@ -203,8 +284,12 @@ <script> sh setup.data/stage1.sh </script> + +There only supported attribute for the script element is the 'lang' element: -There are no attributes for the script element. + lang The script is only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The following environment variables are defined while in the shell script: SETUP_PRODUCTNAME : Product name from the XML file @@ -216,6 +301,18 @@ the XML file designates that some components are to be installed from CD-ROM. +About localization : + +The 'lang' values are matched against the value of the LANG environment +variable. The special value 'none' is matched only when there is no LANG +environment variable set (the default locale). + +A locale is matched if the specified value is found at the beginning of +LANG. For example, "fr" will match both the "fr" and "fr_CA" values. In +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 +translations, list "fr" before "fr_CA" in the XML file). + ------------------------------------------------------------------------- Example XML product specification: @@ -227,9 +324,11 @@ path="/opt" preinstall="sh setup.data/foo-preinst.sh $*" postinstall="sh setup.data/foo-postinst.sh $*" - eula="license.txt" url="http://www.products.kom/foo/index.html" > + <eula>license.txt</eula> + <eula lang="fr">license-fr.txt</eula> + <readme>README</readme> # This installs a product named "foo" in /opt/foo by default. # The user may specify a different installation directory. # The installer will prompt the user with the license contained in the @@ -238,26 +337,32 @@ # installing, a browser will be launched to the site: # http://www.products.kom/foo/index.html - <option install="true" help="Required for use"> + <option install="true"> Base Install # Option called "Base Install" contains a binary, # some data files, and two optional editors. + <help>Required for use</help> + <help lang="fr">Requis pour utilisation</help> <binary arch="any" libc="any" symlink="foo" icon="icon.xpm"> foo </binary> + <files lang="fr"> + README.fr + <files> <files> - README icon.xpm edit.xpm data/*.dat </files> - <option help="terminal editor for foo data files"> + <option> Curses Editor + <help>Terminal editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.ncurses </binary> </option> - <option help="X windows editor for foo data files"> + <option> Motif Editor + <help>X windows editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.motif </binary> @@ -269,7 +374,7 @@ sh setup.data/edit-postinst.sh $* </script> </option> - <option> + <option size="12M"> Extra Data # Option called "Extra Data" contains extra files <files> extra/*.dat [ cvs rdiff -t -u setup/TODO ] Index: setup/TODO diff -u setup/TODO:1.4 setup/TODO:1.5 --- setup/TODO:1.4 Sat Apr 22 13:17:39 2000 +++ setup/TODO Tue Jul 18 14:49:08 2000 @@ -1,6 +1,8 @@ (random order) todo-list -* test +* internationalization +* add enhanced server support (start/stop scripts etc) +* thoroughly test across multiple hardware configurations * possible integrate symlink files to cdrom instead of copy to disk * automaticly create setup package WITHOUT CVS/ directories * update all readme files in setup for 413 [ cvs rdiff -t -u setup/image/LinuxLogos.tar.gz ] Index: setup/image/LinuxLogos.tar.gz [ cvs rdiff -t -u setup/image/setup.data/setup.xml ] Index: setup/image/setup.data/setup.xml diff -u setup/image/setup.data/setup.xml:1.8 setup/image/setup.data/setup.xml:1.9 --- setup/image/setup.data/setup.xml:1.8 Sat Apr 29 11:33:03 2000 +++ setup/image/setup.data/setup.xml Tue Jul 18 14:49:09 2000 @@ -1,14 +1,16 @@ <?xml version="1.0" standalone="yes"?> -<install product="UnrealTournament" - desc="Unreal Tournament" - version="413A" - cdrom="required" - cdromfile="System/UNREALTOURNAMENT.EXE" - postinstall="sh setup.data/ut-postinstall.sh $*" - url="http://OpenUT.sourceforge.net/"> - <option install="true" help="The basic stuff you need to play." size="520"> +<install product="UnrealTournament" + desc="Unreal Tournament for Linux" + version="413A" + cdrom="required" + cdromfile="System/UNREALTOURNAMENT.EXE" + postinstall="sh setup.data/ut-postinstall.sh $*" + url="http://OpenUT.sourceforge.net/"> + <readme>README.txt</readme> + <option install="true" size="520M"> Unreal Tournament Base - <binary symlink="UnrealTournament"> + <help>The basic stuff you need to play</help> + <binary symlink="UnrealTournament" icon="ut48lit.png" name="Unreal Tournament"> UT </binary> <binary symlink="utcp"> @@ -34,8 +36,9 @@ md5sum </files> </option> - <option install="true" help="Tools to generate HTML statistics about your gameplay." size="1"> + <option install="true" size="1M"> NetGames USA Stat Utils + <help>Tools to generate HTML statistics about your gameplay</help> <files> NetGamesUSA.com.tar.gz </files> [ cvs rdiff -t -u setup/image/setup.data/bin/x86/setup ] Index: setup/image/setup.data/bin/x86/setup [ cvs rdiff -t -u setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk ] Index: setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk [ cvs rdiff -t -u setup/makeself/makeself.sh ] Index: setup/makeself/makeself.sh diff -u setup/makeself/makeself.sh:1.1 setup/makeself/makeself.sh:1.2 --- setup/makeself/makeself.sh:1.1 Tue Apr 18 11:57:05 2000 +++ setup/makeself/makeself.sh Tue Jul 18 14:49:10 2000 @@ -2,7 +2,7 @@ # # makeself 1.5.3 # -# $Id: makeself.sh,v 1.1 2000/04/18 18:57:05 jeroenj Exp $ +# $Id: makeself.sh,v 1.2 2000/07/18 21:49:10 andyp Exp $ # # Utility to create self-extracting tar.gz archives. # The resulting archive is a file holding the tar.gz archive with @@ -42,6 +42,7 @@ KEEP=n NOX11=n COMPRESS=gzip +TAR_ARGS=cvf if [ "$1" = --version ]; then echo Makeself version $VERSION exit 0 @@ -70,7 +71,11 @@ NOX11=y shift 1 fi -skip=143 +if [ "$1" = --follow ]; then + TAR_ARGS=cvfh + shift 1 +fi +skip=149 if [ x"$1" = x--lsm -o x"$1" = x-lsm ]; then shift 1 lsm_file=$1 @@ -99,6 +104,7 @@ echo " --nocomp : Do not compress the data" echo " --notemp : The archive will create archive_dir in the" echo " current directory and uncompress in ./archive_dir" + echo " --follow : Follow the symlinks in the archive" echo " --nox11 : Disable automatic spawn of a xterm" echo " --nowait : Do not wait for user input after executing embedded program from an xterm" echo " --lsm file : LSM file describing the package" @@ -223,7 +229,7 @@ if ! tty -s; then # Do we have a terminal? if [ x"\$DISPLAY" != x -a x"\$xterm_loop" = x ]; then # No, but do we have X? if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable - GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt konsole" + GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt" for a in \$GUESS_XTERMS; do if which \$a >/dev/null 2>&1; then XTERM=\$a @@ -244,9 +250,15 @@ cat << EOF >> $archname [ x"\$finish" = x ] && finish=true -if [ "\$1" = "-confirm" ]; then verbose=y; shift 1; fi -if [ "\$1" = "-keep" ]; then keep=y; shift 1; fi -if [ "\$1" = "-target" -a x"\$2" != x ]; then targetdir=\$2; keep=y; shift 2; fi +parsing=yes +while [ x"\$parsing" != x ]; do + case "\$1" in + -confirm) verbose=y; shift;; + -keep) keep=y; shift;; + -target) if [ x"\$2" != x ]; then targetdir="\$2"; keep=y; shift 2; fi;; + *) parsing="";; + esac +done if [ "\$keep" = y ]; then echo "Creating directory \$targetdir"; tmpdir=\$targetdir; else tmpdir="/tmp/selfgz\$\$"; fi location=\`pwd\` @@ -306,7 +318,7 @@ # Append the compressed tar data after the stub echo Adding files to archive named \"$archname\"... # (cd $archdir; tar cvf - *| $GZIP_CMD ) >> $archname && chmod +x $archname && .. -(cd $archdir; tar cvf - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } +(cd $archdir; tar $TAR_ARGS - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } echo echo >> $archname >&- ; # try to close the archive # echo Self-extractible archive \"$archname\" successfully created. |
From: Andy P. <an...@us...> - 2000-07-18 21:49:27
|
Update of setup Modified Files: Changelog README.xml TODO Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image Modified Files: LinuxLogos.tar.gz Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data Modified Files: setup.xml Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86 Modified Files: setup Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86/glibc-2.1 Modified Files: setup.gtk Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/de/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/es/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/makeself Modified Files: makeself.sh Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- [ cvs rdiff -t -u setup/Changelog ] Index: setup/Changelog diff -u setup/Changelog:1.5 setup/Changelog:1.6 --- setup/Changelog:1.5 Sat Apr 22 13:17:39 2000 +++ setup/Changelog Tue Jul 18 14:49:08 2000 @@ -1,8 +1,13 @@ -current (to be 413A) +413A-new +- updated setup to loki 1.3 +- rewrote setup.xml for 1.3 - new directives and defaults +- added desktop icon + +413A - integrated utcp in setup - integrated 413A patch into the setup - updated setup binaries to loki setup 1.2.3 from cvs - updated setup.xml for 1.2.x setup (updated cdrom support, install size) 400A -- initial 400A setup import \ No newline at end of file +- initial 400A setup import [ cvs rdiff -t -u setup/README.xml ] Index: setup/README.xml diff -u setup/README.xml:1.2 setup/README.xml:1.3 --- setup/README.xml:1.2 Sat Apr 22 05:10:11 2000 +++ setup/README.xml Tue Jul 18 14:49:08 2000 @@ -50,11 +50,15 @@ 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). url This is a web site which is launched after the install is completed. @@ -81,7 +85,34 @@ nouninstall This is an optional flag which, if specified, tells setup not to generate an uninstall script after it runs. + 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. + +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 take an optional attribute : + + 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. + +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. Those elements should NOT be inside an OPTION +element, alongside 'file' and 'binary' elements. +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 OPTION element: The option element contains text describing the element, along with @@ -94,8 +125,10 @@ <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 @@ -112,6 +145,8 @@ 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: @@ -121,14 +156,42 @@ The version can be one of: libc5, glibc-2.0, glibc-2.1, etc. - size This is an optional size of the install option in megabytes. + 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. +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 ;-) + The BINARY element: -The binary element contains a single binary file to be installed for +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. @@ -157,6 +220,11 @@ 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. + 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 @@ -172,6 +240,16 @@ cdrom If this attribute has a "yes" value, then setup will look for the file on one of the mounted CDROMs on the system. + 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. + The FILES element: The files element contains a list of files and directories, one per line, @@ -186,6 +264,9 @@ cdrom If this attribute has a "yes" value, then setup will look for the files on one of the mounted CDROMs on the system. + lang The files are only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The SCRIPT element: @@ -203,8 +284,12 @@ <script> sh setup.data/stage1.sh </script> + +There only supported attribute for the script element is the 'lang' element: -There are no attributes for the script element. + lang The script is only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The following environment variables are defined while in the shell script: SETUP_PRODUCTNAME : Product name from the XML file @@ -216,6 +301,18 @@ the XML file designates that some components are to be installed from CD-ROM. +About localization : + +The 'lang' values are matched against the value of the LANG environment +variable. The special value 'none' is matched only when there is no LANG +environment variable set (the default locale). + +A locale is matched if the specified value is found at the beginning of +LANG. For example, "fr" will match both the "fr" and "fr_CA" values. In +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 +translations, list "fr" before "fr_CA" in the XML file). + ------------------------------------------------------------------------- Example XML product specification: @@ -227,9 +324,11 @@ path="/opt" preinstall="sh setup.data/foo-preinst.sh $*" postinstall="sh setup.data/foo-postinst.sh $*" - eula="license.txt" url="http://www.products.kom/foo/index.html" > + <eula>license.txt</eula> + <eula lang="fr">license-fr.txt</eula> + <readme>README</readme> # This installs a product named "foo" in /opt/foo by default. # The user may specify a different installation directory. # The installer will prompt the user with the license contained in the @@ -238,26 +337,32 @@ # installing, a browser will be launched to the site: # http://www.products.kom/foo/index.html - <option install="true" help="Required for use"> + <option install="true"> Base Install # Option called "Base Install" contains a binary, # some data files, and two optional editors. + <help>Required for use</help> + <help lang="fr">Requis pour utilisation</help> <binary arch="any" libc="any" symlink="foo" icon="icon.xpm"> foo </binary> + <files lang="fr"> + README.fr + <files> <files> - README icon.xpm edit.xpm data/*.dat </files> - <option help="terminal editor for foo data files"> + <option> Curses Editor + <help>Terminal editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.ncurses </binary> </option> - <option help="X windows editor for foo data files"> + <option> Motif Editor + <help>X windows editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.motif </binary> @@ -269,7 +374,7 @@ sh setup.data/edit-postinst.sh $* </script> </option> - <option> + <option size="12M"> Extra Data # Option called "Extra Data" contains extra files <files> extra/*.dat [ cvs rdiff -t -u setup/TODO ] Index: setup/TODO diff -u setup/TODO:1.4 setup/TODO:1.5 --- setup/TODO:1.4 Sat Apr 22 13:17:39 2000 +++ setup/TODO Tue Jul 18 14:49:08 2000 @@ -1,6 +1,8 @@ (random order) todo-list -* test +* internationalization +* add enhanced server support (start/stop scripts etc) +* thoroughly test across multiple hardware configurations * possible integrate symlink files to cdrom instead of copy to disk * automaticly create setup package WITHOUT CVS/ directories * update all readme files in setup for 413 [ cvs rdiff -t -u setup/image/LinuxLogos.tar.gz ] Index: setup/image/LinuxLogos.tar.gz [ cvs rdiff -t -u setup/image/setup.data/setup.xml ] Index: setup/image/setup.data/setup.xml diff -u setup/image/setup.data/setup.xml:1.8 setup/image/setup.data/setup.xml:1.9 --- setup/image/setup.data/setup.xml:1.8 Sat Apr 29 11:33:03 2000 +++ setup/image/setup.data/setup.xml Tue Jul 18 14:49:09 2000 @@ -1,14 +1,16 @@ <?xml version="1.0" standalone="yes"?> -<install product="UnrealTournament" - desc="Unreal Tournament" - version="413A" - cdrom="required" - cdromfile="System/UNREALTOURNAMENT.EXE" - postinstall="sh setup.data/ut-postinstall.sh $*" - url="http://OpenUT.sourceforge.net/"> - <option install="true" help="The basic stuff you need to play." size="520"> +<install product="UnrealTournament" + desc="Unreal Tournament for Linux" + version="413A" + cdrom="required" + cdromfile="System/UNREALTOURNAMENT.EXE" + postinstall="sh setup.data/ut-postinstall.sh $*" + url="http://OpenUT.sourceforge.net/"> + <readme>README.txt</readme> + <option install="true" size="520M"> Unreal Tournament Base - <binary symlink="UnrealTournament"> + <help>The basic stuff you need to play</help> + <binary symlink="UnrealTournament" icon="ut48lit.png" name="Unreal Tournament"> UT </binary> <binary symlink="utcp"> @@ -34,8 +36,9 @@ md5sum </files> </option> - <option install="true" help="Tools to generate HTML statistics about your gameplay." size="1"> + <option install="true" size="1M"> NetGames USA Stat Utils + <help>Tools to generate HTML statistics about your gameplay</help> <files> NetGamesUSA.com.tar.gz </files> [ cvs rdiff -t -u setup/image/setup.data/bin/x86/setup ] Index: setup/image/setup.data/bin/x86/setup [ cvs rdiff -t -u setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk ] Index: setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk [ cvs rdiff -t -u setup/makeself/makeself.sh ] Index: setup/makeself/makeself.sh diff -u setup/makeself/makeself.sh:1.1 setup/makeself/makeself.sh:1.2 --- setup/makeself/makeself.sh:1.1 Tue Apr 18 11:57:05 2000 +++ setup/makeself/makeself.sh Tue Jul 18 14:49:10 2000 @@ -2,7 +2,7 @@ # # makeself 1.5.3 # -# $Id: makeself.sh,v 1.1 2000/04/18 18:57:05 jeroenj Exp $ +# $Id: makeself.sh,v 1.2 2000/07/18 21:49:10 andyp Exp $ # # Utility to create self-extracting tar.gz archives. # The resulting archive is a file holding the tar.gz archive with @@ -42,6 +42,7 @@ KEEP=n NOX11=n COMPRESS=gzip +TAR_ARGS=cvf if [ "$1" = --version ]; then echo Makeself version $VERSION exit 0 @@ -70,7 +71,11 @@ NOX11=y shift 1 fi -skip=143 +if [ "$1" = --follow ]; then + TAR_ARGS=cvfh + shift 1 +fi +skip=149 if [ x"$1" = x--lsm -o x"$1" = x-lsm ]; then shift 1 lsm_file=$1 @@ -99,6 +104,7 @@ echo " --nocomp : Do not compress the data" echo " --notemp : The archive will create archive_dir in the" echo " current directory and uncompress in ./archive_dir" + echo " --follow : Follow the symlinks in the archive" echo " --nox11 : Disable automatic spawn of a xterm" echo " --nowait : Do not wait for user input after executing embedded program from an xterm" echo " --lsm file : LSM file describing the package" @@ -223,7 +229,7 @@ if ! tty -s; then # Do we have a terminal? if [ x"\$DISPLAY" != x -a x"\$xterm_loop" = x ]; then # No, but do we have X? if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable - GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt konsole" + GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt" for a in \$GUESS_XTERMS; do if which \$a >/dev/null 2>&1; then XTERM=\$a @@ -244,9 +250,15 @@ cat << EOF >> $archname [ x"\$finish" = x ] && finish=true -if [ "\$1" = "-confirm" ]; then verbose=y; shift 1; fi -if [ "\$1" = "-keep" ]; then keep=y; shift 1; fi -if [ "\$1" = "-target" -a x"\$2" != x ]; then targetdir=\$2; keep=y; shift 2; fi +parsing=yes +while [ x"\$parsing" != x ]; do + case "\$1" in + -confirm) verbose=y; shift;; + -keep) keep=y; shift;; + -target) if [ x"\$2" != x ]; then targetdir="\$2"; keep=y; shift 2; fi;; + *) parsing="";; + esac +done if [ "\$keep" = y ]; then echo "Creating directory \$targetdir"; tmpdir=\$targetdir; else tmpdir="/tmp/selfgz\$\$"; fi location=\`pwd\` @@ -306,7 +318,7 @@ # Append the compressed tar data after the stub echo Adding files to archive named \"$archname\"... # (cd $archdir; tar cvf - *| $GZIP_CMD ) >> $archname && chmod +x $archname && .. -(cd $archdir; tar cvf - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } +(cd $archdir; tar $TAR_ARGS - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } echo echo >> $archname >&- ; # try to close the archive # echo Self-extractible archive \"$archname\" successfully created. |
From: Andy P. <an...@us...> - 2000-07-18 21:49:27
|
Update of setup Modified Files: Changelog README.xml TODO Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image Modified Files: LinuxLogos.tar.gz Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data Modified Files: setup.xml Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86 Modified Files: setup Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86/glibc-2.1 Modified Files: setup.gtk Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/de/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/es/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/makeself Modified Files: makeself.sh Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- [ cvs rdiff -t -u setup/Changelog ] Index: setup/Changelog diff -u setup/Changelog:1.5 setup/Changelog:1.6 --- setup/Changelog:1.5 Sat Apr 22 13:17:39 2000 +++ setup/Changelog Tue Jul 18 14:49:08 2000 @@ -1,8 +1,13 @@ -current (to be 413A) +413A-new +- updated setup to loki 1.3 +- rewrote setup.xml for 1.3 - new directives and defaults +- added desktop icon + +413A - integrated utcp in setup - integrated 413A patch into the setup - updated setup binaries to loki setup 1.2.3 from cvs - updated setup.xml for 1.2.x setup (updated cdrom support, install size) 400A -- initial 400A setup import \ No newline at end of file +- initial 400A setup import [ cvs rdiff -t -u setup/README.xml ] Index: setup/README.xml diff -u setup/README.xml:1.2 setup/README.xml:1.3 --- setup/README.xml:1.2 Sat Apr 22 05:10:11 2000 +++ setup/README.xml Tue Jul 18 14:49:08 2000 @@ -50,11 +50,15 @@ 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). url This is a web site which is launched after the install is completed. @@ -81,7 +85,34 @@ nouninstall This is an optional flag which, if specified, tells setup not to generate an uninstall script after it runs. + 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. + +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 take an optional attribute : + + 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. + +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. Those elements should NOT be inside an OPTION +element, alongside 'file' and 'binary' elements. +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 OPTION element: The option element contains text describing the element, along with @@ -94,8 +125,10 @@ <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 @@ -112,6 +145,8 @@ 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: @@ -121,14 +156,42 @@ The version can be one of: libc5, glibc-2.0, glibc-2.1, etc. - size This is an optional size of the install option in megabytes. + 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. +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 ;-) + The BINARY element: -The binary element contains a single binary file to be installed for +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. @@ -157,6 +220,11 @@ 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. + 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 @@ -172,6 +240,16 @@ cdrom If this attribute has a "yes" value, then setup will look for the file on one of the mounted CDROMs on the system. + 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. + The FILES element: The files element contains a list of files and directories, one per line, @@ -186,6 +264,9 @@ cdrom If this attribute has a "yes" value, then setup will look for the files on one of the mounted CDROMs on the system. + lang The files are only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The SCRIPT element: @@ -203,8 +284,12 @@ <script> sh setup.data/stage1.sh </script> + +There only supported attribute for the script element is the 'lang' element: -There are no attributes for the script element. + lang The script is only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The following environment variables are defined while in the shell script: SETUP_PRODUCTNAME : Product name from the XML file @@ -216,6 +301,18 @@ the XML file designates that some components are to be installed from CD-ROM. +About localization : + +The 'lang' values are matched against the value of the LANG environment +variable. The special value 'none' is matched only when there is no LANG +environment variable set (the default locale). + +A locale is matched if the specified value is found at the beginning of +LANG. For example, "fr" will match both the "fr" and "fr_CA" values. In +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 +translations, list "fr" before "fr_CA" in the XML file). + ------------------------------------------------------------------------- Example XML product specification: @@ -227,9 +324,11 @@ path="/opt" preinstall="sh setup.data/foo-preinst.sh $*" postinstall="sh setup.data/foo-postinst.sh $*" - eula="license.txt" url="http://www.products.kom/foo/index.html" > + <eula>license.txt</eula> + <eula lang="fr">license-fr.txt</eula> + <readme>README</readme> # This installs a product named "foo" in /opt/foo by default. # The user may specify a different installation directory. # The installer will prompt the user with the license contained in the @@ -238,26 +337,32 @@ # installing, a browser will be launched to the site: # http://www.products.kom/foo/index.html - <option install="true" help="Required for use"> + <option install="true"> Base Install # Option called "Base Install" contains a binary, # some data files, and two optional editors. + <help>Required for use</help> + <help lang="fr">Requis pour utilisation</help> <binary arch="any" libc="any" symlink="foo" icon="icon.xpm"> foo </binary> + <files lang="fr"> + README.fr + <files> <files> - README icon.xpm edit.xpm data/*.dat </files> - <option help="terminal editor for foo data files"> + <option> Curses Editor + <help>Terminal editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.ncurses </binary> </option> - <option help="X windows editor for foo data files"> + <option> Motif Editor + <help>X windows editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.motif </binary> @@ -269,7 +374,7 @@ sh setup.data/edit-postinst.sh $* </script> </option> - <option> + <option size="12M"> Extra Data # Option called "Extra Data" contains extra files <files> extra/*.dat [ cvs rdiff -t -u setup/TODO ] Index: setup/TODO diff -u setup/TODO:1.4 setup/TODO:1.5 --- setup/TODO:1.4 Sat Apr 22 13:17:39 2000 +++ setup/TODO Tue Jul 18 14:49:08 2000 @@ -1,6 +1,8 @@ (random order) todo-list -* test +* internationalization +* add enhanced server support (start/stop scripts etc) +* thoroughly test across multiple hardware configurations * possible integrate symlink files to cdrom instead of copy to disk * automaticly create setup package WITHOUT CVS/ directories * update all readme files in setup for 413 [ cvs rdiff -t -u setup/image/LinuxLogos.tar.gz ] Index: setup/image/LinuxLogos.tar.gz [ cvs rdiff -t -u setup/image/setup.data/setup.xml ] Index: setup/image/setup.data/setup.xml diff -u setup/image/setup.data/setup.xml:1.8 setup/image/setup.data/setup.xml:1.9 --- setup/image/setup.data/setup.xml:1.8 Sat Apr 29 11:33:03 2000 +++ setup/image/setup.data/setup.xml Tue Jul 18 14:49:09 2000 @@ -1,14 +1,16 @@ <?xml version="1.0" standalone="yes"?> -<install product="UnrealTournament" - desc="Unreal Tournament" - version="413A" - cdrom="required" - cdromfile="System/UNREALTOURNAMENT.EXE" - postinstall="sh setup.data/ut-postinstall.sh $*" - url="http://OpenUT.sourceforge.net/"> - <option install="true" help="The basic stuff you need to play." size="520"> +<install product="UnrealTournament" + desc="Unreal Tournament for Linux" + version="413A" + cdrom="required" + cdromfile="System/UNREALTOURNAMENT.EXE" + postinstall="sh setup.data/ut-postinstall.sh $*" + url="http://OpenUT.sourceforge.net/"> + <readme>README.txt</readme> + <option install="true" size="520M"> Unreal Tournament Base - <binary symlink="UnrealTournament"> + <help>The basic stuff you need to play</help> + <binary symlink="UnrealTournament" icon="ut48lit.png" name="Unreal Tournament"> UT </binary> <binary symlink="utcp"> @@ -34,8 +36,9 @@ md5sum </files> </option> - <option install="true" help="Tools to generate HTML statistics about your gameplay." size="1"> + <option install="true" size="1M"> NetGames USA Stat Utils + <help>Tools to generate HTML statistics about your gameplay</help> <files> NetGamesUSA.com.tar.gz </files> [ cvs rdiff -t -u setup/image/setup.data/bin/x86/setup ] Index: setup/image/setup.data/bin/x86/setup [ cvs rdiff -t -u setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk ] Index: setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk [ cvs rdiff -t -u setup/makeself/makeself.sh ] Index: setup/makeself/makeself.sh diff -u setup/makeself/makeself.sh:1.1 setup/makeself/makeself.sh:1.2 --- setup/makeself/makeself.sh:1.1 Tue Apr 18 11:57:05 2000 +++ setup/makeself/makeself.sh Tue Jul 18 14:49:10 2000 @@ -2,7 +2,7 @@ # # makeself 1.5.3 # -# $Id: makeself.sh,v 1.1 2000/04/18 18:57:05 jeroenj Exp $ +# $Id: makeself.sh,v 1.2 2000/07/18 21:49:10 andyp Exp $ # # Utility to create self-extracting tar.gz archives. # The resulting archive is a file holding the tar.gz archive with @@ -42,6 +42,7 @@ KEEP=n NOX11=n COMPRESS=gzip +TAR_ARGS=cvf if [ "$1" = --version ]; then echo Makeself version $VERSION exit 0 @@ -70,7 +71,11 @@ NOX11=y shift 1 fi -skip=143 +if [ "$1" = --follow ]; then + TAR_ARGS=cvfh + shift 1 +fi +skip=149 if [ x"$1" = x--lsm -o x"$1" = x-lsm ]; then shift 1 lsm_file=$1 @@ -99,6 +104,7 @@ echo " --nocomp : Do not compress the data" echo " --notemp : The archive will create archive_dir in the" echo " current directory and uncompress in ./archive_dir" + echo " --follow : Follow the symlinks in the archive" echo " --nox11 : Disable automatic spawn of a xterm" echo " --nowait : Do not wait for user input after executing embedded program from an xterm" echo " --lsm file : LSM file describing the package" @@ -223,7 +229,7 @@ if ! tty -s; then # Do we have a terminal? if [ x"\$DISPLAY" != x -a x"\$xterm_loop" = x ]; then # No, but do we have X? if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable - GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt konsole" + GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt" for a in \$GUESS_XTERMS; do if which \$a >/dev/null 2>&1; then XTERM=\$a @@ -244,9 +250,15 @@ cat << EOF >> $archname [ x"\$finish" = x ] && finish=true -if [ "\$1" = "-confirm" ]; then verbose=y; shift 1; fi -if [ "\$1" = "-keep" ]; then keep=y; shift 1; fi -if [ "\$1" = "-target" -a x"\$2" != x ]; then targetdir=\$2; keep=y; shift 2; fi +parsing=yes +while [ x"\$parsing" != x ]; do + case "\$1" in + -confirm) verbose=y; shift;; + -keep) keep=y; shift;; + -target) if [ x"\$2" != x ]; then targetdir="\$2"; keep=y; shift 2; fi;; + *) parsing="";; + esac +done if [ "\$keep" = y ]; then echo "Creating directory \$targetdir"; tmpdir=\$targetdir; else tmpdir="/tmp/selfgz\$\$"; fi location=\`pwd\` @@ -306,7 +318,7 @@ # Append the compressed tar data after the stub echo Adding files to archive named \"$archname\"... # (cd $archdir; tar cvf - *| $GZIP_CMD ) >> $archname && chmod +x $archname && .. -(cd $archdir; tar cvf - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } +(cd $archdir; tar $TAR_ARGS - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } echo echo >> $archname >&- ; # try to close the archive # echo Self-extractible archive \"$archname\" successfully created. |
From: Andy P. <an...@us...> - 2000-07-18 21:49:27
|
Update of setup Modified Files: Changelog README.xml TODO Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image Modified Files: LinuxLogos.tar.gz Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data Modified Files: setup.xml Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86 Modified Files: setup Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86/glibc-2.1 Modified Files: setup.gtk Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/de/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/es/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/makeself Modified Files: makeself.sh Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- [ cvs rdiff -t -u setup/Changelog ] Index: setup/Changelog diff -u setup/Changelog:1.5 setup/Changelog:1.6 --- setup/Changelog:1.5 Sat Apr 22 13:17:39 2000 +++ setup/Changelog Tue Jul 18 14:49:08 2000 @@ -1,8 +1,13 @@ -current (to be 413A) +413A-new +- updated setup to loki 1.3 +- rewrote setup.xml for 1.3 - new directives and defaults +- added desktop icon + +413A - integrated utcp in setup - integrated 413A patch into the setup - updated setup binaries to loki setup 1.2.3 from cvs - updated setup.xml for 1.2.x setup (updated cdrom support, install size) 400A -- initial 400A setup import \ No newline at end of file +- initial 400A setup import [ cvs rdiff -t -u setup/README.xml ] Index: setup/README.xml diff -u setup/README.xml:1.2 setup/README.xml:1.3 --- setup/README.xml:1.2 Sat Apr 22 05:10:11 2000 +++ setup/README.xml Tue Jul 18 14:49:08 2000 @@ -50,11 +50,15 @@ 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). url This is a web site which is launched after the install is completed. @@ -81,7 +85,34 @@ nouninstall This is an optional flag which, if specified, tells setup not to generate an uninstall script after it runs. + 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. + +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 take an optional attribute : + + 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. + +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. Those elements should NOT be inside an OPTION +element, alongside 'file' and 'binary' elements. +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 OPTION element: The option element contains text describing the element, along with @@ -94,8 +125,10 @@ <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 @@ -112,6 +145,8 @@ 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: @@ -121,14 +156,42 @@ The version can be one of: libc5, glibc-2.0, glibc-2.1, etc. - size This is an optional size of the install option in megabytes. + 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. +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 ;-) + The BINARY element: -The binary element contains a single binary file to be installed for +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. @@ -157,6 +220,11 @@ 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. + 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 @@ -172,6 +240,16 @@ cdrom If this attribute has a "yes" value, then setup will look for the file on one of the mounted CDROMs on the system. + 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. + The FILES element: The files element contains a list of files and directories, one per line, @@ -186,6 +264,9 @@ cdrom If this attribute has a "yes" value, then setup will look for the files on one of the mounted CDROMs on the system. + lang The files are only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The SCRIPT element: @@ -203,8 +284,12 @@ <script> sh setup.data/stage1.sh </script> + +There only supported attribute for the script element is the 'lang' element: -There are no attributes for the script element. + lang The script is only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The following environment variables are defined while in the shell script: SETUP_PRODUCTNAME : Product name from the XML file @@ -216,6 +301,18 @@ the XML file designates that some components are to be installed from CD-ROM. +About localization : + +The 'lang' values are matched against the value of the LANG environment +variable. The special value 'none' is matched only when there is no LANG +environment variable set (the default locale). + +A locale is matched if the specified value is found at the beginning of +LANG. For example, "fr" will match both the "fr" and "fr_CA" values. In +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 +translations, list "fr" before "fr_CA" in the XML file). + ------------------------------------------------------------------------- Example XML product specification: @@ -227,9 +324,11 @@ path="/opt" preinstall="sh setup.data/foo-preinst.sh $*" postinstall="sh setup.data/foo-postinst.sh $*" - eula="license.txt" url="http://www.products.kom/foo/index.html" > + <eula>license.txt</eula> + <eula lang="fr">license-fr.txt</eula> + <readme>README</readme> # This installs a product named "foo" in /opt/foo by default. # The user may specify a different installation directory. # The installer will prompt the user with the license contained in the @@ -238,26 +337,32 @@ # installing, a browser will be launched to the site: # http://www.products.kom/foo/index.html - <option install="true" help="Required for use"> + <option install="true"> Base Install # Option called "Base Install" contains a binary, # some data files, and two optional editors. + <help>Required for use</help> + <help lang="fr">Requis pour utilisation</help> <binary arch="any" libc="any" symlink="foo" icon="icon.xpm"> foo </binary> + <files lang="fr"> + README.fr + <files> <files> - README icon.xpm edit.xpm data/*.dat </files> - <option help="terminal editor for foo data files"> + <option> Curses Editor + <help>Terminal editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.ncurses </binary> </option> - <option help="X windows editor for foo data files"> + <option> Motif Editor + <help>X windows editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.motif </binary> @@ -269,7 +374,7 @@ sh setup.data/edit-postinst.sh $* </script> </option> - <option> + <option size="12M"> Extra Data # Option called "Extra Data" contains extra files <files> extra/*.dat [ cvs rdiff -t -u setup/TODO ] Index: setup/TODO diff -u setup/TODO:1.4 setup/TODO:1.5 --- setup/TODO:1.4 Sat Apr 22 13:17:39 2000 +++ setup/TODO Tue Jul 18 14:49:08 2000 @@ -1,6 +1,8 @@ (random order) todo-list -* test +* internationalization +* add enhanced server support (start/stop scripts etc) +* thoroughly test across multiple hardware configurations * possible integrate symlink files to cdrom instead of copy to disk * automaticly create setup package WITHOUT CVS/ directories * update all readme files in setup for 413 [ cvs rdiff -t -u setup/image/LinuxLogos.tar.gz ] Index: setup/image/LinuxLogos.tar.gz [ cvs rdiff -t -u setup/image/setup.data/setup.xml ] Index: setup/image/setup.data/setup.xml diff -u setup/image/setup.data/setup.xml:1.8 setup/image/setup.data/setup.xml:1.9 --- setup/image/setup.data/setup.xml:1.8 Sat Apr 29 11:33:03 2000 +++ setup/image/setup.data/setup.xml Tue Jul 18 14:49:09 2000 @@ -1,14 +1,16 @@ <?xml version="1.0" standalone="yes"?> -<install product="UnrealTournament" - desc="Unreal Tournament" - version="413A" - cdrom="required" - cdromfile="System/UNREALTOURNAMENT.EXE" - postinstall="sh setup.data/ut-postinstall.sh $*" - url="http://OpenUT.sourceforge.net/"> - <option install="true" help="The basic stuff you need to play." size="520"> +<install product="UnrealTournament" + desc="Unreal Tournament for Linux" + version="413A" + cdrom="required" + cdromfile="System/UNREALTOURNAMENT.EXE" + postinstall="sh setup.data/ut-postinstall.sh $*" + url="http://OpenUT.sourceforge.net/"> + <readme>README.txt</readme> + <option install="true" size="520M"> Unreal Tournament Base - <binary symlink="UnrealTournament"> + <help>The basic stuff you need to play</help> + <binary symlink="UnrealTournament" icon="ut48lit.png" name="Unreal Tournament"> UT </binary> <binary symlink="utcp"> @@ -34,8 +36,9 @@ md5sum </files> </option> - <option install="true" help="Tools to generate HTML statistics about your gameplay." size="1"> + <option install="true" size="1M"> NetGames USA Stat Utils + <help>Tools to generate HTML statistics about your gameplay</help> <files> NetGamesUSA.com.tar.gz </files> [ cvs rdiff -t -u setup/image/setup.data/bin/x86/setup ] Index: setup/image/setup.data/bin/x86/setup [ cvs rdiff -t -u setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk ] Index: setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk [ cvs rdiff -t -u setup/makeself/makeself.sh ] Index: setup/makeself/makeself.sh diff -u setup/makeself/makeself.sh:1.1 setup/makeself/makeself.sh:1.2 --- setup/makeself/makeself.sh:1.1 Tue Apr 18 11:57:05 2000 +++ setup/makeself/makeself.sh Tue Jul 18 14:49:10 2000 @@ -2,7 +2,7 @@ # # makeself 1.5.3 # -# $Id: makeself.sh,v 1.1 2000/04/18 18:57:05 jeroenj Exp $ +# $Id: makeself.sh,v 1.2 2000/07/18 21:49:10 andyp Exp $ # # Utility to create self-extracting tar.gz archives. # The resulting archive is a file holding the tar.gz archive with @@ -42,6 +42,7 @@ KEEP=n NOX11=n COMPRESS=gzip +TAR_ARGS=cvf if [ "$1" = --version ]; then echo Makeself version $VERSION exit 0 @@ -70,7 +71,11 @@ NOX11=y shift 1 fi -skip=143 +if [ "$1" = --follow ]; then + TAR_ARGS=cvfh + shift 1 +fi +skip=149 if [ x"$1" = x--lsm -o x"$1" = x-lsm ]; then shift 1 lsm_file=$1 @@ -99,6 +104,7 @@ echo " --nocomp : Do not compress the data" echo " --notemp : The archive will create archive_dir in the" echo " current directory and uncompress in ./archive_dir" + echo " --follow : Follow the symlinks in the archive" echo " --nox11 : Disable automatic spawn of a xterm" echo " --nowait : Do not wait for user input after executing embedded program from an xterm" echo " --lsm file : LSM file describing the package" @@ -223,7 +229,7 @@ if ! tty -s; then # Do we have a terminal? if [ x"\$DISPLAY" != x -a x"\$xterm_loop" = x ]; then # No, but do we have X? if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable - GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt konsole" + GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt" for a in \$GUESS_XTERMS; do if which \$a >/dev/null 2>&1; then XTERM=\$a @@ -244,9 +250,15 @@ cat << EOF >> $archname [ x"\$finish" = x ] && finish=true -if [ "\$1" = "-confirm" ]; then verbose=y; shift 1; fi -if [ "\$1" = "-keep" ]; then keep=y; shift 1; fi -if [ "\$1" = "-target" -a x"\$2" != x ]; then targetdir=\$2; keep=y; shift 2; fi +parsing=yes +while [ x"\$parsing" != x ]; do + case "\$1" in + -confirm) verbose=y; shift;; + -keep) keep=y; shift;; + -target) if [ x"\$2" != x ]; then targetdir="\$2"; keep=y; shift 2; fi;; + *) parsing="";; + esac +done if [ "\$keep" = y ]; then echo "Creating directory \$targetdir"; tmpdir=\$targetdir; else tmpdir="/tmp/selfgz\$\$"; fi location=\`pwd\` @@ -306,7 +318,7 @@ # Append the compressed tar data after the stub echo Adding files to archive named \"$archname\"... # (cd $archdir; tar cvf - *| $GZIP_CMD ) >> $archname && chmod +x $archname && .. -(cd $archdir; tar cvf - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } +(cd $archdir; tar $TAR_ARGS - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } echo echo >> $archname >&- ; # try to close the archive # echo Self-extractible archive \"$archname\" successfully created. |
From: Andy P. <an...@us...> - 2000-07-18 21:49:26
|
Update of setup Modified Files: Changelog README.xml TODO Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image Modified Files: LinuxLogos.tar.gz Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data Modified Files: setup.xml Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86 Modified Files: setup Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/bin/x86/glibc-2.1 Modified Files: setup.gtk Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/de/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/es/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Added Files: setup.mo Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- Update of setup/makeself Modified Files: makeself.sh Log Message: Updated to Loki setup 1.3 Modified setup.xml for 1.3 added desktop icon ------------------------------------------------- [ cvs rdiff -t -u setup/Changelog ] Index: setup/Changelog diff -u setup/Changelog:1.5 setup/Changelog:1.6 --- setup/Changelog:1.5 Sat Apr 22 13:17:39 2000 +++ setup/Changelog Tue Jul 18 14:49:08 2000 @@ -1,8 +1,13 @@ -current (to be 413A) +413A-new +- updated setup to loki 1.3 +- rewrote setup.xml for 1.3 - new directives and defaults +- added desktop icon + +413A - integrated utcp in setup - integrated 413A patch into the setup - updated setup binaries to loki setup 1.2.3 from cvs - updated setup.xml for 1.2.x setup (updated cdrom support, install size) 400A -- initial 400A setup import \ No newline at end of file +- initial 400A setup import [ cvs rdiff -t -u setup/README.xml ] Index: setup/README.xml diff -u setup/README.xml:1.2 setup/README.xml:1.3 --- setup/README.xml:1.2 Sat Apr 22 05:10:11 2000 +++ setup/README.xml Tue Jul 18 14:49:08 2000 @@ -50,11 +50,15 @@ 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). url This is a web site which is launched after the install is completed. @@ -81,7 +85,34 @@ nouninstall This is an optional flag which, if specified, tells setup not to generate an uninstall script after it runs. + 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. + +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 take an optional attribute : + + 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. + +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. Those elements should NOT be inside an OPTION +element, alongside 'file' and 'binary' elements. +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 OPTION element: The option element contains text describing the element, along with @@ -94,8 +125,10 @@ <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 @@ -112,6 +145,8 @@ 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: @@ -121,14 +156,42 @@ The version can be one of: libc5, glibc-2.0, glibc-2.1, etc. - size This is an optional size of the install option in megabytes. + 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. +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 ;-) + The BINARY element: -The binary element contains a single binary file to be installed for +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. @@ -157,6 +220,11 @@ 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. + 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 @@ -172,6 +240,16 @@ cdrom If this attribute has a "yes" value, then setup will look for the file on one of the mounted CDROMs on the system. + 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. + The FILES element: The files element contains a list of files and directories, one per line, @@ -186,6 +264,9 @@ cdrom If this attribute has a "yes" value, then setup will look for the files on one of the mounted CDROMs on the system. + lang The files are only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The SCRIPT element: @@ -203,8 +284,12 @@ <script> sh setup.data/stage1.sh </script> + +There only supported attribute for the script element is the 'lang' element: -There are no attributes for the script element. + lang The script is only installed if the current locale matches the + string of this attribute. See 'About localization' below for + more details. The following environment variables are defined while in the shell script: SETUP_PRODUCTNAME : Product name from the XML file @@ -216,6 +301,18 @@ the XML file designates that some components are to be installed from CD-ROM. +About localization : + +The 'lang' values are matched against the value of the LANG environment +variable. The special value 'none' is matched only when there is no LANG +environment variable set (the default locale). + +A locale is matched if the specified value is found at the beginning of +LANG. For example, "fr" will match both the "fr" and "fr_CA" values. In +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 +translations, list "fr" before "fr_CA" in the XML file). + ------------------------------------------------------------------------- Example XML product specification: @@ -227,9 +324,11 @@ path="/opt" preinstall="sh setup.data/foo-preinst.sh $*" postinstall="sh setup.data/foo-postinst.sh $*" - eula="license.txt" url="http://www.products.kom/foo/index.html" > + <eula>license.txt</eula> + <eula lang="fr">license-fr.txt</eula> + <readme>README</readme> # This installs a product named "foo" in /opt/foo by default. # The user may specify a different installation directory. # The installer will prompt the user with the license contained in the @@ -238,26 +337,32 @@ # installing, a browser will be launched to the site: # http://www.products.kom/foo/index.html - <option install="true" help="Required for use"> + <option install="true"> Base Install # Option called "Base Install" contains a binary, # some data files, and two optional editors. + <help>Required for use</help> + <help lang="fr">Requis pour utilisation</help> <binary arch="any" libc="any" symlink="foo" icon="icon.xpm"> foo </binary> + <files lang="fr"> + README.fr + <files> <files> - README icon.xpm edit.xpm data/*.dat </files> - <option help="terminal editor for foo data files"> + <option> Curses Editor + <help>Terminal editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.ncurses </binary> </option> - <option help="X windows editor for foo data files"> + <option> Motif Editor + <help>X windows editor for foo data files</help> <binary arch="any" libc="any"> foo-edit.motif </binary> @@ -269,7 +374,7 @@ sh setup.data/edit-postinst.sh $* </script> </option> - <option> + <option size="12M"> Extra Data # Option called "Extra Data" contains extra files <files> extra/*.dat [ cvs rdiff -t -u setup/TODO ] Index: setup/TODO diff -u setup/TODO:1.4 setup/TODO:1.5 --- setup/TODO:1.4 Sat Apr 22 13:17:39 2000 +++ setup/TODO Tue Jul 18 14:49:08 2000 @@ -1,6 +1,8 @@ (random order) todo-list -* test +* internationalization +* add enhanced server support (start/stop scripts etc) +* thoroughly test across multiple hardware configurations * possible integrate symlink files to cdrom instead of copy to disk * automaticly create setup package WITHOUT CVS/ directories * update all readme files in setup for 413 [ cvs rdiff -t -u setup/image/LinuxLogos.tar.gz ] Index: setup/image/LinuxLogos.tar.gz [ cvs rdiff -t -u setup/image/setup.data/setup.xml ] Index: setup/image/setup.data/setup.xml diff -u setup/image/setup.data/setup.xml:1.8 setup/image/setup.data/setup.xml:1.9 --- setup/image/setup.data/setup.xml:1.8 Sat Apr 29 11:33:03 2000 +++ setup/image/setup.data/setup.xml Tue Jul 18 14:49:09 2000 @@ -1,14 +1,16 @@ <?xml version="1.0" standalone="yes"?> -<install product="UnrealTournament" - desc="Unreal Tournament" - version="413A" - cdrom="required" - cdromfile="System/UNREALTOURNAMENT.EXE" - postinstall="sh setup.data/ut-postinstall.sh $*" - url="http://OpenUT.sourceforge.net/"> - <option install="true" help="The basic stuff you need to play." size="520"> +<install product="UnrealTournament" + desc="Unreal Tournament for Linux" + version="413A" + cdrom="required" + cdromfile="System/UNREALTOURNAMENT.EXE" + postinstall="sh setup.data/ut-postinstall.sh $*" + url="http://OpenUT.sourceforge.net/"> + <readme>README.txt</readme> + <option install="true" size="520M"> Unreal Tournament Base - <binary symlink="UnrealTournament"> + <help>The basic stuff you need to play</help> + <binary symlink="UnrealTournament" icon="ut48lit.png" name="Unreal Tournament"> UT </binary> <binary symlink="utcp"> @@ -34,8 +36,9 @@ md5sum </files> </option> - <option install="true" help="Tools to generate HTML statistics about your gameplay." size="1"> + <option install="true" size="1M"> NetGames USA Stat Utils + <help>Tools to generate HTML statistics about your gameplay</help> <files> NetGamesUSA.com.tar.gz </files> [ cvs rdiff -t -u setup/image/setup.data/bin/x86/setup ] Index: setup/image/setup.data/bin/x86/setup [ cvs rdiff -t -u setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk ] Index: setup/image/setup.data/bin/x86/glibc-2.1/setup.gtk [ cvs rdiff -t -u setup/makeself/makeself.sh ] Index: setup/makeself/makeself.sh diff -u setup/makeself/makeself.sh:1.1 setup/makeself/makeself.sh:1.2 --- setup/makeself/makeself.sh:1.1 Tue Apr 18 11:57:05 2000 +++ setup/makeself/makeself.sh Tue Jul 18 14:49:10 2000 @@ -2,7 +2,7 @@ # # makeself 1.5.3 # -# $Id: makeself.sh,v 1.1 2000/04/18 18:57:05 jeroenj Exp $ +# $Id: makeself.sh,v 1.2 2000/07/18 21:49:10 andyp Exp $ # # Utility to create self-extracting tar.gz archives. # The resulting archive is a file holding the tar.gz archive with @@ -42,6 +42,7 @@ KEEP=n NOX11=n COMPRESS=gzip +TAR_ARGS=cvf if [ "$1" = --version ]; then echo Makeself version $VERSION exit 0 @@ -70,7 +71,11 @@ NOX11=y shift 1 fi -skip=143 +if [ "$1" = --follow ]; then + TAR_ARGS=cvfh + shift 1 +fi +skip=149 if [ x"$1" = x--lsm -o x"$1" = x-lsm ]; then shift 1 lsm_file=$1 @@ -99,6 +104,7 @@ echo " --nocomp : Do not compress the data" echo " --notemp : The archive will create archive_dir in the" echo " current directory and uncompress in ./archive_dir" + echo " --follow : Follow the symlinks in the archive" echo " --nox11 : Disable automatic spawn of a xterm" echo " --nowait : Do not wait for user input after executing embedded program from an xterm" echo " --lsm file : LSM file describing the package" @@ -223,7 +229,7 @@ if ! tty -s; then # Do we have a terminal? if [ x"\$DISPLAY" != x -a x"\$xterm_loop" = x ]; then # No, but do we have X? if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable - GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt konsole" + GUESS_XTERMS="dtterm eterm Eterm xterm rxvt kvt" for a in \$GUESS_XTERMS; do if which \$a >/dev/null 2>&1; then XTERM=\$a @@ -244,9 +250,15 @@ cat << EOF >> $archname [ x"\$finish" = x ] && finish=true -if [ "\$1" = "-confirm" ]; then verbose=y; shift 1; fi -if [ "\$1" = "-keep" ]; then keep=y; shift 1; fi -if [ "\$1" = "-target" -a x"\$2" != x ]; then targetdir=\$2; keep=y; shift 2; fi +parsing=yes +while [ x"\$parsing" != x ]; do + case "\$1" in + -confirm) verbose=y; shift;; + -keep) keep=y; shift;; + -target) if [ x"\$2" != x ]; then targetdir="\$2"; keep=y; shift 2; fi;; + *) parsing="";; + esac +done if [ "\$keep" = y ]; then echo "Creating directory \$targetdir"; tmpdir=\$targetdir; else tmpdir="/tmp/selfgz\$\$"; fi location=\`pwd\` @@ -306,7 +318,7 @@ # Append the compressed tar data after the stub echo Adding files to archive named \"$archname\"... # (cd $archdir; tar cvf - *| $GZIP_CMD ) >> $archname && chmod +x $archname && .. -(cd $archdir; tar cvf - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } +(cd $archdir; tar $TAR_ARGS - * | $GZIP_CMD ) >> $archname || { echo Aborting; exit 1; } echo echo >> $archname >&- ; # try to close the archive # echo Self-extractible archive \"$archname\" successfully created. |
From: Andy P. <an...@us...> - 2000-07-18 21:43:15
|
Update of setup/image/setup.data/locale/es/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/es/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/fr/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/it/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/nl/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/sv/LC_MESSAGES added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:43:15
|
Update of setup/image/setup.data/locale/es/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/es/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/fr/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/it/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/nl/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/sv/LC_MESSAGES added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:43:07
|
Update of setup/image/setup.data/locale/es/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/es/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/fr/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/it/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/nl/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/sv/LC_MESSAGES added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:43:04
|
Update of setup/image/setup.data/locale/es/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/es/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/fr/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/it/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/nl/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/sv/LC_MESSAGES added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:43:04
|
Update of setup/image/setup.data/locale/es/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/es/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/fr/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/it/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/nl/LC_MESSAGES added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/sv/LC_MESSAGES added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:41:26
|
Update of setup/image/setup.data/locale/es Log Message: Directory setup/image/setup.data/locale/es added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr Log Message: Directory setup/image/setup.data/locale/fr added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it Log Message: Directory setup/image/setup.data/locale/it added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl Log Message: Directory setup/image/setup.data/locale/nl added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv Log Message: Directory setup/image/setup.data/locale/sv added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:41:26
|
Update of setup/image/setup.data/locale/es Log Message: Directory setup/image/setup.data/locale/es added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr Log Message: Directory setup/image/setup.data/locale/fr added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it Log Message: Directory setup/image/setup.data/locale/it added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl Log Message: Directory setup/image/setup.data/locale/nl added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv Log Message: Directory setup/image/setup.data/locale/sv added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:41:25
|
Update of setup/image/setup.data/locale/es Log Message: Directory setup/image/setup.data/locale/es added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr Log Message: Directory setup/image/setup.data/locale/fr added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it Log Message: Directory setup/image/setup.data/locale/it added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl Log Message: Directory setup/image/setup.data/locale/nl added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv Log Message: Directory setup/image/setup.data/locale/sv added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:41:25
|
Update of setup/image/setup.data/locale/es Log Message: Directory setup/image/setup.data/locale/es added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr Log Message: Directory setup/image/setup.data/locale/fr added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it Log Message: Directory setup/image/setup.data/locale/it added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl Log Message: Directory setup/image/setup.data/locale/nl added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv Log Message: Directory setup/image/setup.data/locale/sv added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:41:24
|
Update of setup/image/setup.data/locale/es Log Message: Directory setup/image/setup.data/locale/es added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/fr Log Message: Directory setup/image/setup.data/locale/fr added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/it Log Message: Directory setup/image/setup.data/locale/it added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/nl Log Message: Directory setup/image/setup.data/locale/nl added to the repository ------------------------------------------------- Update of setup/image/setup.data/locale/sv Log Message: Directory setup/image/setup.data/locale/sv added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:39:21
|
Update of setup/image/setup.data/locale/de/LC_MESSAGES Log Message: Directory setup/image/setup.data/locale/de/LC_MESSAGES added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:37:41
|
Update of setup/image/setup.data/locale/de Log Message: Directory setup/image/setup.data/locale/de added to the repository ------------------------------------------------- |
From: Andy P. <an...@us...> - 2000-07-18 21:36:58
|
Update of setup/image/setup.data/locale Log Message: Directory setup/image/setup.data/locale added to the repository ------------------------------------------------- |
From: Daniel V. <gra...@us...> - 2000-06-16 17:10:57
|
Update of OpenUT Removed Files: README.G400 Log Message: removed obsolete doc ------------------------------------------------- |
From: Daniel V. <gra...@sl...> - 2000-06-13 04:37:22
|
Update of OpenUT Modified Files: README.Options Log Message: ups, faulty documentation ;-) Thanks to Mitch for pointing this out ;-) ------------------------------------------------- [ cvs rdiff -t -u OpenUT/README.Options ] Index: OpenUT/README.Options diff -u OpenUT/README.Options:1.10 OpenUT/README.Options:1.11 --- OpenUT/README.Options:1.10 Sun Apr 2 19:24:06 2000 +++ OpenUT/README.Options Mon Jun 12 21:34:03 2000 @@ -22,14 +22,17 @@ (to choose the Glide renderer) GameRenderDevice=GlideDrv.GlideRenderDevice +RenderDevice=GlideDrv.GlideRenderDevice ViewportManager=XDrv.XClient or ViewportManager=SDLDrv.SDLClient (to choose the SDL / OpenGL renderer) GameRenderDevice=SDLGLDrv.SDLGLRenderDevice +RenderDevice=SDLGLDrv.SDLGLRenderDevice ViewportManager=SDLDrv.SDLClient (to choose the obsolete X / OpenGL renderer) GameRenderDevice=XMesaGLDrv.XMesaGLRenderDevice +RenderDevice=XMesaGLDrv.XMesaGLRenderDevice ViewportManager=XDrv.XClient |
From: Albert K T H. <av...@sl...> - 2000-05-19 07:18:37
|
Update of setup/image/bin/x86 Modified Files: UT Log Message: Moved -usehomedir to the end so that url on command line will work. ------------------------------------------------- [ cvs rdiff -t -u setup/image/bin/x86/UT ] Index: setup/image/bin/x86/UT diff -u setup/image/bin/x86/UT:1.2 setup/image/bin/x86/UT:1.3 --- setup/image/bin/x86/UT:1.2 Sun Apr 23 01:59:58 2000 +++ setup/image/bin/x86/UT Fri May 19 00:17:10 2000 @@ -1,3 +1,3 @@ #!/bin/sh cd `dirname $0`/System -./UnrealTournament -usehomedir ${1+"$@"} +./UnrealTournament ${1+"$@"} -usehomedir |
From: Andy P. <an...@sl...> - 2000-05-14 21:08:22
|
Update of openut.sourceforge.net/htdocs Modified Files: index.html news.html Log Message: News updates ------------------------------------------------- [ cvs rdiff -t -u openut.sourceforge.net/htdocs/index.html ] Index: openut.sourceforge.net/htdocs/index.html diff -u openut.sourceforge.net/htdocs/index.html:1.10 openut.sourceforge.net/htdocs/index.html:1.11 --- openut.sourceforge.net/htdocs/index.html:1.10 Thu May 11 12:19:59 2000 +++ openut.sourceforge.net/htdocs/index.html Sun May 14 14:07:17 2000 @@ -2,7 +2,7 @@ <head> <!-- version control information --> -<!-- $Header: /cvsroot/OpenUT/openut.sourceforge.net/htdocs/index.html,v 1.10 2000/05/11 19:19:59 andyp Exp $ --> +<!-- $Header: /cvsroot/OpenUT/openut.sourceforge.net/htdocs/index.html,v 1.11 2000/05/14 21:07:17 andyp Exp $ --> <meta http-equiv="Content-Type" content="text/html"> <meta http-equiv="Content-Style-Type" content="text/css"> @@ -32,22 +32,19 @@ <H3>News and updates</H3> <DL> +<DT><SPAN CLASS="date">14th May 2000</SPAN> +<DD>Bit of a catastrophe today - my monitor blew up! (I think it could be the +tube...). So, there may be fewer updates than I'd like to make in the next week or so.<BR> +<DD>I'll continue to keep an eye on the <A +HREF="http://sourceforge.net/forum/forum.php?forum_id=2812">forum</A> and <A +HREF="http://sourceforge.net/mail/?group_id=975">mailing lists</A>, so I won't be +gone completely! ;-) +<DD>The webalizer usage stats are missing some data for the last day or so, +apparently the SourceForge server hasn't been putting the logs where it should. +<DD> <DT><SPAN CLASS="date">11th May 2000</SPAN> <DD>Added a link to the <A HREF="./index.html#inoxx">Inoxx map pack</A> (thanks to LinuxGames) <DD> -<DT><SPAN CLASS="date">10th May 2000</SPAN> -<DD>Apologies for the lack of an update in a few days. Plenty of news today! -<DD>The Inoxx map pack is out - check <A -HREF="http://www.linuxgames.com">LinuxGames</A> for more info. -<DD>The <A HREF="./files/SDLAudio.txt">SDLAudio mini-HOWTO</A> has been added - text only for now. -<DD>I have a lot of FAQ updates ready to go, they should be published any day -now. -<DD>Brandon at Epic has confirmed that the 413a headers will be released after the E3 -show. There should be another official patch shortly after. -<DT> -<DT><SPAN CLASS="date">4th May 2000</SPAN> -<DD>Updated the FAQ with various new bits of information. There is more to come over the weekend... -<DT> <DT><SPAN CLASS="date"><A HREF="./news.html">what was new...</A></SPAN> </DL> [ cvs rdiff -t -u openut.sourceforge.net/htdocs/news.html ] Index: openut.sourceforge.net/htdocs/news.html diff -u openut.sourceforge.net/htdocs/news.html:1.5 openut.sourceforge.net/htdocs/news.html:1.6 --- openut.sourceforge.net/htdocs/news.html:1.5 Thu May 11 12:19:59 2000 +++ openut.sourceforge.net/htdocs/news.html Sun May 14 14:07:17 2000 @@ -2,7 +2,7 @@ <head> <!-- version control information --> -<!-- $Header: /cvsroot/OpenUT/openut.sourceforge.net/htdocs/news.html,v 1.5 2000/05/11 19:19:59 andyp Exp $ --> +<!-- $Header: /cvsroot/OpenUT/openut.sourceforge.net/htdocs/news.html,v 1.6 2000/05/14 21:07:17 andyp Exp $ --> <meta http-equiv="Content-Type" content="text/html"> <meta http-equiv="Content-Style-Type" content="text/css"> @@ -23,6 +23,16 @@ <H3>News and updates (archived)</H3> <DL> +<DT><SPAN CLASS="date">14th May 2000</SPAN> +<DD>Bit of a catastrophe today - my monitor blew up! (I think it could be the +tube...). So, there may be fewer updates than I'd like to make in the next week or so.<BR> +<DD>I'll continue to keep an eye on the <A +HREF="http://sourceforge.net/forum/forum.php?forum_id=2812">forum</A> and <A +HREF="http://sourceforge.net/mail/?group_id=975">mailing lists</A>, so I won't be +gone completely! ;-) +<DD>The webalizer usage stats are missing some data for the last day or so, +apparently the SourceForge server hasn't been putting the logs where it should. +<DD> <DT><SPAN CLASS="date">11th May 2000</SPAN> <DD>Added a link to the <A HREF="./index.html#inoxx">Inoxx map pack</A> (thanks to LinuxGames) <DD> |
From: Jeremy M. <jmu...@sl...> - 2000-05-13 03:59:53
|
Update of OpenUT/SDLAudio/Inc Modified Files: SDLAudioLibrary.h SDLAudioSubsystem.h Log Message: Merged priority and distance-attenuation code from old Audio module. ------------------------------------------------- Update of OpenUT/SDLAudio/Src Modified Files: SDLAudioLibrary.cpp SDLAudioSubsystem.cpp Log Message: Merged priority and distance-attenuation code from old Audio module. ------------------------------------------------- [ cvs rdiff -t -u OpenUT/SDLAudio/Inc/SDLAudioLibrary.h ] Index: OpenUT/SDLAudio/Inc/SDLAudioLibrary.h diff -u OpenUT/SDLAudio/Inc/SDLAudioLibrary.h:1.3 OpenUT/SDLAudio/Inc/SDLAudioLibrary.h:1.4 --- OpenUT/SDLAudio/Inc/SDLAudioLibrary.h:1.3 Wed Apr 19 10:36:43 2000 +++ OpenUT/SDLAudio/Inc/SDLAudioLibrary.h Fri May 12 20:58:58 2000 @@ -25,7 +25,7 @@ #define AUDIO_SURPAN 32768 #define AUDIO_MINVOLUME 0 -#define AUDIO_MAXVOLUME 256 +#define AUDIO_MAXVOLUME MIX_MAX_VOLUME #define AUDIO_DISABLED 0 #define AUDIO_ENABLED 1 @@ -39,8 +39,6 @@ #define AUDIO_MONO_CHANNELS 1 #define AUDIO_STEREO_CHANNELS 2 -#define AUDIO_SAMPLE_SCALE 8 - /*------------------------------------------------------------------------------------ Flags ------------------------------------------------------------------------------------*/ @@ -132,7 +130,7 @@ extern INT SampleVoices; // Volume -extern INT SampleVolume; +extern FLOAT CurSampleVolume; // Threads extern AudioThread MixingThread; [ cvs rdiff -t -u OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h ] Index: OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h diff -u OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h:1.1 OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h:1.2 --- OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h:1.1 Tue Mar 21 07:48:22 2000 +++ OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h Fri May 12 20:58:58 2000 @@ -13,7 +13,7 @@ // Constants. #define MAX_EFFECTS_CHANNELS 32 #define MUSIC_CHANNELS 32 -#define EFFECT_FACTOR 1.0 +#define EFFECT_FACTOR 0.25 // Utility Macros. #define safecall(f) \ @@ -36,8 +36,54 @@ ------------------------------------------------------------------------------------*/ // -// The SDL/libmikmod implementation of UAudioSubsystem. +// Information about a playing sound. // +class FPlayingSound +{ +public: + //Voice* Channel; + INT PhysChannel; + AActor* Actor; + INT Id; + UBOOL Is3D; + USound* Sound; + FVector Location; + FLOAT Volume; + FLOAT Radius; + FLOAT Pitch; + FLOAT Priority; + FPlayingSound() + :/* Channel (NULL) + ,*/ + PhysChannel (-1) + , Actor (NULL) + , Id (0) + , Is3D (0) + , Sound (0) + , Priority(0) + , Volume (0) + , Radius (0) + , Pitch (0) + {} + FPlayingSound( AActor* InActor, INT InId, USound* InSound, FVector InLocation, FLOAT InVolume, FLOAT InRadius, FLOAT InPitch, FLOAT InPriority ) + :/* Channel (NULL) + ,*/ + PhysChannel (-1) + , Actor (InActor) + , Id (InId) + , Is3D (0) + , Sound (InSound) + , Location(InLocation) + , Volume (InVolume) + , Radius (InRadius) + , Pitch (InPitch) + , Priority(InPriority) + {} +}; + +// +// The SDL_mixer implementation of UAudioSubsystem. +// class DLL_EXPORT_CLASS USDLAudioSubsystem : public UAudioSubsystem { DECLARE_CLASS(USDLAudioSubsystem,UAudioSubsystem,CLASS_Config) @@ -64,6 +110,7 @@ // Variables. UViewport* Viewport; + FPlayingSound PlayingSounds[MAX_EFFECTS_CHANNELS]; DOUBLE LastTime; UMusic* CurrentMusic; BYTE CurrentCDTrack; @@ -96,7 +143,22 @@ void PostRender( FSceneNode* Frame ); // Internal functions. - void SetVolumes(); + void SetVolumes(); + void StopSound( INT Index ); + // Inlines. + Sample* GetSound( USound* Sound ) + { + check(Sound); + if( !Sound->Handle ) + RegisterSound( Sound ); + return (Sample*)Sound->Handle; + } + FLOAT SoundPriority( UViewport* Viewport, FVector Location, FLOAT Volume, FLOAT Radius ) + { + return Volume * (1.0 - (Location - (Viewport->Actor->ViewTarget ? + Viewport->Actor->ViewTarget : + Viewport->Actor)->Location).Size()/Radius); + } }; [ cvs rdiff -t -u OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp ] Index: OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp diff -u OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp:1.3 OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp:1.4 --- OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp:1.3 Wed Apr 19 10:36:43 2000 +++ OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp Fri May 12 20:58:58 2000 @@ -32,7 +32,7 @@ INT SampleVoices; // Volume -INT SampleVolume; +FLOAT CurSampleVolume; // Threads AudioThread MixingThread; @@ -134,18 +134,34 @@ } /*------------------------------------------------------------------------------------ + Sample control. +------------------------------------------------------------------------------------*/ + +// Change a sample. +/* +void UpdateSample( Voice* InVoice, INT Freq, INT Volume, INT Panning ) +{ + ALock; + InVoice->Volume = Volume; + InVoice->Panning = InVoice->Panning + ((Panning - InVoice->Panning)/2); + InVoice->BasePanning = InVoice->Panning; + AUnlock; +} +*/ + +/*------------------------------------------------------------------------------------ Volume control. ------------------------------------------------------------------------------------*/ UBOOL SetSampleVolume( FLOAT Volume ) { - Mix_Volume(-1, (int) (Volume/AUDIO_SAMPLE_SCALE)); + CurSampleVolume = Volume; return 1; } UBOOL SetMusicVolume( FLOAT Volume ) { - Mix_VolumeMusic((int) Volume); + Mix_VolumeMusic((int) (AUDIO_MAXVOLUME*Volume)); return 1; } [ cvs rdiff -t -u OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp ] Index: OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp diff -u OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp:1.2 OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp:1.3 --- OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp:1.2 Wed Apr 19 10:36:43 2000 +++ OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp Fri May 12 20:58:58 2000 @@ -178,8 +178,8 @@ guard(USDLAudioSubsystem::SetViewport); // Stop playing sounds. - //for( INT i=0; i<Channels; i++ ) - //StopSound( i ); + for( INT i=0; i<Channels; i++ ) + StopSound( i ); // Remember the viewport. if( Viewport != InViewport ) @@ -203,14 +203,6 @@ // Start sound output. guard(AudioStartOutput); - /* - if (OutputRate == 0) - OutputRate = 1; - else if (OutputRate == 2) - OutputRate = 3; - else if ((OutputRate == 4) || (OutputRate = 6)) - OutputRate = 5; - */ INT Rates[] = {8000, 11025, 16000, 22050, 32000, 44100, 48000}; INT Rate = Rates[OutputRate]; INT Result = AudioStartOutput( Rate, Format, PhysChannels); @@ -238,21 +230,21 @@ void USDLAudioSubsystem::RegisterMusic( UMusic* Music ) { - printf("-1-\n"); + //printf("-1-\n"); guard(USDLAudioSubsystem::RegisterMusic); - printf("-2-\n"); + //printf("-2-\n"); checkSlow(Music); - printf("-3-\n"); + //printf("-3-\n"); - printf("CurrentMusic = \n"); - printf(" %p\n",CurrentMusic); + //printf("CurrentMusic = \n"); + //printf(" %p\n",CurrentMusic); //printf(" %s\n",CurrentMusic?CurrentMusic->GetPathName():""); - printf("(new)Music = \n"); - printf(" %p\n",Music); - printf(" %s\n",Music->GetPathName()); + //printf("(new)Music = \n"); + //printf(" %p\n",Music); + //printf(" %s\n",Music->GetPathName()); //CurrentMusic, CurrentMusic?CurrentMusic->GetPathName():"", Music, Music->GetPathName()); - printf("-4-\n"); + //printf("-4-\n"); // Load music if it hasn't been loaded yet (Handle is non-null if it's been loaded) if( !Music->Handle ) @@ -261,23 +253,23 @@ Music->Handle = (void*)-1; // Load the data. - printf("=0=\n"); + //printf("=0=\n"); Music->Data.Load(); - printf("=1=\n"); - debugf( NAME_DevMusic, TEXT("Register music: %s (%i)"), Music->GetPathName(), Music->Data.Num() ); - printf("=2=\n"); + //printf("=1=\n"); + //debugf( NAME_DevMusic, TEXT("Register music: %s (%i)"), Music->GetPathName(), Music->Data.Num() ); + //printf("=2=\n"); check(Music->Data.Num()>0); - printf("=3=\n"); + //printf("=3=\n"); // Register the sound. guard(Mix_LoadMUS); - printf("=4=\n"); + //printf("=4=\n"); // mikmod segfaults sometimes when it's asked to load one song while // another is already playing, so just stop the music... if ( Mix_PlayingMusic() ) { - printf("-- Halting currently playing music --\n"); + //printf("-- Halting currently playing music --\n"); Mix_HaltMusic(); } @@ -286,18 +278,18 @@ // filename to Mix_LoadMUS. It's frickin' HEINOUS! // FIXME: We need to get some sort of memory-array file-loader going on // here, but I don't think SDL_mixer exports that interface to mikmod... - printf("== Register %s ==\n", Music->GetPathName()); + //printf("== Register %s ==\n", Music->GetPathName()); FILE *ftmp = fopen("/tmp/ut_music", "wb"); fwrite(&Music->Data(0), 1, Music->Data.Num(), ftmp); fclose(ftmp); - printf("=5=\n"); + //printf("=5=\n"); Music->Handle = Mix_LoadMUS("/tmp/ut_music"); - printf("=6=\n"); + //printf("=6=\n"); unlink("/tmp/ut_music"); - printf("=7=\n"); + //printf("=7=\n"); unguard; //unguardf(( TEXT("(%i)"), Music->Data.Num() )); @@ -355,12 +347,12 @@ check(Music); if (Music->Handle) { - printf("== Unregister %s ==\n", Music->GetPathName() ); + //printf("== Unregister %s ==\n", Music->GetPathName() ); debugf( NAME_DevMusic, TEXT("Unregister music: %s"), Music->GetPathName() ); // if this song is playing, we should stop it if ( CurrentMusic == Music ) { - printf("-- unloading the currently playing music! --\n"); + //printf("-- unloading the currently playing music! --\n"); Mix_HaltMusic(); } Mix_FreeMusic((Mix_Music *) Music->Handle); @@ -377,15 +369,6 @@ if( Sound->Handle ) { //debugf( NAME_DevSound, TEXT("Unregister sound: %s"), Sound->GetFullName() ); - - // Stop this sound. - //for( INT i=0; i<Channels; i++ ) - // if ( PlayingSounds[i].Sound == Sound ) - // StopSound( i ); - - // Unload this sound. - //safecall( UnloadSample( (Sample*) Sound->Handle ) ); - Mix_FreeChunk((Mix_Chunk *) Sound->Handle); } unguard; @@ -429,9 +412,6 @@ if( !Viewport || !Sound ) return 0; - if (!Sound->Handle) - RegisterSound(Sound); - //printf(" PlaySound: playing %s (handle==%p) ", Sound->GetFullName(), Sound->Handle); // Allocate a new slot if requested. @@ -439,42 +419,45 @@ Id = 16 * --FreeSlot; // Compute priority. - FLOAT Priority = 0; //SoundPriority( Viewport, Location, Volume, Radius ); + FLOAT Priority = SoundPriority( Viewport, Location, Volume, Radius ); // If already playing, stop it. INT Index = -1; FLOAT BestPriority = Priority; - //for( INT i=0; i<Channels; i++ ) - //{ - //FPlayingSound& Playing = PlayingSounds[i]; - //if( (Playing.Id&~1)==(Id&~1) ) - //{ + for( INT i=0; i<Channels; i++ ) + { + FPlayingSound& Playing = PlayingSounds[i]; + if( (Playing.Id&~1)==(Id&~1) ) + { // Skip if not interruptable. - //if( Id&1 ) - //return 0; + if( Id&1 ) + return 0; // Stop the sound. - //Index = i; - //break; - //} - //else if( Playing.Priority<=BestPriority ) - //{ - //Index = i; - //BestPriority = Playing.Priority; - //} - //} + Index = i; + break; + } + else if( Playing.Priority<=BestPriority ) + { + Index = i; + BestPriority = Playing.Priority; + } + } // If no sound, or its priority is overruled, stop it. - //if( Index==-1 ) - //return 0; + if( Index==-1 ) + return 0; // Put the sound on the play-list. - //StopSound( Index ); - //if( Sound!=(USound*)-1 ) - //PlayingSounds[Index] = FPlayingSound( Actor, Id, Sound, Location, Volume, Radius, Pitch, Priority ); + StopSound( Index ); + if( Sound!=(USound*)-1 ) + PlayingSounds[Index] = FPlayingSound( Actor, Id, Sound, Location, Volume, Radius, Pitch, Priority ); - int chan = Mix_PlayChannel(-1, (Mix_Chunk *) Sound->Handle, 0); - //printf(" on channel %d\n", chan); + /* + GetSound( Sound ); + int chan = Mix_PlayChannel(Index, (Mix_Chunk *) Sound->Handle, 0); + printf("playing %s on channel %d (wanted %d)\n", Sound->GetPathName(), chan, Index); + */ return 1; @@ -490,21 +473,19 @@ // Stop referencing actor. for( INT i=0; i<Channels; i++ ) { - /* - if( PlayingSounds[i].Actor==Actor ) - { - if( (PlayingSounds[i].Id&14)==SLOT_Ambient*2 ) + if( PlayingSounds[i].Actor==Actor ) { + if( (PlayingSounds[i].Id&14)==SLOT_Ambient*2 ) + { // Stop ambient sound when actor dies. - StopSound( i ); - } - else - { + StopSound( i ); + } + else + { // Unbind regular sounds from actors. - PlayingSounds[i].Actor = NULL; + PlayingSounds[i].Actor = NULL; + } } - } - */ } unguard; @@ -551,7 +532,7 @@ if ( 1 /* Transition is complete */ ) { // Load and start the new track - printf("-- loading new track %s --\n", Viewport->Actor->Song->GetPathName()); + //printf("-- loading new track %s --\n", Viewport->Actor->Song->GetPathName()); RegisterMusic(Viewport->Actor->Song); // only play this music if it's not already playing @@ -581,11 +562,11 @@ && FDistSquared(ViewActor->Location,Actor->Location)<=Square(Actor->WorldSoundRadius()) ) { INT Id = Actor->GetIndex()*16+SLOT_Ambient*2; - //for( INT j=0; j<Channels; j++ ) - //if( PlayingSounds[j].Id==Id ) - //break; - //if( j==Channels ) - // PlaySound( Actor, Id, Actor->AmbientSound, Actor->Location, AmbientFactor*Actor->SoundVolume/255.0, Actor->WorldSoundRadius(), Actor->SoundPitch/64.0 ); + for( INT j=0; j<Channels; j++ ) + if( PlayingSounds[j].Id==Id ) + break; + if( j==Channels ) + PlaySound( Actor, Id, Actor->AmbientSound, Actor->Location, AmbientFactor*Actor->SoundVolume/255.0, Actor->WorldSoundRadius(), Actor->SoundPitch/64.0 ); } } unguard; @@ -593,10 +574,10 @@ // Update all playing ambient sounds. guard(UpdateAmbience); - /* + for( INT i=0; i<Channels; i++ ) { - FPlayingSound& Playing = PlayingSounds[i]; + FPlayingSound& Playing = PlayingSounds[i]; if( (Playing.Id&14)==SLOT_Ambient*2 ) { check(Playing.Actor); @@ -624,12 +605,11 @@ } } } - */ unguard; // Update all active sounds. guard(UpdateSounds); - /* + for( INT Index=0; Index<Channels; Index++ ) { FPlayingSound& Playing = PlayingSounds[Index]; @@ -638,18 +618,27 @@ if( PlayingSounds[Index].Id==0 ) { // Sound is not playing. + //printf("-- sound not playing --\n"); continue; } - else if( Playing.Channel && SampleFinished(Playing.Channel) ) + else if( !Mix_Playing(Index) && Playing.PhysChannel != -1 ) { // Sound is finished. + // (not playing, and has been allocated a channel already; + // second condition avoids stopping a sample before it starts) + //printf("-- sound finished; stopping --\n"); StopSound( Index ); } else { + //printf("-- sound playing; updating --\n"); + // Update positioning from actor, if available. if( Playing.Actor ) - Playing.Location = Playing.Actor->Location;void UpdateSample( Voice* InVoice, INT Freq, INT Volume, INT Panning ); + Playing.Location = Playing.Actor->Location; + + /*void UpdateSample( Voice* InVoice, INT Freq, INT Volume, INT Panning );*/ + // Update the priority. Playing.Priority = SoundPriority( Viewport, Playing.Location, Playing.Volume, Playing.Radius ); @@ -666,7 +655,7 @@ // Compute panning and volume. INT SoundPan = Clamp( (INT)(AUDIO_MAXPAN/2 + PanAngle*AUDIO_MAXPAN*7/8/PI), 0, AUDIO_MAXPAN ); FLOAT Attenuation = Clamp(1.0-Size/Playing.Radius,0.0,1.0); - INT SoundVolume = Clamp( (INT)(AUDIO_MAXVOLUME * Playing.Volume * Attenuation * EFFECT_FACTOR), 0, AUDIO_MAXVOLUME ); + INT SoundVolume = Clamp( (INT)(AUDIO_MAXVOLUME * Playing.Volume * Attenuation * EFFECT_FACTOR), 0, (INT) (AUDIO_MAXVOLUME*EFFECT_FACTOR) ); if( ReverseStereo ) SoundPan = AUDIO_MAXPAN - SoundPan; if( Location.Z<0.0 && UseSurround ) @@ -677,20 +666,24 @@ if( Playing.Actor ) { FLOAT V = (Playing.Actor->Velocity - //-ViewActor->Velocity + /*-ViewActor->Velocity*/ ) | (Playing.Actor->Location - ViewActor->Location).SafeNormal(); Doppler = Clamp( 1.0 - V/DopplerSpeed, 0.5, 2.0 ); } // Update the sound. - Sample* Sample = GetSound(Playing.Sound); + GetSound( Playing.Sound ); FVector Z(0,0,0); FVector L(Location.X/400.0,Location.Y/400.0,Location.Z/400.0); - if( Playing.Channel ) + if( Mix_Playing( Index ) ) { + //printf("-- sound actually being played -- \n"); // Update an existing sound. + //printf("soundvol = %5d, scaled = %5d\n", SoundVolume, (int) (SoundVolume * CurSampleVolume)); guard(UpdateSample); + Mix_Volume(Index, (int) (SoundVolume * CurSampleVolume)); + /* UpdateSample ( Playing.Channel, @@ -699,23 +692,32 @@ SoundPan ); Playing.Channel->BasePanning = SoundPan; + */ unguard; } else { + //printf("-- sound not yet started; starting --\n"); // Start this new sound. guard(StartSample); - if( !Playing.Channel ) + //if( !Mix_Playing( Index ) ) { + Playing.PhysChannel = Mix_PlayChannel(Index, (Mix_Chunk *) Playing.Sound->Handle, 0); + //printf("playing %s on channel %d (wanted %d)\n", + // Playing.Sound->GetPathName(), Playing.PhysChannel, Index); + //} + + /* Playing.Channel = StartSample ( Index+1, Sample, (INT) (Sample->SamplesPerSec * Playing.Pitch * Doppler), SoundVolume, SoundPan ); - check(Playing.Channel); + */ + + /*check(Playing.Channel);*/ unguard; } } } -*/ unguard; // Unlock. @@ -813,9 +815,9 @@ // Set music and effects volumes. - verify( SetSampleVolume( 128*NormSoundVolume ) ); + verify( SetSampleVolume( NormSoundVolume ) ); if( UseDigitalMusic ) - verify( SetMusicVolume( 128*NormMusicVolume*Max(MusicFade,0.f) ) ); + verify( SetMusicVolume( NormMusicVolume*Max(MusicFade,0.f) ) ); /* REF verify( SetSampleVolume( 127*NormSoundVolume ) ); @@ -828,6 +830,17 @@ unguard; } +void USDLAudioSubsystem::StopSound( INT Index ) +{ + guard(UGenericAudioSubsystem::StopSound); + + Mix_HaltChannel( Index ); + PlayingSounds[Index] = FPlayingSound(); + + unguard; +} + /*----------------------------------------------------------------------------- The End. -----------------------------------------------------------------------------*/ + |
From: Jeremy M. <jmu...@sl...> - 2000-05-13 03:59:53
|
Update of OpenUT/SDLAudio/Inc Modified Files: SDLAudioLibrary.h SDLAudioSubsystem.h Log Message: Merged priority and distance-attenuation code from old Audio module. ------------------------------------------------- Update of OpenUT/SDLAudio/Src Modified Files: SDLAudioLibrary.cpp SDLAudioSubsystem.cpp Log Message: Merged priority and distance-attenuation code from old Audio module. ------------------------------------------------- [ cvs rdiff -t -u OpenUT/SDLAudio/Inc/SDLAudioLibrary.h ] Index: OpenUT/SDLAudio/Inc/SDLAudioLibrary.h diff -u OpenUT/SDLAudio/Inc/SDLAudioLibrary.h:1.3 OpenUT/SDLAudio/Inc/SDLAudioLibrary.h:1.4 --- OpenUT/SDLAudio/Inc/SDLAudioLibrary.h:1.3 Wed Apr 19 10:36:43 2000 +++ OpenUT/SDLAudio/Inc/SDLAudioLibrary.h Fri May 12 20:58:58 2000 @@ -25,7 +25,7 @@ #define AUDIO_SURPAN 32768 #define AUDIO_MINVOLUME 0 -#define AUDIO_MAXVOLUME 256 +#define AUDIO_MAXVOLUME MIX_MAX_VOLUME #define AUDIO_DISABLED 0 #define AUDIO_ENABLED 1 @@ -39,8 +39,6 @@ #define AUDIO_MONO_CHANNELS 1 #define AUDIO_STEREO_CHANNELS 2 -#define AUDIO_SAMPLE_SCALE 8 - /*------------------------------------------------------------------------------------ Flags ------------------------------------------------------------------------------------*/ @@ -132,7 +130,7 @@ extern INT SampleVoices; // Volume -extern INT SampleVolume; +extern FLOAT CurSampleVolume; // Threads extern AudioThread MixingThread; [ cvs rdiff -t -u OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h ] Index: OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h diff -u OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h:1.1 OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h:1.2 --- OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h:1.1 Tue Mar 21 07:48:22 2000 +++ OpenUT/SDLAudio/Inc/SDLAudioSubsystem.h Fri May 12 20:58:58 2000 @@ -13,7 +13,7 @@ // Constants. #define MAX_EFFECTS_CHANNELS 32 #define MUSIC_CHANNELS 32 -#define EFFECT_FACTOR 1.0 +#define EFFECT_FACTOR 0.25 // Utility Macros. #define safecall(f) \ @@ -36,8 +36,54 @@ ------------------------------------------------------------------------------------*/ // -// The SDL/libmikmod implementation of UAudioSubsystem. +// Information about a playing sound. // +class FPlayingSound +{ +public: + //Voice* Channel; + INT PhysChannel; + AActor* Actor; + INT Id; + UBOOL Is3D; + USound* Sound; + FVector Location; + FLOAT Volume; + FLOAT Radius; + FLOAT Pitch; + FLOAT Priority; + FPlayingSound() + :/* Channel (NULL) + ,*/ + PhysChannel (-1) + , Actor (NULL) + , Id (0) + , Is3D (0) + , Sound (0) + , Priority(0) + , Volume (0) + , Radius (0) + , Pitch (0) + {} + FPlayingSound( AActor* InActor, INT InId, USound* InSound, FVector InLocation, FLOAT InVolume, FLOAT InRadius, FLOAT InPitch, FLOAT InPriority ) + :/* Channel (NULL) + ,*/ + PhysChannel (-1) + , Actor (InActor) + , Id (InId) + , Is3D (0) + , Sound (InSound) + , Location(InLocation) + , Volume (InVolume) + , Radius (InRadius) + , Pitch (InPitch) + , Priority(InPriority) + {} +}; + +// +// The SDL_mixer implementation of UAudioSubsystem. +// class DLL_EXPORT_CLASS USDLAudioSubsystem : public UAudioSubsystem { DECLARE_CLASS(USDLAudioSubsystem,UAudioSubsystem,CLASS_Config) @@ -64,6 +110,7 @@ // Variables. UViewport* Viewport; + FPlayingSound PlayingSounds[MAX_EFFECTS_CHANNELS]; DOUBLE LastTime; UMusic* CurrentMusic; BYTE CurrentCDTrack; @@ -96,7 +143,22 @@ void PostRender( FSceneNode* Frame ); // Internal functions. - void SetVolumes(); + void SetVolumes(); + void StopSound( INT Index ); + // Inlines. + Sample* GetSound( USound* Sound ) + { + check(Sound); + if( !Sound->Handle ) + RegisterSound( Sound ); + return (Sample*)Sound->Handle; + } + FLOAT SoundPriority( UViewport* Viewport, FVector Location, FLOAT Volume, FLOAT Radius ) + { + return Volume * (1.0 - (Location - (Viewport->Actor->ViewTarget ? + Viewport->Actor->ViewTarget : + Viewport->Actor)->Location).Size()/Radius); + } }; [ cvs rdiff -t -u OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp ] Index: OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp diff -u OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp:1.3 OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp:1.4 --- OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp:1.3 Wed Apr 19 10:36:43 2000 +++ OpenUT/SDLAudio/Src/SDLAudioLibrary.cpp Fri May 12 20:58:58 2000 @@ -32,7 +32,7 @@ INT SampleVoices; // Volume -INT SampleVolume; +FLOAT CurSampleVolume; // Threads AudioThread MixingThread; @@ -134,18 +134,34 @@ } /*------------------------------------------------------------------------------------ + Sample control. +------------------------------------------------------------------------------------*/ + +// Change a sample. +/* +void UpdateSample( Voice* InVoice, INT Freq, INT Volume, INT Panning ) +{ + ALock; + InVoice->Volume = Volume; + InVoice->Panning = InVoice->Panning + ((Panning - InVoice->Panning)/2); + InVoice->BasePanning = InVoice->Panning; + AUnlock; +} +*/ + +/*------------------------------------------------------------------------------------ Volume control. ------------------------------------------------------------------------------------*/ UBOOL SetSampleVolume( FLOAT Volume ) { - Mix_Volume(-1, (int) (Volume/AUDIO_SAMPLE_SCALE)); + CurSampleVolume = Volume; return 1; } UBOOL SetMusicVolume( FLOAT Volume ) { - Mix_VolumeMusic((int) Volume); + Mix_VolumeMusic((int) (AUDIO_MAXVOLUME*Volume)); return 1; } [ cvs rdiff -t -u OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp ] Index: OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp diff -u OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp:1.2 OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp:1.3 --- OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp:1.2 Wed Apr 19 10:36:43 2000 +++ OpenUT/SDLAudio/Src/SDLAudioSubsystem.cpp Fri May 12 20:58:58 2000 @@ -178,8 +178,8 @@ guard(USDLAudioSubsystem::SetViewport); // Stop playing sounds. - //for( INT i=0; i<Channels; i++ ) - //StopSound( i ); + for( INT i=0; i<Channels; i++ ) + StopSound( i ); // Remember the viewport. if( Viewport != InViewport ) @@ -203,14 +203,6 @@ // Start sound output. guard(AudioStartOutput); - /* - if (OutputRate == 0) - OutputRate = 1; - else if (OutputRate == 2) - OutputRate = 3; - else if ((OutputRate == 4) || (OutputRate = 6)) - OutputRate = 5; - */ INT Rates[] = {8000, 11025, 16000, 22050, 32000, 44100, 48000}; INT Rate = Rates[OutputRate]; INT Result = AudioStartOutput( Rate, Format, PhysChannels); @@ -238,21 +230,21 @@ void USDLAudioSubsystem::RegisterMusic( UMusic* Music ) { - printf("-1-\n"); + //printf("-1-\n"); guard(USDLAudioSubsystem::RegisterMusic); - printf("-2-\n"); + //printf("-2-\n"); checkSlow(Music); - printf("-3-\n"); + //printf("-3-\n"); - printf("CurrentMusic = \n"); - printf(" %p\n",CurrentMusic); + //printf("CurrentMusic = \n"); + //printf(" %p\n",CurrentMusic); //printf(" %s\n",CurrentMusic?CurrentMusic->GetPathName():""); - printf("(new)Music = \n"); - printf(" %p\n",Music); - printf(" %s\n",Music->GetPathName()); + //printf("(new)Music = \n"); + //printf(" %p\n",Music); + //printf(" %s\n",Music->GetPathName()); //CurrentMusic, CurrentMusic?CurrentMusic->GetPathName():"", Music, Music->GetPathName()); - printf("-4-\n"); + //printf("-4-\n"); // Load music if it hasn't been loaded yet (Handle is non-null if it's been loaded) if( !Music->Handle ) @@ -261,23 +253,23 @@ Music->Handle = (void*)-1; // Load the data. - printf("=0=\n"); + //printf("=0=\n"); Music->Data.Load(); - printf("=1=\n"); - debugf( NAME_DevMusic, TEXT("Register music: %s (%i)"), Music->GetPathName(), Music->Data.Num() ); - printf("=2=\n"); + //printf("=1=\n"); + //debugf( NAME_DevMusic, TEXT("Register music: %s (%i)"), Music->GetPathName(), Music->Data.Num() ); + //printf("=2=\n"); check(Music->Data.Num()>0); - printf("=3=\n"); + //printf("=3=\n"); // Register the sound. guard(Mix_LoadMUS); - printf("=4=\n"); + //printf("=4=\n"); // mikmod segfaults sometimes when it's asked to load one song while // another is already playing, so just stop the music... if ( Mix_PlayingMusic() ) { - printf("-- Halting currently playing music --\n"); + //printf("-- Halting currently playing music --\n"); Mix_HaltMusic(); } @@ -286,18 +278,18 @@ // filename to Mix_LoadMUS. It's frickin' HEINOUS! // FIXME: We need to get some sort of memory-array file-loader going on // here, but I don't think SDL_mixer exports that interface to mikmod... - printf("== Register %s ==\n", Music->GetPathName()); + //printf("== Register %s ==\n", Music->GetPathName()); FILE *ftmp = fopen("/tmp/ut_music", "wb"); fwrite(&Music->Data(0), 1, Music->Data.Num(), ftmp); fclose(ftmp); - printf("=5=\n"); + //printf("=5=\n"); Music->Handle = Mix_LoadMUS("/tmp/ut_music"); - printf("=6=\n"); + //printf("=6=\n"); unlink("/tmp/ut_music"); - printf("=7=\n"); + //printf("=7=\n"); unguard; //unguardf(( TEXT("(%i)"), Music->Data.Num() )); @@ -355,12 +347,12 @@ check(Music); if (Music->Handle) { - printf("== Unregister %s ==\n", Music->GetPathName() ); + //printf("== Unregister %s ==\n", Music->GetPathName() ); debugf( NAME_DevMusic, TEXT("Unregister music: %s"), Music->GetPathName() ); // if this song is playing, we should stop it if ( CurrentMusic == Music ) { - printf("-- unloading the currently playing music! --\n"); + //printf("-- unloading the currently playing music! --\n"); Mix_HaltMusic(); } Mix_FreeMusic((Mix_Music *) Music->Handle); @@ -377,15 +369,6 @@ if( Sound->Handle ) { //debugf( NAME_DevSound, TEXT("Unregister sound: %s"), Sound->GetFullName() ); - - // Stop this sound. - //for( INT i=0; i<Channels; i++ ) - // if ( PlayingSounds[i].Sound == Sound ) - // StopSound( i ); - - // Unload this sound. - //safecall( UnloadSample( (Sample*) Sound->Handle ) ); - Mix_FreeChunk((Mix_Chunk *) Sound->Handle); } unguard; @@ -429,9 +412,6 @@ if( !Viewport || !Sound ) return 0; - if (!Sound->Handle) - RegisterSound(Sound); - //printf(" PlaySound: playing %s (handle==%p) ", Sound->GetFullName(), Sound->Handle); // Allocate a new slot if requested. @@ -439,42 +419,45 @@ Id = 16 * --FreeSlot; // Compute priority. - FLOAT Priority = 0; //SoundPriority( Viewport, Location, Volume, Radius ); + FLOAT Priority = SoundPriority( Viewport, Location, Volume, Radius ); // If already playing, stop it. INT Index = -1; FLOAT BestPriority = Priority; - //for( INT i=0; i<Channels; i++ ) - //{ - //FPlayingSound& Playing = PlayingSounds[i]; - //if( (Playing.Id&~1)==(Id&~1) ) - //{ + for( INT i=0; i<Channels; i++ ) + { + FPlayingSound& Playing = PlayingSounds[i]; + if( (Playing.Id&~1)==(Id&~1) ) + { // Skip if not interruptable. - //if( Id&1 ) - //return 0; + if( Id&1 ) + return 0; // Stop the sound. - //Index = i; - //break; - //} - //else if( Playing.Priority<=BestPriority ) - //{ - //Index = i; - //BestPriority = Playing.Priority; - //} - //} + Index = i; + break; + } + else if( Playing.Priority<=BestPriority ) + { + Index = i; + BestPriority = Playing.Priority; + } + } // If no sound, or its priority is overruled, stop it. - //if( Index==-1 ) - //return 0; + if( Index==-1 ) + return 0; // Put the sound on the play-list. - //StopSound( Index ); - //if( Sound!=(USound*)-1 ) - //PlayingSounds[Index] = FPlayingSound( Actor, Id, Sound, Location, Volume, Radius, Pitch, Priority ); + StopSound( Index ); + if( Sound!=(USound*)-1 ) + PlayingSounds[Index] = FPlayingSound( Actor, Id, Sound, Location, Volume, Radius, Pitch, Priority ); - int chan = Mix_PlayChannel(-1, (Mix_Chunk *) Sound->Handle, 0); - //printf(" on channel %d\n", chan); + /* + GetSound( Sound ); + int chan = Mix_PlayChannel(Index, (Mix_Chunk *) Sound->Handle, 0); + printf("playing %s on channel %d (wanted %d)\n", Sound->GetPathName(), chan, Index); + */ return 1; @@ -490,21 +473,19 @@ // Stop referencing actor. for( INT i=0; i<Channels; i++ ) { - /* - if( PlayingSounds[i].Actor==Actor ) - { - if( (PlayingSounds[i].Id&14)==SLOT_Ambient*2 ) + if( PlayingSounds[i].Actor==Actor ) { + if( (PlayingSounds[i].Id&14)==SLOT_Ambient*2 ) + { // Stop ambient sound when actor dies. - StopSound( i ); - } - else - { + StopSound( i ); + } + else + { // Unbind regular sounds from actors. - PlayingSounds[i].Actor = NULL; + PlayingSounds[i].Actor = NULL; + } } - } - */ } unguard; @@ -551,7 +532,7 @@ if ( 1 /* Transition is complete */ ) { // Load and start the new track - printf("-- loading new track %s --\n", Viewport->Actor->Song->GetPathName()); + //printf("-- loading new track %s --\n", Viewport->Actor->Song->GetPathName()); RegisterMusic(Viewport->Actor->Song); // only play this music if it's not already playing @@ -581,11 +562,11 @@ && FDistSquared(ViewActor->Location,Actor->Location)<=Square(Actor->WorldSoundRadius()) ) { INT Id = Actor->GetIndex()*16+SLOT_Ambient*2; - //for( INT j=0; j<Channels; j++ ) - //if( PlayingSounds[j].Id==Id ) - //break; - //if( j==Channels ) - // PlaySound( Actor, Id, Actor->AmbientSound, Actor->Location, AmbientFactor*Actor->SoundVolume/255.0, Actor->WorldSoundRadius(), Actor->SoundPitch/64.0 ); + for( INT j=0; j<Channels; j++ ) + if( PlayingSounds[j].Id==Id ) + break; + if( j==Channels ) + PlaySound( Actor, Id, Actor->AmbientSound, Actor->Location, AmbientFactor*Actor->SoundVolume/255.0, Actor->WorldSoundRadius(), Actor->SoundPitch/64.0 ); } } unguard; @@ -593,10 +574,10 @@ // Update all playing ambient sounds. guard(UpdateAmbience); - /* + for( INT i=0; i<Channels; i++ ) { - FPlayingSound& Playing = PlayingSounds[i]; + FPlayingSound& Playing = PlayingSounds[i]; if( (Playing.Id&14)==SLOT_Ambient*2 ) { check(Playing.Actor); @@ -624,12 +605,11 @@ } } } - */ unguard; // Update all active sounds. guard(UpdateSounds); - /* + for( INT Index=0; Index<Channels; Index++ ) { FPlayingSound& Playing = PlayingSounds[Index]; @@ -638,18 +618,27 @@ if( PlayingSounds[Index].Id==0 ) { // Sound is not playing. + //printf("-- sound not playing --\n"); continue; } - else if( Playing.Channel && SampleFinished(Playing.Channel) ) + else if( !Mix_Playing(Index) && Playing.PhysChannel != -1 ) { // Sound is finished. + // (not playing, and has been allocated a channel already; + // second condition avoids stopping a sample before it starts) + //printf("-- sound finished; stopping --\n"); StopSound( Index ); } else { + //printf("-- sound playing; updating --\n"); + // Update positioning from actor, if available. if( Playing.Actor ) - Playing.Location = Playing.Actor->Location;void UpdateSample( Voice* InVoice, INT Freq, INT Volume, INT Panning ); + Playing.Location = Playing.Actor->Location; + + /*void UpdateSample( Voice* InVoice, INT Freq, INT Volume, INT Panning );*/ + // Update the priority. Playing.Priority = SoundPriority( Viewport, Playing.Location, Playing.Volume, Playing.Radius ); @@ -666,7 +655,7 @@ // Compute panning and volume. INT SoundPan = Clamp( (INT)(AUDIO_MAXPAN/2 + PanAngle*AUDIO_MAXPAN*7/8/PI), 0, AUDIO_MAXPAN ); FLOAT Attenuation = Clamp(1.0-Size/Playing.Radius,0.0,1.0); - INT SoundVolume = Clamp( (INT)(AUDIO_MAXVOLUME * Playing.Volume * Attenuation * EFFECT_FACTOR), 0, AUDIO_MAXVOLUME ); + INT SoundVolume = Clamp( (INT)(AUDIO_MAXVOLUME * Playing.Volume * Attenuation * EFFECT_FACTOR), 0, (INT) (AUDIO_MAXVOLUME*EFFECT_FACTOR) ); if( ReverseStereo ) SoundPan = AUDIO_MAXPAN - SoundPan; if( Location.Z<0.0 && UseSurround ) @@ -677,20 +666,24 @@ if( Playing.Actor ) { FLOAT V = (Playing.Actor->Velocity - //-ViewActor->Velocity + /*-ViewActor->Velocity*/ ) | (Playing.Actor->Location - ViewActor->Location).SafeNormal(); Doppler = Clamp( 1.0 - V/DopplerSpeed, 0.5, 2.0 ); } // Update the sound. - Sample* Sample = GetSound(Playing.Sound); + GetSound( Playing.Sound ); FVector Z(0,0,0); FVector L(Location.X/400.0,Location.Y/400.0,Location.Z/400.0); - if( Playing.Channel ) + if( Mix_Playing( Index ) ) { + //printf("-- sound actually being played -- \n"); // Update an existing sound. + //printf("soundvol = %5d, scaled = %5d\n", SoundVolume, (int) (SoundVolume * CurSampleVolume)); guard(UpdateSample); + Mix_Volume(Index, (int) (SoundVolume * CurSampleVolume)); + /* UpdateSample ( Playing.Channel, @@ -699,23 +692,32 @@ SoundPan ); Playing.Channel->BasePanning = SoundPan; + */ unguard; } else { + //printf("-- sound not yet started; starting --\n"); // Start this new sound. guard(StartSample); - if( !Playing.Channel ) + //if( !Mix_Playing( Index ) ) { + Playing.PhysChannel = Mix_PlayChannel(Index, (Mix_Chunk *) Playing.Sound->Handle, 0); + //printf("playing %s on channel %d (wanted %d)\n", + // Playing.Sound->GetPathName(), Playing.PhysChannel, Index); + //} + + /* Playing.Channel = StartSample ( Index+1, Sample, (INT) (Sample->SamplesPerSec * Playing.Pitch * Doppler), SoundVolume, SoundPan ); - check(Playing.Channel); + */ + + /*check(Playing.Channel);*/ unguard; } } } -*/ unguard; // Unlock. @@ -813,9 +815,9 @@ // Set music and effects volumes. - verify( SetSampleVolume( 128*NormSoundVolume ) ); + verify( SetSampleVolume( NormSoundVolume ) ); if( UseDigitalMusic ) - verify( SetMusicVolume( 128*NormMusicVolume*Max(MusicFade,0.f) ) ); + verify( SetMusicVolume( NormMusicVolume*Max(MusicFade,0.f) ) ); /* REF verify( SetSampleVolume( 127*NormSoundVolume ) ); @@ -828,6 +830,17 @@ unguard; } +void USDLAudioSubsystem::StopSound( INT Index ) +{ + guard(UGenericAudioSubsystem::StopSound); + + Mix_HaltChannel( Index ); + PlayingSounds[Index] = FPlayingSound(); + + unguard; +} + /*----------------------------------------------------------------------------- The End. -----------------------------------------------------------------------------*/ + |