Browse Source

Fixed single file execution

master
Rémi BERTHO 8 months ago
parent
commit
33ec93e98e
Signed by: Rémi BERTHO <remi.bertho@dalan.fr> GPG Key ID: EE3B917931C07B64
2 changed files with 5 additions and 2 deletions
  1. 1
    1
      .gitignore
  2. 4
    1
      SimplePanoramaViewer

+ 1
- 1
.gitignore View File

@@ -97,4 +97,4 @@ ENV/
97 97
 # IMages
98 98
 *.jpg
99 99
 *.jpeg
100
-*.JPG
100
+*.JPG

+ 4
- 1
SimplePanoramaViewer View File

@@ -26,7 +26,10 @@ if img == "":
26 26
 img = img.replace("\\", "/")
27 27
 img = img.replace("'", "\\'")
28 28
 
29
-exe_dir = path.dirname(path.realpath(sys.argv[0]))
29
+if getattr( sys, 'frozen', False ) :
30
+	exe_dir = path.realpath(sys._MEIPASS)
31
+else :
32
+	exe_dir = path.dirname(path.realpath(__file__))
30 33
 os.chdir(exe_dir)
31 34
 
32 35
 try:

Loading…
Cancel
Save