mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 16:40:59 +00:00
1127bdb65c
The actual port is SeriousSamClassic, but only The First Encounter is built and installed. It should be relatively easy to also build and install The Second Encounter from this port in the future.
36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jelle Raaijmakers <jelle@gmta.nl>
|
|
Date: Sun, 30 Apr 2023 16:53:57 +0200
|
|
Subject: [PATCH] Engine: Support running from `/usr/local`
|
|
|
|
A lot of logic is hardcoded to `/usr`, so we push it in the right
|
|
direction to allow it to run from `/usr/local` instead.
|
|
---
|
|
SamTFE/Sources/Engine/Engine.cpp | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/SamTFE/Sources/Engine/Engine.cpp b/SamTFE/Sources/Engine/Engine.cpp
|
|
index f3e2ebe155439cef2a5860201665839fc2cc09c3..0bf86cc57563ef5f44e25d97623194f99484060e 100644
|
|
--- a/SamTFE/Sources/Engine/Engine.cpp
|
|
+++ b/SamTFE/Sources/Engine/Engine.cpp
|
|
@@ -736,7 +736,7 @@ ENGINE_API void SE_InitEngine(CTString strGameID)
|
|
CPrintF(TRANSV("Running %d-bit version\n"), sys_iGameBits);
|
|
|
|
#ifdef PLATFORM_UNIX
|
|
- int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/bin/", (size_t) 9 );
|
|
+ int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/local/bin/", (size_t) 15 );
|
|
if( _isystempath == 0 ) {
|
|
sys_iSysPath = 1; // using system path
|
|
} else {
|
|
@@ -751,8 +751,8 @@ ENGINE_API void SE_InitEngine(CTString strGameID)
|
|
_fnmModLibPath = "/usr/lib/i386-linux-gnu/" + strGameID + "/";
|
|
} else if( sys_iSysPath == 1 && sys_iGameBits == 64 && _pFileSystem->IsDirectory((const char *) "/usr/lib64")) {
|
|
_fnmModLibPath = "/usr/lib64/" + strGameID + "/";
|
|
- } else if( sys_iSysPath == 1 && sys_iGameBits == 32 && _pFileSystem->IsDirectory((const char *) "/usr/lib")) {
|
|
- _fnmModLibPath = "/usr/lib/" + strGameID + "/";
|
|
+ } else if( sys_iSysPath == 1 && _pFileSystem->IsDirectory((const char *) "/usr/local/lib")) {
|
|
+ _fnmModLibPath = "/usr/local/lib/" + strGameID + "/";
|
|
} else {
|
|
_fnmModLibPath = _fnmApplicationPath;
|
|
}
|