aboutsummaryrefslogtreecommitdiff
path: root/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'core.py')
-rw-r--r--core.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/core.py b/core.py
index e4a7a6c..e5a9b70 100644
--- a/core.py
+++ b/core.py
@@ -22,7 +22,13 @@ class Core():
self.dataDir = QDesktopServices.storageLocation(
QDesktopServices.DataLocation)
self.presetDir = os.path.join(self.dataDir, 'presets')
- self.wd = os.path.dirname(os.path.realpath(__file__))
+ if getattr(sys, 'frozen', False):
+ # frozen
+ self.wd = os.path.dirname(sys.executable)
+ else:
+ # unfrozen
+ self.wd = os.path.dirname(os.path.realpath(__file__))
+
self.loadEncoderOptions()
self.videoFormats = Core.appendUppercase([
'*.mp4',