diff --git a/go/cmd/updater/launcher_linux.go b/go/cmd/updater/launcher_linux.go index d9ad958..8bfe774 100644 --- a/go/cmd/updater/launcher_linux.go +++ b/go/cmd/updater/launcher_linux.go @@ -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.