mirror of
https://github.com/ptitSeb/box86.git
synced 2024-11-23 01:43:55 +08:00
[X86LIBS] Changed x86 libs install directory to prevent conflicts (#1014)
This commit is contained in:
parent
f921c0cdbe
commit
58f1b5d1e3
@ -808,20 +808,21 @@ if(NOT _x86 AND NOT _x86_64)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/system/box86.box86rc DESTINATION ${TERMUX_PATH}/usr/etc/)
|
||||
endif()
|
||||
endif()
|
||||
set(INSTALL_PATH "/usr/lib/box86-i386-linux-gnu/")
|
||||
if(NOT NO_LIB_INSTALL)
|
||||
if(NOT TERMUX)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libpng12.so.0 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libunwind.so.8 DESTINATION /usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION ${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION ${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION ${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libpng12.so.0 DESTINATION ${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libunwind.so.8 DESTINATION ${INSTALL_PATH})
|
||||
else()
|
||||
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION ${TERMUX_PATH}/usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION ${TERMUX_PATH}/usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION ${TERMUX_PATH}/usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libpng12.so.0 DESTINATION ${TERMUX_PATH}/usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libunwind.so.8 DESTINATION ${TERMUX_PATH}/usr/lib/i386-linux-gnu/)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libpng12.so.0 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libunwind.so.8 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -30,7 +30,7 @@ Disables Box86 printing its version and build
|
||||
|
||||
#### BOX86_LD_LIBRARY_PATH *
|
||||
Path to look for x86 libraries. Default is current folder and `lib` in current folder.
|
||||
Also, `/usr/lib/i386-linux-gnu` and `/lib/i386-linux-gnu` are added if they exist.
|
||||
Also, `/usr/lib/i386-linux-gnu`, `/lib/i386-linux-gnu`, and `/usr/lib/box86-i386-linux-gnu` are added if they exist.
|
||||
|
||||
#### BOX86_PATH *
|
||||
Path to look for x86 executable. Default is current folder and `bin` in current folder.
|
||||
|
10
src/main.c
10
src/main.c
@ -974,6 +974,10 @@ void LoadEnvVars(box86context_t *context)
|
||||
AddPath("/mnt/utmp/codeblocks/usr/lib/i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/mnt/utmp/box86/lib/i386-linux-gnu", 0))
|
||||
AddPath("/mnt/utmp/box86/lib/i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/mnt/utmp/codeblocks/usr/lib/box86-i386-linux-gnu", 0))
|
||||
AddPath("/mnt/utmp/codeblocks/usr/lib/box86-i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/mnt/utmp/box86/lib/box86-i386-linux-gnu", 0))
|
||||
AddPath("/mnt/utmp/box86/lib/box86-i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
//TODO: add relative path to box86 location
|
||||
#endif
|
||||
#ifndef TERMUX
|
||||
@ -991,11 +995,17 @@ void LoadEnvVars(box86context_t *context)
|
||||
AddPath("/usr/lib/i686-pc-linux-gnu", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/usr/lib32", 0))
|
||||
AddPath("/usr/lib32", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/lib/box86-i386-linux-gnu", 0))
|
||||
AddPath("/lib/box86-i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/usr/lib/box86-i386-linux-gnu", 0))
|
||||
AddPath("/usr/lib/box86-i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
#else
|
||||
if(FileExist("/data/data/com.termux/files/usr/lib/i386-linux-gnu", 0))
|
||||
AddPath("/data/data/com.termux/files/usr/lib/i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/data/data/com.termux/files/usr/lib/i686-linux-gnu", 0))
|
||||
AddPath("/data/data/com.termux/files/usr/lib/i686-linux-gnu", &context->box86_ld_lib, 1);
|
||||
if(FileExist("/data/data/com.termux/files/usr/lib/box86-i386-linux-gnu", 0))
|
||||
AddPath("/data/data/com.termux/files/usr/lib/box86-i386-linux-gnu", &context->box86_ld_lib, 1);
|
||||
#endif
|
||||
if(getenv("LD_LIBRARY_PATH"))
|
||||
PrependList(&context->box86_ld_lib, getenv("LD_LIBRARY_PATH"), 1); // in case some of the path are for x86 world
|
||||
|
Loading…
Reference in New Issue
Block a user