feat(lite): switch the archive to zip -9 and download the WebView2 installer on demand - #785
Open
nieyuanhong wants to merge 2 commits into
Open
feat(lite): switch the archive to zip -9 and download the WebView2 installer on demand#785nieyuanhong wants to merge 2 commits into
nieyuanhong wants to merge 2 commits into
Conversation
…staller on demand - build the all-platforms archive with Python zipfile (deflate -9, deterministic entry order); codex-proxy.sh is written with the 0755 bit so POSIX extraction keeps it executable; Python 3 is now a packaging requirement - stop bundling the Evergreen Bootstrapper (~2 MB); explicit --mode=webview2 without the runtime now asks, then downloads it from Microsoft's official endpoint, verifies the Authenticode signature (valid, Microsoft-signed) and runs /silent /install, caching the downloader in the temp directory; failures fall back to opening the official install page - drop scripts/portable/download-webview2-bootstrapper.mjs and its npm script; CI no longer downloads, verifies or packages the installer - update test-portable.mjs (zip metadata extraction, bootstrapper-absence assertions) and the portable contract tests
- portable README: zip archive, runtime download + Authenticode verification, CODEX_PROXY_WEBVIEW2_BOOTSTRAPPER override for offline environments - README (zh-CN/en/zh-TW/zh-HK/ja): artifact renamed to .zip and the new webview2 install prompt behavior - CHANGELOG: Added / Changed / Removed entries under [Unreleased]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Follow-up improvements to the No-Node Lite distribution:
codex-proxy.shis stored with the 0755 permission bit so it stays executable after extraction on Linux/macOS; entries are written in a deterministic order, making the archive reproducible. Packaging now requires Python 3 (zipfile, preinstalled on all runners).--mode=webview2is requested explicitly and the WebView2 Runtime is missing, the launcher asks first (15-second timeout). After confirmation it downloads the Bootstrapper from Microsoft's official endpoint (go.microsoft.com/fwlink/?linkid=2124703), verifies the MZ header and size, verifies the Authenticode signature (must be signed by Microsoft — the same standard as the release CI'sGet-AuthenticodeSignaturecheck), and runs it with/silent /install, polling until the runtime becomes ready. The downloaded installer is cached in the system temp directory and reused. If the download or the signature check fails, the official installation page is opened instead.automode behavior is unchanged (still falls back to the browser directly). Fully offline environments can point to a local installer viaCODEX_PROXY_WEBVIEW2_BOOTSTRAPPER.Changes
scripts/portable/build-portable.mjs: zip -9 packaging; removed the--webview2-bootstrapperoption and the manifestbootstrapperfield (replaced withruntimeInstall: "download-on-demand")scripts/portable/server.mjs: on-demand installer download + Authenticode verification + temp-directory cachescripts/portable/download-webview2-bootstrapper.mjsand thedownload:webview2-bootstrappernpm script; CI no longer downloads, verifies, or packages the installerscripts/portable/test-portable.mjs,tests/unit/portable/portable-contract.test.ts: zip metadata extraction,codex-proxy.shpermission assertions, and an assertion that the installer is never bundled.github/workflows/lite-ci.yml,release.yml: artifact globs changed to*.zipREADME.mdplus the EN/TW/HK/JA versions,scripts/portable/README.md, andCHANGELOG.md([Unreleased] Added/Changed/Removed) updated accordinglyTesting
npm run test:litepassed (launcher smoke, no-Node guidance, HTTP probe, default data directory);npm testandnpm run typecheck:scriptspassedMicrosoftEdgeWebView2Setup.exeinside,codex-proxy.shmode 0755