@jiangshangmuyun on X updated on Windows and found a new magpie while
"the original is still there". That is by design since 14807bcf2: a
magpie-windows-amd64.exe kept in a folder of the user's own is asked
about and installed to <folder>\magpie\magpie.exe, a copy, and the
download is left where it was. Nothing said it could go.
Now the install dialog (installDialog, Windows' task dialog) has a
footer naming the exe it was opened from: "Once magpie is installed,
you can delete D:\Tools\magpie-windows-amd64.exe." It is in each
language the dialog speaks (en, zh, zh-TW, ja, de), and stays under a
refusal too. The file is never deleted by magpie; only the words are
new. The footer is TASKDIALOGCONFIG's pszFooter (offset 132 in the
packed 64-bit layout), left empty when the exe can't be told.
Tests: TestInstallDialogSaysTheDownloadCanGo (every language names
the exe once, no format error; none without an exe). Broken by hand:
zh's text without %s goes red with %!(EXTRA ...).
Run: go test ./internal/gui/ ./internal/update/ on mote (ok) and on
the Windows box: the new and existing install tests ok; 11 reds there
(TestGatewayHeldByAContainer, the four %AppData% import rows,
TestProviderSaveClientCert, TestPageAwayLetsStatsGo,
TestPluginAgentMissingSaysSo, TestGatewayModeStatsNameTheGatewaySessions,
TestUpdateThatWontStart, TestPackagedByDpkg) fail the same at a fresh
origin/main 9dcec6751 and are open (#6068, #4603, #6810, #5928, #6059); GOOS=windows go vet (amd64, arm64) of
internal/gui and internal/update on mote; gofmt -l clean. Real dialog:
a throwaway test (not committed) opened taskDialog on xiaomi-gpu's
console session with comctl32 6 and read it back through UI
Automation, en and zh: the footer is there under the buttons, full
path included.
Not run: a Linux go vet of internal/gui (the box has no gtk4/webkit
headers; installdir.go is pure Go and compiles on darwin). Not tried:
the real installed app's first start from D:\, or a screenshot of the
dialog (the console renders black over SSH-started captures).