mirror of https://github.com/PrimeDecomp/prime.git
parent
6b306c1121
commit
c6823f56cd
3
Makefile
3
Makefile
|
@ -76,6 +76,7 @@ ifeq ($(WINDOWS),1)
|
|||
AS := $(DEVKITPPC)/bin/powerpc-eabi-as.exe
|
||||
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp.exe -P
|
||||
PYTHON := py
|
||||
SHA1SUM := sha1sum
|
||||
else
|
||||
WIBO := $(shell command -v wibo 2> /dev/null)
|
||||
ifdef WIBO
|
||||
|
@ -88,11 +89,11 @@ else
|
|||
AS := $(DEVKITPPC)/bin/powerpc-eabi-as
|
||||
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp -P
|
||||
PYTHON := python3
|
||||
SHA1SUM := shasum -a 1
|
||||
endif
|
||||
CC = $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe
|
||||
LD := $(WINE) tools/mwcc_compiler/$(MWLD_VERSION)/mwldeppc.exe
|
||||
ELF2DOL := tools/elf2dol
|
||||
SHA1SUM := shasum -a 1
|
||||
|
||||
TRANSFORM_DEP := tools/transform-dep.py
|
||||
FRANK := tools/franklite.py
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import os
|
||||
from platform import uname
|
||||
|
||||
wineprefix = os.path.join(os.environ['HOME'], '.wine')
|
||||
if 'WINEPREFIX' in os.environ:
|
||||
wineprefix = os.environ['WINEPREFIX']
|
||||
winedevices = os.path.join(wineprefix, 'dosdevices')
|
||||
|
||||
def in_wsl() -> bool:
|
||||
return 'microsoft-standard' in uname().release
|
||||
|
||||
def import_d_file(in_file) -> str:
|
||||
out_text = ''
|
||||
|
||||
|
@ -26,6 +30,13 @@ def import_d_file(in_file) -> str:
|
|||
path = line.strip()
|
||||
# lowercase drive letter
|
||||
path = path[0].lower() + path[1:]
|
||||
if path[0] == 'z':
|
||||
# shortcut for z:
|
||||
path = path[2:].replace('\\', '/')
|
||||
elif in_wsl():
|
||||
path = path[0:1] + path[2:]
|
||||
path = os.path.join('/mnt', path.replace('\\', '/'))
|
||||
else:
|
||||
# use $WINEPREFIX/dosdevices to resolve path
|
||||
path = os.path.realpath(os.path.join(winedevices, path.replace('\\', '/')))
|
||||
out_text += "\t" + path + suffix + "\n"
|
||||
|
|
Loading…
Reference in New Issue