Some cleanup to shell tests.
This commit is contained in:
@@ -63,8 +63,8 @@ class App(QtCore.QObject):
|
|||||||
log.addHandler(handler)
|
log.addHandler(handler)
|
||||||
|
|
||||||
## Version
|
## Version
|
||||||
version = 8.4
|
version = 8.5
|
||||||
version_date = "2015/10"
|
version_date = "2016/7"
|
||||||
|
|
||||||
## URL for update checks and statistics
|
## URL for update checks and statistics
|
||||||
version_url = "http://flatcam.org/version"
|
version_url = "http://flatcam.org/version"
|
||||||
@@ -129,6 +129,7 @@ class App(QtCore.QObject):
|
|||||||
### OS-specific ###
|
### OS-specific ###
|
||||||
###################
|
###################
|
||||||
|
|
||||||
|
# Folder for user settings.
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
from win32com.shell import shell, shellcon
|
from win32com.shell import shell, shellcon
|
||||||
App.log.debug("Win32!")
|
App.log.debug("Win32!")
|
||||||
@@ -168,8 +169,11 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# Application directory. Chdir to it. Otherwise, trying to load
|
# Application directory. Chdir to it. Otherwise, trying to load
|
||||||
# GUI icons will fail as thir path is relative.
|
# GUI icons will fail as thir path is relative.
|
||||||
# This will fail under cx_freeze ...
|
if hasattr(sys, "frozen"):
|
||||||
self.app_home = os.path.dirname(os.path.realpath(__file__))
|
# For cx_freeze and sililar.
|
||||||
|
self.app_home = os.path.dirname(sys.executable)
|
||||||
|
else:
|
||||||
|
self.app_home = os.path.dirname(os.path.realpath(__file__))
|
||||||
App.log.debug("Application path is " + self.app_home)
|
App.log.debug("Application path is " + self.app_home)
|
||||||
App.log.debug("Started in " + os.getcwd())
|
App.log.debug("Started in " + os.getcwd())
|
||||||
os.chdir(self.app_home)
|
os.chdir(self.app_home)
|
||||||
|
|||||||
Reference in New Issue
Block a user