Setup 2a2784943006b0c4f52e22cc2ec51a43e8007497d90da022798e739d83f805f0 Portable 1d9cfa6467d66604ef2f672969afdc288f46608913c35658f9c7466820ab01df Ariadne install UX: promoted from an end-of-install MessageBox popup to a dedicated wizard page. nsis/installer.nsh replaces the MessageBox customInstall with a `Page custom` (nsDialogs) that shows FIRST in the install flow (electron-builder's INCLUDE hook is placed above its own MUI_PAGE_* inserts and NSIS processes page directives in file order — that is the earliest hook we have without editing the template). Framed as "Options" so it reads naturally as a preamble. The page: Header: "Optional add-ons" Body: A 4-line explanation of Ariadne's Thread and the trade-off. Checkbox: "Install Ariadne's Thread (recommended)" — pre-checked. Footer: Notes the UAC prompt and that Theseus install continues. Skipped entirely (Abort) if Ariadne is already installed. State is saved from AriadnePageLeave into $InstallAriadneFlag; customInstall runs the chain-installer iff BST_CHECKED. Uninstall side unchanged (still MessageBox — a full custom uninstall page would be overkill for one Y/N during a rare event). Also carries 1e5d670: don't re-route same-origin navigations through navigateTab. Was silently breaking every site whose in-page form POSTs — Startpage's search box submits to /do/search via POST, and navigateTab -> loadURL always GETs, dropping the body. Same-origin navigations now stay on Chromium's native path. Deployed: scp + sia-upload of both trees. Verified HEAD 200 on the installer, live manifest reads 0.1.1 2026-08-31, VPS hashes match. 0.1.0 (never deployed for long — same-day iteration) is preserved in _prev/ for rollback.
90 lines
3.6 KiB
NSIS
90 lines
3.6 KiB
NSIS
; Theseus Navigator NSIS include — bundles Ariadne's Thread as an opt-out.
|
|
;
|
|
; UI: a dedicated wizard page with a real checkbox (pre-checked) instead of a
|
|
; MessageBox popup. Shown FIRST in the install flow because electron-builder's
|
|
; template places our `!include` before its own MUI_PAGE_* inserts and NSIS
|
|
; processes page directives in file order — so this is the earliest hook
|
|
; we have without editing the template. Framed as "Options" so it reads
|
|
; naturally as a preamble before the standard Welcome/License/Directory pages.
|
|
; Skipped entirely (`Abort`) if Ariadne's Thread is already installed, so
|
|
; upgrades of Theseus don't nag.
|
|
;
|
|
; The uninstall side stays a symmetric MessageBox (a full custom uninstaller
|
|
; page is overkill for one yes/no during a rare event).
|
|
|
|
!include "nsDialogs.nsh"
|
|
!include "LogicLib.nsh"
|
|
!include "MUI2.nsh"
|
|
|
|
Var AriadneCheckbox
|
|
Var InstallAriadneFlag
|
|
|
|
!define ARIADNE_INSTALLER "AriadneResolver-Setup-0.1.0.exe"
|
|
!define ARIADNE_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\{7E7A5F1C-3B4E-4C8A-9E1D-ARIADNERSLVR}_is1"
|
|
|
|
Page custom AriadnePageCreate AriadnePageLeave
|
|
|
|
Function AriadnePageCreate
|
|
; Skip the page entirely if Ariadne's Thread is already on this machine —
|
|
; nothing to offer. Registry lookup uses HKLM 64-bit view because Ariadne's
|
|
; Inno script sets ArchitecturesInstallIn64BitMode=x64compatible.
|
|
SetRegView 64
|
|
ReadRegStr $R0 HKLM "${ARIADNE_UNINST_KEY}" "UninstallString"
|
|
SetRegView lastused
|
|
StrCmp $R0 "" ariadne_page_show 0
|
|
StrCpy $InstallAriadneFlag "0"
|
|
Abort
|
|
|
|
ariadne_page_show:
|
|
!insertmacro MUI_HEADER_TEXT "Optional add-ons" "Choose whether to also install Ariadne's Thread alongside Theseus Navigator."
|
|
|
|
nsDialogs::Create 1018
|
|
Pop $0
|
|
StrCmp $0 "error" ariadne_page_bail 0
|
|
|
|
${NSD_CreateLabel} 0 0 100% 44u "Ariadne's Thread is a small system-wide resolver that lets Bitcoin Cash names (.bch, .x, ...) work in Chrome, Edge, Firefox, and every other browser on this machine.$\r$\n$\r$\nWithout it, only Theseus resolves these names. You can install or remove it later."
|
|
Pop $0
|
|
|
|
${NSD_CreateCheckbox} 0 60u 100% 12u "Install Ariadne's Thread (recommended)"
|
|
Pop $AriadneCheckbox
|
|
${NSD_Check} $AriadneCheckbox
|
|
|
|
${NSD_CreateLabel} 0 80u 100% 20u "It runs a UAC (admin) prompt of its own during install. Theseus Navigator's own setup continues after this page."
|
|
Pop $0
|
|
|
|
nsDialogs::Show
|
|
Return
|
|
|
|
ariadne_page_bail:
|
|
StrCpy $InstallAriadneFlag "0"
|
|
Abort
|
|
FunctionEnd
|
|
|
|
Function AriadnePageLeave
|
|
${NSD_GetState} $AriadneCheckbox $InstallAriadneFlag
|
|
FunctionEnd
|
|
|
|
!macro customInstall
|
|
; Read the state saved from AriadnePageLeave. BST_CHECKED == 1.
|
|
${If} $InstallAriadneFlag == ${BST_CHECKED}
|
|
; Ariadne's Inno installer runs its own UAC prompt (PrivilegesRequired=admin).
|
|
; ExecWait blocks until Ariadne finishes or the user cancels UAC; either
|
|
; way, Theseus install continues normally afterwards.
|
|
ExecWait '"$INSTDIR\resources\${ARIADNE_INSTALLER}" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART'
|
|
${EndIf}
|
|
!macroend
|
|
|
|
!macro customUnInstall
|
|
; Only offer to remove Ariadne if it's actually installed.
|
|
SetRegView 64
|
|
ReadRegStr $R0 HKLM "${ARIADNE_UNINST_KEY}" "UninstallString"
|
|
SetRegView lastused
|
|
StrCmp $R0 "" ariadne_skip_uninstall
|
|
|
|
MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON1 \
|
|
"Also uninstall Ariadne's Thread?$\r$\n$\r$\nRemoving it makes Bitcoin Cash names stop resolving in Chrome, Edge, Firefox, and every other browser on this machine. (Theseus's own uninstall does not depend on this — say No to keep the system-wide resolver.)" \
|
|
IDNO ariadne_skip_uninstall
|
|
ExecWait '$R0 /VERYSILENT /SUPPRESSMSGBOXES /NORESTART'
|
|
|
|
ariadne_skip_uninstall:
|
|
!macroend
|