Install
openclaw skills install @ully/html2app将本地网页离线封装为 macOS 或 Windows 桌面应用
openclaw skills install @ully/html2appPackage existing web content; do not rewrite its visual product unless packaging exposes a concrete compatibility issue.
Run scripts/inspect_web_app.sh <project-dir> first. Treat a standalone .html file as a static input. For a framework project, use its existing production build command and package the build output, never its development server.
Read references/packaging-matrix.md before selecting targets or release settings.
Stop and explain the limitation if the site requires a server-side API, database, OAuth callback, CDN-only assets, or secret. Local Electron packaging cannot make those dependencies offline by itself.
electron-builder to the project, preserving existing package tooling.BrowserWindow and loads the selected local HTML with loadFile.contextIsolation: true, sandbox: true, and nodeIntegration: false. Add a preload bridge only for explicitly required local capabilities; validate every input exposed through it.start, dist, and platform-specific package scripts. Configure electron-builder with app name, identifier, output directory, files allowlist, and an icon.Use a user-provided icon when available. Otherwise, generate a simple, high-contrast default icon that reflects the app's purpose; never leave the Electron default icon in a deliverable.
scripts/generate_default_icon_macos.sh <output-dir> to create icon.svg and icon.icns.build.mac.icon to the generated .icns. On Windows, provide a matching .ico; use a PNG/SVG only where the target accepts it.Contents/Resources contains the intended icon. Record whether it is a generated fallback or a user-supplied brand asset.npm install and confirm that Electron's platform binary actually downloaded; a successful dependency-resolution phase alone is insufficient.arm64, x64, or universal on macOS). Match it to the user's intended devices.~/Library/Caches/electron/. Use the cached-runtime fallback only when they match; do not relabel a different architecture or version as the requested release.electron-builder fails before producing artifacts, retain its complete log and report the blocker. On macOS, use scripts/package_cached_electron_macos.sh only for an available matching cached Electron runtime.Keep SQLite in the Electron main process. Place the database at path.join(app.getPath('userData'), '<app>.sqlite'); never write it beside renderer files or under Contents/Resources.
node:sqlite, verify the bundled Electron Node version supports it; otherwise choose and package a compatible dependency.CREATE TABLE IF NOT EXISTS or a versioned migration table.task:add, task:list), then expose only those methods through preload. Do not expose generic SQL execution to the renderer.loadFile and normal relative links work for static multi-page navigation..dmg and .zip; on Windows, produce NSIS .exe and optionally portable .exe..app with codesign --verify --deep --strict. Treat this as an integrity check, not Gatekeeper approval. Run spctl --assess --type execute and report its result.userData and not inside the app bundle.Run scripts/run_fixture_checks.sh whenever changing the inspection or packaging workflow. Read references/test-cases.md before packaging a multi-page or data-persisting project. Treat its acceptance criteria as release gates, not suggestions.
For local storage, keep mutable data in app.getPath('userData'), never inside the packaged app. Expose storage through a narrow preload API; do not enable renderer Node access. For a remote backend, stop and identify the service, credentials, connectivity, and offline behavior that must be decided before packaging.
scripts/inspect_web_app.sh: enumerate likely entry points, package scripts, and remote asset/API references.scripts/package_cached_electron_macos.sh: assemble a locally testable .app from an exact cached Electron archive when normal binary acquisition is unavailable.scripts/generate_default_icon_macos.sh: create a high-contrast fallback SVG and macOS .icns icon.scripts/run_fixture_checks.sh: generate and inspect static, local-storage, and remote-backend fixtures.references/packaging-matrix.md: target selection and signing constraints.references/test-cases.md: packaging test cases and acceptance criteria.