diff --git a/.gitignore b/.gitignore index b8b1e89c71..b83de51fab 100644 --- a/.gitignore +++ b/.gitignore @@ -12,20 +12,11 @@ mods/*/*.dll # Red Alert binary files mods/*/packages/*.[mM][iI][xX] -# Crap generated by OpenRa -sheet-*.png -log.txt - -*.rep - #binary stuff /*.dll *.pdb *.mdb *.exe -OpenRA -OpenRA.app -*.vqa # backup files by various editors *~ @@ -33,10 +24,8 @@ OpenRA.app # dependency DLLs (different for every platform!) cg.dll cgGL.dll -glfw.dll /OpenRa.Gl.dll -settings.ini #monodevelop *.pidb diff --git a/packaging/osx/package-deps.sh b/packaging/osx/builddeps.sh similarity index 100% rename from packaging/osx/package-deps.sh rename to packaging/osx/builddeps.sh diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh new file mode 100755 index 0000000000..472d857091 --- /dev/null +++ b/packaging/osx/buildpackage.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Files to include in the package +# Specified relative to the build-dir (argument $1) +FILES="OpenRA.Game.exe OpenRA.Gl.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf shaders mods/ra mods/cnc VERSION" + +# Files that match the above patterns, that should be excluded +EXCLUDE="*.mdb" + +if [ $# -ne "2" ]; then + echo "Usage: `basename $0` build-dir version" + exit 1 +fi + +# Dirty build dir; last build failed? +if [ -e "OpenRA.app" ]; then + echo "Error: OpenRA.app already exists" + exit 2 +fi + +# Copy the template to build the game package +# Assumes it is layed out with the correct directory structure +cp -rv template.app OpenRA.app + +for i in $FILES; do + cp -Rv "$1$i" "OpenRA.app/Contents/Resources/$i" || exit 3 +done + +# Delete excluded files +pushd "OpenRA.app/Contents/Resources/" &> /dev/null +for i in $EXCLUDE; do + find . -path "$i" -delete +done +popd &> /dev/null + +# Package app bundle into a zip +zip OpenRA-$2 -r -9 OpenRA.app +rm -rf OpenRA.app +echo "Done!" \ No newline at end of file diff --git a/packaging/osx/dmgsource/.background/bg.png b/packaging/osx/dmgsource/.background/bg.png deleted file mode 100644 index 8eac9f5eba..0000000000 Binary files a/packaging/osx/dmgsource/.background/bg.png and /dev/null differ diff --git a/packaging/osx/osx-dmgbg.xcf b/packaging/osx/osx-dmgbg.xcf deleted file mode 100644 index e2c4caa1cc..0000000000 Binary files a/packaging/osx/osx-dmgbg.xcf and /dev/null differ diff --git a/packaging/osx/package-game.sh b/packaging/osx/package-game.sh deleted file mode 100755 index 6503d609a2..0000000000 --- a/packaging/osx/package-game.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# OpenRA Packaging script for osx -# Packages game files into the launcher app -# previously created by the package-launcher script - -PACKAGING_PATH="$1/osxbuild" -SOURCE_PATH="$1" -BUNDLE_PATH="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 VERSION" -EXCLUDE="*.mdb" - -# 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 "$SOURCE_PATH/$i" "$TARGET_PATH/$i" -done - -# Delete unwanted files -cd $TARGET_PATH -for i in $EXCLUDE; do - find . -path "$i" -delete -done - -cd $PACKAGING_PATH -zip OpenRA-$2 -r -9 OpenRA.app -echo "Done!" diff --git a/packaging/osx/package-local.sh b/packaging/osx/package-local.sh deleted file mode 100755 index 89b5446cc1..0000000000 --- a/packaging/osx/package-local.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 VERSION" -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 - -cd $PACKAGING_PATH -zip OpenRA -r -9 OpenRA.app -echo "Done!" \ No newline at end of file diff --git a/packaging/osx/OpenRA.app/Contents/Info.plist b/packaging/osx/template.app/Contents/Info.plist similarity index 100% rename from packaging/osx/OpenRA.app/Contents/Info.plist rename to packaging/osx/template.app/Contents/Info.plist diff --git a/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA b/packaging/osx/template.app/Contents/MacOS/OpenRA similarity index 100% rename from packaging/osx/OpenRA.app/Contents/MacOS/OpenRA rename to packaging/osx/template.app/Contents/MacOS/OpenRA diff --git a/packaging/osx/OpenRA.app/Contents/MacOS/display_error b/packaging/osx/template.app/Contents/MacOS/display_error similarity index 100% rename from packaging/osx/OpenRA.app/Contents/MacOS/display_error rename to packaging/osx/template.app/Contents/MacOS/display_error diff --git a/packaging/osx/OpenRA.app/Contents/MacOS/download_package b/packaging/osx/template.app/Contents/MacOS/download_package similarity index 100% rename from packaging/osx/OpenRA.app/Contents/MacOS/download_package rename to packaging/osx/template.app/Contents/MacOS/download_package diff --git a/packaging/osx/OpenRA.app/Contents/Resources/OpenRA.Game.exe.config b/packaging/osx/template.app/Contents/Resources/OpenRA.Game.exe.config similarity index 100% rename from packaging/osx/OpenRA.app/Contents/Resources/OpenRA.Game.exe.config rename to packaging/osx/template.app/Contents/Resources/OpenRA.Game.exe.config diff --git a/packaging/osx/OpenRA.app/Contents/Resources/OpenRA.icns b/packaging/osx/template.app/Contents/Resources/OpenRA.icns similarity index 100% rename from packaging/osx/OpenRA.app/Contents/Resources/OpenRA.icns rename to packaging/osx/template.app/Contents/Resources/OpenRA.icns diff --git a/packaging/osx/template.app/Contents/Resources/mods/.gitignore b/packaging/osx/template.app/Contents/Resources/mods/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packaging/package-all.sh b/packaging/package-all.sh index bba46b0870..1cb4eb4b13 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -42,9 +42,9 @@ esac ( msg "\E[34m" "Building OSX package." pushd osx/ &>/dev/null - sh package-game.sh ~/openra-package/$_gitname-build "$VERSION" &> package.log + sh buildpackage.sh /home/openra/openra-package/OpenRA-build "$VERSION" &> package.log if [ $? -eq 0 ]; then - ../uploader.sh mac "$VERSION" ~/openra-package/$_gitname-build/osxbuild/OpenRA-$VERSION.zip "$FTPPATH" "$2" "$3" + ../uploader.sh mac "$VERSION" OpenRA-$VERSION.zip "$FTPPATH" "$2" "$3" else msg "\E[31m" "OSX package build failed, refer to log." fi