forked from OpenRA/OpenRA
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a local packaging script for osx
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# OpenRA Packaging script for osx | ||
# Packages game files into the launcher app | ||
# previously created by the package-launcher script | ||
|
||
PWD=`pwd` | ||
PACKAGING_PATH="$PWD/osxbuild" | ||
SOURCE_PATH="$PWD/." | ||
BUNDLE_PATH="$SOURCE_PATH/packaging/osx/OpenRA.app" | ||
TARGET_PATH="$PACKAGING_PATH/OpenRA.app/Contents/Resources" | ||
|
||
FILES="OpenRA.Game.exe OpenRA.Gl.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf shaders mods/ra mods/cnc" | ||
EXCLUDE="*.mdb ./mods/cnc/packages/*.mix ./mods/ra/packages/*.mix ./mods/cnc/packages/*.MIX ./mods/ra/packages/*.MIX" | ||
|
||
# Copy source files into packaging dir | ||
mkdir -p $PACKAGING_PATH | ||
cp -r "$BUNDLE_PATH" "$PACKAGING_PATH/OpenRA.app" | ||
mkdir -p "$TARGET_PATH/mods" | ||
|
||
for i in $FILES; do | ||
cp -R "$i" "$TARGET_PATH/$i" | ||
done | ||
|
||
# Delete unwanted files | ||
cd $TARGET_PATH | ||
for i in $EXCLUDE; do | ||
find . -path "$i" -delete | ||
done | ||
|
||
git describe --tags > "VERSION" | ||
cd $PACKAGING_PATH | ||
zip OpenRA -r -9 OpenRA.app | ||
echo "Done!" |