From e66875865ff81ee9f32b92e4d1ece33ff13bb8fd Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 13 Nov 2018 16:08:29 +0100 Subject: Make Cura app name configurable in CuraVersion --- cura_app.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cura_app.py') 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() -- cgit v1.2.3