Skip to content

Latest commit

 

History

History
114 lines (72 loc) · 2.46 KB

File metadata and controls

114 lines (72 loc) · 2.46 KB

Unity Command Line Launcher (.NET)

Prerequisites

sed -n 's/.*<TargetFramework>\(.*\)<\/TargetFramework>.*/\1/p' ../Directory.Build.props
  • You should be familiar with using the dotnet CLI or the build/publish features in your IDE (e.g. JetBrains Rider).

Building

The project requires no special process to compile the source. Simply run:

dotnet build

From the ucll project directory.

To run the code without having to publish a standalone binary:

dotnet run -- --help

The first -- separates the args passed to dotnet run from the args passed to ucll.


Testing

Run the default test commands in the ucll.tests project:

dotnet test ../ucll.tests

Debugging

This project uses only a single Release configuration with debugging enabled.

Run with the --debug flag to enable timers and additional logs. Run with the --dry-run flag to simulate mutating commands (e.g. open or install) without applying changes.

dotnet run -- version-usage --debug | grep -F "[Timing]"

Publishing

If you want to publish (export) a single-file self-contained binary for your current platform, run:

dotnet publish

For the ucll project. You will find the build output e.g. here: src/ucll/bin/osx-arm64/publish/ucll

If you want to publish releases for all platforms and sign them, run the ucll.build project:

dotnet run --project ../ucll.build

Calling dotnet publish --project ../ucll.build would publish the build project itself, which wouldn't make sense.

The binaries are configured in the .csproj to be self-contained (they don't require a .NET runtime installed by the user).


Testing

Manual

See the TestPlan. This plan can also be used as an inspiration for future automated tests.

Virtual Machine

Manual platform testing via GUI can be performed by installing the tool within a virtual machine in, e.g. UTM.

Docker

Testing via CLI can be performed by running the tool in a container, e.g.:

brew install orbstack
orb start
dotnet publish --runtime linux-x64
docker run -it --rm --platform linux/amd64 \
-v ~/repos/opensource/UnityCommandLineLauncher/src/ucll/bin/linux-x64/publish:/app \
unityci/hub \
bash
 /app/ucll --help