Skip to main content

Crate pacenotes_installer

Crate pacenotes_installer 

Source
Expand description

Pacenotes Installer: common controls, the developer self-test, then the wizard. The Win32-free logic lives in the sibling library (lib.rs).

ModulesΒ§

api πŸ”’
The server’s endpoints: URLs in, parsed bodies out. The transport is http and the thread is worker.
crash πŸ”’
A GUI binary with panic = "abort" has nowhere to print, so a panic would be a vanished window and an offset into a stripped exe. The hook runs before the abort: it writes where and why into the run log, and tells the user in their language where that is, offering to show the file.
elevation πŸ”’
Restarting as administrator, for a game folder this account cannot write (P11): what the new instance carries over so nothing is asked twice, and the UAC launch itself.
game_process πŸ”’
http πŸ”’
The installer’s only HTTP client: WinHTTP, whose TLS is the OS’s own Schannel. Blocking, so it runs on the worker thread, never the UI thread.
i18n πŸ”’
Localization: the strings live in per-language STRINGTABLEs in res/installer.rc, and choosing a language is SetThreadUILanguage. The IDS_* ids below match the #defines there.
package_download πŸ”’
Fetching a package into the cache. A payload enters the cache only after its sha256 matched the manifest, so nothing downstream verifies it again.
run_header πŸ”’
selftest πŸ”’
Developer checks that run one real network path without the wizard and report to a file or a MessageBox, since a GUI-subsystem binary has no stdout.
single_instance πŸ”’
ui πŸ”’
The Win32 vocabulary the wizard pages are written in.
wizard πŸ”’
The wizard: a comctl32 PropertySheet in wizard mode, one page per scene of installer/DESIGN.md rev. 2. Scene 1 shares the sheet’s frame rather than being the small window DESIGN.md describes, since a sheet has one size.
worker πŸ”’
The one background thread. A worker never touches a control: it posts messages and the UI thread acts on them.

ConstantsΒ§

DEFAULT_SERVER πŸ”’
From installer/.env, read by build.rs; --server <url> overrides it, which is how the tests reach a local server.

FunctionsΒ§

argument_after πŸ”’
cache_override πŸ”’
--cache <dir>, an override for development: the cache belongs in the game folder, which is not known until scene 3 settles one.
init_common_controls πŸ”’
main πŸ”’
server_url πŸ”’