Merge pull request #111 from jakcron/v1.8.1-release

Update NSTool to v1.8.1
This commit is contained in:
Jack 2023-12-31 22:56:43 +08:00 committed by GitHub
commit 5cf2ef95b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 18 deletions

View file

@ -1,4 +1,4 @@
name: Compile Main Branches name: Compile Project (Push/PR/Release)
on: on:
push: push:
@ -20,22 +20,25 @@ jobs:
- dist: ubuntu_x86_64 - dist: ubuntu_x86_64
os: ubuntu-latest os: ubuntu-latest
arch: x86_64 arch: x86_64
bin_ext:
- dist: macos_x86_64 - dist: macos_x86_64
os: macos-latest os: macos-latest
arch: x86_64 arch: x86_64
bin_ext:
- dist: macos_arm64 - dist: macos_arm64
os: macos-latest os: macos-latest
arch: arm64 arch: arm64
bin_ext:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v4
- name: Clone submodules - name: Clone submodules
run: git submodule init && git submodule update run: git submodule init && git submodule update
- name: Compile ${{ matrix.prog }} - name: Compile ${{ matrix.prog }}
run: make PROJECT_PLATFORM_ARCH=${{ matrix.arch }} deps all run: make PROJECT_PLATFORM_ARCH=${{ matrix.arch }} deps all
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v4
with: with:
name: ${{ matrix.prog }}-${{ matrix.dist }} name: ${{ matrix.prog }}-${{ matrix.dist }}
path: ./bin/${{ matrix.prog }} path: ./bin/${{ matrix.prog }}${{ matrix.bin_ext }}
build_visualstudio: build_visualstudio:
name: Compile ${{ matrix.prog }} for ${{ matrix.dist }} name: Compile ${{ matrix.prog }} for ${{ matrix.dist }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -49,21 +52,22 @@ jobs:
platform: x64 platform: x64
configuration: Release configuration: Release
build_path: x64\Release build_path: x64\Release
bin_ext: .exe
- dist: win_x86 - dist: win_x86
os: windows-latest os: windows-latest
platform: x86 platform: x86
configuration: Release configuration: Release
build_path: Release build_path: Release
bin_ext: .exe
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v4
- name: Add msbuild to PATH - name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1 uses: microsoft/setup-msbuild@v1.3
- name: Clone submodules - name: Clone submodules
run: git submodule init && git submodule update run: git submodule init && git submodule update
- name: Compile ${{ matrix.prog }} - name: Compile ${{ matrix.prog }}
run: msbuild .\build\visualstudio\${{ matrix.prog }}.sln /p:configuration=${{ matrix.configuration }} /p:platform=${{ matrix.platform }} 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: with:
name: ${{ matrix.prog }}-${{ matrix.dist }} 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 }}

View file

@ -1,4 +1,13 @@
# Building # 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 ## Linux (incl. Windows Subsystem for Linux) & MacOS - Makefile
### Requirements ### Requirements
* `make` * `make`

2
deps/libfmt vendored

@ -1 +1 @@
Subproject commit 22d3ddc718021809d8499913867bb9d93dfce7d0 Subproject commit b03b081e026ceb1226b45de926babe629d6c0688

2
deps/liblz4 vendored

@ -1 +1 @@
Subproject commit ea157aaacb8da70a9619c7c7f140b3983e06c988 Subproject commit 561775a11e00cbd21a45031c64068cb5e1242608

2
deps/libmbedtls vendored

@ -1 +1 @@
Subproject commit d6d2803b77f6baa9a64bf3b2a787f0e93db7c48f Subproject commit 74346376dd035e9fbc161cdb80afc646b72fde86

2
deps/libpietendo vendored

@ -1 +1 @@
Subproject commit 86c2c39730fab8bd9d9abe81b9a2113f5f012d97 Subproject commit 4613d1a5936d6bc7a7e891abf88340ac3c9ad349

2
deps/libtoolchain vendored

@ -1 +1 @@
Subproject commit 6fcb2677cf3cac0a4900002f216b7550a4f16b7a Subproject commit fa13eb8679ad8ff64f90485e96f7c60bd2c568bb

View file

@ -1,6 +1,6 @@
# C++/C Recursive Project Makefile # C++/C Recursive Project Makefile
# (c) Jack # (c) Jack
# Version 8 (20220420) # Version 9 (20231231)
# Project Name # Project Name
PROJECT_NAME = nstool PROJECT_NAME = nstool
@ -80,7 +80,7 @@ ifeq ($(PROJECT_PLATFORM), WIN32)
ARCHFLAGS = ARCHFLAGS =
INC += INC +=
LIB += -static LIB += -static
ARFLAGS = cr -o ARFLAGS = cr
else ifeq ($(PROJECT_PLATFORM), GNU) else ifeq ($(PROJECT_PLATFORM), GNU)
# GNU/Linux Flags/Libs # GNU/Linux Flags/Libs
#CC = #CC =
@ -90,7 +90,7 @@ else ifeq ($(PROJECT_PLATFORM), GNU)
ARCHFLAGS = ARCHFLAGS =
INC += INC +=
LIB += LIB +=
ARFLAGS = cr -o ARFLAGS = cr
else ifeq ($(PROJECT_PLATFORM), MACOS) else ifeq ($(PROJECT_PLATFORM), MACOS)
# MacOS Flags/Libs # MacOS Flags/Libs
#CC = #CC =

View file

@ -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++) for (size_t i = 0; i < aci.getFileSystemAccessControl().getSaveDataOwnerIdList().size(); i++)
{ {
bool rightFound = false; 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); 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 // check SAC
for (size_t i = 0; i < aci.getServiceAccessControl().getServiceList().size(); i++) for (size_t i = 0; i < aci.getServiceAccessControl().getServiceList().size(); i++)

View file

@ -3,5 +3,5 @@
#define BIN_NAME "nstool" #define BIN_NAME "nstool"
#define VER_MAJOR 1 #define VER_MAJOR 1
#define VER_MINOR 8 #define VER_MINOR 8
#define VER_PATCH 0 #define VER_PATCH 1
#define AUTHORS "jakcron" #define AUTHORS "jakcron"