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
This commit is contained in:
mcmartin
2010-03-15 04:39:40 +00:00
parent ce534168c0
commit 0cf53407d4
4 changed files with 32 additions and 30 deletions
+10 -4
View File
@@ -24,15 +24,21 @@ Unzip the libogg and libvorbis archives somewhere convenient.
For libogg: For libogg:
- Go to the macosx directory, open the xcodeproj. - Go to the macosx directory, open the xcodeproj.
- Open Project->Project Settings. Ensure the Architecture is set to - Open Project->Project Settings and set the Configuration to
"i386 ppc". "Release". Ensure the Architecture is set to "i386 ppc".
- Choose the Deployment target and build. - 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 - If there are no errors, the Ogg.framework file should have turned
from red to black. Control-click it, choose "reveal in finder". from red to black. Control-click it, choose "reveal in finder".
- Copy Ogg.framework to /Library/Frameworks. - Copy Ogg.framework to /Library/Frameworks.
For libvorbis: For libvorbis:
- As above, but you need the "Release" target. - Same procedure as libogg.
To build: To build:
- Run ./build.sh in the sc2/ directory and choose your configuration - Run ./build.sh in the sc2/ directory and choose your configuration
+11 -15
View File
@@ -553,8 +553,7 @@ uqm_install_osx() {
echo "Creating directory structure..." >&2 echo "Creating directory structure..." >&2
mkdirhier "$INSTROOT/MacOS" 0755 mkdirhier "$INSTROOT/MacOS" 0755
mkdirhier "$INSTROOT/Frameworks" 0755 mkdirhier "$INSTROOT/Frameworks" 0755
mkdirhier "$INSTROOT/Resources/Launcher.nib" 0755 mkdirhier "$INSTROOT/Resources/content/addons" 0755
mkdirhier "$INSTROOT/Resources/content/packages/addons" 0755
# Install misc. resources, icons, etc. # Install misc. resources, icons, etc.
echo "Installing miscellaneous resources..." >&2 echo "Installing miscellaneous resources..." >&2
@@ -562,8 +561,6 @@ uqm_install_osx() {
"$INSTROOT/Info.plist" "$INSTROOT/Info.plist"
cp src/res/darwin/PkgInfo "$INSTROOT" cp src/res/darwin/PkgInfo "$INSTROOT"
cp "src/res/darwin/The Ur-Quan Masters.icns" "$INSTROOT/Resources" 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. # Find Frameworks and copy them into the application.
echo "Copying dependancy Frameworks..." >&2 echo "Copying dependancy Frameworks..." >&2
@@ -584,22 +581,21 @@ uqm_install_osx() {
echo "Creating base content package..." >&2 echo "Creating base content package..." >&2
cp content/version "$INSTROOT/Resources/content/" cp content/version "$INSTROOT/Resources/content/"
(cd content && \ (cd content && \
find . \( -name CVS -o -name packages -o -name .svn \) -prune \ find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path '*/addons*' -print | \
-o \! \( -type d -o -name \*.ogg \) -print | \ $SED 's/^..//' | zip -X -q -n .ogg -8 -@ uqm-${VERSION}-prv-content.uqm)
$SED 's/^..//' | zip -@ uqm-${VERSION}-prv-content.uqm)
mv content/uqm-$VERSION-prv-content.uqm "$INSTROOT/Resources/content/packages" mv content/uqm-$VERSION-prv-content.uqm "$INSTROOT/Resources/content/packages"
echo "Creating voice content package..." >&2 echo "Creating voice content package..." >&2
(cd content && \ (cd content/addons && \
find . -name \*\[0-9\]\[0-9\]\[0-9\].ogg -print \ find 3dovoice -type f -not -path '*/CVS*' -not -path '*/.svn*' -print | \
| $SED 's/^..//' | zip -0 -@ uqm-${VERSION}-prv-voice.uqm) zip -X -q -n .ogg -8 -@ ../uqm-${VERSION}-prv-voice.uqm)
mv content/uqm-$VERSION-prv-voice.uqm "$INSTROOT/Resources/content/packages" mv content/uqm-$VERSION-prv-voice.uqm "$INSTROOT/Resources/content/addons"
echo "Creating 3do music content package..." >&2 echo "Creating 3do music content package..." >&2
(cd content && \ (cd content/addons && \
find . -name \*.ogg -a \! -name \*\[0-9\]\[0-9\]\[0-9\].ogg \ find 3domusic -type f -not -path '*/CVS*' -not -path '*/.svn*' -print | \
-print | $SED 's/^..//' | zip -0 -@ uqm-${VERSION}-prv-3domusic.uqm) zip -X -q -n .ogg -8 -@ ../uqm-${VERSION}-prv-3domusic.uqm)
mv content/uqm-$VERSION-prv-3domusic.uqm "$INSTROOT/Resources/content/packages" mv content/uqm-$VERSION-prv-3domusic.uqm "$INSTROOT/Resources/content/addons"
# Install game binary (and rename it) # Install game binary (and rename it)
echo "Installing executable..." >&2 echo "Installing executable..." >&2
+3 -3
View File
@@ -62,9 +62,9 @@ useGccBuildTools() {
} }
case "$HOST_SYSTEM" in case "$HOST_SYSTEM" in
Darwin) Darwin)
EXTRA_PLATFORM_GCC_FLAGS_COMPILE_C='-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='-arch ppc -arch i386' EXTRA_PLATFORM_GCC_FLAGS_COMPILE_OBJC='-mmacosx-version-min=10.4 -arch ppc -arch i386'
EXTRA_PLATFORM_GCC_FLAGS_LINK='-arch ppc -arch i386' EXTRA_PLATFORM_GCC_FLAGS_LINK='-mmacosx-version-min=10.4 -arch ppc -arch i386'
useGccBuildTools useGccBuildTools
;; ;;
WINSCW) WINSCW)
+8 -8
View File
@@ -17,7 +17,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 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 # THESE MUST BE DEFINED, PREFERABLY AS ABSOLUTE PATHS, BEFORE RUNNING
# THIS SCRIPT # THIS SCRIPT
@@ -39,17 +39,17 @@ ZIP="zip -X -q -n .ogg -8"
make_content_list() { make_content_list() {
cd "$CONTENT_DIR" 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() { make_voice_list() {
cd "$CONTENT_DIR" cd "$CONTENT_DIR/addons"
find . -type f -name '*[0-9][0-9][0-9].ogg' | sort > "$VOICE_LIST" find 3dovoice -type f -not -path '*/CVS*' -not -path '*/.svn*' | sort > "$VOICE_LIST"
} }
make_3domusic_list() { make_3domusic_list() {
cd "$CONTENT_DIR" cd "$CONTENT_DIR/addons"
find . -type f -name "*.ogg" -and -not -name '*[0-9][0-9][0-9].ogg' | sort > "$MUSIC_LIST" find 3domusic -type f -not -path '*/CVS*' -not -path '*/.svn*' | sort > "$MUSIC_LIST"
} }
make_content_pkg() { make_content_pkg() {
@@ -59,13 +59,13 @@ make_content_pkg() {
} }
make_voice_pkg() { make_voice_pkg() {
cd "$CONTENT_DIR" cd "$CONTENT_DIR/addons"
rm -f -- "$VOICE_PKG" rm -f -- "$VOICE_PKG"
$ZIP "$VOICE_PKG" -r . -i@"$VOICE_LIST" $ZIP "$VOICE_PKG" -r . -i@"$VOICE_LIST"
} }
make_3domusic_pkg() { make_3domusic_pkg() {
cd "$CONTENT_DIR" cd "$CONTENT_DIR/addons"
rm -f -- "$MUSIC_PKG" rm -f -- "$MUSIC_PKG"
$ZIP "$MUSIC_PKG" -r . -i@"$MUSIC_LIST" $ZIP "$MUSIC_PKG" -r . -i@"$MUSIC_LIST"
} }