Move the osx-packaging script inside the launcher xcode project
This commit is contained in:
3
Makefile
3
Makefile
@@ -92,7 +92,4 @@ seqed: $(seqed_TARGET)
|
||||
mapcvtr: $(mapcvtr_TARGET)
|
||||
all: $(fileformats_TARGET) $(gl_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET) $(ra_ng_TARGET) $(seqed_TARGET) $(mapcvtr_TARGET)
|
||||
|
||||
dist-osx:
|
||||
packaging/osx/package.sh
|
||||
|
||||
.DEFAULT: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@@ -12,7 +12,7 @@
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
DA1241101151F194002EFE2B /* OpenRa.icns in Resources */ = {isa = PBXBuildFile; fileRef = DA12410F1151F194002EFE2B /* OpenRa.icns */; };
|
||||
DA1241101151F194002EFE2B /* OpenRA.icns in Resources */ = {isa = PBXBuildFile; fileRef = DA12410F1151F194002EFE2B /* OpenRA.icns */; };
|
||||
DA28A92A117878EC00342835 /* mods.plist in Resources */ = {isa = PBXBuildFile; fileRef = DA28A929117878EC00342835 /* mods.plist */; };
|
||||
DAAB5C7911536D6500DCCB80 /* Settings.m in Sources */ = {isa = PBXBuildFile; fileRef = DAAB5C7811536D6500DCCB80 /* Settings.m */; };
|
||||
DAFD657B11520799001F4C97 /* launcher.ini in Resources */ = {isa = PBXBuildFile; fileRef = DAFD657A11520799001F4C97 /* launcher.ini */; };
|
||||
@@ -31,7 +31,7 @@
|
||||
8990E7AE1151C0F20089C198 /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Controller.m; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* OpenRA-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "OpenRA-Info.plist"; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* OpenRA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenRA.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DA12410F1151F194002EFE2B /* OpenRa.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = OpenRa.icns; sourceTree = "<group>"; };
|
||||
DA12410F1151F194002EFE2B /* OpenRA.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = OpenRA.icns; sourceTree = "<group>"; };
|
||||
DA28A929117878EC00342835 /* mods.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = mods.plist; sourceTree = "<group>"; };
|
||||
DAAB5C7711536D6500DCCB80 /* Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Settings.h; sourceTree = "<group>"; };
|
||||
DAAB5C7811536D6500DCCB80 /* Settings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Settings.m; sourceTree = "<group>"; };
|
||||
@@ -113,7 +113,7 @@
|
||||
children = (
|
||||
DAFD657A11520799001F4C97 /* launcher.ini */,
|
||||
8D1107310486CEB800E47090 /* OpenRA-Info.plist */,
|
||||
DA12410F1151F194002EFE2B /* OpenRa.icns */,
|
||||
DA12410F1151F194002EFE2B /* OpenRA.icns */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
|
||||
DA28A929117878EC00342835 /* mods.plist */,
|
||||
@@ -176,7 +176,7 @@
|
||||
files = (
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
|
||||
DA1241101151F194002EFE2B /* OpenRa.icns in Resources */,
|
||||
DA1241101151F194002EFE2B /* OpenRA.icns in Resources */,
|
||||
DAFD657B11520799001F4C97 /* launcher.ini in Resources */,
|
||||
DA28A92A117878EC00342835 /* mods.plist in Resources */,
|
||||
);
|
||||
@@ -196,8 +196,8 @@
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd ../../../\n#make clean\n#make all\n#make dist-osx\ncp -r OpenRA.app ${TARGET_BUILD_DIR}/OpenRA.app/Contents/Resources/";
|
||||
shellPath = /bin/bash;
|
||||
shellScript = "./package.sh\ncp -r build/game/OpenRA.app ${TARGET_BUILD_DIR}/OpenRA.app/Contents/Resources/";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -3,20 +3,10 @@
|
||||
# Creates a .app bundle for OpenRA game, and a command line app for OpenRa server
|
||||
# All dependencies are packaged inside the game bundle
|
||||
|
||||
# List of game files to copy into the app bundle
|
||||
GAME_FILES="OpenRA shaders maps FreeSans.ttf FreeSansBold.ttf titles.ttf"
|
||||
|
||||
# List of mods to include
|
||||
MODS="ra cnc"
|
||||
|
||||
# Files/directories to include
|
||||
MODS_INCLUDE_FILES="find mods/$m ! -name \"*.mdb\" ! -name \"packages\""
|
||||
|
||||
# dylibs referred to by dlls in the gac; won't show up to otool
|
||||
GAC_DYLIBS="/Library/Frameworks/Mono.framework/Versions/2.6.3/lib/libMonoPosixHelper.dylib /Library/Frameworks/Mono.framework/Versions/2.6.3/lib/libgdiplus.dylib "
|
||||
|
||||
# Remove old app bundle
|
||||
rm -r OpenRA.app
|
||||
# ASSUMPTIONS:
|
||||
# - Mono version is 2.6.3
|
||||
# - pkg-config is installed via Fink
|
||||
# - Fink is installed in /sw
|
||||
|
||||
# Recursively modify and copy the mono files depended on by OpenRA into the app bundle
|
||||
function patch_mono {
|
||||
@@ -39,31 +29,64 @@ function patch_mono {
|
||||
}
|
||||
|
||||
function copy_mods {
|
||||
for m in $MODS; do
|
||||
mkdir -p "OpenRA.app/Contents/Resources/mods/$m"
|
||||
for m in $MODS; do
|
||||
mkdir -p ${BUILD_DIR}"OpenRA.app/Contents/Resources/mods/$m"
|
||||
|
||||
#for f in $( find mods/$m \! -name "*.mdb" \! -name "packages"); do
|
||||
#for f in `$MODS_INCLUDE_FILES`; do
|
||||
cp -R "mods/$m/" "OpenRA.app/Contents/Resources/mods/$m/"
|
||||
#done
|
||||
#for f in $( find mods/$m \! -name "*.mdb" \! -name "packages"); do
|
||||
#for f in `$MODS_INCLUDE_FILES`; do
|
||||
cp -R "mods/$m/" ${BUILD_DIR}"OpenRA.app/Contents/Resources/mods/$m/"
|
||||
#done
|
||||
done
|
||||
}
|
||||
|
||||
# Setup environment for mkbundle
|
||||
# Force 32-bit build and set the pkg-config path for mono.pc
|
||||
export AS="as -arch i386"
|
||||
export CC="gcc -arch i386 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/
|
||||
export PATH=/sw/bin:/sw/sbin:$PATH
|
||||
|
||||
# List of game files to copy into the app bundle
|
||||
GAME_FILES="shaders maps FreeSans.ttf FreeSansBold.ttf titles.ttf"
|
||||
|
||||
# List of mods to include
|
||||
MODS="ra cnc aftermath ra-ng"
|
||||
|
||||
# Files/directories to include
|
||||
MODS_INCLUDE_FILES="find mods/$m ! -name \"*.mdb\" ! -name \"packages\""
|
||||
|
||||
# dylibs referred to by dlls in the gac; won't show up to otool
|
||||
GAC_DYLIBS="/Library/Frameworks/Mono.framework/Versions/2.6.3/lib/libMonoPosixHelper.dylib /Library/Frameworks/Mono.framework/Versions/2.6.3/lib/libgdiplus.dylib "
|
||||
|
||||
# Binaries to compile into our executable
|
||||
DEPS="OpenRA.Game.exe OpenRA.Gl.dll OpenRA.FileFormats.dll thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.Cg.dll.config thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.OpenGl.dll.config thirdparty/Tao/Tao.OpenAl.dll thirdparty/Tao/Tao.OpenAl.dll.config thirdparty/Tao/Tao.FreeType.dll thirdparty/Tao/Tao.FreeType.dll.config thirdparty/Tao/Tao.Sdl.dll thirdparty/Tao/Tao.Sdl.dll.config "
|
||||
DEPS_LOCAL="OpenRA.Game.exe OpenRA.Gl.dll OpenRA.FileFormats.dll Tao.Cg.dll Tao.OpenGl.dll Tao.OpenAl.dll Tao.FreeType.dll Tao.Sdl.dll"
|
||||
|
||||
# Create clean build dir
|
||||
BUILD_DIR=`pwd`/build/game/
|
||||
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir $BUILD_DIR
|
||||
|
||||
# Copy deps into build dir
|
||||
cp -r OpenRA.app $BUILD_DIR
|
||||
cd ../../../
|
||||
cp $DEPS $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
|
||||
# Package the game binary
|
||||
mkbundle --deps --static -z -o OpenRA OpenRA.Game.exe OpenRA.Gl.dll OpenRA.FileFormats.dll thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.OpenAl.dll thirdparty/Tao/Tao.FreeType.dll thirdparty/Tao/Tao.Sdl.dll
|
||||
mkbundle --deps --static -z -o OpenRA $DEPS_LOCAL
|
||||
rm $DEPS_LOCAL
|
||||
rm *.config
|
||||
mv OpenRA OpenRA.app/Contents/Resources/
|
||||
|
||||
# Copy game files into our game bundle template
|
||||
cp -R packaging/osx/OpenRA.app .
|
||||
cp -R $GAME_FILES OpenRA.app/Contents/Resources/
|
||||
cd ../../../../../
|
||||
cp -R $GAME_FILES ${BUILD_DIR}OpenRA.app/Contents/Resources/
|
||||
copy_mods
|
||||
cd $BUILD_DIR
|
||||
|
||||
# Copy frameworks into our game bundle template
|
||||
mkdir OpenRA.app/Contents/Frameworks/
|
||||
patch_mono OpenRA.app/Contents/Resources/OpenRA
|
||||
|
||||
# The dylibs referenced by dll.configs in the gac don't show up to otool: patch them manually
|
||||
Reference in New Issue
Block a user