Skip to content

Commit

Permalink
Changed resource path
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffenhir committed Apr 6, 2023
1 parent 08e0e07 commit 4692a85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions graxpert/help_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """

if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
base_path = path.abspath(path.dirname(__file__))
else:
base_path = path.abspath(path.join(path.dirname(__file__), "../"))
base_path = path.abspath(path.join(path.dirname(__file__), "../"))

return path.join(base_path, relative_path)

Expand Down
6 changes: 1 addition & 5 deletions graxpert/loadingframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@

def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """

if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
base_path = path.abspath(path.dirname(__file__))
else:
base_path = path.abspath(path.join(path.dirname(__file__), "../"))
base_path = path.abspath(path.join(path.dirname(__file__), "../"))

return path.join(base_path, relative_path)

Expand Down
6 changes: 1 addition & 5 deletions graxpert/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@

def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """

if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
base_path = os.path.abspath(os.path.dirname(__file__))
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))

return os.path.join(base_path, relative_path)

Expand Down

0 comments on commit 4692a85

Please sign in to comment.