Skip to content

feat: Windows installer with a bundled language model, plus credits - #7

Merged
TWadi merged 5 commits into
twadi/desktop-appfrom
twadi/installer
Nov 2, 2026
Merged

TWadi merged 5 commits into
twadi/desktop-appfrom
twadi/installer

Conversation

@TWadi

@TWadi TWadi commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #6 (merge that first).

What this adds

A Windows installer that needs nothing else (installer/)

uv run python installer/build.py stages a self-contained Open RAG and runs Inno Setup. The stage contains:

  • the app, published self-contained for win-x64
  • a uv-managed CPython 3.12 with the engine wheel and its locked dependencies (CPU torch)
  • the embedding and reranker models, copied from the Hugging Face cache
  • the Qwen3 4B Instruct GGUF, copied from Ollama and checked against its digest
  • llama.cpp's llama-server, CPU build b12052, checked against its sha256

The setup:

  • installs per user, without admin rights, into %LOCALAPPDATA%\Programs\Open RAG
  • keeps the library (%LOCALAPPDATA%\OpenRag) on uninstall and update
  • warns if the WebView2 runtime is missing

It comes as OpenRag-Setup.exe plus two .bin parts, each under GitHub's 2 GiB limit per release file, because the model alone is 2.5 GB. That's about 3.2 GB to download and 4.8 GB installed.

The app runs the bundled model

When engine/llm/ is present, the app:

  1. Starts llama-server on a free loopback port with a random key, passed through LLAMA_API_KEY so it never shows on a command line.
  2. Points the engine at it with --llm-url.
  3. Reports ready once both processes are ready.

ChildHost replaces EngineHost and runs both processes. It waits either for ORE_READY or for a /health probe, and rotates logs at 5 MB.

Credits

The sidebar says "Developed by Wadi & Ghassen" and opens a Credits sheet with our GitHub and LinkedIn links and the source code. The window opens only links on its own list (ExternalLinks), and a test checks that the sheet's links match that list.

Fix for #6

The Python .gitignore template ignored every lib/ folder, so desktop/web/src/lib (the engine client, the bridge, chat storage and the mock) was never committed. I pushed that fix to #6's branch, and it's merged here.

Test plan

  • dotnet test: 69 passed
  • Web: tsc -b, 15 tests passed
  • pytest and ruff pass
  • installer/smoke_test.py on the stage passes with model downloads blocked:
    • engine ready in 8 s and language model ready in 8 s
    • llama-server refuses requests without the key
    • the example manual indexes, and the question gets a cited answer in 24 s
  • The staged OpenRag.exe starts llama-server and the engine, and an existing library loads without re-indexing
  • Install from OpenRag-Setup.exe on a second Windows machine, ask a question offline, then uninstall

TWadi added 5 commits November 2, 2026 19:10
A bundled engine loads its models from models_dir/<org>--<name> under the same model names, so the index
fingerprint and existing indexes stay valid. --llm-url points the engine at the llama-server the app starts.
installer/build.py stages a self-contained Open RAG and runs Inno Setup:
the published app, a uv-managed CPython 3.12 with the engine and its locked
dependencies (CPU torch), the embedding and reranker models from the Hugging
Face cache, the Qwen3 GGUF from Ollama (digest-checked) and llama.cpp's
llama-server (pinned b12052, sha256-checked). The setup installs per user,
keeps the library on uninstall and comes in parts below GitHub's 2 GiB limit.

The app starts the bundled llama-server on a free loopback port with its own
key and points the engine at it with --llm-url. ChildHost replaces EngineHost
and runs both processes, waiting on ORE_READY or a /health probe. Logs rotate
at 5 MB. installer/smoke_test.py checks a stage or an installed app end to end.

The window also opens the credits' GitHub and LinkedIn links, and only those
(ExternalLinks).
The sidebar says who developed Open RAG and opens a Credits sheet with both
authors' GitHub and LinkedIn and the source code. Links open in the default
browser through the window, which accepts only the links on its own list; a
test checks the sheet's links against it.
@TWadi
TWadi merged commit 8ae05f3 into twadi/desktop-app Nov 2, 2026
1 of 2 checks passed
@TWadi
TWadi deleted the twadi/installer branch November 2, 2026 19:09
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.

1 participant