GUIDE 27 / 28 · NATIVE 2.0.7

Build & validate the native app

Prepare the source toolchain, build the renderer and service, publish the Windows host and run focused regression checks.

Development requirements#

Native source development requires a supported Node/npm environment, the .NET 10 SDK and Windows for host and real capture validation. The published app bundles its runtimes; these requirements apply to developers rather than every end user.

The host targets Windows x64 and uses WinForms, WebView2 and NAudio. Install the runtime dependencies required by WebView2 on the test machine. Use the project lockfile with npm ci so dependency versions stay reproducible.

Build the application source#

From the application source root
npm ci
npm run typecheck
npm run build

Type checking covers the renderer and native service. The build produces the Vite renderer and bundles the Node backend with esbuild. Building only the website does not create a new native recording executable.

Publish and package through the supplied PowerShell script. Choose a dedicated output directory and the actual path to your .NET SDK when it is not available as dotnet.

PowerShell packaging
.\scripts\package-native.ps1 -OutputDirectory 'C:\Builds\HydroClips'

The script creates the self-contained Windows host, copies the bundled Node/FFmpeg tools and renderer, then produces the portable native ZIP. An NSIS path can be supplied for installer generation. Check the script's parameters before adapting it to a different machine.

Focused validation#

Recording regression
node scripts/test-replay.cjs --audio --long

The recording regression uses an isolated temporary profile and tests real desktop capture, audio and long replay output. Build the native artifacts first. Capture tests record the developer's desktop, so run them in an intentional test session.

Ordered transport regression
dotnet run --project scripts/tests/TransportRegression/TransportRegression.csproj -c Release -- 'C:\path\to\node.exe'

The transport test uses a controlled echo process to exercise concurrent complete JSON-line writes. It validates transport ordering without recording the desktop. These checks address different failure modes and should be chosen according to the code you changed.

Inspect a release package#

Verify the package contains HydroClips.exe, backend.cjs, the renderer and the required bin tools. Launch in normal mode, check the selected encoder, save a short manual recording and a warmed replay, play both, then quit normally.

Confirm tray shortcuts and the collapsed/open window region. Keep the source version, package name, website download link and checksums aligned for a native release. Documentation-only updates do not require changing the native application version.

Build these documentation pages#

From the website source root
node generate-docs.cjs
node build-site.cjs

The documentation generator combines structured guide content with the site's static template. The site builder publishes only approved public files, generated guide pages, assets and explicitly named download archives. Keep private hosting credentials and local notes outside that public selection.

The plugin example sources accompany the documentation source, and their downloadable ZIP is independently testable. Start at Complete plugin examples to exercise the extension API.

Implementation reference: package.json; scripts/package-native.ps1; scripts/test-replay.cjs; native/HydroClips.csproj; website generate-docs.cjs · native 2.0.7.