tool paths configurable by environment (LLAMAMOD_CD, LAMA_WINEPREFIX, LAMA_MOD, APPTEST_ROOT, APPTEST_ISO; tools/lamapaths.py), music tracks without a file on the cd marked in the editor and the tutorial uses kronk, levelbuild.py accepts the english texture names
This commit is contained in:
1 parent
a0d961357e
commit
6d449257a7
21 files changed
+153
-44
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""Where the Python tools look for the original game files (all overridable by environment variables).
|
||||
|
||||
LLAMAMOD_CD folder with the CD contents (wads/, music/, *.cor ...),
|
||||
default $LAMA_WINEPREFIX/iso-dk/Setup/Eng/Cd
|
||||
LAMA_WINEPREFIX Wine prefix of a hand-made game setup (lamatest.py, levelbuild.py --install),
|
||||
default ~/.wine-lama
|
||||
LAMA_MOD the lama-mod script, default ~/.local/bin/lama-mod, else tools/lama-mod
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
WINEPREFIX = os.path.expanduser(os.environ.get('LAMA_WINEPREFIX') or '~/.wine-lama')
|
||||
CD = os.path.expanduser(os.environ.get('LLAMAMOD_CD') or os.path.join(WINEPREFIX, 'iso-dk', 'Setup', 'Eng', 'Cd'))
|
||||
CD_WADS = os.path.join(CD, 'wads')
|
||||
TESTLEVEL_WAD = os.path.join(WINEPREFIX, 'mods', 'testlevel', 'wads', 'T1L9M001.wad')
|
||||
|
||||
|
||||
def lama_mod():
|
||||
p = os.environ.get('LAMA_MOD')
|
||||
if p:
|
||||
return os.path.expanduser(p)
|
||||
p = os.path.expanduser('~/.local/bin/lama-mod')
|
||||
return p if os.path.exists(p) else os.path.join(HERE, 'lama-mod')
|
||||
|
||||
|
||||
def need(path, what, hint):
|
||||
"""Exit with a clear message if PATH does not exist."""
|
||||
if not os.path.exists(path):
|
||||
sys.exit('%s not found: %s (%s)' % (what, path, hint))
|
||||
return path
|
||||
Reference in new issue
Block a user