1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-10 04:31:44 +00:00
nxdumptool/build.sh
Pablo Curiel 15431ec2c8 Many changes.
* AES: moved CTR initializing/updating functions here from nca.c.
* BKTR/RomFS/PFS: check if we're dealing with a NCA with titlekey crypto and the titlekey hasn't been retrieved.
* BFTTF: use void pointers for output font data.
* Mem: Only exclude Unmapped/Uo/ThreadLocal/Reserved memory pages if dealing with FS.
* NCA: use content type context pointers inside NCA contexts to manage ContentMeta, ProgramInfo, Nacp and LegalInfo contexts.
* NCA: added 'written' bool elements to patch structs to indicate patch write completion.
* NPDM: remove unnecessary inline functions, generate PFS patch right after changing ACID data, add a pfsWriteEntryPatchToMemoryBuffer wrapper.
* PFS: added PartitionFileSystemFileContext and related functions to deal with NSP headers.
* ProgramInfo: removed unnecessary inline functions.
* Save: added commented code to dump a full system savefile - will probably use it down the road.
* Tik: added support for volatile tickets (thanks to @shchmue and @Whovian9369!), added a rights ID string representation to the Ticket struct, clear Volatile and ELicenseRequired flags in conversions to common tickets.
* Title: added a function to calculate the number of titles (current + siblings) from a TItleInfo block.
* Utils: added a function to generate a dynamically allocated path string using a prefix, a filename and a extension.
* Removed explicit offset checks throughout all the code.
* Codestyle fixes.
* Updated to-do.
2020-10-21 00:27:48 -04:00

40 lines
938 B
Bash

#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")"
tar_filename="nxdumptool-rewrite_poc_$(shell git rev-parse --short HEAD).tar.bz2"
rm -f ./*.tar.bz2
rm -rf ./code_templates/tmp
mkdir ./code_templates/tmp
for f in ./code_templates/*.c; do
basename="$(basename "$f")"
filename="${basename%.*}"
if [[ $filename == "dump_title_infos" ]]; then
continue
fi
echo $filename
rm -f ./source/main.c
cp $f ./source/main.c
make clean &> /dev/null
make -j 12 BUILD_TYPE="$filename"
mkdir ./code_templates/tmp/$filename
cp ./nxdumptool-rewrite.nro ./code_templates/tmp/$filename/nxdumptool-rewrite.nro
#cp ./nxdumptool-rewrite.elf ./code_templates/tmp/$filename/nxdumptool-rewrite.elf
done
cd ./code_templates/tmp
tar -cjf ../../$tar_filename *
cd ../..
make clean &> /dev/null
rm -f ./source/main.c
rm -rf ./code_templates/tmp
read -p "Press any key to finish ..."