Move Windows launcher compilation to packaging scripts.

This commit is contained in:
Paul Chote
2017-03-13 09:47:22 +00:00
parent 35249c1faf
commit 005b4166cc
8 changed files with 23 additions and 80 deletions

View File

@@ -5,6 +5,20 @@ BUILTDIR="$2"
SRCDIR="$3"
OUTPUTDIR="$4"
LAUNCHER_LIBS="-r:System.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:${BUILTDIR}/OpenRA.Game.exe"
FAQ_URL="http://wiki.openra.net/FAQ"
function makelauncher()
{
sed "s|DISPLAY_NAME|$2|" WindowsLauncher.cs.in | sed "s|MOD_ID|$3|" | sed "s|FAQ_URL|${FAQ_URL}|" > WindowsLauncher.cs
mcs -sdk:4.5 WindowsLauncher.cs -warn:4 -codepage:utf8 -warnaserror -out:"$1" -t:winexe ${LAUNCHER_LIBS} -win32icon:"$4"
rm WindowsLauncher.cs
mono ${SRCDIR}/fixheader.exe $1 > /dev/null
}
echo "Compiling Windows launcher"
makelauncher ${BUILTDIR}/OpenRA.exe "OpenRA" "" OpenRA.ico
if [ -x /usr/bin/makensis ]; then
echo "Building Windows setup.exe"
makensis -V2 -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/download/windows" OpenRA.nsi