From c7fe8bcd0fde494042870a18506de65fa0fbcbd5 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 14:18:15 +0800 Subject: [PATCH 01/12] Fixes #92, skip verifying SaveDataOwnerIdList against ACID as this is never populated. --- src/MetaProcess.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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++) From 0d248d1c8e6fb9fc3c23f7add7b0e570d294d6d7 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 14:24:19 +0800 Subject: [PATCH 02/12] #96 Add instructions for using git submodules --- BUILDING.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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` From 705cf9b4f33984f6857ffbab1601b81a9bc70acc Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 17:51:19 +0800 Subject: [PATCH 03/12] Update makefile to v9 --- makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 = From 25850cd74b1ce94bb99665afcba51aacc884abd6 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 18:15:52 +0800 Subject: [PATCH 04/12] Test newer GH Actions Dependencies --- .github/workflows/compile_main_branches.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compile_main_branches.yml b/.github/workflows/compile_main_branches.yml index a765808..6721033 100644 --- a/.github/workflows/compile_main_branches.yml +++ b/.github/workflows/compile_main_branches.yml @@ -27,12 +27,12 @@ jobs: os: macos-latest arch: arm64 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 }} @@ -55,14 +55,14 @@ jobs: configuration: Release build_path: Release 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 From cf4d335be3acf46343620e1b8c477a651a90d218 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 19:17:57 +0800 Subject: [PATCH 05/12] Update libfmt to 10.1.1 --- deps/libfmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 268f56b803bc03b5d3c79b72759abd403c87a10a Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 22:10:38 +0800 Subject: [PATCH 06/12] Update liblz4 to v1.9.4 --- deps/liblz4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0765ee5502dc8c03cf775492fca6a409a91a5320 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 22:10:50 +0800 Subject: [PATCH 07/12] Update libmbedtls to v2.16.12 --- deps/libmbedtls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 30c8751cfd86a97f9e5801b03bf7464224066f47 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 22:11:30 +0800 Subject: [PATCH 08/12] Update libtoolchain to v0.7.0 --- deps/libtoolchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 17f9298c50091fb055306be5e9ef856334066202 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 22:11:41 +0800 Subject: [PATCH 09/12] Update libpietendo v0.7.2 --- deps/libpietendo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4922717ad05807028ef5589fae6f84b53fb5e741 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 22:17:00 +0800 Subject: [PATCH 10/12] Tweak GH Actions --- .../{compile_main_branches.yml => compile_project.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{compile_main_branches.yml => compile_project.yml} (98%) diff --git a/.github/workflows/compile_main_branches.yml b/.github/workflows/compile_project.yml similarity index 98% rename from .github/workflows/compile_main_branches.yml rename to .github/workflows/compile_project.yml index 6721033..a7a7074 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: From 978899780c738e5e4346959754eb51b0527d4602 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 22:21:35 +0800 Subject: [PATCH 11/12] Test GH Actions tweaks --- .github/workflows/compile_project.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile_project.yml b/.github/workflows/compile_project.yml index a7a7074..b7457b1 100644 --- a/.github/workflows/compile_project.yml +++ b/.github/workflows/compile_project.yml @@ -20,12 +20,15 @@ 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@v4 - name: Clone submodules @@ -35,7 +38,7 @@ jobs: - 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,11 +52,13 @@ 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@v4 - name: Add msbuild to PATH @@ -65,5 +70,4 @@ jobs: - 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 }} From e9a71cbc2b546c443b7edcff48281f86d1509181 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 Dec 2023 22:37:25 +0800 Subject: [PATCH 12/12] Set version string to v1.8.1 --- src/version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/version.h b/src/version.h index 1ff741e..4b60dca 100644 --- a/src/version.h +++ b/src/version.h @@ -1,7 +1,7 @@ #pragma once #define APP_NAME "NSTool" #define BIN_NAME "nstool" -#define VER_MAJOR 0 -#define VER_MINOR 0 -#define VER_PATCH 0 +#define VER_MAJOR 1 +#define VER_MINOR 8 +#define VER_PATCH 1 #define AUTHORS "jakcron" \ No newline at end of file