We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca491d5 commit a6b6af4Copy full SHA for a6b6af4
main/dod3.py
@@ -11,10 +11,12 @@
11
12
def getResourcePath(filename):
13
""" Get absolute path to resource, works for dev and for PyInstaller """
14
- if hasattr(sys, '_MEIPASS'):
15
- return os.path.join(sys._MEIPASS, filename)
+ if getattr(sys, 'frozen', False):
+ application_path = os.path.dirname(sys.executable)
16
+ elif __file__:
17
+ application_path = os.path.dirname(__file__)
18
- rootPath = os.path.dirname(__file__)
19
+ rootPath = os.path.dirname(application_path)
20
return os.path.join(rootPath, filename)
21
22
class Game:
0 commit comments