Made .bat file dynamically created again since it requires an absolute path.
This commit is contained in:
parent
5a7866d572
commit
2fe2aa6db7
4 changed files with 10 additions and 4 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
#! /usr/bin/python2.7
|
#! /usr/bin/python2.7
|
||||||
"""
|
"""
|
||||||
Linux launcher
|
Linux launcher
|
||||||
|
|
||||||
|
This is copied directly into the python bin directory and makes the
|
||||||
|
'evennia' program available on $PATH.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
@"python" "evennia.py" %*
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#! /usr/bin/python2.7
|
|
||||||
"""
|
"""
|
||||||
Linux launcher
|
Windows launcher. This is called by a dynamically created .bat file in
|
||||||
|
the python bin directory and makes the 'evennia' program available on
|
||||||
|
the command %path%.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
|
||||||
5
setup.py
5
setup.py
|
|
@ -27,7 +27,10 @@ def get_scripts():
|
||||||
this means creating a .bat file.
|
this means creating a .bat file.
|
||||||
"""
|
"""
|
||||||
if os.name == "nt":
|
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:
|
else:
|
||||||
return [os.path.join("bin", "unix", "evennia")]
|
return [os.path.join("bin", "unix", "evennia")]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue