summarylogtreecommitdiffstats
path: root/path-fix.patch
blob: 894f3a397c3dc8d1776195a67d3d78d5b4baaed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/QtScrcpy/main.cpp
+++ b/QtScrcpy/main.cpp
@@ -36,10 +36,10 @@ int main(int argc, char *argv[])
 #endif
 
 #ifdef Q_OS_LINUX
-    qputenv("QTSCRCPY_ADB_PATH", "../../../QtScrcpy/QtScrcpyCore/src/third_party/adb/linux/adb");
-    qputenv("QTSCRCPY_SERVER_PATH", "../../../QtScrcpy/QtScrcpyCore/src/third_party/scrcpy-server");
-    qputenv("QTSCRCPY_KEYMAP_PATH", "../../../keymap");
-    qputenv("QTSCRCPY_CONFIG_PATH", "../../../config");
+    if (!qEnvironmentVariableIsSet("QTSCRCPY_ADB_PATH")) { qputenv("QTSCRCPY_ADB_PATH", "/usr/bin/adb"); }
+    if (!qEnvironmentVariableIsSet("QTSCRCPY_SERVER_PATH")) { qputenv("QTSCRCPY_SERVER_PATH", "/opt/qtscrcpy/scrcpy-server"); }
+    if (!qEnvironmentVariableIsSet("QTSCRCPY_KEYMAP_PATH")) { qputenv("QTSCRCPY_KEYMAP_PATH", "/opt/qtscrcpy/keymap"); }
+    if (!qEnvironmentVariableIsSet("QTSCRCPY_CONFIG_PATH")) { qputenv("QTSCRCPY_CONFIG_PATH", "/etc/qtscrcpy"); }
 #endif
 
     g_msgType = covertLogLevel(Config::getInstance().getLogLevel());