Skip to content

Commit

Permalink
read from pyinstaller temp dir when frozen
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskiehl committed Nov 7, 2015
1 parent edfd985 commit 660b0b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gooey/gui/util/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ def is_frozen():

def get_resource_path(*args):
if is_frozen():
resource_dir = os.path.join(os.path.dirname(sys.executable), 'gooey')
# MEIPASS explanation:
# https://pythonhosted.org/PyInstaller/#run-time-operation
resource_dir = os.path.join(sys._MEIPASS, 'gooey')
if not os.path.isdir(resource_dir):
raise IOError(("cannot locate Gooey resources. It seems that the program "
"was frozen, but resource files were not copied to "
Expand Down

0 comments on commit 660b0b0

Please # to comment.