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:
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
Application manifest for alkane-toolkit.exe (embedded by windows/alkane-toolkit.rc).
|
||||
- Common Controls v6: themed native controls (Windows 10/11 visual styles)
|
||||
instead of the Windows 95 look.
|
||||
- Per-monitor DPI awareness v2: crisp at any scale factor; wx rescales
|
||||
windows when they move between monitors.
|
||||
- supportedOS Windows 10/11 (the Rust toolchain's own minimum).
|
||||
- activeCodePage UTF-8: the C runtime and any narrow-string Win32 call speak
|
||||
the same UTF-8 the Rust side does.
|
||||
- longPathAware: settings/export paths beyond MAX_PATH work when enabled.
|
||||
- asInvoker: never asks for elevation.
|
||||
-->
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity type="win32" name="Blueflare.AlkaneToolkit" version="1.0.0.0"
|
||||
processorArchitecture="amd64"/>
|
||||
<description>Alkane Toolkit</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0" processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df" language="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@@ -0,0 +1,42 @@
|
||||
// Windows resources for alkane-toolkit.exe, compiled by crates/alkane-gui/build.rs
|
||||
// with the windres named by `wx-config --rescomp`. ALKANE_VER_* come from the
|
||||
// crate version (which CI stamps per release).
|
||||
|
||||
// wxMSW's own resources (stock cursors and bitmaps). Its built-in manifest is
|
||||
// suppressed: the application manifest below replaces it.
|
||||
#define wxUSE_NO_MANIFEST 1
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
// The first icon in the file is the one Explorer and the taskbar show.
|
||||
aaaa ICON "alkane-toolkit.ico"
|
||||
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "alkane-toolkit.exe.manifest"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION ALKANE_VER_MAJOR, ALKANE_VER_MINOR, ALKANE_VER_PATCH, 0
|
||||
PRODUCTVERSION ALKANE_VER_MAJOR, ALKANE_VER_MINOR, ALKANE_VER_PATCH, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Blueflare"
|
||||
VALUE "FileDescription", "Alkane Toolkit"
|
||||
VALUE "FileVersion", ALKANE_VER_STR
|
||||
VALUE "InternalName", "alkane-toolkit"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2026 Blueflare (MIT License)"
|
||||
VALUE "OriginalFilename", "alkane-toolkit.exe"
|
||||
VALUE "ProductName", "Alkane Toolkit"
|
||||
VALUE "ProductVersion", ALKANE_VER_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 1200
|
||||
END
|
||||
END
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# Regenerate alkane-toolkit.ico (the Windows executable/taskbar icon) from the
|
||||
# in-repo microchip glyph: a white chip on a rounded amber tile, at the sizes
|
||||
# Windows asks for (16-256 px). Needs rsvg-convert and ImageMagick; the .ico is
|
||||
# committed, so a normal build never runs this.
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
GLYPH=../assets/icons/microchip-solid-full.svg
|
||||
TMP=$(mktemp -d)
|
||||
trap 'rm -rf "$TMP"' 0
|
||||
sed 's/currentColor/#ffffff/g; s/<svg /<svg fill="#ffffff" /' "$GLYPH" > "$TMP/glyph.svg"
|
||||
for s in 16 20 24 32 40 48 64 256; do
|
||||
r=$((s * 22 / 100)); g=$((s * 64 / 100)); o=$(((s - g) / 2))
|
||||
rsvg-convert -w "$g" -h "$g" "$TMP/glyph.svg" -o "$TMP/g$s.png"
|
||||
convert -size "${s}x${s}" xc:none -fill '#d9822b' \
|
||||
-draw "roundrectangle 0,0 $((s - 1)),$((s - 1)) $r,$r" \
|
||||
"$TMP/g$s.png" -geometry "+$o+$o" -composite "PNG32:$TMP/i$s.png"
|
||||
done
|
||||
convert "$TMP"/i16.png "$TMP"/i20.png "$TMP"/i24.png "$TMP"/i32.png "$TMP"/i40.png \
|
||||
"$TMP"/i48.png "$TMP"/i64.png "$TMP"/i256.png alkane-toolkit.ico
|
||||
echo "wrote $(pwd)/alkane-toolkit.ico"
|
||||
Reference in New Issue
Block a user