diff options
| author | Yang Liu <numbksco@gmail.com> | 2024-09-04 20:13:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-04 14:13:58 +0200 |
| commit | b34a50b38160d8455763773888130ecc4e18042a (patch) | |
| tree | ff533717e5a1fda7a5b237281b71f545f0b3dba6 | |
| parent | a973c53ea2a728460fbe6f233fd428b6db008aac (diff) | |
| download | box64-b34a50b38160d8455763773888130ecc4e18042a.tar.gz box64-b34a50b38160d8455763773888130ecc4e18042a.zip | |
[X64LIBS] Changed x86/x64 libs install directory to prevent conflicts (#1791)
* [X64LIBS] Changed x86/x64 libs install directory to prevent conflicts * Update pressure_vessel
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | docs/USAGE.md | 2 | ||||
| -rw-r--r-- | docs/box64.pod | 4 | ||||
| -rw-r--r-- | src/core.c | 4 | ||||
| -rw-r--r-- | src/steam.c | 4 |
5 files changed, 11 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a347fd23..96d75235 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1088,7 +1088,7 @@ if(NOT _x86 AND NOT _x86_64) endif() endif() - set(INSTALL_PATH "/usr/lib/x86_64-linux-gnu/") + set(INSTALL_PATH "/usr/lib/box64-x86_64-linux-gnu/") if(NOT NO_LIB_INSTALL) if(NOT TERMUX) install(FILES ${CMAKE_SOURCE_DIR}/x64lib/libstdc++.so.5 DESTINATION ${INSTALL_PATH}) @@ -1125,7 +1125,7 @@ if(NOT _x86 AND NOT _x86_64) endif() endif() if(BOX32) - set(INSTALL_PATH "/usr/lib/i386-linux-gnu/") + set(INSTALL_PATH "/usr/lib/box64-i386-linux-gnu/") if(NOT NO_LIB_INSTALL) if(NOT TERMUX) install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION ${INSTALL_PATH}) diff --git a/docs/USAGE.md b/docs/USAGE.md index 8d14f778..ca25a127 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -30,7 +30,7 @@ Disables Box64 printing its version and build #### BOX64_LD_LIBRARY_PATH * Path to look for x86_64 libraries. Default is current folder and `lib` in current folder. -Also, `/usr/lib/x86_64-linux-gnu` and `/lib/x86_64-linux-gnu` are added if they exist. +Also, `/usr/lib/x86_64-linux-gnu`, `/lib/x86_64-linux-gnu` and `/usr/lib/box64-x86_64-linux-gnu` are added if they exist. #### BOX64_PATH * Path to look for x86_64 executable. Default is current folder and `bin` in current folder. diff --git a/docs/box64.pod b/docs/box64.pod index ae4648b6..2b67c336 100644 --- a/docs/box64.pod +++ b/docs/box64.pod @@ -118,8 +118,8 @@ B<BOX64_LOG> > 1 (may need B<BOX64_SHOWSEGV=1> also) =item B<BOX64_LD_LIBRARY_PATH>=I</path/to/libs> Path to look for x86_64 libraries. Default is current folder and C<lib> in -current folder. Also, F</usr/lib/x86_64-linux-gnu> and -F</lib/x86_64-linux-gnu> are added if they exist. +current folder. Also, F</usr/lib/x86_64-linux-gnu>, +F</lib/x86_64-linux-gnu> and F</usr/lib/box64-x86_64-linux-gnu> are added if they exist. =item B<BOX64_PATH>=I</path/to/bins> diff --git a/src/core.c b/src/core.c index 2fda5c2e..188102a1 100644 --- a/src/core.c +++ b/src/core.c @@ -1505,6 +1505,8 @@ void LoadLDPath(box64context_t *context) AddPath("/usr/lib/i386-linux-gnu", &context->box64_ld_lib, 1); if(FileExist("/usr/i386-linux-gnu/lib", 0)) AddPath("/usr/i386-linux-gnu/lib", &context->box64_ld_lib, 1); + if(FileExist("/usr/lib/box64-i386-linux-gnu", 0)) + AddPath("/usr/lib/box64-i386-linux-gnu", &context->box64_ld_lib, 1); if(FileExist("/data/data/com.termux/files/usr/glibc/lib/i386-linux-gnu", 0)) AddPath("/data/data/com.termux/files/usr/glibc/lib/i386-linux-gnu", &context->box64_ld_lib, 1); #endif @@ -1515,6 +1517,8 @@ void LoadLDPath(box64context_t *context) AddPath("/usr/lib/x86_64-linux-gnu", &context->box64_ld_lib, 1); if(FileExist("/usr/x86_64-linux-gnu/lib", 0)) AddPath("/usr/x86_64-linux-gnu/lib", &context->box64_ld_lib, 1); + if(FileExist("/usr/lib/box64-x86_64-linux-gnu", 0)) + AddPath("/usr/lib/box64-x86_64-linux-gnu", &context->box64_ld_lib, 1); if(FileExist("/data/data/com.termux/files/usr/glibc/lib/x86_64-linux-gnu", 0)) AddPath("/data/data/com.termux/files/usr/glibc/lib/x86_64-linux-gnu", &context->box64_ld_lib, 1); } diff --git a/src/steam.c b/src/steam.c index 52461a31..8859ce05 100644 --- a/src/steam.c +++ b/src/steam.c @@ -39,13 +39,13 @@ void pressure_vessel(int argc, const char** argv, int nextarg, const char* prog) if(is_usr) { // transform RESSURE_VESSEL_APP_LD_LIBRARY_PATH to BOX86_ / BOX64_ LD_LIBRARY_PATH char tmp[strlen(argv[nextarg])+150]; - strcpy(tmp, "BOX86_LD_LIBRARY_PATH=/lib/box86:/usr/lib/box86:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/i686-pc-linux-gnu:/usr/lib32:"); + strcpy(tmp, "BOX86_LD_LIBRARY_PATH=/lib/box86:/usr/lib/box86:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/box64-i386-linux-gnu:/usr/lib/i686-pc-linux-gnu:/usr/lib32:"); strcat(tmp, argv[nextarg]+strlen("--env-if-host=STEAM_RUNTIME_LIBRARY_PATH=")); char *p = strchr(tmp, '='); *p ='\0'; ++p; setenv(tmp, p, 1); printf_log(LOG_DEBUG, "setenv(%s, %s, 1)\n", tmp, p); - strcpy(tmp, "BOX64_LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:"); + strcpy(tmp, "BOX64_LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/box64-x86_64-linux-gnu:"); strcat(tmp, argv[nextarg]+strlen("--env-if-host=STEAM_RUNTIME_LIBRARY_PATH=")); p = strchr(tmp, '='); *p ='\0'; ++p; |