From DONOTREPLY at icculus.org Wed Dec 5 02:26:19 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 5 Dec 2007 02:26:19 -0500 Subject: r382 - in trunk: . scripts Message-ID: <20071205072619.28583.qmail@icculus.org> Author: icculus Date: 2007-12-05 02:26:19 -0500 (Wed, 05 Dec 2007) New Revision: 382 Modified: trunk/gui_stdio.c trunk/scripts/localization.lua Log: Bunch of work on the stdio UI: paging of READMEs, default values on promptyn and promptynan, other tweaks. Modified: trunk/gui_stdio.c =================================================================== --- trunk/gui_stdio.c 2007-11-24 17:28:23 UTC (rev 381) +++ trunk/gui_stdio.c 2007-12-05 07:26:19 UTC (rev 382) @@ -41,6 +41,10 @@ static int readstr(const char *prompt, char *buf, int len, boolean back, boolean fwd) { + // !!! FIXME: if read_stdin() returns -1, we return 0, which makes it + // !!! FIXME: indistinguishable from "user hit enter" ... maybe we should + // !!! FIXME: abort in read_stdin() if i/o fails? + int retval = 0; const char *backstr = NULL; @@ -65,13 +69,13 @@ if ((retval = read_stdin(buf, len)) >= 0) { - if ((back) && (strcmp(buf, backstr) == 0)) + if ((back) && (strcmp(buf, backstr) == 0)) // !!! FIXME: utf8casecmp? retval = -1; } // if free((void *) backstr); return retval; -} // print_prompt +} // readstr static uint8 MojoGui_stdio_priority(boolean istty) @@ -119,25 +123,37 @@ boolean retval = false; if (!feof(stdin)) { + const char *fmt = ((defval) ? "%s\n[Y/n]: " : "%s\n[y/N]: "); + const char *localized_fmt = entry->xstrdup(entry->_(fmt)); const char *localized_no = entry->xstrdup(entry->_("N")); const char *localized_yes = entry->xstrdup(entry->_("Y")); boolean getout = false; char buf[128]; + while (!getout) { - // !!! FIXME: - // We currently ignore defval and make you type out your choice. - printf(entry->_("%s\n[y/n]: "), text); + int rc = 0; + + getout = true; // we may reset this later. + printf(localized_fmt, text); fflush(stdout); - if (read_stdin(buf, sizeof (buf)) < 0) - getout = true; + rc = read_stdin(buf, sizeof (buf)); + + if (rc < 0) + retval = false; + else if (rc == 0) + retval = defval; else if (strcasecmp(buf, localized_no) == 0) - getout = true; + retval = false; else if (strcasecmp(buf, localized_yes) == 0) - retval = getout = true; + retval = true; + else + getout = false; // try again. } // while + + free((void *) localized_yes); free((void *) localized_no); - free((void *) localized_yes); + free((void *) localized_fmt); } // if return retval; @@ -150,42 +166,44 @@ MojoGuiYNAN retval = MOJOGUI_NO; if (!feof(stdin)) { + const char *localized_fmt = entry->_("%s\n[y/n/Always/Never]: "); const char *localized_no = entry->xstrdup(entry->_("N")); const char *localized_yes = entry->xstrdup(entry->_("Y")); const char *localized_always = entry->xstrdup(entry->_("Always")); const char *localized_never = entry->xstrdup(entry->_("Never")); boolean getout = false; char buf[128]; + while (!getout) { - // !!! FIXME: - // We currently ignore defval and make you type out your choice. - printf(entry->_("%s\n[y/n/Always/Never]: "), txt); + int rc = 0; + + getout = true; // we may reset this later. + printf(localized_fmt, txt); fflush(stdout); - if (read_stdin(buf, sizeof (buf)) < 0) - getout = true; + rc = read_stdin(buf, sizeof (buf)); + + if (rc < 0) + retval = MOJOGUI_NO; + else if (rc == 0) + retval = (defval) ? MOJOGUI_YES : MOJOGUI_NO; else if (strcasecmp(buf, localized_no) == 0) - getout = true; + retval = MOJOGUI_NO; else if (strcasecmp(buf, localized_yes) == 0) - { retval = MOJOGUI_YES; - getout = true; - } // else if else if (strcasecmp(buf, localized_always) == 0) - { retval = MOJOGUI_ALWAYS; - getout = true; - } // else if else if (strcasecmp(buf, localized_never) == 0) - { retval = MOJOGUI_NEVER; - getout = true; - } // else if + else + getout = false; // try again. } // while + + free((void *) localized_never); + free((void *) localized_always); + free((void *) localized_yes); free((void *) localized_no); - free((void *) localized_yes); - free((void *) localized_always); - free((void *) localized_never); + free((void *) localized_fmt); } // if return retval; @@ -206,27 +224,175 @@ } // MojoGui_stdio_stop -static int MojoGui_stdio_readme(const char *name, const uint8 *data, - size_t datalen, boolean can_back, - boolean can_fwd) +// !!! FIXME: cut and pasted in gui_ncurses.c, too...fix bugs in both copies! +// !!! FIXME: (or move this somewhere else...) +// !!! FIXME: this is not really Unicode friendly... +static char **splitText(const char *_text, int *_count, int *_w) { + char *ptr = entry->xstrdup(_text); + char *text = ptr; + int i; + int scrw = 80; + char **retval = NULL; + int count = 0; + int w = 0; + + *_count = *_w = 0; + while (*text) + { + int pos = 0; + int furthest = 0; + + for (i = 0; (text[i]) && (i < (scrw-4)); i++) + { + const int ch = text[i]; + if ((ch == '\r') || (ch == '\n')) + { + count++; + retval = (char **) entry->xrealloc(retval, + count * sizeof (char *)); + text[i] = '\0'; + retval[count-1] = entry->xstrdup(text); + text += i; + *text = ch; + if ((ch == '\r') && (text[1] == '\n')) + text++; + text++; + + if (i > w) + w = i; + i = -1; // will be zero on next iteration... + } // if + else if (isspace(ch)) + { + furthest = i; + } // else if + } // for + + // line overflow or end of stream... + pos = (text[i]) ? furthest : i; + if ((text[i]) && (furthest == 0)) // uhoh, no split at all...hack it. + { + // !!! FIXME: might be chopping in the middle of a UTF-8 seq. + pos = strlen(text); + if (pos > scrw-4) + pos = scrw-4; + } // if + + if (pos > 0) + { + char ch = text[pos]; + count++; + retval = (char **) entry->xrealloc(retval, count * sizeof (char*)); + text[pos] = '\0'; + retval[count-1] = entry->xstrdup(text); + text += pos; + *text = ch; + if (pos > w) + w = pos; + } // if + } // while + + free(ptr); + *_count = count; + *_w = w; + return retval; +} // splitText + + +static void dumb_pager(const char *name, const char *data, size_t datalen) +{ + const int MAX_PAGE_LINES = 21; + char buf[256]; + const char *_fmt = entry->_("(%d-%d of %d lines, see more?)"); // !!! FIXME: localization + char *fmt = entry->xstrdup(_fmt); + int i = 0; + int w = 0; + int linecount = 0; boolean getout = false; - int retval = -1; - int len = 0; - char buf[128]; + char **lines = splitText(data, &linecount, &w); - while (!getout) + assert(linecount >= 0); + + printf("%s\n", name); + + if (lines == NULL) // failed to parse?! + printf("%s\n", data); // just dump it all. Oh well. + else { - printf("%s\n%s\n", name, (const char *) data); - if ((len = readstr(NULL, buf, sizeof (buf), can_back, true)) < 0) - getout = true; - else if (len == 0) + int printed = 0; + do { - getout = true; - retval = 1; - } // else if + for (i = 0; (i < MAX_PAGE_LINES) && (printed < linecount); i++) + printf("%s\n", lines[printed++]); + + if (printed >= linecount) + getout = true; + else + { + printf("\n"); + snprintf(buf, sizeof (buf), fmt, + (printed-i)+1, printed, linecount); + getout = !MojoGui_stdio_promptyn("", buf, true); + printf("\n"); + } // else + } while (!getout); } // while + for (i = 0; i < linecount; i++) + free(lines[i]); + free(lines); + free(fmt); +} // dumb_pager + + +static int MojoGui_stdio_readme(const char *name, const uint8 *_data, + size_t datalen, boolean can_back, + boolean can_fwd) +{ + const char *data = (const char *) _data; + char buf[256]; + int retval = -1; + boolean failed = true; + + #if PLATFORM_UNIX + const size_t namelen = strlen(name); + const char *programs[] = { getenv("PAGER"), "more", "less -M", "less" }; + int i = 0; + + // flush streams, so output doesn't mingle with the popen()'d process. + fflush(stdout); + fflush(stderr); + + for (i = 0; i < STATICARRAYLEN(programs); i++) + { + const char *cmd = programs[i]; + if (cmd != NULL) + { + FILE *io = popen(cmd, "w"); + if (io != NULL) + { + failed = false; + if (!failed) failed = (fwrite("\n", 1, 1, io) != 1); + if (!failed) failed = (fwrite(name, namelen, 1, io) != 1); + if (!failed) failed = (fwrite("\n", 1, 1, io) != 1); + if (!failed) failed = (fwrite(data, datalen, 1, io) != 1); + if (!failed) failed = (fwrite("\n", 1, 1, io) != 1); + failed |= (pclose(io) != 0); // call whether we failed or not. + if (!failed) + break; // it worked, we're done! + } // if + } // if + } // for + #endif // PLATFORM_UNIX + + if (failed) // We're not Unix, or none of the pagers worked? + dumb_pager(name, data, datalen); + + // Put up the "hit enter to continue (or 'back' to go back)" prompt. + if (readstr(NULL, buf, sizeof (buf), can_back, true) >= 0) + retval = 1; + return retval; } // MojoGui_stdio_readme Modified: trunk/scripts/localization.lua =================================================================== --- trunk/scripts/localization.lua 2007-11-24 17:28:23 UTC (rev 381) +++ trunk/scripts/localization.lua 2007-12-05 07:26:19 UTC (rev 382) @@ -45,10 +45,14 @@ ["NOTICE: %s\n[hit enter]"] = { }; - -- stdio GUI plugin says this for yes/no prompts (printf format string). - ["%s\n[y/n]"] = { + -- stdio GUI plugin says this for yes/no prompts that default to yes (printf format string). + ["%s\n[Y/n]: "] = { }; + -- stdio GUI plugin says this for yes/no prompts that default to no (printf format string). + ["%s\n[y/N]: "] = { + }; + -- stdio GUI plugin says this for yes/no/always/never prompts (printf format string). ["%s\n[y/n/Always/Never]: "] = { }; @@ -61,6 +65,10 @@ ["N"] = { }; + -- This is shown when using stdio GUI's built-in README pager (printf format). + ["(Viewing %d-%d of %d lines, see more?)"] = { + }; + -- This is utf8casecmp()'d for "always" answers in stdio GUI's promptyn(). ["Always"] = { }; From DONOTREPLY at icculus.org Wed Dec 5 02:26:56 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 5 Dec 2007 02:26:56 -0500 Subject: r383 - trunk Message-ID: <20071205072656.29235.qmail@icculus.org> Author: icculus Date: 2007-12-05 02:26:56 -0500 (Wed, 05 Dec 2007) New Revision: 383 Modified: trunk/gui_ncurses.c Log: Added a FIXME. Modified: trunk/gui_ncurses.c =================================================================== --- trunk/gui_ncurses.c 2007-12-05 07:26:19 UTC (rev 382) +++ trunk/gui_ncurses.c 2007-12-05 07:26:56 UTC (rev 383) @@ -86,6 +86,8 @@ static MojoBox *progressBox = NULL; +// !!! FIXME: cut and pasted in gui_stdio.c, too...fix bugs in both copies! +// !!! FIXME: (or move this somewhere else...) // !!! FIXME: this is not really Unicode friendly... static char **splitText(char *text, int *_count, int *_w) { From DONOTREPLY at icculus.org Wed Dec 5 05:37:25 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 5 Dec 2007 05:37:25 -0500 Subject: r384 - trunk/scripts Message-ID: <20071205103725.20781.qmail@icculus.org> Author: icculus Date: 2007-12-05 05:37:09 -0500 (Wed, 05 Dec 2007) New Revision: 384 Modified: trunk/scripts/mojosetup_mainline.lua Log: Fixed script crash when no splash screen is specified. Modified: trunk/scripts/mojosetup_mainline.lua =================================================================== --- trunk/scripts/mojosetup_mainline.lua 2007-12-05 07:26:56 UTC (rev 383) +++ trunk/scripts/mojosetup_mainline.lua 2007-12-05 10:37:09 UTC (rev 384) @@ -988,7 +988,13 @@ -- Now make all this happen. - if not MojoSetup.gui.start(install.description, 'meta/' .. install.splash) then + + local splashfname = install.splash + if splashfname ~= nil then + splashfname = 'meta/' .. splashfname + end + + if not MojoSetup.gui.start(install.description, splashfname) then MojoSetup.fatal(_("GUI failed to start")) end From DONOTREPLY at icculus.org Wed Dec 5 06:12:37 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 5 Dec 2007 06:12:37 -0500 Subject: r385 - trunk Message-ID: <20071205111237.17227.qmail@icculus.org> Author: icculus Date: 2007-12-05 06:12:35 -0500 (Wed, 05 Dec 2007) New Revision: 385 Modified: trunk/gui_stdio.c Log: Hmm...popen() isn't really reliable for the pager code: - If a program doesn't exist, it'll report success. - If a program closes the stream without paging it all, fwrite() will report failure. - If we roll our own with fork()/exec(), we have to parse any potential command lines. It's a mess. You only get dumb_pager() for now. :/ Modified: trunk/gui_stdio.c =================================================================== --- trunk/gui_stdio.c 2007-12-05 10:37:09 UTC (rev 384) +++ trunk/gui_stdio.c 2007-12-05 11:12:35 UTC (rev 385) @@ -355,7 +355,8 @@ int retval = -1; boolean failed = true; - #if PLATFORM_UNIX + // !!! FIXME: popen() isn't reliable. + #if 0 //PLATFORM_UNIX const size_t namelen = strlen(name); const char *programs[] = { getenv("PAGER"), "more", "less -M", "less" }; int i = 0; From DONOTREPLY at icculus.org Sat Dec 15 21:35:56 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 15 Dec 2007 21:35:56 -0500 Subject: r386 - trunk Message-ID: <20071216023556.3044.qmail@icculus.org> Author: icculus Date: 2007-12-15 21:35:56 -0500 (Sat, 15 Dec 2007) New Revision: 386 Modified: trunk/gui_stdio.c Log: In the stdio ui, don't prompt the user to hit enter if they just paged through a readme/eula ... if there's no actual choice, just go on. Modified: trunk/gui_stdio.c =================================================================== --- trunk/gui_stdio.c 2007-12-05 11:12:35 UTC (rev 385) +++ trunk/gui_stdio.c 2007-12-16 02:35:56 UTC (rev 386) @@ -390,8 +390,9 @@ if (failed) // We're not Unix, or none of the pagers worked? dumb_pager(name, data, datalen); - // Put up the "hit enter to continue (or 'back' to go back)" prompt. - if (readstr(NULL, buf, sizeof (buf), can_back, true) >= 0) + // Put up the "hit enter to continue (or 'back' to go back)" prompt, + // but only if there's an choice to be made here. + if ((!can_back) || (readstr(NULL, buf, sizeof (buf), can_back, true) >= 0)) retval = 1; return retval; From DONOTREPLY at icculus.org Mon Dec 17 14:37:06 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 17 Dec 2007 14:37:06 -0500 Subject: r387 - in trunk/examples: . ut3-dedicated ut3-dedicated/scripts Message-ID: <20071217193706.29431.qmail@icculus.org> Author: icculus Date: 2007-12-17 14:37:05 -0500 (Mon, 17 Dec 2007) New Revision: 387 Added: trunk/examples/ut3-dedicated/ trunk/examples/ut3-dedicated/make.sh trunk/examples/ut3-dedicated/scripts/ trunk/examples/ut3-dedicated/scripts/config.lua Log: The basic structure of my ut3 dedicated server installer-build process. Added: trunk/examples/ut3-dedicated/make.sh =================================================================== --- trunk/examples/ut3-dedicated/make.sh (rev 0) +++ trunk/examples/ut3-dedicated/make.sh 2007-12-17 19:37:05 UTC (rev 387) @@ -0,0 +1,136 @@ +#!/bin/sh + +# This script is not robust for all platforms or situations. Use as a rough +# example, but invest effort in what it's trying to do, and what it produces. +# (make sure you don't build in features you don't need, etc). + +# Stop if anything produces an error. +set -e + +DEBUG=0 +if [ "$1" = "--debug" ]; then + echo "debug build!" + DEBUG=1 +fi + +# Show everything that we do here on stdout. +set -x + +if [ "$DEBUG" = "1" ]; then + LUASTRIPOPT= + BUILDTYPE=Debug + TRUEIFDEBUG=TRUE + FALSEIFDEBUG=FALSE +else + LUASTRIPOPT=-s + BUILDTYPE=MinSizeRel + TRUEIFDEBUG=FALSE + FALSEIFDEBUG=TRUE +fi + +# this is a little nasty, but it works! +TOTALINSTALL=`du -sb data |perl -w -pi -e 's/\A(\d+)\s+data\Z/$1/;'` +perl -w -pi -e "s/\A\s*(local TOTAL_INSTALL_SIZE)\s*\=\s*\d+\s*;\s*\Z/\$1 = $TOTALINSTALL;\n/;" scripts/config.lua + +# Clean up previous run, build fresh dirs for Base Archive. +rm -rf image mojosetup UT3-linux-server-*.bin pdata.zip +mkdir image +mkdir image/guis +mkdir image/scripts +mkdir image/data + +# Build MojoSetup binaries from scratch. +cd ../.. +rm -rf `svn propget svn:ignore .` +cmake \ + -DCMAKE_BUILD_TYPE=$BUILDTYPE \ + -DCMAKE_C_COMPILER=/opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/gcc \ + -DCMAKE_CXX_COMPILER=/opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++ \ + -DMOJOSETUP_LUA_PARSER=$TRUEIFDEBUG \ + -DMOJOSETUP_ARCHIVE_TAR=FALSE \ + -DMOJOSETUP_ARCHIVE_TAR_BZ2=FALSE \ + -DMOJOSETUP_ARCHIVE_TAR_GZ=FALSE \ + -DMOJOSETUP_ARCHIVE_ZIP=TRUE \ + -DMOJOSETUP_BUILD_LUAC=TRUE \ + -DMOJOSETUP_CHECKSUM_CRC32=FALSE \ + -DMOJOSETUP_CHECKSUM_MD5=FALSE \ + -DMOJOSETUP_CHECKSUM_SHA1=FALSE \ + -DMOJOSETUP_GUI_GTKPLUS2=FALSE \ + -DMOJOSETUP_GUI_GTKPLUS2_STATIC=FALSE \ + -DMOJOSETUP_GUI_NCURSES=FALSE \ + -DMOJOSETUP_GUI_NCURSES_STATIC=FALSE \ + -DMOJOSETUP_GUI_STDIO=TRUE \ + -DMOJOSETUP_GUI_STDIO_STATIC=TRUE \ + -DMOJOSETUP_GUI_WWW=FALSE \ + -DMOJOSETUP_INTERNAL_BZLIB=FALSE \ + -DMOJOSETUP_INTERNAL_ZLIB=TRUE \ + -DMOJOSETUP_URL_FTP=FALSE \ + -DMOJOSETUP_IMAGE_JPG=FALSE \ + -DMOJOSETUP_IMAGE_PNG=FALSE \ + . + +#make -j5 VERBOSE=1 +make -j5 + +# Strip the binaries and GUI plugins, put them somewhere useful. +if [ "$DEBUG" != "1" ]; then + strip ./mojosetup +fi + +mv ./mojosetup examples/ut3-dedicated/ + +for feh in *.so *.dll *.dylib ; do + if [ -f $feh ]; then + if [ "$DEBUG" != "1" ]; then + strip $feh + fi + mv $feh examples/ut3-dedicated/image/guis + fi +done + +# Compile the Lua scripts, put them in the base archive. +for feh in scripts/*.lua ; do + ./mojoluac $LUASTRIPOPT -o examples/ut3-dedicated/image/${feh}c $feh +done + +# Don't want the example config...use our's instead. +rm -f examples/ut3-dedicated/image/scripts/config.luac +./mojoluac $LUASTRIPOPT -o examples/ut3-dedicated/image/scripts/config.luac examples/ut3-dedicated/scripts/config.lua + +# Fill in the rest of the Base Archive... +cd examples/ut3-dedicated +cp -R data/* image/data/ + +# Make a .zip archive of the Base Archive dirs and nuke the originals... +cd image +zip -9r ../pdata.zip * +cd .. +rm -rf image + +# Append the .zip archive to the mojosetup binary, so it's "self-extracting." +cat pdata.zip >> ./mojosetup +rm -f pdata.zip + +# Rename it, and we're good to go. +mv ./mojosetup UT3-linux-server-`date +%m%d%Y`.bin + +# ...and that's that. +set +e +set +x +echo "Successfully built!" + +if [ "$DEBUG" = "1" ]; then + echo + echo + echo + echo 'ATTENTION: THIS IS A DEBUG BUILD!' + echo " DON'T DISTRIBUTE TO THE PUBLIC." + echo ' THIS IS PROBABLY BIGGER AND SLOWER THAN IT SHOULD BE.' + echo ' YOU HAVE BEEN WARNED!' + echo + echo + echo +fi + +exit 0 + Property changes on: trunk/examples/ut3-dedicated/make.sh ___________________________________________________________________ Name: svn:executable + * Added: trunk/examples/ut3-dedicated/scripts/config.lua =================================================================== --- trunk/examples/ut3-dedicated/scripts/config.lua (rev 0) +++ trunk/examples/ut3-dedicated/scripts/config.lua 2007-12-17 19:37:05 UTC (rev 387) @@ -0,0 +1,37 @@ +local TOTAL_INSTALL_SIZE = 2575422952; +local _ = MojoSetup.translate + +Setup.Package +{ + id = "ut3-dedicated", + description = "Unreal Tournament 3 Dedicated Server", + version = "3487", + + recommended_destinations = + { + MojoSetup.info.homedir, + "/opt/games", + "/opt", + "/usr/local/games", + "/usr/local" + }, + + Setup.Eula + { + description = _("End User License Agreement"), + source = _("UT3-linux-server-EULA.txt") + }, + + Setup.Option + { + value = true, + required = true, + disabled = false, + bytes = TOTAL_INSTALL_SIZE, + description = _("Dedicated Server"), + Setup.File {}, -- Just copies the whole thing. + }, +} + +-- end of config.lua ... + From DONOTREPLY at icculus.org Mon Dec 17 14:37:25 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 17 Dec 2007 14:37:25 -0500 Subject: r388 - trunk/examples/ut3-dedicated Message-ID: <20071217193725.29879.qmail@icculus.org> Author: icculus Date: 2007-12-17 14:37:25 -0500 (Mon, 17 Dec 2007) New Revision: 388 Added: trunk/examples/ut3-dedicated/data/ Log: Added dir. From DONOTREPLY at icculus.org Mon Dec 17 14:41:50 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 17 Dec 2007 14:41:50 -0500 Subject: r389 - trunk/examples/ut3-dedicated Message-ID: <20071217194150.4307.qmail@icculus.org> Author: icculus Date: 2007-12-17 14:41:50 -0500 (Mon, 17 Dec 2007) New Revision: 389 Modified: trunk/examples/ut3-dedicated/make.sh Log: Don't count .svn dir size in total installed bytes. Modified: trunk/examples/ut3-dedicated/make.sh =================================================================== --- trunk/examples/ut3-dedicated/make.sh 2007-12-17 19:37:25 UTC (rev 388) +++ trunk/examples/ut3-dedicated/make.sh 2007-12-17 19:41:50 UTC (rev 389) @@ -30,6 +30,8 @@ # this is a little nasty, but it works! TOTALINSTALL=`du -sb data |perl -w -pi -e 's/\A(\d+)\s+data\Z/$1/;'` +TOTALINSTALLSVN=`du -sb data/.svn |perl -w -pi -e 's/\A(\d+)\s+data\/\.svn\Z/$1/;'` +let TOTALINSTALL=$TOTALINSTALL-$TOTALINSTALLSVN perl -w -pi -e "s/\A\s*(local TOTAL_INSTALL_SIZE)\s*\=\s*\d+\s*;\s*\Z/\$1 = $TOTALINSTALL;\n/;" scripts/config.lua # Clean up previous run, build fresh dirs for Base Archive. From DONOTREPLY at icculus.org Mon Dec 17 14:44:37 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 17 Dec 2007 14:44:37 -0500 Subject: r390 - trunk/examples/ut3-dedicated Message-ID: <20071217194437.10634.qmail@icculus.org> Author: icculus Date: 2007-12-17 14:44:37 -0500 (Mon, 17 Dec 2007) New Revision: 390 Modified: trunk/examples/ut3-dedicated/make.sh Log: Don't build an empty installer. :) Modified: trunk/examples/ut3-dedicated/make.sh =================================================================== --- trunk/examples/ut3-dedicated/make.sh 2007-12-17 19:41:50 UTC (rev 389) +++ trunk/examples/ut3-dedicated/make.sh 2007-12-17 19:44:37 UTC (rev 390) @@ -4,6 +4,14 @@ # example, but invest effort in what it's trying to do, and what it produces. # (make sure you don't build in features you don't need, etc). +if [ ! -d data/Binaries ]; then + echo "We don't see data/Binaries ..." + echo " Either you're in the wrong directory, or you didn't copy the" + echo " install data into here (it's unreasonably big to store it in" + echo " Subversion for no good reason)." + exit 1 +fi + # Stop if anything produces an error. set -e From DONOTREPLY at icculus.org Tue Dec 18 09:49:09 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 18 Dec 2007 09:49:09 -0500 Subject: r391 - tags Message-ID: <20071218144909.9627.qmail@icculus.org> Author: icculus Date: 2007-12-18 09:49:09 -0500 (Tue, 18 Dec 2007) New Revision: 391 Added: tags/ut3-dedicated-server-installer/ Log: This was the revision we used for the original release of the Unreal Tournament 3 dedicated linux server. Copied: tags/ut3-dedicated-server-installer (from rev 390, trunk)