Skip to content

Commit

Permalink
Update actions workflow to produce cross-platform CLI binaries, updat…
Browse files Browse the repository at this point in the history
…e readme to reflect .net 9 changes
  • Loading branch information
LukeFZ committed Nov 14, 2024
1 parent bcbf4f4 commit 5cd9478
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 31 deletions.
76 changes: 48 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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`.

Expand Down

0 comments on commit 5cd9478

Please sign in to comment.