From 83c9e9e6ddce0328d52e6c685e387e8527b3e3ae Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 9 Oct 2010 01:35:40 +1300 Subject: [PATCH] A few fixes when running package scripts under debian. --- packaging/linux/deb/buildpackage.sh | 6 ++---- packaging/linux/openra | 3 +++ packaging/osx/buildpackage.sh | 7 +++++-- packaging/package-all.sh | 11 ++++------- 4 files changed, 14 insertions(+), 13 deletions(-) create mode 100755 packaging/linux/openra diff --git a/packaging/linux/deb/buildpackage.sh b/packaging/linux/deb/buildpackage.sh index dc791be872..450d710382 100755 --- a/packaging/linux/deb/buildpackage.sh +++ b/packaging/linux/deb/buildpackage.sh @@ -7,11 +7,9 @@ then exit $E_BADARGS fi VERSION=$1 +PACKAGE_SIZE=`du --apparent-size -c $2/usr | grep "total" | awk '{print $1}'` -# HACK: bsd du doesn't like --apparant-size; remember to add back when running on debian -PACKAGE_SIZE=`du -c $2/usr | grep "total" | awk '{print $1}'` - -# Copy our two needed folders to a clean package directory (yes, this is needed) +# Copy template files into a clean build directory (required) mkdir root cp -R DEBIAN root cp -R $2/usr root diff --git a/packaging/linux/openra b/packaging/linux/openra new file mode 100755 index 0000000000..7a862c550a --- /dev/null +++ b/packaging/linux/openra @@ -0,0 +1,3 @@ +#!/bin/sh +cd /usr/share/openra +mono /usr/share/openra/OpenRA.Game.exe SupportDir=~/.openra "$@" \ No newline at end of file diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh index 6980233742..aff50cab4d 100755 --- a/packaging/osx/buildpackage.sh +++ b/packaging/osx/buildpackage.sh @@ -15,12 +15,15 @@ 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 -cp -R "$2/" "OpenRA.app/Contents/Resources/" || exit 3 +cp -rv $2/* "OpenRA.app/Contents/Resources/" || exit 3 -# Remove the tao and WindowsBase dlls (which are shipped with the deps package) +# Remove the tao and WindowsBase dlls (they are shipped in the deps package) rm OpenRA.app/Contents/Resources/Tao.* rm OpenRA.app/Contents/Resources/WindowsBase.dll + +# Icon isn't used, and editor doesn't work under mono 2.8 rm OpenRA.app/Contents/Resources/OpenRA.ico +rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe # Package app bundle into a zip and clean up zip OpenRA-$1 -r -9 OpenRA.app diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 2883074d7d..263e21f34f 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -45,7 +45,6 @@ cp OpenRA.Game/OpenRA.ico packaging/built # Change into packaging directory and run the platform-dependant packaging in parallel cd packaging -# ####### Windows ####### ( echo "Building Windows package." cd windows @@ -53,27 +52,25 @@ cd packaging if [ $? -eq 0 ]; then mv OpenRA.exe "$PACKAGEDIR"/OpenRA-$VERSION.exe else - echo "Windows package build failed, refer to $PWD/package.log." + echo "Windows package build failed, refer to windows/package.log." fi ) & -####### OSX ####### ( echo "Building OSX package." cd osx sh buildpackage.sh "$VERSION" "$BUILTDIR" "$PACKAGEDIR" &> package.log if [ $? -ne 0 ]; then - echo "OSX package build failed, refer to $PWD/package.log." + echo "OSX package build failed, refer to osx/package.log." fi ) & -####### Linux ####### ( - echo "Building linux common." + echo "Building linux packages." cd linux sh buildpackage.sh "$VERSION" "$BUILTDIR" "$PACKAGEDIR" &> package.log if [ $? -ne 0 ]; then - echo "linux package build failed, refer to $PWD/package.log." + echo "linux package build failed, refer to linux/package.log." fi ) & wait