Run bash instead of cmd for more functionality
This commit is contained in:
parent
b17c6c6b65
commit
f46a053cc0
15
fwinebox.py
15
fwinebox.py
|
@ -63,10 +63,7 @@ def launchPrefix(prefix,cmd,raw = False):
|
|||
home = os.environ["HOME"]
|
||||
os.environ["HOME"] = cv(config["DEFAULT"]["homeLocation"])
|
||||
os.environ["WINEPREFIX"] = p(cv(config["DEFAULT"]["prefixLocation"]),prefix)
|
||||
if raw == False:
|
||||
subprocess.call(["wine"] + cmd)
|
||||
else:
|
||||
subprocess.call(cmd)
|
||||
subprocess.call(cmd)
|
||||
os.environ["HOME"] = home
|
||||
del os.environ["WINEPREFIX"]
|
||||
del configVars["prefix"]
|
||||
|
@ -88,13 +85,11 @@ def main():
|
|||
print("error: prefix does not exist")
|
||||
return
|
||||
|
||||
raw = False
|
||||
cmd = ["cmd"]
|
||||
cmd = ["bash"]
|
||||
if (len(args) > 1):
|
||||
cmd = args[1:]
|
||||
if cmd[0] == "winetricks": raw = True
|
||||
|
||||
launchPrefix(args[0],cmd,raw)
|
||||
launchPrefix(args[0],cmd)
|
||||
return
|
||||
|
||||
while True:
|
||||
|
@ -126,7 +121,7 @@ def main():
|
|||
elif (choice != "3"): continue
|
||||
os.makedirs(prefixFolder)
|
||||
if (syswow == False): os.environ["WINEARCH"] = "win32"
|
||||
launchPrefix(prefix,["winecfg"])
|
||||
launchPrefix(prefix,["wine","winecfg"])
|
||||
del os.environ["WINEARCH"]
|
||||
break
|
||||
|
||||
|
@ -135,7 +130,7 @@ def main():
|
|||
if os.path.isdir(prefixFolder):
|
||||
print("\nlaunching " +prefix+ "...")
|
||||
try:
|
||||
launchPrefix(prefix,["cmd"])
|
||||
launchPrefix(prefix,["bash"])
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
print("\nended wine-session")
|
||||
|
|
Loading…
Reference in New Issue