diff options
author | fieldOfView <aldo@fieldofview.com> | 2018-11-13 18:08:29 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2018-11-13 18:08:29 +0300 |
commit | e66875865ff81ee9f32b92e4d1ece33ff13bb8fd (patch) | |
tree | 01ada3f9b0700a4d031fd8d914e034325e11619f /cura_app.py | |
parent | 7a577489ae1073a135edfd8f0162e90d1dd88c19 (diff) |
Make Cura app name configurable in CuraVersion
Diffstat (limited to 'cura_app.py')
-rwxr-xr-x | cura_app.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cura_app.py b/cura_app.py index 164e32e738..fea47e5a8b 100755 --- a/cura_app.py +++ b/cura_app.py @@ -26,13 +26,18 @@ parser.add_argument("--trigger-early-crash", known_args = vars(parser.parse_known_args()[0]) if not known_args["debug"]: + try: + from cura.CuraVersion import CuraAppName # type: ignore + except ImportError: + CuraAppName = "cura" + def get_cura_dir_path(): if Platform.isWindows(): - return os.path.expanduser("~/AppData/Roaming/cura") + return os.path.expanduser("~/AppData/Roaming/" + CuraAppName) elif Platform.isLinux(): - return os.path.expanduser("~/.local/share/cura") + return os.path.expanduser("~/.local/share/" + CuraAppName) elif Platform.isOSX(): - return os.path.expanduser("~/Library/Logs/cura") + return os.path.expanduser("~/Library/Logs/" + CuraAppName) if hasattr(sys, "frozen"): dirpath = get_cura_dir_path() |