From ea11863e352a9113eb7b7217a24e411799aab6cd Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 22 Oct 2022 15:12:02 -0400 Subject: [PATCH 1/2] Change the way we declare root by pyinstaller docs --- main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b6fdd89f..bcfaa94e 100644 --- a/main.py +++ b/main.py @@ -197,8 +197,15 @@ if __name__ == "__main__": if not controller.check_system_user(): controller.add_system_user() - project_root = os.path.dirname(__file__) - controller.set_project_root(project_root) + if getattr(sys, "frozen", False): + # If the application is run as a bundle, the PyInstaller bootloader + # extends the sys module by a flag frozen=True and sets the app + # path into variable _MEIPASS'. + application_path = sys._MEIPASS + else: + application_path = os.path.dirname(os.path.abspath(__file__)) + + controller.set_project_root(application_path) controller.clear_unexecuted_commands() controller.clear_support_status() From a85c44989d3444ab78eff04e6277e2ea4b547ba9 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Sat, 22 Oct 2022 20:56:49 +0100 Subject: [PATCH 2/2] Update changelog !491 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c9df52..8a9b4f6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Add timeout to socket for servers with incorrect port selection ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/482)) - Fix server_stats db file when deleting server ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/486)) - Fix "cannot render after finish" from backup_now ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/489)) +- Fix Support Logs on windows by changing the way we declare projects working directory ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/491)) ### Tweaks - Fix sidebar to not move when scrolling ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/481)) - Add the rest of CSS predefined colors to themes ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/477))