Replace OSX launcher with a native-code version.

- Binary files hosted externally.
- Fixes dialogs hijacking Finder.
- Fixes dock icon being lost when restarting.
- Adds openra:// url handling.
- Adds .orarep file handling.
- Minimum OS X version is now 10.6.
This commit is contained in:
Paul Chote
2015-04-07 23:27:50 +01:00
parent 1a21421217
commit 85cd7308b4
7 changed files with 16 additions and 111 deletions

View File

@@ -1,8 +1,10 @@
#!/bin/bash
# OpenRA packaging script for Mac OSX
if [ $# -ne "4" ]; then
echo "Usage: `basename $0` tag files-dir platform-files-dir outputdir"
LAUNCHER_TAG="osx-launcher-20150412"
if [ $# -ne "3" ]; then
echo "Usage: `basename $0` tag files-dir outputdir"
exit 1
fi
@@ -12,9 +14,12 @@ if [ -e "OpenRA.app" ]; then
exit 2
fi
wget https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/launcher.zip || exit 3
unzip launcher.zip
rm launcher.zip
# Copy the template to build the game package
cp -rv template.app OpenRA.app
cp -rv $2/* $3/* "OpenRA.app/Contents/Resources/" || exit 3
cp -rv $2/* "OpenRA.app/Contents/Resources/" || exit 3
# Remove unused icon
rm OpenRA.app/Contents/Resources/OpenRA.ico
@@ -23,14 +28,14 @@ rm OpenRA.app/Contents/Resources/OpenRA.ico
rm OpenRA.app/Contents/Resources/OpenRA.exe
rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe
# Set version string
sed "s/{DEV_VERSION}/${1}/" OpenRA.app/Contents/Info.plist.template > OpenRA.app/Contents/Info.plist
rm OpenRA.app/Contents/Info.plist.template
# Remove linux cruft
rm Eluant.dll.config.in
# Add a symlink to libgdiplus.dylib to work around an issue in mono 3.8
ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib OpenRA.app/Contents/Resources/libgdiplus.dylib
# Set version string
sed "s/{DEV_VERSION}/${1}/" OpenRA.app/Contents/Info.plist > OpenRA.app/Contents/Info.plist.tmp
mv OpenRA.app/Contents/Info.plist.tmp OpenRA.app/Contents/Info.plist
# Package app bundle into a zip and clean up
zip OpenRA-$1 -r -9 OpenRA.app --quiet --symlinks
mv OpenRA-$1.zip $4
mv OpenRA-$1.zip $3
rm -rf OpenRA.app