Made .bat file dynamically created again since it requires an absolute path.

This commit is contained in:
Griatch 2015-02-02 20:54:26 +01:00
parent 5a7866d572
commit 2fe2aa6db7
4 changed files with 10 additions and 4 deletions

View file

@ -27,7 +27,10 @@ def get_scripts():
this means creating a .bat file.
"""
if os.name == "nt":
return [os.path.join("bin", "windows", "evennia.bat"), os.path.join("bin", "windows", "evennia.py")]
batpath = os.path.join("bin", "windows", "evennia.bat")
with open(batpath, "w") as batfile:
batfile.write("@\"%s\" \"%s\" %%*" % (sys.executable, batpath))
return [batpath]
else:
return [os.path.join("bin", "unix", "evennia")]