Introduce new OpenRA.exe entrypoint and change OpenRA.Game to a library.

This commit is contained in:
Paul Chote
2020-11-22 11:52:00 +00:00
committed by teinarss
parent 20fe59e844
commit 07a10069db
17 changed files with 130 additions and 63 deletions

View File

@@ -10,8 +10,8 @@
# openra_user="<run server as this user>" (default: openra)
# openra_chdir="<home directory of openra_user>"
# (default: /usr/home/${openra_user})
# openra_path="<path to OpenRA.Game.exe>"
# (default: ${openra_chdir}/OpenRA/OpenRA.Game.exe)
# openra_path="<path to OpenRA.exe>"
# (default: ${openra_chdir}/OpenRA/OpenRA.exe)
# openra_ServerName="<ServerName>" (default: "Dedicated Server")
# openra_Mod="<Mod>" (default: ra)
# openra_ListenPort="<number>" (default: 1234)

View File

@@ -35,7 +35,7 @@ fi
# Run the game
export SDL_VIDEO_X11_WMCLASS="openra-{MODID}-{TAG}"
mono --debug OpenRA.Game.exe Game.Mod={MODID} Engine.LaunchPath="${LAUNCHER}" Engine.LaunchWrapper="${HERE}/restore-environment.sh" "${JOIN_SERVER}" "$@"
mono --debug OpenRA.exe Game.Mod={MODID} Engine.LaunchPath="${LAUNCHER}" Engine.LaunchWrapper="${HERE}/restore-environment.sh" "${JOIN_SERVER}" "$@"
# Show a crash dialog if something went wrong
if [ $? != 0 ] && [ $? != 1 ]; then

View File

@@ -9,7 +9,7 @@ if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
fi
# Run the game
mono {DEBUG} OpenRA.Game.exe Game.Mod={MODID} Engine.LaunchPath="{BIN_DIR}/openra-{MODID}" "${JOIN_SERVER}" "$@"
mono {DEBUG} OpenRA.exe Game.Mod={MODID} Engine.LaunchPath="{BIN_DIR}/openra-{MODID}" "${JOIN_SERVER}" "$@"
# Show a crash dialog if something went wrong
if [ $? != 0 ] && [ $? != 1 ]; then

View File

@@ -238,7 +238,7 @@ static int check_mono_version(const char *version, const char *req_version)
[self exitWithMonoPrompt];
// Default values - can be overriden by setting certain keys Info.plist
NSString *gameName = @"OpenRA.Game.exe";
NSString *gameName = @"OpenRA.exe";
NSString *modId = nil;
NSDictionary *plist = [[NSBundle mainBundle] infoDictionary];

View File

@@ -131,7 +131,7 @@ NSTask *gameTask;
launched = YES;
// Default values - can be overriden by setting certain keys Info.plist
NSString *gameName = @"OpenRA.Game.exe";
NSString *gameName = @"OpenRA.exe";
NSString *modId = nil;
NSDictionary *plist = [[NSBundle mainBundle] infoDictionary];

View File

@@ -18,7 +18,7 @@ SRCDIR="$(pwd)/../.."
BUILTDIR="$(pwd)/build"
ARTWORK_DIR="$(pwd)/../artwork/"
LAUNCHER_LIBS="-r:System.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:${BUILTDIR}/OpenRA.Game.exe"
LAUNCHER_LIBS="-r:System.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:${BUILTDIR}/OpenRA.Game.dll"
FAQ_URL="http://wiki.openra.net/FAQ"
SUFFIX=" (dev)"
@@ -44,7 +44,7 @@ function makelauncher()
# We need to set the loadFromRemoteSources flag for the launcher, but only for the "portable" zip package.
# Windows automatically un-trusts executables that are extracted from a downloaded zip file
cp "${BUILTDIR}/OpenRA.Game.exe.config" "${BUILTDIR}/${LAUNCHER_NAME}.config"
cp "${BUILTDIR}/OpenRA.exe.config" "${BUILTDIR}/${LAUNCHER_NAME}.config"
if [ "${PLATFORM}" = "x86" ]; then
# Enable the full 4GB address space for the 32 bit game executable
@@ -80,7 +80,7 @@ function build_platform()
make install-dependencies "${TARGETPLATFORM}" gameinstalldir="" DESTDIR="${BUILTDIR}"
popd > /dev/null || exit 1
cp "${SRCDIR}/bin/OpenRA.Game.exe.config" "${BUILTDIR}"
cp "${SRCDIR}/bin/OpenRA.exe.config" "${BUILTDIR}"
echo "Compiling Windows launchers (${PLATFORM})"
makelauncher "RedAlert.exe" "Red Alert" "ra" ${PLATFORM}