Update osx packaging script

This commit is contained in:
pchote
2010-02-19 19:41:18 +13:00
parent ea6dbfc092
commit 86925888e2
4 changed files with 24 additions and 16 deletions

View File

@@ -1,12 +0,0 @@
<?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">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>OpenRa Server</string>
<key>CFBundleExecutable</key>
<string>OpenRa Server</string>
<key>CFBundleIconFile</key>
<string>OpenRa.icns</string>
</dict>
</plist>

4
packaging/osx/OpenRA Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`
cd "$APP_PATH/Contents/Resources"
./OpenRA

View File

@@ -1,5 +1,21 @@
#!/bin/sh
macpack -mode:console -n "OpenRa Server" -r OpenRa.FileFormats.dll,packaging/osx/OpenRa.icns OpenRa.Server.exe
cp packaging/osx/Info_server.plist "OpenRa Server.app/Contents/Info.plist"
macpack -mode:winforms -n OpenRA -r OpenRa.FileFormats.dll,OpenRa.Gl.dll,libglfw.dylib,allies.mix,conquer.mix,expand2.mix,general.mix,hires.mix,interior.mix,redalert.mix,russian.mix,snow.mix,sounds.mix,temperat.mix,packaging/osx/settings.ini,line.fx,chrome-shp.fx,chrome-rgba.fx,bogus.sno,bogus.tem,world-shp.fx,tileSet.til,templates.ini,packaging/osx/OpenRa.icns,mods OpenRa.Game.exe
cp packaging/osx/Info_game.plist "OpenRa.app/Contents/Info.plist"
# Set the required environment variables
export AS="as -arch i386"
export CC="gcc -arch i386"
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/
# Package a command-line binary for the server
mkbundle --deps -o OpenRA_Server OpenRA.Server.exe OpenRa.Fileformats.dll
# Create the app bundle for the game
macpack -mode:winforms -n OpenRA -r OpenRa.FileFormats.dll,OpenRa.Gl.dll,libglfw.dylib,thirdparty/Tao/Tao.Glfw.dll,thirdparty/Tao/Tao.Cg.dll,thirdparty/Tao/Tao.OpenGl.dll,thirdparty/Tao/Tao.OpenAl.dll,allies.mix,conquer.mix,expand2.mix,general.mix,hires.mix,interior.mix,redalert.mix,russian.mix,snow.mix,sounds.mix,temperat.mix,packaging/osx/settings.ini,line.fx,chrome-shp.fx,chrome-rgba.fx,bogus.sno,bogus.tem,world-shp.fx,tileSet.til,templates.ini,packaging/osx/OpenRa.icns,mods,maps OpenRa.Game.exe
# Package a new binary with included deps
mkbundle --deps -o OpenRA OpenRa.Game.exe OpenRa.Fileformats.dll
# Modify the app bundle with our custom files
cp packaging/osx/Info.plist OpenRA.app/Contents/
rm OpenRA.app/Contents/Resources/OpenRA.exe
cp OpenRA OpenRA.app/Contents/Resources/
cp packaging/osx/OpenRA OpenRA.app/Contents/MacOS/