Skip to content

feat: add Windows support - #45

Merged
comppaz merged 8 commits into
mainfrom
feat/windows-support
Dec 17, 2025
Merged

feat: add Windows support#45
comppaz merged 8 commits into
mainfrom
feat/windows-support

Conversation

@comppaz

@comppaz comppaz commented Dec 17, 2025

Copy link
Copy Markdown
Collaborator

Summary

Adds full Windows support for the Think desktop app, including:

  • CI/CD: New build-windows job in release workflow that builds NSIS installer
  • Native Messaging: Replaced winreg npm dependency with native reg.exe commands
  • Ollama Download: Replaced curl (not available on Windows) with native https module with progress reporting
  • Database: Graceful FTS5 fallback when module is unavailable (rotki-pysqlcipher3 on Windows doesn't include FTS5)
  • Password Bug Fix: Use binary mode for salt file to avoid Windows UTF-8 BOM issues
  • Build Scripts: Cross-platform Node.js build scripts replacing shell commands
  • Packaging: NSIS installer config with install directory choice, desktop/start menu shortcuts

Issue

Closes #43

Changes

File Change
.github/workflows/release.yml Added Windows build job, uploads .exe artifact
app/build/icon.ico Windows app icon
app/electron/install-native-host.js Use reg.exe instead of winreg module
app/electron/main.js Native https download with progress, redirect handling
app/package.json NSIS config, added png-to-ico, removed winreg
backend/app/db/migrations.py FTS5 availability check with graceful fallback
backend/app/services/secrets.py Binary mode for salt file read/write
backend/native_host/stub_win.spec PyInstaller spec for Windows stub
backend/scripts/decrypt_db.py Cross-platform support, CLI args
backend/think.spec Cross-platform sqlite-vec detection
scripts/build-backend.js Cross-platform backend build script
scripts/build-stub.js Cross-platform stub build script

Test Plan

  • Windows build completes successfully in CI
  • NSIS installer works (install, uninstall, shortcuts)
  • Native messaging registers correctly in Chrome/Edge/Firefox
  • Ollama download works with progress reporting
  • Database password unlock works (salt file encoding fix)
  • App starts and functions normally on Windows
  • Mac build still works (no regressions)

Antonio Maiolo added 7 commits December 17, 2025 12:26
- Add Windows icon (icon.ico) for NSIS installer
- Configure electron-builder with NSIS settings
- Update PyInstaller spec for cross-platform sqlite-vec detection
- Create stub_win.spec for Windows native messaging stub
- Add cross-platform build scripts (build-backend.js, build-stub.js)
- Add Windows build job to GitHub Actions release workflow
- Mark alpha/beta releases as prerelease automatically
The snok/install-poetry action doesn't add Poetry to PATH correctly on Windows.
Using pip install instead.
The sqlite-vec Windows release is distributed as .tar.gz, not .zip.
On Windows, read_text()/write_text() can add UTF-8 BOM which causes
the derived encryption key to differ between setup and unlock.

Using binary mode (read_bytes/write_bytes) avoids encoding issues
entirely since the salt is just ASCII hex characters.
rotki-pysqlcipher3 on Windows doesn't include FTS5 support.
Migration 8 now checks if FTS5 is available before creating
the virtual table. Search falls back to vector-only when FTS5
is unavailable.

Also improved decrypt_db.py with cross-platform support and
better CLI arguments.
- Replace blocking curl download with async https download
- Show real download progress (5-80%) instead of hanging at 10%
- Replace winreg dependency with built-in reg.exe commands
- Remove unused winreg dependency from package.json
@comppaz comppaz changed the title feat: windows support feat: add Windows support Dec 17, 2025
@comppaz
comppaz marked this pull request as ready for review December 17, 2025 16:26
@comppaz
comppaz merged commit c187deb into main Dec 17, 2025
@comppaz
comppaz deleted the feat/windows-support branch December 17, 2025 16:28
@comppaz comppaz mentioned this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Windows support (.exe installer)

1 participant