make config usable in production env

use QTSCRCPY_DEV_ENV flag to preset env vars only in dev env
This commit is contained in:
Matthias Sweertvaegher 2020-09-09 15:06:18 +02:00
parent d45c9b03f4
commit 623feabe13

View file

@ -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());