mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2026-01-07 05:39:13 +08:00
feat: Try to load the libs from the system libs first
This commit is contained in:
parent
bf6ebb00fd
commit
e76961c2c8
@ -19,8 +19,21 @@ func Launcher() {
|
||||
|
||||
cmd := exec.Command("./nekoray", flag.Args()...)
|
||||
|
||||
ld_env := "LD_LIBRARY_PATH=" + filepath.Join(wd, "./usr/lib")
|
||||
qt_plugin_env := "QT_PLUGIN_PATH=" + filepath.Join(wd, "./usr/plugins")
|
||||
system_ld_env := os.Getenv("LD_LIBRARY_PATH")
|
||||
ld_env := "LD_LIBRARY_PATH="
|
||||
if len(system_ld_env) != 0 {
|
||||
ld_env += system_ld_env + ":"
|
||||
}
|
||||
ld_env += "/lib:/usr/lib:/lib64:/usr/lib/x86_64:/usr/local/Qt:/opt/Qt"
|
||||
ld_env += filepath.Join(wd, "./usr/lib")
|
||||
|
||||
system_qt_plugin_env := os.Getenv("QT_PLUGIN_PATH")
|
||||
qt_plugin_env := "QT_PLUGIN_PATH="
|
||||
if system_qt_plugin_env != "" {
|
||||
qt_plugin_env += system_qt_plugin_env + ":"
|
||||
}
|
||||
qt_plugin_env += "/usr/lib/qt6/plugins:/usr/lib/x86_64-linux-gnu/qt6/plugins:/usr/lib64/qt6/plugins:/usr/lib/qt/plugins:/usr/lib64/qt/plugins:"
|
||||
qt_plugin_env += filepath.Join(wd, "./usr/plugins")
|
||||
|
||||
// Qt 5.12 abi is usually compatible with system Qt 5.15
|
||||
// But use package Qt 5.12 by default.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user