mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Using UM.Platform for Windows detection
The diff says everything.
This commit is contained in:
parent
0d8292df49
commit
f11ef0c0c0
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,6 @@
|
||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
#WORKAROUND: GITHUB-704 GITHUB-708
|
#WORKAROUND: GITHUB-704 GITHUB-708
|
||||||
|
@ -34,9 +33,10 @@ sys.excepthook = exceptHook
|
||||||
# first seems to prevent Sip from going into a state where it
|
# first seems to prevent Sip from going into a state where it
|
||||||
# tries to create PyQt objects on a non-main thread.
|
# tries to create PyQt objects on a non-main thread.
|
||||||
import Arcus #@UnusedImport
|
import Arcus #@UnusedImport
|
||||||
|
from UM.Platform import Platform
|
||||||
import cura.CuraApplication
|
import cura.CuraApplication
|
||||||
|
|
||||||
if platform.system() == "Windows" and hasattr(sys, "frozen"):
|
if Platform.isWindows() and hasattr(sys, "frozen"):
|
||||||
dirpath = os.path.expanduser("~/AppData/Local/cura/")
|
dirpath = os.path.expanduser("~/AppData/Local/cura/")
|
||||||
os.makedirs(dirpath, exist_ok = True)
|
os.makedirs(dirpath, exist_ok = True)
|
||||||
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
|
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue