Actually remove the mdb files, and simplify calling syntax
This commit is contained in:
@@ -1,37 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenRA master packaging script
|
# OpenRA master packaging script
|
||||||
|
|
||||||
if [ $# -ne "3" ]; then
|
if [ $# -ne "2" ]; then
|
||||||
echo "Usage: `basename $0` tag srcdir outputdir"
|
echo "Usage: `basename $0` version outputdir"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VERSION=`echo $1 | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
# Resolve the absolute source path from the location of this script
|
||||||
SRCDIR=$2
|
SRCDIR=$(readlink -f $(dirname $0)/../)
|
||||||
PACKAGEDIR=$3
|
|
||||||
BUILTDIR="${SRCDIR}/packaging/built"
|
BUILTDIR="${SRCDIR}/packaging/built"
|
||||||
|
VERSION=`echo $1 | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||||
|
OUTPUTDIR=$(readlink -f $2)
|
||||||
|
|
||||||
# Build the code and push the files into a clean dir
|
# Build the code and push the files into a clean dir
|
||||||
cd "$SRCDIR"
|
cd "$SRCDIR"
|
||||||
echo $1 > VERSION
|
|
||||||
make game editor
|
|
||||||
mkdir packaging/built
|
mkdir packaging/built
|
||||||
mkdir packaging/built/mods
|
mkdir packaging/built/mods
|
||||||
|
echo $1 > VERSION
|
||||||
|
make game editor
|
||||||
|
|
||||||
|
# Remove the mdb files that are created during `make`
|
||||||
|
find . -path "*.mdb" -delete
|
||||||
|
|
||||||
# List of files that are packaged on all platforms
|
# List of files that are packaged on all platforms
|
||||||
# Note that the Tao dlls are shipped on all platforms except osx
|
# Note that the Tao dlls are shipped on all platforms except osx and that
|
||||||
# and that they are now installed to the game directory instead of being placed in the gac
|
# they are now installed to the game directory instead of placed in the gac
|
||||||
FILES="OpenRA.Game.exe OpenRA.Editor.exe OpenRA.Gl.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf shaders mods/ra mods/cnc VERSION COPYING HACKING INSTALL"
|
FILES="OpenRA.Game.exe OpenRA.Editor.exe OpenRA.Gl.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf shaders mods/ra mods/cnc VERSION COPYING HACKING INSTALL"
|
||||||
|
|
||||||
# Files that match the above patterns, that should be excluded
|
|
||||||
EXCLUDE="*.mdb"
|
|
||||||
|
|
||||||
for i in $FILES; do
|
for i in $FILES; do
|
||||||
cp -R "$i" "packaging/built/$i" || exit 3
|
cp -R "$i" "packaging/built/$i" || exit 3
|
||||||
done
|
done
|
||||||
for i in $EXCLUDE; do
|
|
||||||
find . -path "$i" -delete
|
|
||||||
done
|
|
||||||
|
|
||||||
# Copy Tao
|
# Copy Tao
|
||||||
cp thirdparty/Tao/* packaging/built
|
cp thirdparty/Tao/* packaging/built
|
||||||
@@ -42,33 +40,34 @@ cp thirdparty/WindowsBase.dll packaging/built
|
|||||||
# Copy game icon for windows package
|
# Copy game icon for windows package
|
||||||
cp OpenRA.Game/OpenRA.ico packaging/built
|
cp OpenRA.Game/OpenRA.ico packaging/built
|
||||||
|
|
||||||
# Change into packaging directory and run the platform-dependant packaging in parallel
|
#
|
||||||
|
# Change into packaging directory and run the
|
||||||
|
# platform-dependant packaging in parallel
|
||||||
|
#
|
||||||
cd packaging
|
cd packaging
|
||||||
|
echo "Creating packages..."
|
||||||
|
|
||||||
(
|
(
|
||||||
echo "Building Windows package."
|
|
||||||
cd windows
|
cd windows
|
||||||
makensis -DSRCDIR="$BUILTDIR" OpenRA.nsi &> package.log
|
makensis -DSRCDIR="$BUILTDIR" OpenRA.nsi &> package.log
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
mv OpenRA.exe "$PACKAGEDIR"/OpenRA-$VERSION.exe
|
mv OpenRA.exe "$OUTPUTDIR"/OpenRA-$VERSION.exe
|
||||||
else
|
else
|
||||||
echo "Windows package build failed, refer to windows/package.log."
|
echo "Windows package build failed, refer to windows/package.log."
|
||||||
fi
|
fi
|
||||||
) &
|
) &
|
||||||
|
|
||||||
(
|
(
|
||||||
echo "Building OSX package."
|
|
||||||
cd osx
|
cd osx
|
||||||
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$PACKAGEDIR" &> package.log
|
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "OSX package build failed, refer to osx/package.log."
|
echo "OSX package build failed, refer to osx/package.log."
|
||||||
fi
|
fi
|
||||||
) &
|
) &
|
||||||
|
|
||||||
(
|
(
|
||||||
echo "Building linux packages."
|
|
||||||
cd linux
|
cd linux
|
||||||
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$PACKAGEDIR" &> package.log
|
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "linux package build failed, refer to linux/package.log."
|
echo "linux package build failed, refer to linux/package.log."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user