Skip to content

Commit c790db8

Browse files
pchotechrisforbes
authored andcommitted
Fix and bulletproof osx packaging script; cleanup some obsolete .gitignore entries
1 parent d6dd392 commit c790db8

File tree

15 files changed

+41
-76
lines changed

15 files changed

+41
-76
lines changed

.gitignore

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,20 @@ mods/*/*.dll
1212
# Red Alert binary files
1313
mods/*/packages/*.[mM][iI][xX]
1414

15-
# Crap generated by OpenRa
16-
sheet-*.png
17-
log.txt
18-
19-
*.rep
20-
2115
#binary stuff
2216
/*.dll
2317
*.pdb
2418
*.mdb
2519
*.exe
26-
OpenRA
27-
OpenRA.app
28-
*.vqa
2920

3021
# backup files by various editors
3122
*~
3223
*.orig
3324
# dependency DLLs (different for every platform!)
3425
cg.dll
3526
cgGL.dll
36-
glfw.dll
3727

3828
/OpenRa.Gl.dll
39-
settings.ini
4029

4130
#monodevelop
4231
*.pidb
File renamed without changes.

packaging/osx/buildpackage.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
# Files to include in the package
4+
# Specified relative to the build-dir (argument $1)
5+
FILES="OpenRA.Game.exe OpenRA.Gl.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf shaders mods/ra mods/cnc VERSION"
6+
7+
# Files that match the above patterns, that should be excluded
8+
EXCLUDE="*.mdb"
9+
10+
if [ $# -ne "2" ]; then
11+
echo "Usage: `basename $0` build-dir version"
12+
exit 1
13+
fi
14+
15+
# Dirty build dir; last build failed?
16+
if [ -e "OpenRA.app" ]; then
17+
echo "Error: OpenRA.app already exists"
18+
exit 2
19+
fi
20+
21+
# Copy the template to build the game package
22+
# Assumes it is layed out with the correct directory structure
23+
cp -rv template.app OpenRA.app
24+
25+
for i in $FILES; do
26+
cp -Rv "$1$i" "OpenRA.app/Contents/Resources/$i" || exit 3
27+
done
28+
29+
# Delete excluded files
30+
pushd "OpenRA.app/Contents/Resources/" &> /dev/null
31+
for i in $EXCLUDE; do
32+
find . -path "$i" -delete
33+
done
34+
popd &> /dev/null
35+
36+
# Package app bundle into a zip
37+
zip OpenRA-$2 -r -9 OpenRA.app
38+
rm -rf OpenRA.app
39+
echo "Done!"
-71.9 KB
Binary file not shown.

packaging/osx/osx-dmgbg.xcf

-456 KB
Binary file not shown.

packaging/osx/package-game.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

packaging/osx/package-local.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

packaging/osx/template.app/Contents/Resources/mods/.gitignore

Whitespace-only changes.

packaging/package-all.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ esac
4242
(
4343
msg "\E[34m" "Building OSX package."
4444
pushd osx/ &>/dev/null
45-
sh package-game.sh ~/openra-package/$_gitname-build "$VERSION" &> package.log
45+
sh buildpackage.sh /home/openra/openra-package/OpenRA-build "$VERSION" &> package.log
4646
if [ $? -eq 0 ]; then
47-
../uploader.sh mac "$VERSION" ~/openra-package/$_gitname-build/osxbuild/OpenRA-$VERSION.zip "$FTPPATH" "$2" "$3"
47+
../uploader.sh mac "$VERSION" OpenRA-$VERSION.zip "$FTPPATH" "$2" "$3"
4848
else
4949
msg "\E[31m" "OSX package build failed, refer to log."
5050
fi

0 commit comments

Comments
 (0)