From 5cd94784f56f40d2f21ebe46f79912d5fc3d952e Mon Sep 17 00:00:00 2001 From: LukeFZ <17146677+LukeFZ@users.noreply.github.com> Date: Thu, 14 Nov 2024 07:42:27 +0100 Subject: [PATCH] Update actions workflow to produce cross-platform CLI binaries, update readme to reflect .net 9 changes --- .github/workflows/build.yml | 76 +++++++++++++++++++++++-------------- README.md | 6 +-- 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98dc063b..d0dfe0bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,21 +1,20 @@ name: Il2CppInspectorRedux Build -on: - push: - branches: [ master ] - - workflow_dispatch: +on: [push, workflow_dispatch] jobs: - build: + build-gui: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: microsoft/setup-msbuild@v1.1 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' - uses: actions/cache@v3 with: @@ -25,33 +24,54 @@ jobs: ${{ runner.os }}-nuget- - name: Restore NuGet packages - run: nuget restore + run: dotnet restore -r net9.0-windows - name: Build GUI - run: msbuild /t:Il2CppInspector_GUI:publish /p:Configuration=Release /p:Platform="Any CPU" /p:TargetFramework=net9.0-windows /p:SelfContained=false /verbosity:minimal - - - name: Build CLI - run: msbuild /t:Il2CppInspector_CLI:publish /p:Configuration=Release /p:Platform="Any CPU" /p:TargetFramework=net9.0 /p:SelfContained=false /verbosity:minimal - - - name: Add Plugins folder (GUI) - shell: pwsh - working-directory: Il2CppInspector.GUI/bin/Release/net8.0-windows/win-x64/publish - run: ../../../../../../get-plugins.ps1 - - - name: Add Plugins folder (CLI) - shell: pwsh - working-directory: Il2CppInspector.CLI/bin/Release/net8.0/win-x64/publish - run: ../../../../../../get-plugins.ps1 + run: dotnet publish ./Il2CppInspector.GUI/Il2CppInspector.GUI.csproj -c Release -r net9.0-windows --no-self-contained - name: Upload GUI Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Il2CppInspectorRedux.GUI path: Il2CppInspector.GUI/bin/Release/net9.0-windows/win-x64/publish - - name: Upload CLI Artifact - uses: actions/upload-artifact@v2 + build-cli: + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [ '9.0.x' ] + rid: ['win-x64', 'linux-x64', 'linux-arm64', 'osx-x64', 'osx-arm64'] + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Setup .NET SDK ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v3 with: - name: Il2CppInspectorRedux.CLI - path: Il2CppInspector.CLI/bin/Release/net9.0/win-x64/publish + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Install dependencies + run: dotnet restore -r ${{ matrix.rid }} + - name: Build & Publish + run: dotnet publish ./Il2CppInspector.CLI/Il2CppInspector.CLI.csproj -c Release --no-self-contained --no-restore -o ./${{ matrix.rid }} -r ${{ matrix.rid }} + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: Il2CppInspectorRedux.CLI-${{ matrix.rid }}.zip + path: ./${{ matrix.rid }} diff --git a/README.md b/README.md index d30dbe64..83071257 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ Nice to have: * Automatically defeats certain basic obfuscation methods * Test chassis for automated integration testing of IL2CPP binaries -Class library targets .NET 8. Built with Visual Studio 2022. +Class library targets .NET 9. Built with Visual Studio 2022. **NOTE**: Il2CppInspector is not a decompiler. It can provide you with the structure of an application and function addresses for every method so that you can easily jump straight to methods of interest in your disassembler. It does not attempt to recover the entire source code of the application. @@ -181,9 +181,9 @@ Get all current plugins (optional): For other operating systems supporting .NET Core, add `-r xxx` to the final command where `xxx` is a RID from https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog -The output binary for command-line usage is placed in `Il2CppInspectorRedux/Il2CppInspector.CLI/bin/Release/net8.0/[win|osx|linux]-x64/publish/Il2CppInspector.exe`. +The output binary for command-line usage is placed in `Il2CppInspectorRedux/Il2CppInspector.CLI/bin/Release/net9.0/[win|osx|linux]-x64/publish/Il2CppInspector.exe`. -The output binary for Windows GUI is placed in `Il2CppInspectorRedux/Il2CppInspector.GUI/bin/Release/net8.0-windows/win-x64/publish/Il2CppInspector.exe`. +The output binary for Windows GUI is placed in `Il2CppInspectorRedux/Il2CppInspector.GUI/bin/Release/net9.0-windows/win-x64/publish/Il2CppInspector.exe`. The `plugins` folder should be placed in the same folder as `Il2CppInspector.exe`.