Build requirements
==================
Rust 1.75.0; Flutter 3.24.5 (framework dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668,
engine a18df97ca57a249df5d8d68cd0820600223ce262); Dart 3.5.4;
flutter_rust_bridge 1.80. Preserve Cargo.lock, flutter/pubspec.lock and the
included generated bridge. Install the native dependencies in vcpkg.json and
the appropriate platform SDK. Dependency downloads are required on a new host.

Prepare a profile with prepare.py, then work in that destination. Flutter
regenerates host-specific plugin and SDK paths during flutter pub get. Use
separate build directories for each platform and edition. Recorded source
timestamps are retained; a new build can produce different timestamps.

Edition selection
-----------------
Advanced Support: leave NX_BUILD_PROFILE unset.
Support: set NX_BUILD_PROFILE=windows_inbound_client, macos_inbound_client or
linux_inbound_client for the corresponding platform, for both Rust and Flutter.
For Linux use the matching linux-support or linux-advanced source profile.

Linux x86_64
------------
Requires an X11 desktop, GTK development files, Clang, CMake, Ninja, pkg-config
and the native libraries in vcpkg.json. Set VCPKG_ROOT and LIBCLANG_PATH for
your installation. From the prepared source:
  cargo build --locked --features flutter,hwcodec --lib --release
  cd flutter
  flutter pub get
  flutter test test/linux_staff_access_setup_test.dart --no-pub
  flutter build linux --release --no-pub
The application bundle is under flutter/build/linux/x64/release/bundle.

Windows x64
-----------
Requires Visual Studio 2022 C++ Build Tools, Windows SDK, LLVM, Python, NuGet
and WiX/MSBuild. Use the MSVC Rust toolchain and the matching native libraries.
  cargo build --locked --lib --features hwcodec,flutter,vram --release
  cd flutter
  flutter pub get
  flutter build windows --release --no-pub
Keep each edition's runner/Release distribution separately. The final MSI
source is already applied at res/msi by the windows profile. In a packaging
copy, rename nxsupport.exe to NetExpertsSupport.exe and supply res/icon.ico.
From res/msi, with the matching distribution and NuGet/MSBuild on PATH:
  python preprocess.py --nx-edition advanced --arp -d ../advanced-dist --app-name NetExpertsSupport -m "NetExperts Pty Ltd" -c -v 1.5.3
  nuget restore msi.sln
  MSBuild.exe msi.sln /p:Configuration=Release /p:Platform=x64 /p:TargetVersion=Windows10
Use --nx-edition inbound and its distribution for Support.

macOS Universal Binary
----------------------
Requires Xcode, CocoaPods and native libraries for arm64 and x86_64. Set
MACOSX_DEPLOYMENT_TARGET=11.0, VCPKG_ROOT and LIBCLANG_PATH for each target.
Native port/triplet inputs are under build/macos. For each architecture:
  cargo build --locked --features flutter --lib --bin service --release --target TARGET
Use aarch64-apple-darwin or x86_64-apple-darwin for TARGET. Run flutter pub get
and flutter build macos --release --no-pub from flutter/. Combine the matching
architecture slices with lipo; include service in Contents/MacOS/service.
The released Universal Binary contains both Intel and Apple Silicon slices.

Signing and distribution
------------------------
Signing certificates, private keys and notarisation credentials are excluded.
Unsigned local builds can be made without them. The published applications
also use preserved platform dependencies and signing infrastructure; this
archive is source and build information, not a complete offline toolchain.
