Remove OpenRA.PostProcess.exe.

The LAA flag is now set when packaging
Windows release installers.
This commit is contained in:
Paul Chote
2020-05-02 14:51:38 +01:00
committed by abcdefg30
parent 90815ace59
commit 2abd137494
7 changed files with 11 additions and 86 deletions

View File

@@ -0,0 +1,36 @@
#region Copyright & License Information
/*
* Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.IO;
using System.Linq;
namespace OpenRA.PostProcess
{
class Program
{
static void Main(string[] args)
{
var assembly = args.First();
var flags = args.Skip(1).ToArray();
Console.WriteLine("Post-processing {0}", assembly);
var data = File.ReadAllBytes(assembly);
var peOffset = BitConverter.ToInt32(data, 0x3c);
// Set /LARGEADDRESSAWARE Flag (Application can handle large (>2GB) addresses)
Console.WriteLine(" - Enabling /LARGEADDRESSAWARE");
data[peOffset + 4 + 18] |= 0x20;
File.WriteAllBytes(args[0], data);
}
}
}

View File

@@ -32,7 +32,14 @@ function makelauncher()
sed "s|DISPLAY_NAME|$2|" WindowsLauncher.cs.in | sed "s|MOD_ID|$3|" | sed "s|FAQ_URL|${FAQ_URL}|" > WindowsLauncher.cs
csc WindowsLauncher.cs -warn:4 -warnaserror -platform:"$5" -out:"$1" -t:winexe ${LAUNCHER_LIBS} -win32icon:"$4"
rm WindowsLauncher.cs
mono "${SRCDIR}/OpenRA.PostProcess.exe" "$1" -LAA > /dev/null
if [ "$5" = "x86" ]; then
# Enable the full 4GB address space for the 32 bit game executable
# The server and utility do not use enough memory to need this
csc MakeLAA.cs -warn:4 -warnaserror -out:"MakeLAA.exe"
mono "MakeLAA.exe" "$1"
rm MakeLAA.exe
fi
}
function build_platform()