From 623feabe13888b03c7a787a61b758bf284b7ae17 Mon Sep 17 00:00:00 2001 From: Matthias Sweertvaegher <178714+mx1up@users.noreply.github.com> Date: Wed, 9 Sep 2020 15:06:18 +0200 Subject: [PATCH] make config usable in production env use QTSCRCPY_DEV_ENV flag to preset env vars only in dev env --- QtScrcpy/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/QtScrcpy/main.cpp b/QtScrcpy/main.cpp index 890ee43..822ace4 100644 --- a/QtScrcpy/main.cpp +++ b/QtScrcpy/main.cpp @@ -23,6 +23,7 @@ QtMsgType covertLogLevel(const QString &logLevel); int main(int argc, char *argv[]) { // set env +#ifdef QTSCRCPY_DEV_ENV #ifdef Q_OS_WIN32 qputenv("QTSCRCPY_ADB_PATH", "../../../../third_party/adb/win/adb.exe"); qputenv("QTSCRCPY_SERVER_PATH", "../../../../third_party/scrcpy-server"); @@ -39,6 +40,7 @@ int main(int argc, char *argv[]) qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server"); qputenv("QTSCRCPY_CONFIG_PATH", "../../../config"); qputenv("QTSCRCPY_KEYMAP_PATH", "../../../keymap"); +#endif #endif g_msgType = covertLogLevel(Config::getInstance().getLogLevel());