diff --git a/.gitignore b/.gitignore index 0daf464..00af7c8 100644 --- a/.gitignore +++ b/.gitignore @@ -97,4 +97,4 @@ ENV/ # IMages *.jpg *.jpeg -*.JPG \ No newline at end of file +*.JPG diff --git a/SimplePanoramaViewer b/SimplePanoramaViewer index e3e1620..4720c1d 100755 --- a/SimplePanoramaViewer +++ b/SimplePanoramaViewer @@ -26,7 +26,10 @@ if img == "": img = img.replace("\\", "/") img = img.replace("'", "\\'") -exe_dir = path.dirname(path.realpath(sys.argv[0])) +if getattr( sys, 'frozen', False ) : + exe_dir = path.realpath(sys._MEIPASS) +else : + exe_dir = path.dirname(path.realpath(__file__)) os.chdir(exe_dir) try: