From 3de688da298db1e09e16d224414ebfdc5d0a067d Mon Sep 17 00:00:00 2001 From: Wrycu Date: Sat, 18 Jan 2020 11:28:26 -0800 Subject: [PATCH 1/2] fix(payloads): fix for payloads when compiled into an exe --- qt_ui/main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/qt_ui/main.py b/qt_ui/main.py index 7e44d29b..b1778d12 100644 --- a/qt_ui/main.py +++ b/qt_ui/main.py @@ -19,8 +19,17 @@ if __name__ == "__main__": assert len(sys.argv) >= 3, "__init__.py should be started with two mandatory arguments: %UserProfile% location and application version" persistency.setup(sys.argv[1]) + source_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..\\resources\\payloads") + compiled_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..\\resources\\payloads") + the_path = None + if os.path.exists(source_path): + the_path = source_path + else: + the_path = compiled_path + dcs.planes.FlyingType.payload_dirs = [ - os.path.join(os.path.dirname(os.path.realpath(__file__)), "..\\resources\\payloads")] + the_path + ] VERSION_STRING = sys.argv[2] logging_module.setup_version_string(VERSION_STRING) From fcfa785ae9061edfb8e1258ed1d1fa83c7abe301 Mon Sep 17 00:00:00 2001 From: Wrycu Date: Sat, 18 Jan 2020 11:29:16 -0800 Subject: [PATCH 2/2] fix(save): correct openbeta detection --- userdata/persistency.py | 1 - 1 file changed, 1 deletion(-) diff --git a/userdata/persistency.py b/userdata/persistency.py index 818fdced..7b061857 100644 --- a/userdata/persistency.py +++ b/userdata/persistency.py @@ -18,7 +18,6 @@ def base_path() -> str: global _user_folder assert _user_folder - return installation.get_dcs_saved_games_directory() openbeta_path = os.path.join(_user_folder, "DCS.openbeta") if "--force-stable-DCS" not in sys.argv and os.path.exists(openbeta_path): return openbeta_path