Sweeping modifications to synthesis and the package directory structure so that every potential binary is in its own package.

While we're rearranging files, ensure all SVN mime-types are set correctly.

git-svn-id: https://svn.eduke32.com/eduke32@4130 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2013-11-04 03:59:26 +00:00
parent d52889e5db
commit 851e9fc8d1
25 changed files with 100 additions and 59 deletions

View file

@ -14,8 +14,8 @@ clean=veryclean
# the following file paths are relative to $source
targets=( eduke32$exe mapster32$exe )
package=package
not_src_packaged=( $package/ebacktrace1.dll $package/ebacktrace1-64.dll )
package=$top/$source/package/package
not_src_packaged=( package/debug/win32/ebacktrace1.dll package/debug/win64/ebacktrace1-64.dll )
# group that owns the resulting packages
group=dukeworld
@ -25,7 +25,6 @@ dobuild=
# controls resulting package filenames... will support linux later
basename=eduke32
platform=win32
# if the output dir doesn't exist, create it
if [ ! -e $output ]
@ -83,6 +82,47 @@ function verifytargets ()
exit
fi
done
# create the output directory
mkdir -p $output/$date-$head
}
function package_start ()
{
mkdir -p $package
cd $package
cp -R $top/$source/package/common/* ./
}
function package_debug ()
{
cp -R $top/$source/package/debug/${*}/* ./
}
function package_game_lunatic ()
{
# Package some Lunatic test and demo files.
mkdir -p lunatic/test
cp $top/$source/source/lunatic/test.lua lunatic
cp $top/$source/source/lunatic/test/test_{bitar,geom,rotspr}.lua lunatic/test
cp $top/$source/source/lunatic/test/{delmusicsfx,helixspawner}.lua lunatic/test
}
function package_sdk ()
{
cp -R $top/$source/package/sdk/* ./
}
function package_execute ()
{
echo 7z a -mx9 -t7z $output/$date-$head/${*}_$date-$head.7z *
7z a -mx9 -t7z $output/$date-$head/${*}_$date-$head.7z *
cd $top/$source
rm -rf $package
}
if [ $dobuild ]
@ -94,6 +134,9 @@ then
# throw the svn revision into a header. this is ugly.
echo "s_buildRev = \"r$head\";" > source/rev.h
# get the date in the YYYYMMDD format (ex: 20091001)
date=`date +%Y%m%d`
# 32-bit debug
@ -104,11 +147,18 @@ then
# make sure all the targets were produced
verifytargets
# move the targets to $package
echo mv -f eduke32$exe "$package/eduke32.debug$exe"
# package game
package_start
package_debug win32
mv -f eduke32$exe "$package/eduke32.debug$exe"
echo mv -f mapster32$exe "$package/mapster32.debug$exe"
package_execute ${basename}_win32_debug
# package sdk
package_start
package_debug win32
package_sdk
mv -f mapster32$exe "$package/mapster32.debug$exe"
package_execute ${basename}-sdk_win32_debug
# 64-bit debug
@ -120,11 +170,18 @@ then
# make sure all the targets were produced
verifytargets
# move the targets to $package
echo mv -f eduke32$exe "$package/eduke64.debug$exe"
mv -f eduke32$exe "$package/eduke64.debug$exe"
echo mv -f mapster32$exe "$package/mapster64.debug$exe"
mv -f mapster32$exe "$package/mapster64.debug$exe"
# package game
package_start
package_debug win64
mv -f eduke32$exe "$package/eduke32.debug$exe"
package_execute ${basename}_win64_debug
# package sdk
package_start
package_debug win64
package_sdk
mv -f mapster32$exe "$package/mapster32.debug$exe"
package_execute ${basename}-sdk_win64_debug
# 32-bit Lunatic (pre-)release
@ -139,9 +196,11 @@ then
# make sure all the targets were produced
verifytargets
# move the targets to $package
echo mv -f eduke32$exe "$package/leduke32_PREVIEW$exe"
# package game
package_start
package_game_lunatic
mv -f eduke32$exe "$package/leduke32_PREVIEW$exe"
package_execute l${basename}-lunatic-PREVIEW_win32
fi
@ -154,11 +213,16 @@ then
# make sure all the targets were produced
verifytargets
# move the targets to $package
echo mv -f eduke32$exe "$package/eduke32$exe"
# package game
package_start
mv -f eduke32$exe "$package/eduke32$exe"
echo mv -f mapster32$exe "$package/mapster32$exe"
package_execute ${basename}_win32
# package sdk
package_start
package_sdk
mv -f mapster32$exe "$package/mapster32$exe"
package_execute ${basename}-sdk_win32
# 64-bit release
@ -170,42 +234,19 @@ then
# make sure all the targets were produced
verifytargets
# move the targets to $package
echo mv -f eduke32$exe "$package/eduke64$exe"
mv -f eduke32$exe "$package/eduke64$exe"
echo mv -f mapster32$exe "$package/mapster64$exe"
mv -f mapster32$exe "$package/mapster64$exe"
# package game
package_start
mv -f eduke32$exe "$package/eduke32$exe"
package_execute ${basename}_win64
# package sdk
package_start
package_sdk
mv -f mapster32$exe "$package/mapster32$exe"
package_execute ${basename}-sdk_win64
# get the date in the YYYYMMDD format (ex: 20091001)
date=`date +%Y%m%d`
# create the output directory
mkdir $output/$date-$head
# package the binary snapshot
cd $package
# Package some Lunatic test and demo files.
if [ -n "$BUILD_LUNATIC" ]; then
mkdir -p lunatic/test
cp $top/$source/source/lunatic/test.lua lunatic
cp $top/$source/source/lunatic/test/test_{bitar,geom,rotspr}.lua lunatic/test
cp $top/$source/source/lunatic/test/{delmusicsfx,helixspawner}.lua lunatic/test
fi
echo 7z a -mx9 -t7z $output/$date-$head/${basename}_${platform}_$date-$head.7z *
7z a -mx9 -t7z $output/$date-$head/${basename}_${platform}_$date-$head.7z *
# Remove the packaged Lunatic test/demo files.
if [ -n "$BUILD_LUNATIC" ]; then
rm lunatic/test/*.lua lunatic/test.lua
rmdir lunatic/test
rmdir lunatic
fi
cd $top/$source
# clean up
# hack to restore [e]obj/keep.me
echo svn update -r $head
@ -247,7 +288,7 @@ then
chown -R :$group $output/$date-$head
# link eduke32_latest.zip to the new archive
ln -sf $output/$date-$head/${basename}_${platform}_$date-$head.7z $output/eduke32_latest.7z
ln -sf $output/$date-$head/${basename}_win32_$date-$head.7z $output/eduke32_latest.7z
rm -f $lockfile
else