-
Notifications
You must be signed in to change notification settings - Fork 23
Compiling yourself
Go to Wiki Home.
CRT is a .NET 10 / Avalonia desktop application and builds with the plain dotnet CLI on all
three platforms. The build itself is identical everywhere — the only thing that really differs
between operating systems is how you install the .NET 10 SDK.
- Before you start
- Quick start (any platform)
- Always build RELEASE
- Windows
- Linux
- macOS
- Self-contained builds
- Running the test suite
- Where the hardware data comes from
- The MiniPro IC programmer
- Troubleshooting
You need:
-
.NET 10 SDK — install it from your package manager, or download it from
dotnet.microsoft.com.
A newer SDK is fine too; the project sets
RollForward=LatestMajor. - Git
- Roughly 2 GB of free disk space for a plain build, more if you publish self-contained builds for several platforms.
Then fork the CRT repository and clone your fork:
git clone https://github.com/<your-username>/Classic-Repair-Toolbox.git
cd Classic-Repair-Toolbox
Verify the SDK is found:
dotnet --list-sdks
You should see a 10.x.x entry.
dotnet restore Classic-Repair-Toolbox.slnx
dotnet build Classic-Repair-Toolbox.slnx -c Release
dotnet test Classic-Repair-Toolbox.slnx -c Release
The application lands in bin/Release/net10.0/:
| Platform | Executable |
|---|---|
| Windows | bin\Release\net10.0\Classic-Repair-Toolbox.exe |
| Linux / macOS | bin/Release/net10.0/Classic-Repair-Toolbox |
You can also run it straight from the source tree:
dotnet run --project Classic-Repair-Toolbox.csproj -c Release
Note the two different targets.
dotnet buildanddotnet testare pointed at the solution (Classic-Repair-Toolbox.slnx) so the unit tests are built and run too.dotnet publishanddotnet runare pointed at the project (Classic-Repair-Toolbox.csproj) — publishing the solution would drag the test project along with it.
Build Release unless you are actively debugging. Debug builds deliberately fake two things so
the UI can be worked on without a server round-trip, and they will confuse you if you forget:
| Debug behaviour | Controlled by (in Main/App.axaml.cs) |
|---|---|
Never checks for a real update online; always shows a dummy update banner for version 99.0.0
|
AppConfig.DebugSimulateUpdate |
| Simulates the online data sync instead of performing the real one | AppConfig.DebugSimulateSync |
Flip those constants if you need different behaviour locally.
One more difference worth knowing: Release treats compiler warnings as errors (Debug does
not, so a half-finished edit does not break your F5 loop). If your build is green in Debug and
red in Release, a warning is the likely reason.
- Open
Classic-Repair-Toolbox.slnx. You need a Visual Studio version new enough to open an.slnxsolution and to target .NET 10 — if yours cannot, use the CLI or VS Code route instead, which always works. - Switch the configuration drop-down from
DebugtoRelease -
Build>Build Solution - The executable is
bin\Release\net10.0\Classic-Repair-Toolbox.exe
The repository ships with .vscode/tasks.json and .vscode/launch.json, so with the
C# Dev Kit extension installed you get:
-
buildtask —dotnet buildon the solution -
watchtask —dotnet watch run, rebuilding and restarting on every save -
F5 — builds and launches the
Debugbuild under the debugger
dotnet build Classic-Repair-Toolbox.slnx -c Release
bin\Release\net10.0\Classic-Repair-Toolbox.exe
This is the only distro-specific part. Everything after it is the same everywhere.
Fedora
sudo dnf install dotnet-sdk-10.0
Debian / Ubuntu
sudo apt install dotnet-sdk-10.0
If your release does not carry a .NET 10 package yet, use Microsoft's install script (below).
Arch
sudo pacman -S dotnet-sdk
Check with dotnet --list-sdks that you actually got 10.x and not an older SDK.
Gentoo
Gentoo can have several SDKs installed side by side, so you have to select the right one:
eselect dotnet list # show all available .NET SDK versions
eselect dotnet set 1 # pick the .NET 10 profile - (1) in this example
. /etc/profile # reload the system environment variables
dotnet --list-sdks # verify the active SDK is 10.x
Any distro — Microsoft's install script
Works everywhere and needs no root; it installs into ~/.dotnet:
curl -sSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 10.0
export PATH="$HOME/.dotnet:$PATH"
Add that export to your shell profile to make it stick.
dotnet build Classic-Repair-Toolbox.slnx -c Release
./bin/Release/net10.0/Classic-Repair-Toolbox
If the application builds but will not start, see Troubleshooting — on a
minimal system you are usually missing fontconfig or ICU.
The build is the same as everywhere else; only the SDK install and the run step have a couple of macOS quirks.
- Install the .NET 10 SDK — either the
.pkginstaller from dotnet.microsoft.com, or Homebrew:Confirm you got 10.x withbrew install --cask dotnet-sdkdotnet --list-sdks. - Build:
dotnet build Classic-Repair-Toolbox.slnx -c Release - Run it from Terminal:
./bin/Release/net10.0/Classic-Repair-Toolbox
Two things to be aware of:
- A plain
dotnet buildordotnet publishgives you a bare executable, not a.appbundle. The.appin the official releases is produced by Velopack during packaging, not by the build. Launching the bare executable from Terminal works fine. - Locally built binaries are not signed or notarised. Running from Terminal is normally
untroubled, but if macOS refuses to start it, clear the quarantine flag:
xattr -dr com.apple.quarantine ./bin/Release/net10.0/Classic-Repair-Toolbox
Pick the matching architecture if you go on to publish a self-contained build: osx-arm64 for
Apple Silicon, osx-x64 for Intel.
A self-contained build bundles the .NET runtime, so it runs on a machine with no .NET installed.
This is what the official releases are built from. Note that it is dotnet publish on the
project file, and that --self-contained requires a runtime identifier (-r):
dotnet publish Classic-Repair-Toolbox.csproj -c Release -f net10.0 -r <rid> --self-contained
| Target | <rid> |
Output folder |
|---|---|---|
| Windows x64 | win-x64 |
bin/Release/net10.0/win-x64/publish/ |
| Linux x64 | linux-x64 |
bin/Release/net10.0/linux-x64/publish/ |
| macOS Apple Silicon | osx-arm64 |
bin/Release/net10.0/osx-arm64/publish/ |
| macOS Intel | osx-x64 |
bin/Release/net10.0/osx-x64/publish/ |
Use -o <folder> if you would rather choose the output folder yourself.
Passing -r also turns on ReadyToRun, which ahead-of-time compiles the app and the bundled
runtime. It makes the build bigger and slower to produce, but noticeably quicker to launch — the
right trade for an app that already ships around 1 GB of hardware data. A publish without -r
skips it.
Cross-compiling works: you can publish linux-x64 from Windows, and so on. Only the macOS
packaging step in CI genuinely needs a Mac.
There is an xUnit suite covering the non-UI logic in Handlers/. It needs no oscilloscope, no
MiniPro programmer, no network and no display, and finishes in a couple of seconds:
dotnet test Classic-Repair-Toolbox.slnx -c Release
Every push runs the same suite on GitHub, and a red suite blocks releases — so if you intend to send a pull request, run it locally first. If you add or change logic, add or update the tests in the same change.
The ~1 GB of schematics, component data and images in Assets/Data is not copied into the
build output. The official installers bundle it; a build from source does not. So on first launch
CRT will create its data folder and download everything from classic-repair-toolbox.dk.
The data folder lives outside the build folder, next to the log file:
| Platform | Location |
|---|---|
| Windows | %LOCALAPPDATA%\Classic-Repair-Toolbox\Data |
| Linux / macOS | ~/.local/share/Classic-Repair-Toolbox/Data |
Three things follow from that:
- If you already have CRT installed, your build reuses the same data folder and downloads nothing. Only a folder that does not yet exist triggers the first-run download.
- You can seed it instead of downloading, exactly the way the release pipeline does, by copying
Assets/Datanext to the built executable before the first run — it is then copied into the data folder on startup. - You can point a build at its own data folder, and leave your installed copy alone, with the
command-line switch:
Classic-Repair-Toolbox --data-root=/path/to/some/other/Data
The log file sits alongside, at Classic-Repair-Toolbox/Classic-Repair-Toolbox.log. It records the
resolved data root on every start (Data root is [...]), which is the quickest way to confirm which
folder a given build is actually using.
Only the win-x64 build bundles a minipro binary — it is committed at
Assets/MiniPro/win-x64/ and copied next to the executable automatically on a Windows build.
On Linux and macOS nothing is bundled. CRT looks for minipro on PATH and in the common
install locations, so install it yourself (for example from
the minipro project). You can also point CRT at a
specific binary with the MiniPro path override in the Configuration tab.
dotnet cannot find a .NET 10 SDK
Run dotnet --list-sdks. If there is no 10.x entry, the SDK is not installed or not on PATH.
On Gentoo, check you ran eselect dotnet set and re-sourced /etc/profile.
The build is green in Debug and red in Release
Release treats warnings as errors. Read the first error in the log — it will be a warning.
Visual Studio will not open Classic-Repair-Toolbox.slnx
The solution uses the newer XML solution format. Either upgrade Visual Studio, or build from the
command line — the CLI does not care.
The app builds on Linux but exits immediately or crashes on startup
Avalonia needs fonts and ICU present. On a minimal or container install, add fontconfig (and the
libicu package for your distro), then try again. Check the log file for the real error.
The app starts but there is no hardware data That is expected on a first run from source — it is downloading. Watch the splash screen, and check the log if it seems stuck. See Where the hardware data comes from.
It keeps telling me version 99.0.0 is available
You built Debug. Build Release. See Always build RELEASE.
Go to Wiki Home.