Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c138900
fix: find the game executable on case-sensitive filesystems
playday3008 Feb 5, 2026
b7b7111
feat(cli): add the command line interface
playday3008 Sep 2, 2026
e7ad5a8
feat(cli): add the tree, gen9, pack and diff commands
playday3008 Sep 2, 2026
35ce37f
refactor(cli): share the error results and fix the glob syntax
playday3008 Sep 2, 2026
73f33d8
feat(cli): add the export command
playday3008 Sep 2, 2026
9ae1d44
fix(cli): null and thread safety, and --no-overwrite for export
playday3008 Sep 2, 2026
4c97e9f
feat(cli): add the stat, search, validate and inspect commands
playday3008 Sep 2, 2026
a8f3a02
refactor(cli): turn the analyzers up and clear what they flag
playday3008 Sep 2, 2026
7bfc629
fix(cli): make Success, the exit code and the counts agree
playday3008 Sep 2, 2026
14e676d
chore(cli): add the launch and task configurations
playday3008 Sep 2, 2026
464673b
test(cli): add the unit and fuzz test project
playday3008 Sep 2, 2026
cd3b027
style(cli): tighten the editorconfig and reformat to match
playday3008 Sep 2, 2026
3c61d25
fix(cli): correct the net48 string polyfills
playday3008 Sep 2, 2026
aa3d63b
refactor(cli): adopt LINQ and handle Ctrl+C
playday3008 Sep 2, 2026
b3153b8
test(cli): cover the remaining handlers
playday3008 Sep 2, 2026
7f218fb
chore(cli): build the net48 target on non-Windows
playday3008 Sep 2, 2026
9476af7
test(cli): thread cancellation through the tests
playday3008 Sep 2, 2026
1b95e7f
refactor(cli): move the handlers and their tests into directories
playday3008 Sep 2, 2026
3c3f82e
chore(cli): move WarningsAsErrors into Directory.Build.props
playday3008 Sep 2, 2026
86aacf0
refactor(cli): rework the shared helpers and cover them with tests
playday3008 Sep 2, 2026
123d5d9
refactor(cli): split the hash and stat handlers for testing
playday3008 Sep 2, 2026
feb24ca
fix(cli): list nested archives when not recursing
playday3008 Sep 2, 2026
b536725
fix(cli): keep scan errors and encoding failures in the error result
playday3008 Sep 2, 2026
abbb74a
fix(cli): count uncompressed entries in stat's compressed total
playday3008 Sep 2, 2026
7cec710
test(cli): cover the stat handler's collection and printing
playday3008 Sep 2, 2026
67360c1
refactor(cli): split the list, tree and validate handlers for testing
playday3008 Sep 2, 2026
54903b7
refactor(cli): rewrite the search matcher and add --dir
playday3008 Sep 2, 2026
4dcc7a0
refactor(cli): give diff independent options per side
playday3008 Sep 2, 2026
83d1a84
refactor(cli): flatten shared options and move helpers into Helpers/
playday3008 Sep 1, 2026
f21f467
fix(cli): set RpfManager.IsGen9 so --gen9 parses Gen9 resources
playday3008 Sep 1, 2026
71193d2
fix(cli): hash each diff side under its own encryption keys
playday3008 Sep 1, 2026
085f1ce
fix(cli): report post-filter totals in extract and export
playday3008 Sep 1, 2026
2046987
docs(cli): move the command reference into --help
playday3008 Sep 1, 2026
0c6e83f
style(cli): normalize comments and doc tags
playday3008 Sep 1, 2026
255bd19
chore(cli): fix launch config paths and patch Bcl.Memory
playday3008 Sep 1, 2026
9a55512
fix(cli): format numbers invariantly
playday3008 Sep 1, 2026
b5d75f7
fix(cli): mirror the archive structure when exporting
playday3008 Sep 1, 2026
99bbe3d
chore(cli): force crlf checkouts to match .editorconfig
playday3008 Sep 2, 2026
5e08bfe
ci: build, test and format-check the CLI on push and pull request
playday3008 Sep 2, 2026
2e60297
fix(core): stop shrinking the entry when a resource fails to decompress
playday3008 Sep 2, 2026
bc1364a
ci: print the test log when a run fails
playday3008 Sep 2, 2026
91b6b2f
test(cli): drop the export output directory test that assumed a slash
playday3008 Sep 2, 2026
504e9bf
ci: build the whole solution on windows
playday3008 Sep 2, 2026
8fdec02
ci: publish build artifacts
playday3008 Sep 2, 2026
c3022fe
docs: update the requirements and document the command line program
playday3008 Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: CLI

