Skip to content

Building from Source

WinMac edited this page Nov 22, 2026 · 2 revisions

These instructions describe the 1.0.0 source tree. Use the source revision matching the release you intend to build. A prebuilt release ZIP is not a source checkout.

Prerequisites

Dependency Purpose
Windows WinUI application build and native packaging tools
.NET 10 SDK Build the managed projects
Windows SDK 22621 or newer Resource compiler and MSIX tooling
PowerShell 7 Distribution and NSIS helper scripts
NSIS 3 Optional NSIS installer compilation
Signing certificate with its private key Optional MSIX signing

NuGet restores the pinned Windows App SDK and Win2D dependencies. Building a self-contained app still requires the development SDK; running a published app does not.

Publish the application

From the source root:

# x64
dotnet publish src/WinMac.Dock/WinMac.Dock.csproj -c Release -p:Platform=x64 -r win-x64 --self-contained true -o artifacts/win-x64

# ARM64
dotnet publish src/WinMac.Dock/WinMac.Dock.csproj -c Release -p:Platform=ARM64 -r win-arm64 --self-contained true -o artifacts/win-arm64

# Core regression runner
dotnet run --project tests/WinMac.Dock.Tests -c Release

Close any Dock instance using an output folder before publishing to it. Distribute the complete published folder, including its PRI, native libraries, runtime files, fonts, and other assets.

Distribution packages

Where the source revision includes the distribution scripts, run:

# ZIPs only, for both architectures.
pwsh -File .\build\Build-Distribution.ps1 -ZipOnly

# ZIPs and unsigned MSIX packages.
pwsh -File .\build\Build-Distribution.ps1 -Unsigned

# ZIPs and signed MSIX packages, using the configured certificate.
pwsh -File .\build\Build-Distribution.ps1

# Sign previously generated unsigned packages.
pwsh -File .\build\Sign-Msix.ps1

# Compile NSIS installers from the matching distribution ZIPs.
pwsh -File .\build\Compile-Nsis.ps1

These are alternative build routes, not a requirement to run every command. The distribution builder runs tests unless -SkipTests is supplied. Its fresh payload folders exclude personal settings, logs, and release-note Markdown files.

Use -Architecture x64 or -Architecture arm64 to select one architecture. Outputs go to dist, with the version read from the project. NSIS compilation checks the ZIP payload's architecture and executable version.

Signing

The default MSIX manifest publisher is CN=WinMac Dock. The selected certificate must match that publisher and have an accessible private key in the current user's Personal store. Use -CertificateThumbprint with the distribution or signing script to select a matching certificate.

A .cer file contains the public certificate and cannot sign a package. A development session that cannot see the private key can build unsigned packages for signing later. Do not treat an older signed package beside a fresh unsigned one as the new build.

Source map

Directory Contents
src/WinMac.Dock.Core Settings, defaults, matching, layout, and persistence
src/WinMac.Dock WinUI windows, shell/native integration, rendering, and tracking
src/WinMac.Dock.Icons Native icon resources
tests/WinMac.Dock.Tests Core regression runner
build Resource, distribution, installer, and signing helpers
integrations/windhawk Optional Task View bridge

The defaults JSON under src/WinMac.Dock.Core/Defaults is an embedded build input, not a disposable user settings file. Keep it with the source.

Automated tests do not replace live checks of fullscreen transitions, window capture, mixed-DPI layouts, Windows taskbar restoration, and installation behavior.

Clone this wiki locally