Port linux dkp prefix check from xenoblade (#196)

* Port linux dkp prefix check from xenoblade

* Hope this works idk

* Whoops :p

* I am mega silly

* please work? ^w^
This commit is contained in:
Amber Brault 2024-01-01 12:45:49 -05:00 committed by GitHub
parent fe15f9dedd
commit 609c35ee02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 5 deletions

View File

@ -20,7 +20,7 @@ jobs:
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build
run: |
python configure.py -m -v ${{matrix.version}} --compilers /compilers/GC --powerpc /opt/devkitpro/devkitPPC/bin
python configure.py -m -v ${{matrix.version}} --compilers /compilers/GC
ninja
- name: Upload progress
if: github.ref == 'refs/heads/main'
@ -50,4 +50,6 @@ jobs:
- name: Git config
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build
run: make -j$(nproc) MAPGENFLAG=1 VERSION=${{matrix.version}} COMPILERS=/compilers/GC POWERPC=/opt/devkitpro/devkitPPC/bin
run: |
python configure.py --map --compilers /compilers/GC
make -j$(nproc) MAPGENFLAG=1 VERSION=${{matrix.version}} COMPILERS=/compilers/GC

View File

@ -95,7 +95,12 @@ else
endif
# Disable wine debug output for cleanliness
export WINEDEBUG ?= -all
AS := $(POWERPC)/powerpc-eabi-as
# The Linux dkp files don't have the powerpc-eabi prefix
ifeq ($(shell uname -s), Darwin)
AS := $(POWERPC)/powerpc-eabi-as
else
AS := $(POWERPC)/as
endif
PYTHON := python3
endif
COMPILERS ?= tools/mwcc_compiler

View File

@ -1885,6 +1885,10 @@ def main():
mwld = compiler_path / "mwldeppc.exe"
gnu_as = args.powerpc / f"powerpc-eabi-as{exe}"
#The dkp files for Linux don't have the powerpc-eabi prefix.
if os.uname().sysname == "Linux":
gnu_as = args.powerpc / f"as"
mwcc_cmd = f"{chain}{wine}{mwcc} $cflags -MMD -c $in -o $basedir"
if args.context:
mwcc_cmd += " && $python tools/decompctx.py $cfile -r -q"

View File

@ -39,8 +39,13 @@ def main() -> None:
with zipfile.ZipFile(tmp_zip) as zip_file:
zip_file.extractall(output)
st = os.stat(output)
os.chmod(output, st.st_mode | stat.S_IEXEC)
#st = os.stat(output)
#os.chmod(output, st.st_mode | stat.S_IEXEC)
#FIXME: the above doesn't work for whatever reason
for filename in os.listdir(output):
f = os.path.join(output, filename)
st = os.stat(f)
os.chmod(f, st.st_mode | stat.S_IEXEC)
if __name__ == "__main__":