mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Make Cura app name configurable in CuraVersion
This commit is contained in:
parent
7a577489ae
commit
e66875865f
4 changed files with 13 additions and 5 deletions
11
cura_app.py
11
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue