From 0cf53407d4eae790ced2e57aa24d1e6c9420732a Mon Sep 17 00:00:00 2001 From: mcmartin Date: Mon, 15 Mar 2010 04:39:40 +0000 Subject: [PATCH] Fixes to the build system for Snow Leopard, and for 0.7 content packaging. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3532 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/INSTALL.macosx | 14 ++++++++++---- sc2/build/unix/build.config | 26 +++++++++++--------------- sc2/build/unix/config_proginfo_build | 6 +++--- tools/uqmzip/uqmzip | 16 ++++++++-------- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/sc2/INSTALL.macosx b/sc2/INSTALL.macosx index e2d52f28d..3d7409695 100644 --- a/sc2/INSTALL.macosx +++ b/sc2/INSTALL.macosx @@ -24,15 +24,21 @@ Unzip the libogg and libvorbis archives somewhere convenient. For libogg: - Go to the macosx directory, open the xcodeproj. -- Open Project->Project Settings. Ensure the Architecture is set to - "i386 ppc". -- Choose the Deployment target and build. +- Open Project->Project Settings and set the Configuration to + "Release". Ensure the Architecture is set to "i386 ppc". +- If you are using XCode 3.2.1 (Snow Leopard), you will need to use + GCC 4.0 instead of the default 4.2 (which will not work for the 10.4 + target). Inside Project Settings, add the following User-Defined + Settings via the gear menu at the bottom left: + - GCC_VERSION_i386 = 4.0 + - GCC_VERSION_ppc = 4.0 +- Choose the "10.4 | Release" target and build. - If there are no errors, the Ogg.framework file should have turned from red to black. Control-click it, choose "reveal in finder". - Copy Ogg.framework to /Library/Frameworks. For libvorbis: -- As above, but you need the "Release" target. +- Same procedure as libogg. To build: - Run ./build.sh in the sc2/ directory and choose your configuration diff --git a/sc2/build/unix/build.config b/sc2/build/unix/build.config index c14533ddf..d1b8f45f0 100644 --- a/sc2/build/unix/build.config +++ b/sc2/build/unix/build.config @@ -553,8 +553,7 @@ uqm_install_osx() { echo "Creating directory structure..." >&2 mkdirhier "$INSTROOT/MacOS" 0755 mkdirhier "$INSTROOT/Frameworks" 0755 - mkdirhier "$INSTROOT/Resources/Launcher.nib" 0755 - mkdirhier "$INSTROOT/Resources/content/packages/addons" 0755 + mkdirhier "$INSTROOT/Resources/content/addons" 0755 # Install misc. resources, icons, etc. echo "Installing miscellaneous resources..." >&2 @@ -562,8 +561,6 @@ uqm_install_osx() { "$INSTROOT/Info.plist" cp src/res/darwin/PkgInfo "$INSTROOT" cp "src/res/darwin/The Ur-Quan Masters.icns" "$INSTROOT/Resources" - cp src/res/darwin/Launcher.nib/objects.nib \ - "$INSTROOT/Resources/Launcher.nib" # Find Frameworks and copy them into the application. echo "Copying dependancy Frameworks..." >&2 @@ -584,22 +581,21 @@ uqm_install_osx() { echo "Creating base content package..." >&2 cp content/version "$INSTROOT/Resources/content/" (cd content && \ - find . \( -name CVS -o -name packages -o -name .svn \) -prune \ - -o \! \( -type d -o -name \*.ogg \) -print | \ - $SED 's/^..//' | zip -@ uqm-${VERSION}-prv-content.uqm) + find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path '*/addons*' -print | \ + $SED 's/^..//' | zip -X -q -n .ogg -8 -@ uqm-${VERSION}-prv-content.uqm) mv content/uqm-$VERSION-prv-content.uqm "$INSTROOT/Resources/content/packages" echo "Creating voice content package..." >&2 - (cd content && \ - find . -name \*\[0-9\]\[0-9\]\[0-9\].ogg -print \ - | $SED 's/^..//' | zip -0 -@ uqm-${VERSION}-prv-voice.uqm) - mv content/uqm-$VERSION-prv-voice.uqm "$INSTROOT/Resources/content/packages" + (cd content/addons && \ + find 3dovoice -type f -not -path '*/CVS*' -not -path '*/.svn*' -print | \ + zip -X -q -n .ogg -8 -@ ../uqm-${VERSION}-prv-voice.uqm) + mv content/uqm-$VERSION-prv-voice.uqm "$INSTROOT/Resources/content/addons" echo "Creating 3do music content package..." >&2 - (cd content && \ - find . -name \*.ogg -a \! -name \*\[0-9\]\[0-9\]\[0-9\].ogg \ - -print | $SED 's/^..//' | zip -0 -@ uqm-${VERSION}-prv-3domusic.uqm) - mv content/uqm-$VERSION-prv-3domusic.uqm "$INSTROOT/Resources/content/packages" + (cd content/addons && \ + find 3domusic -type f -not -path '*/CVS*' -not -path '*/.svn*' -print | \ + zip -X -q -n .ogg -8 -@ ../uqm-${VERSION}-prv-3domusic.uqm) + mv content/uqm-$VERSION-prv-3domusic.uqm "$INSTROOT/Resources/content/addons" # Install game binary (and rename it) echo "Installing executable..." >&2 diff --git a/sc2/build/unix/config_proginfo_build b/sc2/build/unix/config_proginfo_build index d8a31588d..2b1ce32b8 100644 --- a/sc2/build/unix/config_proginfo_build +++ b/sc2/build/unix/config_proginfo_build @@ -62,9 +62,9 @@ useGccBuildTools() { } case "$HOST_SYSTEM" in Darwin) - EXTRA_PLATFORM_GCC_FLAGS_COMPILE_C='-arch ppc -arch i386' - EXTRA_PLATFORM_GCC_FLAGS_COMPILE_OBJC='-arch ppc -arch i386' - EXTRA_PLATFORM_GCC_FLAGS_LINK='-arch ppc -arch i386' + EXTRA_PLATFORM_GCC_FLAGS_COMPILE_C='-mmacosx-version-min=10.4 -arch ppc -arch i386' + EXTRA_PLATFORM_GCC_FLAGS_COMPILE_OBJC='-mmacosx-version-min=10.4 -arch ppc -arch i386' + EXTRA_PLATFORM_GCC_FLAGS_LINK='-mmacosx-version-min=10.4 -arch ppc -arch i386' useGccBuildTools ;; WINSCW) diff --git a/tools/uqmzip/uqmzip b/tools/uqmzip/uqmzip index 254717b7c..a10c9b7fc 100755 --- a/tools/uqmzip/uqmzip +++ b/tools/uqmzip/uqmzip @@ -17,7 +17,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -VERSION=0.6.0 +VERSION=0.7.0 # THESE MUST BE DEFINED, PREFERABLY AS ABSOLUTE PATHS, BEFORE RUNNING # THIS SCRIPT @@ -39,17 +39,17 @@ ZIP="zip -X -q -n .ogg -8" make_content_list() { cd "$CONTENT_DIR" - find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -name "*.ogg" -not -name "version" | sort > "$CONTENT_LIST" + find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path '*/addons*' -not -name "version" | sort > "$CONTENT_LIST" } make_voice_list() { - cd "$CONTENT_DIR" - find . -type f -name '*[0-9][0-9][0-9].ogg' | sort > "$VOICE_LIST" + cd "$CONTENT_DIR/addons" + find 3dovoice -type f -not -path '*/CVS*' -not -path '*/.svn*' | sort > "$VOICE_LIST" } make_3domusic_list() { - cd "$CONTENT_DIR" - find . -type f -name "*.ogg" -and -not -name '*[0-9][0-9][0-9].ogg' | sort > "$MUSIC_LIST" + cd "$CONTENT_DIR/addons" + find 3domusic -type f -not -path '*/CVS*' -not -path '*/.svn*' | sort > "$MUSIC_LIST" } make_content_pkg() { @@ -59,13 +59,13 @@ make_content_pkg() { } make_voice_pkg() { - cd "$CONTENT_DIR" + cd "$CONTENT_DIR/addons" rm -f -- "$VOICE_PKG" $ZIP "$VOICE_PKG" -r . -i@"$VOICE_LIST" } make_3domusic_pkg() { - cd "$CONTENT_DIR" + cd "$CONTENT_DIR/addons" rm -f -- "$MUSIC_PKG" $ZIP "$MUSIC_PKG" -r . -i@"$MUSIC_LIST" }