on:
push:
branches: [main, master, cli]
paths:
- CodeWalker.Cli/**
- CodeWalker.Core/**
- CodeWalker.ModManager/**
- CodeWalker.WinForms/**
- CodeWalker/**
- CodeWalker.sln
- .github/workflows/cli.yml
pull_request:
paths:
- CodeWalker.Cli/**
- CodeWalker.Core/**
- CodeWalker.ModManager/**
- CodeWalker.WinForms/**
- CodeWalker/**
- CodeWalker.sln
- .github/workflows/cli.yml
workflow_dispatch:

permissions:
contents: read

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true

jobs:
test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Windows covers net48 natively. Linux is not redundant: two of the
# path bugs this project has hit only reproduce off Windows.
- os: windows-latest
frameworks: net48 net8.0 net10.0
- os: ubuntu-latest
frameworks: net8.0 net10.0
steps:
- uses: actions/checkout@v7

- uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x

- name: Build
run: dotnet build CodeWalker.Cli/CodeWalker.Cli.csproj -warnaserror

- name: Test
shell: bash
run: |
status=0
for framework in ${{ matrix.frameworks }}; do
echo "::group::$framework"
dotnet test CodeWalker.Cli/CodeWalker.Cli.Tests.csproj -f "$framework" || status=1
echo "::endgroup::"
done
exit $status

# The runner reports failures to a file rather than to stdout, so without
# this a failed run names no test.
- name: Show test logs
if: failure()
shell: bash
run: |
find CodeWalker.Cli/bin -path '*TestResults*' -name '*.log' -print -exec cat {} +

solution:
name: solution
runs-on: windows-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x

- uses: microsoft/setup-msbuild@v3

# The CLI jobs build one project. This is what notices when a change to
# CodeWalker.Core breaks the WinForms projects that also consume it.
# msbuild rather than dotnet build: the solution carries a C++ project.
# CodeWalker.csproj sets PlatformTarget to x64 under Release|AnyCPU and the
# SDK then infers a win-x64 RuntimeIdentifier that restore has not produced,
# which fails as NETSDK1047; clearing it keeps the AnyCPU assets.
- name: Build
run: msbuild CodeWalker.sln -restore -p:Configuration=Release -p:RuntimeIdentifier= -m

- uses: actions/upload-artifact@v7
with:
name: codewalker-solution
path: '*/bin/Release/net48/'

publish:
name: publish ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
name: win-x64
args: -f net10.0 -r win-x64 --self-contained true -p:PublishSingleFile=true
- os: ubuntu-latest
name: linux-x64
args: -f net10.0 -r linux-x64 --self-contained true -p:PublishSingleFile=true
- os: windows-latest
name: net48
args: -f net48
steps:
- uses: actions/checkout@v7

- uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x

- name: Publish
run: dotnet publish CodeWalker.Cli/CodeWalker.Cli.csproj -c Release ${{ matrix.args }} -o publish

- uses: actions/upload-artifact@v7
with:
name: codewalker-cli-${{ matrix.name }}
path: publish

format:
name: format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x

- name: Verify formatting
run: |
dotnet format CodeWalker.Cli/CodeWalker.Cli.csproj --verify-no-changes
dotnet format CodeWalker.Cli/CodeWalker.Cli.Tests.csproj --verify-no-changes
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "CLI (net48)",
"type": "clr",
"request": "launch",
"preLaunchTask": "build-cli",
"program": "${workspaceFolder}/CodeWalker.Cli/bin/CodeWalker.Cli/Debug/net48/CodeWalker.Cli.exe",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "CLI (net8.0)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-cli",
"program": "${workspaceFolder}/CodeWalker.Cli/bin/CodeWalker.Cli/Debug/net8.0/CodeWalker.Cli.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "CLI (net10.0)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-cli",
"program": "${workspaceFolder}/CodeWalker.Cli/bin/CodeWalker.Cli/Debug/net10.0/CodeWalker.Cli.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
}
]
}
67 changes: 67 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-cli",
"type": "process",
"command": "dotnet",
"args": ["build", "CodeWalker.Cli/CodeWalker.Cli.csproj"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$msCompile",
"presentation": {
"reveal": "silent",
"revealProblems": "onProblem"
}
},
{
"label": "rebuild-cli",
"type": "process",
"command": "dotnet",
"args": [
"build",
"CodeWalker.Cli/CodeWalker.Cli.csproj",
"--no-incremental"
],
"group": "build",
"problemMatcher": "$msCompile"
},
{
"label": "clean-cli",
"type": "process",
"command": "dotnet",
"args": ["clean", "CodeWalker.Cli/CodeWalker.Cli.csproj"],
"group": "build",
"problemMatcher": "$msCompile"
},
{
"label": "format-cli",
"type": "process",
"command": "dotnet",
"args": ["format", "CodeWalker.Cli/CodeWalker.Cli.csproj"],
"group": "build",
"problemMatcher": []
},
{
"label": "format-cli-tests",
"type": "process",
"command": "dotnet",
"args": ["format", "CodeWalker.Cli/CodeWalker.Cli.Tests.csproj"],
"group": "build",
"problemMatcher": []
},
{
"label": "test-cli",
"type": "process",
"command": "dotnet",
"args": ["test", "CodeWalker.Cli/CodeWalker.Cli.Tests.csproj"],
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": "$msCompile"
}
]
}
Loading