Port the toolkit GUI to Windows (wxMSW, cross-built with mingw-w64)
Build: the wx-rs build script chose the platform with cfg!(), which in a build script describes the build host, so a Linux-to-Windows build took the GTK path. It now reads CARGO_CFG_TARGET_*, and Windows/GNU builds through wx-config exactly like GTK, against a static wxMSW from scripts/build-wx-windows.sh. The C++ runtime is linked statically, so the .exe imports only Windows system DLLs. crates/alkane-gui/build.rs embeds an application manifest (Common Controls v6, per-monitor DPI v2, UTF-8 code page, Windows 10/11), the icon and version info. Bridge on wxMSW (patches 0007/0008): - the upstream frame's invisible "OSX key events" child sat above the UI on MSW and swallowed every click and key; it is no longer created there - light/dark is chosen before the first window (wxMSW ignores it later) and follows the Windows app mode, with dark grid rules for the data view - the generic wxDataViewCtrl gets mouse input in its inner main window, so drag-select and the per-cell / per-icon tooltips bind there (GTK keeps its native GtkTreeView paths; the icon hit-test is shared) - sizes cross the Rust/C++ boundary in DIPs (identity on GTK), so columns, icons, KPI cards and the status bar scale at 125-200 % - vector shapes go through GDI+ (anti-aliased like Cairo on GTK); selected rows use the themed list-view text colour like the native renderer - the frame never opens larger than the monitor work area; title-bar icon from the executable; upstream menu insert no longer reads UTF-8 as UTF-16 App: OS differences live in alkane_core::platform (settings in %APPDATA%\alkane-toolkit, owner-only secret files, NUL, console-less helper processes). SSH password logins use SSH_ASKPASS with the toolkit itself as the helper on every platform, replacing sshpass, which Windows lacks. Release builds are GUI-subsystem; headless modes attach to the parent console. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Headless UI workflow self-test of the WINDOWS build, under Wine on a private
|
||||
# Xvfb display: the same ALKANE_SELFTEST check as scripts/ui-selftest.sh (bench
|
||||
# fixtures rendered through the real wxMSW widgets, read back, and compared),
|
||||
# run against alkane-toolkit.exe. CI runs this on every build; the native
|
||||
# Windows smoke job (.gitea/workflows/windows-native.yml) repeats it on real
|
||||
# Windows.
|
||||
#
|
||||
# Usage: scripts/ui-selftest-windows.sh [alkane-toolkit.exe]
|
||||
# defaults to the cross-built release binary in the cargo target dir.
|
||||
set -u
|
||||
REPO=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
EXE="${1:-}"
|
||||
if [ -z "$EXE" ]; then
|
||||
sh "$REPO/scripts/build-gui-windows.sh" || exit 3
|
||||
TDIR=$(cd "$REPO" && cargo metadata --no-deps --format-version 1 --offline 2>/dev/null \
|
||||
| tr ',' '\n' | grep -o '"target_directory":"[^"]*"' | head -1 | cut -d'"' -f4)
|
||||
EXE="${TDIR:-$REPO/target}/x86_64-pc-windows-gnu/release/alkane-toolkit.exe"
|
||||
fi
|
||||
[ -f "$EXE" ] || { echo "executable not found: $EXE" >&2; exit 3; }
|
||||
# xvfb-run picks a free display and cleans it up; Wine needs an X server for
|
||||
# the window even though the self-test never shows it to anyone.
|
||||
xvfb-run -a -s '-screen 0 1280x850x24' \
|
||||
env ALKANE_SELFTEST=1 sh "$REPO/scripts/wine-run.sh" "$EXE"
|
||||
RC=$?
|
||||
echo "== ui-selftest-windows exit=$RC =="
|
||||
exit "$RC"
|
||||
Reference in New Issue
Block a user