Skip to content

Commit

Permalink
fix OSX bug with _MEIPASS location
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Nov 23, 2018
1 parent 7501e69 commit 79f1e97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion spmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import sys
import time
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))


if __name__ == '__main__':
Expand All @@ -24,6 +23,7 @@

if getattr( sys, 'frozen', False ) :
# running in a bundle
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
imgDir = os.path.join(sys._MEIPASS, 'img')

# if linux export qt plugins path
Expand All @@ -32,6 +32,7 @@

else:
# running live
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src'))
imgDir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'img')

from PyQt5.QtWidgets import QApplication
Expand Down
4 changes: 2 additions & 2 deletions src/version.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"number": "0.4.0",
"tag": "a",
"comments": ["v4 update"]
"tag": "b",
"comments": ["OSX fix: sys._MEIPASS in bundle"]
}

0 comments on commit 79f1e97

Please sign in to comment.