How to validate visual-page-editor on macOS, Linux, and Docker, and how to simulate clean install environments without cluttering the main README.
App version comes from VERSION and package.json. Build scripts read it automatically. To bump: edit VERSION (and package.json if needed); keep rpm/visual-page-editor.spec %define version in sync if you run rpmbuild directly.
From the repo root:
./scripts/test-platforms.sh- macOS:
bin/visual-page-editor --helpand required paths. - Docker (optional): builds image if missing, runs
docker run … --help(fails gracefully if Docker is unavailable). - Arm64-branch alignment: baseline types,
build-macos.sh, ARM64-related strings. - Version / installers:
VERSION,package.json, packaging scripts.
| Goal | Command | Notes |
|---|---|---|
No global nw on PATH |
npm run verify:nw |
Temp dir copies package.json, lockfile, bin/, src/, js/ (so prepare → npm run build succeeds), then npm ci; launcher --help with minimal PATH. |
| Linux VM–style (Docker) | ./scripts/test-install-docker.sh or npm run test:install-docker |
Fresh Ubuntu container, copies repo (no node_modules), runs bootstrap-node.sh. Requires Docker. |
The nw package installs the NW.js SDK under node_modules/ (gitignored). The launcher prefers node_modules/.bin/nw, then ~/.nwjs, then PATH, or (with AUTO_DOWNLOAD_NWJS) a download. Default NWJS_VERSION matches dependencies.nw in package.json (e.g. 0.109.1-sdk → defaults use 0.109.1).
Canonical pin: package.json → dependencies.nw (e.g. 0.109.1-sdk). The same X.Y.Z must appear as defaults in bin/visual-page-editor, Dockerfile.desktop, Docker/Compose scripts, and Linux packaging helpers—not in build-macos.sh (that script uses its own defaults for legacy .app builds).
npm run check:nw-alignThis is read-only (no file edits). Run before a release or after bumping nw. It does not replace macOS smoke tests (install-desktop, ./bin/visual-page-editor). Requires node on PATH.
Bump workflow: (1) Set dependencies.nw to X.Y.Z-sdk. (2) npm install and commit package-lock.json. (3) Update default literals in the files listed by the check if it fails. (4) Re-run npm run check:nw-align.
Use this to test bootstrap + npm + NW.js without Homebrew/nvm/conda Node leaking from your shell. The script copies the tree (excluding .git, node_modules, .tools, …) into .vpe-fresh-install-runs/<N>/, then runs install-desktop with PATH=/usr/bin:/bin only.
./scripts/test-fresh-install-mac.sh 1Use another integer (2, 3, …) for a new disposable copy. Output is gitignored.
rm -rf .vpe-fresh-install-runsnpm script: npm run test:install-mac
See also INSTALL-MAC.md for user-facing install and troubleshooting (conda, ENOENT, cache).
| Platform | How to run | Notes |
|---|---|---|
| macOS | ./bin/visual-page-editor [files...] |
Prefers node_modules/.bin/nw, then ~/.nwjs/nwjs-sdk-v*-osx-*, then versioned SDK under /Applications (not generic nwjs.app). |
| Linux (native) | ./bin/visual-page-editor [files...] |
Same launcher; nw on PATH or auto-download when enabled. |
| Docker (Linux) | ./docker-run.sh [files...] |
Dockerfile.desktop; Xvfb when no DISPLAY. On macOS host: XQuartz + allow network clients for GUI. |
After merging arm64-support, the tree should include baseline types (main/margin), drawer behavior, build-macos.sh ARM64 handling, XSD fallback in nw-app.js, and related XML/TextLine updates. scripts/test-platforms.sh greps for key strings to confirm alignment.