diff --git a/packaging/osx/Info_game.plist b/packaging/osx/Info.plist similarity index 100% rename from packaging/osx/Info_game.plist rename to packaging/osx/Info.plist diff --git a/packaging/osx/Info_server.plist b/packaging/osx/Info_server.plist deleted file mode 100644 index 5e2e020941..0000000000 --- a/packaging/osx/Info_server.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - CFBundleIdentifier - OpenRa Server - CFBundleExecutable - OpenRa Server - CFBundleIconFile - OpenRa.icns - - diff --git a/packaging/osx/OpenRA b/packaging/osx/OpenRA new file mode 100755 index 0000000000..bcb9d150a2 --- /dev/null +++ b/packaging/osx/OpenRA @@ -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 diff --git a/packaging/osx/package.sh b/packaging/osx/package.sh index fc6299f44f..5b395d0860 100755 --- a/packaging/osx/package.sh +++ b/packaging/osx/package.sh @@ -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/ \ No newline at end of file