diff --git a/.github/workflows/compile_main_branches.yml b/.github/workflows/compile_project.yml similarity index 80% rename from .github/workflows/compile_main_branches.yml rename to .github/workflows/compile_project.yml index a765808..b7457b1 100644 --- a/.github/workflows/compile_main_branches.yml +++ b/.github/workflows/compile_project.yml @@ -1,4 +1,4 @@ -name: Compile Main Branches +name: Compile Project (Push/PR/Release) on: push: @@ -20,22 +20,25 @@ jobs: - dist: ubuntu_x86_64 os: ubuntu-latest arch: x86_64 + bin_ext: - dist: macos_x86_64 os: macos-latest arch: x86_64 + bin_ext: - dist: macos_arm64 os: macos-latest arch: arm64 + bin_ext: steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Clone submodules run: git submodule init && git submodule update - name: Compile ${{ matrix.prog }} run: make PROJECT_PLATFORM_ARCH=${{ matrix.arch }} deps all - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: ${{ matrix.prog }}-${{ matrix.dist }} - path: ./bin/${{ matrix.prog }} + path: ./bin/${{ matrix.prog }}${{ matrix.bin_ext }} build_visualstudio: name: Compile ${{ matrix.prog }} for ${{ matrix.dist }} runs-on: ${{ matrix.os }} @@ -49,21 +52,22 @@ jobs: platform: x64 configuration: Release build_path: x64\Release + bin_ext: .exe - dist: win_x86 os: windows-latest platform: x86 configuration: Release build_path: Release + bin_ext: .exe steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1 + uses: microsoft/setup-msbuild@v1.3 - name: Clone submodules run: git submodule init && git submodule update - name: Compile ${{ matrix.prog }} run: msbuild .\build\visualstudio\${{ matrix.prog }}.sln /p:configuration=${{ matrix.configuration }} /p:platform=${{ matrix.platform }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: ${{ matrix.prog }}-${{ matrix.dist }} - path: .\build\visualstudio\${{ matrix.build_path }}\${{ matrix.prog }}.exe - + path: .\build\visualstudio\${{ matrix.build_path }}\${{ matrix.prog }}${{ matrix.bin_ext }} diff --git a/BUILDING.md b/BUILDING.md index 2d94f09..e72835f 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,4 +1,13 @@ # Building +## Git Submodules +This project makes use of git submodules to import dependencies into the source tree. +After cloning this repository using git, prior to building NSTool the dependencies need to be downloaded. +Run these two commands to initialise and download the dependencies: +``` +git submodule init +git submodule update +``` + ## Linux (incl. Windows Subsystem for Linux) & MacOS - Makefile ### Requirements * `make` diff --git a/deps/libfmt b/deps/libfmt index 22d3ddc..b03b081 160000 --- a/deps/libfmt +++ b/deps/libfmt @@ -1 +1 @@ -Subproject commit 22d3ddc718021809d8499913867bb9d93dfce7d0 +Subproject commit b03b081e026ceb1226b45de926babe629d6c0688 diff --git a/deps/liblz4 b/deps/liblz4 index ea157aa..561775a 160000 --- a/deps/liblz4 +++ b/deps/liblz4 @@ -1 +1 @@ -Subproject commit ea157aaacb8da70a9619c7c7f140b3983e06c988 +Subproject commit 561775a11e00cbd21a45031c64068cb5e1242608 diff --git a/deps/libmbedtls b/deps/libmbedtls index d6d2803..7434637 160000 --- a/deps/libmbedtls +++ b/deps/libmbedtls @@ -1 +1 @@ -Subproject commit d6d2803b77f6baa9a64bf3b2a787f0e93db7c48f +Subproject commit 74346376dd035e9fbc161cdb80afc646b72fde86 diff --git a/deps/libpietendo b/deps/libpietendo index 86c2c39..4613d1a 160000 --- a/deps/libpietendo +++ b/deps/libpietendo @@ -1 +1 @@ -Subproject commit 86c2c39730fab8bd9d9abe81b9a2113f5f012d97 +Subproject commit 4613d1a5936d6bc7a7e891abf88340ac3c9ad349 diff --git a/deps/libtoolchain b/deps/libtoolchain index 6fcb267..fa13eb8 160000 --- a/deps/libtoolchain +++ b/deps/libtoolchain @@ -1 +1 @@ -Subproject commit 6fcb2677cf3cac0a4900002f216b7550a4f16b7a +Subproject commit fa13eb8679ad8ff64f90485e96f7c60bd2c568bb diff --git a/makefile b/makefile index 67e1384..3cf9700 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,6 @@ # C++/C Recursive Project Makefile # (c) Jack -# Version 8 (20220420) +# Version 9 (20231231) # Project Name PROJECT_NAME = nstool @@ -80,7 +80,7 @@ ifeq ($(PROJECT_PLATFORM), WIN32) ARCHFLAGS = INC += LIB += -static - ARFLAGS = cr -o + ARFLAGS = cr else ifeq ($(PROJECT_PLATFORM), GNU) # GNU/Linux Flags/Libs #CC = @@ -90,7 +90,7 @@ else ifeq ($(PROJECT_PLATFORM), GNU) ARCHFLAGS = INC += LIB += - ARFLAGS = cr -o + ARFLAGS = cr else ifeq ($(PROJECT_PLATFORM), MACOS) # MacOS Flags/Libs #CC = diff --git a/src/MetaProcess.cpp b/src/MetaProcess.cpp index 445e1d4..ec17abc 100644 --- a/src/MetaProcess.cpp +++ b/src/MetaProcess.cpp @@ -157,6 +157,9 @@ void nstool::MetaProcess::validateAciFromAcid(const pie::hac::AccessControlInfo& } } + // See https://github.com/jakcron/nstool/issues/92 + // Nintendo doesn't populate SaveDataOwnerIdList in ACID, so this field cannot be verified +#if 0 for (size_t i = 0; i < aci.getFileSystemAccessControl().getSaveDataOwnerIdList().size(); i++) { bool rightFound = false; @@ -172,6 +175,7 @@ void nstool::MetaProcess::validateAciFromAcid(const pie::hac::AccessControlInfo& fmt::print("[WARNING] ACI/FAC SaveDataOwnerId: FAIL (0x{:016x} ({:d}) not permitted)\n", aci.getFileSystemAccessControl().getSaveDataOwnerIdList()[i].id, (uint32_t)aci.getFileSystemAccessControl().getSaveDataOwnerIdList()[i].access_type); } } +#endif // check SAC for (size_t i = 0; i < aci.getServiceAccessControl().getServiceList().size(); i++) diff --git a/src/version.h b/src/version.h index 1e71b75..4b60dca 100644 --- a/src/version.h +++ b/src/version.h @@ -3,5 +3,5 @@ #define BIN_NAME "nstool" #define VER_MAJOR 1 #define VER_MINOR 8 -#define VER_PATCH 0 +#define VER_PATCH 1 #define AUTHORS "jakcron" \ No newline at end of file