fix(web): seed KiCad config for all tools to skip the first-run wizard
Every standalone tool (eeschema, pcbnew, calculator) boots through common/single_top.cpp, which runs STARTWIZARD::CheckAndRun() — the first-run "KiCad Setup" wizard. It shows whenever any provider (SETTINGS / LIBRARIES / PRIVACY) reports NeedsUserInput(), which is always true on our ephemeral MEMFS with no config, and its modal loop crashes Asyncify. Only eeschema was seeding config, so pcbnew and the calculator hit the wizard. Flip TOOL_NEEDS_CONFIG_SEED to true for pcbnew and calculator so seedKicadConfig runs in preRun for all three (it writes the kicad_common.json privacy flags and the sym/fp/design-block lib-tables the providers check), making NeedsUserInput() false and skipping the wizard. Verified in-browser: pcbnew renders a board at /p/mytest/pcbnew/bottom.kicad_pcb and the calculator loads, both wizard-free. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6681e0dd82
commit
c77fed2ef1
2 changed files with 10 additions and 7 deletions
2
kicad
2
kicad
|
|
@ -1 +1 @@
|
|||
Subproject commit d701b2365aeb327b9737d97b72aafa1da4d07dc2
|
||||
Subproject commit 3ced43c0b471b607ce263f78216f7e6cf4e834ed
|
||||
|
|
@ -27,15 +27,18 @@ export const TOOL_ARGV0: Record<Tool, string> = {
|
|||
};
|
||||
|
||||
/**
|
||||
* Tools whose standalone entry (single_top.cpp) runs the first-run setup wizard
|
||||
* on launch. That wizard's modal loop crashes Asyncify in our ephemeral MEMFS,
|
||||
* so for these we seed a default KiCad config before main() to suppress it.
|
||||
* Mirrors which harness HTMLs include `seedKicadConfig` in preRun (eeschema only).
|
||||
* Every standalone tool here boots through common/single_top.cpp, which runs
|
||||
* STARTWIZARD::CheckAndRun() — the first-run "KiCad Setup" wizard. It shows
|
||||
* whenever any provider (SETTINGS / LIBRARIES / PRIVACY) reports
|
||||
* NeedsUserInput(), which is always true on our ephemeral MEMFS with no config,
|
||||
* and its modal loop crashes Asyncify. So for all of them we seed a default
|
||||
* KiCad config before main() (kicad_common.json privacy flags + the lib-tables
|
||||
* the providers check) so NeedsUserInput() is false and the wizard is skipped.
|
||||
*/
|
||||
export const TOOL_NEEDS_CONFIG_SEED: Record<Tool, boolean> = {
|
||||
pcbnew: false,
|
||||
pcbnew: true,
|
||||
eeschema: true,
|
||||
calculator: false,
|
||||
calculator: true,
|
||||
};
|
||||
|
||||
/** KiCad user settings dir for this build (PATHS::GetUserSettingsPath()). */
|
||||
|
|
|
|||
Loading…
Reference in a new issue