mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-22 10:16:39 +00:00
workflow: only build nxdt_rw_poc binary
This commit is contained in:
parent
34615f19c3
commit
4882f8430a
3 changed files with 18 additions and 42 deletions
12
.github/workflows/rewrite.yml
vendored
12
.github/workflows/rewrite.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Build nxdumptool-rewrite binaries
|
||||
name: Build nxdumptool-rewrite binary
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -70,7 +70,7 @@ jobs:
|
|||
cd libntfs-3g; su -s /bin/bash nobody -c "dkp-makepkg -c -C -f" > /dev/null; sudo -n dkp-pacman -U --needed --noconfirm *.pkg.tar.* > /dev/null; cd ..
|
||||
cd liblwext4; su -s /bin/bash nobody -c "dkp-makepkg -c -C -f" > /dev/null; sudo -n dkp-pacman -U --needed --noconfirm *.pkg.tar.* > /dev/null; cd ..
|
||||
|
||||
- name: Build nxdumptool-rewrite PoC binaries
|
||||
- name: Build nxdumptool-rewrite PoC binary
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE/nxdumptool"
|
||||
echo "nxdt_commit=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
|
@ -83,14 +83,14 @@ jobs:
|
|||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nxdumptool-rewrite_poc_${{ env.nxdt_commit }}.7z
|
||||
path: nxdumptool/nxdumptool-rewrite_poc_${{ env.nxdt_commit }}.7z
|
||||
name: nxdt_rw_poc-${{ env.nxdt_commit }}.nro
|
||||
path: nxdumptool/code_templates/tmp/nxdt_rw_poc.nro
|
||||
if-no-files-found: error
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nxdumptool-rewrite_poc_${{ env.nxdt_commit }}-Debug_ELFs.7z
|
||||
path: nxdumptool/nxdumptool-rewrite_poc_${{ env.nxdt_commit }}-Debug_ELFs.7z
|
||||
name: nxdt_rw_poc-${{ env.nxdt_commit }}.elf
|
||||
path: nxdumptool/code_templates/tmp/nxdt_rw_poc.elf
|
||||
if-no-files-found: error
|
||||
|
||||
#- uses: actions/upload-artifact@v3
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -12,8 +12,6 @@ host/nxdumptool
|
|||
*.map
|
||||
*.pfs0
|
||||
*.lst
|
||||
*.tar.bz2
|
||||
*.7z
|
||||
*.log
|
||||
*.spec
|
||||
*.exe
|
||||
|
|
46
build.sh
46
build.sh
|
@ -1,11 +1,7 @@
|
|||
#!/bin/bash
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
archive_filename="nxdumptool-rewrite_poc_$(git rev-parse --short HEAD)"
|
||||
|
||||
# Clean-up from last build
|
||||
rm -f ./*.7z
|
||||
|
||||
rm -rf ./code_templates/tmp
|
||||
mkdir ./code_templates/tmp
|
||||
|
||||
|
@ -13,43 +9,25 @@ mv ./source/main.cpp ./main.cpp
|
|||
|
||||
make clean_all
|
||||
|
||||
# Build loop
|
||||
for f in ./code_templates/*.c; do
|
||||
basename="$(basename "$f")"
|
||||
filename="${basename%.*}"
|
||||
# Build PoC
|
||||
poc_name="nxdt_rw_poc"
|
||||
poc_path="./code_templates/$poc_name.c"
|
||||
|
||||
if [[ $filename == "dump_title_infos" ]]; then
|
||||
continue
|
||||
fi
|
||||
rm -f ./source/main.c
|
||||
cp $poc_path ./source/main.c
|
||||
|
||||
echo $filename
|
||||
cp ./romfs/icon/nxdumptool.jpg ./romfs/icon/$poc_name.jpg
|
||||
|
||||
rm -f ./source/main.c
|
||||
cp $f ./source/main.c
|
||||
make BUILD_TYPE="$poc_name" -j$(nproc)
|
||||
|
||||
cp ./romfs/icon/nxdumptool.jpg ./romfs/icon/$filename.jpg
|
||||
rm -f ./romfs/icon/$poc_name.jpg
|
||||
|
||||
make BUILD_TYPE="$filename" -j$(nproc)
|
||||
|
||||
rm -f ./romfs/icon/$filename.jpg
|
||||
|
||||
mkdir ./code_templates/tmp/$filename
|
||||
cp ./$filename.nro ./code_templates/tmp/$filename/$filename.nro
|
||||
cp ./$filename.elf ./code_templates/tmp/$filename/$filename.elf
|
||||
|
||||
make BUILD_TYPE="$filename" clean
|
||||
done
|
||||
mv -f ./$poc_name.nro ./code_templates/tmp/$poc_name.nro
|
||||
mv -f ./$poc_name.elf ./code_templates/tmp/$poc_name.elf
|
||||
|
||||
# Post build clean-up
|
||||
make BUILD_TYPE="$poc_name" clean
|
||||
make clean_all
|
||||
|
||||
# Package resulting binaries
|
||||
cd ./code_templates/tmp
|
||||
7z a ../../"$archive_filename.7z" */*.nro
|
||||
7z a ../../"$archive_filename-Debug_ELFs.7z" */*.elf
|
||||
|
||||
# Final clean-up
|
||||
cd ../..
|
||||
rm -f ./source/main.c
|
||||
rm -rf ./code_templates/tmp
|
||||
mv ./main.cpp ./source/main.cpp
|
||||
mv -f ./main.cpp ./source/main.cpp
|
||||
|
|
Loading…
Reference in a new issue