From 0444b901bb52982700401dd353acba5df287faa6 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 26 Sep 2019 21:49:58 +0300 Subject: [PATCH] - fixed issue when rebooting from within in cx_freezed state (it issued a startup arg with the path to FlatCAM.exe but that triggered the last sys.exit(2) that I had in the App.args_at_startup()) - modified - modified the make_win script for the presence of MatPlotLib - removed as it was unnecessary --- FlatCAMApp.py | 8 ++++++-- make_win.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index e1dedc9a..52b0d349 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -2767,8 +2767,12 @@ class App(QtCore.QObject): # if it reached here without already returning then the app was registered with a file that it does not # recognize therefore we must quit but take into consideration the app reboot from within, in that case # the args_to_process will contain the path to the FlatCAM.exe (cx_freezed executable) - if 'FlatCAM' not in args_to_process: - sys.exit(2) + + for arg in args_to_process: + if 'FlatCAM.exe' in arg: + continue + else: + sys.exit(2) def set_ui_title(self, name): """ diff --git a/make_win.py b/make_win.py index 444d7c85..60fdc737 100644 --- a/make_win.py +++ b/make_win.py @@ -45,7 +45,7 @@ include_files.append((os.path.join(site_dir, "svg/path"), "svg")) include_files.append((os.path.join(site_dir, "vispy"), "vispy")) include_files.append((os.path.join(site_dir, "vispy/app"), "vispy/app")) include_files.append((os.path.join(site_dir, "vispy/app/backends"), "vispy/app/backends")) -include_files.append((os.path.join(site_dir, "matplotlib"), "matplotlib")) +# include_files.append((os.path.join(site_dir, "matplotlib"), "matplotlib")) include_files.append((os.path.join(site_dir, "rtree"), "rtree")) if platform.architecture()[0] == '64bit':