Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
ci: prepare v1.5.0 release pipeline
EtienneLescot1a17f8b32ed0
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERSindex cfee36d65..2a3000ef8 100644--- a/.github/CODEOWNERS+++ b/.github/CODEOWNERS@@ -1 +1 @@-* @siddharthvaddem+* @EtienneLescotdiff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 73029f6bc..44a73e2ac 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -1,36 +1,49 @@-name: Build Electron Appon:+ push:+ tags:+ - "v*"workflow_dispatch:inputs:arch:- description: 'Architecture to build'+ description: "macOS architecture to build"required: true- default: 'both'+ default: "both"type: choiceoptions:- arm64- x64- both+ release_tag:+ description: "Optional release tag to create or update, e.g. v1.5.0"+ required: false+ type: string++permissions:+ contents: write++concurrency:+ group: build-${{ github.ref_name }}-${{ github.event.inputs.release_tag || 'artifacts' }}+ cancel-in-progress: falsejobs:build-windows:+ name: Windows installerruns-on: windows-lateststeps:- name: Checkout code- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Setup Node.js- uses: actions/setup-node@v3+ uses: actions/setup-node@v4with:- node-version: '22'+ node-version: 22+ cache: npm- name: Install dependenciesrun: npm ci- # Cache the downloaded caption model so we don't re-fetch from HuggingFace every run- # (and to avoid 429s when the platform matrix builds hit it at once).- name: Cache caption assetsuses: actions/cache@v4with:@@ -38,151 +51,129 @@ jobs:key: caption-assets-${{ hashFiles('scripts/fetch-caption-model.mjs') }}- name: Build Windows app- run: npm run build:win- env:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}-- - name: Upload Windows build+ run: npm run build:win -- --publish never++ - name: Upload Windows installeruses: actions/upload-artifact@v4with:- name: windows-installer- path: release/**/*.exe+ name: openscreen-windows+ path: release/**/Openscreen.Setup.*.exe+ if-no-files-found: errorretention-days: 30build-macos:+ name: macOS ${{ matrix.arch }} DMGruns-on: macos-lateststrategy:+ fail-fast: falsematrix:- arch: ${{ github.event.inputs.arch == 'both' && fromJSON('["arm64", "x64"]') || fromJSON(format('["{0}"]', github.event.inputs.arch)) }}-+ arch: ${{ fromJSON((github.event_name == 'workflow_dispatch' && github.event.inputs.arch != 'both') && format('["{0}"]', github.event.inputs.arch) || '["arm64", "x64"]') }}steps:- # ─── Checkout ─────────────────────────────────────────────- name: Checkout codeuses: actions/checkout@v4- # ─── Setup Node.js ────────────────────────────────────────- name: Setup Node.jsuses: actions/setup-node@v4with:node-version: 22cache: npm- # ─── Setup Python (needed by some native deps) ────────────- name: Setup Pythonuses: actions/setup-python@v5with:- python-version: '3.11'+ python-version: "3.11"- # ─── Install Dependencies ─────────────────────────────────- name: Install dependenciesrun: npm ci- # ─── Ensure sharp prebuilt binary (+ bundled libvips) ─────- # `npm ci` can leave sharp without its prebuilt binary/vendored libvips,- # which makes electron-builder's native rebuild fail ("vips-cpp.42 not- # found"). Re-fetch the prebuilt (never compile from source).- name: Ensure sharp prebuiltrun: npm rebuild sharpenv:npm_config_build_from_source: "false"- # ─── Cache caption assets ─────────────────────────────────- # Avoid re-fetching the Whisper model from HuggingFace every run (and 429s under the matrix).- name: Cache caption assetsuses: actions/cache@v4with:path: caption-assetskey: caption-assets-${{ hashFiles('scripts/fetch-caption-model.mjs') }}- # ─── Import Code Signing Certificate ──────────────────────- # This is the KEY step that makes CI signing work.- # We create a temporary keychain, import the .p12 cert into it,- # and set it as the default so codesign can find it.+ - name: Resolve macOS signing+ id: signing+ env:+ MAC_CERTIFICATE_P12: ${{ secrets.MAC_CERTIFICATE_P12 }}+ MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}+ MAC_CSC_NAME: ${{ secrets.MAC_CSC_NAME }}+ APPLE_ID: ${{ secrets.APPLE_ID }}+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}+ APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}+ run: |+ if [[ -n "$MAC_CERTIFICATE_P12" && -n "$MAC_CERTIFICATE_PASSWORD" && -n "$MAC_CSC_NAME" && -n "$APPLE_ID" && -n "$APPLE_TEAM_ID" && -n "$APPLE_APP_SPECIFIC_PASSWORD" ]]; then+ echo "enabled=true" >> "$GITHUB_OUTPUT"+ else+ echo "enabled=false" >> "$GITHUB_OUTPUT"+ fi+- name: Import code signing certificate+ if: steps.signing.outputs.enabled == 'true'env:MAC_CERTIFICATE_P12: ${{ secrets.MAC_CERTIFICATE_P12 }}MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}run: |- # Create a temporary keychain- KEYCHAIN_PATH=$RUNNER_TEMP/build.keychain-db- KEYCHAIN_PASSWORD=$(openssl rand -base64 32)+ KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain-db"+ KEYCHAIN_PASSWORD="$(openssl rand -base64 32)"- # Create and configure keychainsecurity create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"- # Decode and import certificate- echo "$MAC_CERTIFICATE_P12" | base64 --decode > $RUNNER_TEMP/certificate.p12- security import $RUNNER_TEMP/certificate.p12 \+ echo "$MAC_CERTIFICATE_P12" | base64 --decode > "$RUNNER_TEMP/certificate.p12"+ security import "$RUNNER_TEMP/certificate.p12" \-k "$KEYCHAIN_PATH" \-P "$MAC_CERTIFICATE_PASSWORD" \-T /usr/bin/codesign \-T /usr/bin/security- # Allow codesign to access the keychain without UI promptsecurity set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"-- # Add to keychain search path (makes it the default)security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | tr -d '"')-- # Verify the identity is availablesecurity find-identity -v -p codesigning "$KEYCHAIN_PATH"+ rm -f "$RUNNER_TEMP/certificate.p12"- # Clean up the .p12 file- rm -f $RUNNER_TEMP/certificate.p12-- # ─── Build Vite + Electron ────────────────────────────────- name: Build Vite + Electronrun: npx tsc && npx vite build- # ─── Build native macOS helpers ───────────────────────────- # The package step below calls electron-builder directly (not `npm run build:mac`),- # so the Swift screencapturekit + cursor helpers must be compiled here first or the- # packaged app ships without them (no recording, "cursor helper couldn't be found").- # Build the matrix arch into electron/native/bin/darwin-<arch> so each DMG gets its- # own native binary.- name: Build native macOS helpersrun: npm run build:native:macenv:OPENSCREEN_MAC_HELPER_ARCHS: ${{ matrix.arch }}- # ─── Package with electron-builder ────────────────────────- # electron-builder handles deep codesigning the .app bundle- # "notarize: false" in electron-builder.json5 prevents it from- # trying its own notarization flow- name: Package .app bundle- run: npx electron-builder --mac --${{ matrix.arch }} --dir+ run: npx electron-builder --mac --${{ matrix.arch }} --dir --publish neverenv:- CSC_NAME: "Samir Patil (N26FZ4GW28)"- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ CSC_NAME: ${{ secrets.MAC_CSC_NAME }}+ CSC_IDENTITY_AUTO_DISCOVERY: ${{ steps.signing.outputs.enabled == 'true' && 'true' || 'false' }}- # ─── Read version from package.json ───────────────────────- name: Get versionid: version- run: echo "version=$(node -p 'require(\"./package.json\").version')" >> $GITHUB_OUTPUT+ run: |+ VERSION="$(node -e "console.log(require('./package.json').version)")"+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"- # ─── Locate the .app bundle ───────────────────────────────- name: Find .app bundleid: find_apprun: |VERSION="${{ steps.version.outputs.version }}"- echo "=== Release directory contents ==="- ls -laR "release/${VERSION}/" || echo "release/${VERSION}/ not found"- echo "=== Searching for .app bundle ==="- APP_BUNDLE=$(find "release/${VERSION}" -maxdepth 4 -name "*.app" -type d | head -n1)- if [ -z "$APP_BUNDLE" ]; then+ APP_BUNDLE="$(find "release/${VERSION}" -maxdepth 4 -name "*.app" -type d | head -n1)"+ if [[ -z "$APP_BUNDLE" ]]; thenecho "::error::No .app bundle found in release/${VERSION}/"+ find "release/${VERSION}" -maxdepth 4 -print || trueexit 1fi- echo "app_bundle=$APP_BUNDLE" >> $GITHUB_OUTPUT- echo "Found: $APP_BUNDLE"+ echo "app_bundle=$APP_BUNDLE" >> "$GITHUB_OUTPUT"- # ─── Verify .app signature ────────────────────────────────- name: Verify .app code signature+ if: steps.signing.outputs.enabled == 'true'run: codesign --verify --deep --strict "${{ steps.find_app.outputs.app_bundle }}"- # ─── Create DMG ───────────────────────────────────────────- name: Create DMGid: dmgrun: |@@ -193,6 +184,8 @@ jobs:DMG_OUTPUT="${RELEASE_DIR}/${DMG_NAME}"STAGING="${RELEASE_DIR}/dmg-staging"+ rm -rf "$STAGING"+ rm -f "$DMG_OUTPUT"mkdir -p "$STAGING"cp -R "${{ steps.find_app.outputs.app_bundle }}" "$STAGING/"ln -s /Applications "$STAGING/Applications"@@ -206,22 +199,18 @@ jobs:"$DMG_OUTPUT"rm -rf "$STAGING"+ echo "dmg_path=$DMG_OUTPUT" >> "$GITHUB_OUTPUT"- echo "dmg_path=$DMG_OUTPUT" >> $GITHUB_OUTPUT- echo "dmg_name=$DMG_NAME" >> $GITHUB_OUTPUT-- # ─── Sign DMG ─────────────────────────────────────────────- name: Sign DMG+ if: steps.signing.outputs.enabled == 'true'run: |codesign --force \- --sign "Developer ID Application: Samir Patil (N26FZ4GW28)" \+ --sign "${{ secrets.MAC_CSC_NAME }}" \--timestamp \"${{ steps.dmg.outputs.dmg_path }}"- # ─── Notarize DMG ────────────────────────────────────────- # On CI we can't use keychain profiles for notarytool, so we- # pass credentials directly via env vars / flags- name: Notarize DMG+ if: steps.signing.outputs.enabled == 'true'run: |xcrun notarytool submit "${{ steps.dmg.outputs.dmg_path }}" \--apple-id "${{ secrets.APPLE_ID }}" \@@ -230,50 +219,47 @@ jobs:--waittimeout-minutes: 15- # ─── Staple ───────────────────────────────────────────────- name: Staple notarization ticket+ if: steps.signing.outputs.enabled == 'true'run: xcrun stapler staple "${{ steps.dmg.outputs.dmg_path }}"- # ─── Validate ─────────────────────────────────────────────- name: Validate stapled DMG+ if: steps.signing.outputs.enabled == 'true'run: |xcrun stapler validate "${{ steps.dmg.outputs.dmg_path }}"spctl -a -vv -t install "${{ steps.dmg.outputs.dmg_path }}"- # ─── Upload Artifact ──────────────────────────────────────- - name: Upload notarized DMG+ - name: Upload macOS DMGuses: actions/upload-artifact@v4with:name: openscreen-mac-${{ matrix.arch }}path: ${{ steps.dmg.outputs.dmg_path }}+ if-no-files-found: errorretention-days: 30- # ─── Cleanup Keychain ─────────────────────────────────────- name: Cleanup keychain- if: always()- run: security delete-keychain $RUNNER_TEMP/build.keychain-db || true+ if: always() && steps.signing.outputs.enabled == 'true'+ run: security delete-keychain "$RUNNER_TEMP/build.keychain-db" || truebuild-linux:+ name: Linux packagesruns-on: ubuntu-lateststeps:- name: Checkout code- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Setup Node.js- uses: actions/setup-node@v3+ uses: actions/setup-node@v4with:- node-version: '22'+ node-version: 22+ cache: npm- name: Install dependenciesrun: npm ci- # bsdtar (from libarchive-tools) is required by fpm to build pacman- # packages. AppImage and deb don't need it; ubuntu-latest doesn't ship it.- name: Install pacman build dependenciesrun: sudo apt-get update && sudo apt-get install -y libarchive-tools- # Cache the downloaded caption model so we don't re-fetch from HuggingFace every run- # (and to avoid 429s when the platform matrix builds hit it at once).- name: Cache caption assetsuses: actions/cache@v4with:@@ -281,17 +267,84 @@ jobs:key: caption-assets-${{ hashFiles('scripts/fetch-caption-model.mjs') }}- name: Build Linux app- run: npm run build:linux- env:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ run: npm run build:linux -- --publish never- - name: Upload Linux build+ - name: Upload Linux packagesuses: actions/upload-artifact@v4with:- name: linux-installer+ name: openscreen-linuxpath: |release/**/*.AppImagerelease/**/*.zsyncrelease/**/*.debrelease/**/*.pacman+ if-no-files-found: errorretention-days: 30++ publish-release:+ name: Publish GitHub release+ runs-on: ubuntu-latest+ needs:+ - build-windows+ - build-macos+ - build-linux+ if: ${{ (github.event_name == 'push' && github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '') }}+ steps:+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Resolve release tag+ id: release+ env:+ INPUT_TAG: ${{ github.event.inputs.release_tag }}+ run: |+ if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then+ TAG="${GITHUB_REF_NAME}"+ else+ TAG="${INPUT_TAG}"+ fi++ if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then+ echo "::error::Release tag must look like v1.5.0; got '${TAG}'"+ exit 1+ fi++ VERSION="${TAG#v}"+ PACKAGE_VERSION="$(node -p 'require("./package.json").version')"+ if [[ "$PACKAGE_VERSION" != "$VERSION" ]]; then+ echo "::error::package.json version ${PACKAGE_VERSION} does not match release tag ${TAG}"+ exit 1+ fi++ echo "tag=$TAG" >> "$GITHUB_OUTPUT"+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"++ - name: Download installers+ uses: actions/download-artifact@v4+ with:+ path: artifacts++ - name: Publish release assets+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ TAG: ${{ steps.release.outputs.tag }}+ run: |+ mapfile -t FILES < <(find artifacts -type f | sort)+ if [[ "${#FILES[@]}" -eq 0 ]]; then+ echo "::error::No installer artifacts were downloaded"+ exit 1+ fi++ if gh release view "$TAG" >/dev/null 2>&1; then+ gh release upload "$TAG" "${FILES[@]}" --clobber+ else+ gh release create "$TAG" "${FILES[@]}" \+ --target "$GITHUB_SHA" \+ --title "$TAG" \+ --generate-notes+ fi++ gh release edit "$TAG" \+ --draft=false \+ --latest \+ --title "$TAG"diff --git a/.github/workflows/bump-nix-package.yml b/.github/workflows/bump-nix-package.ymlindex 5ff3c73e6..57e48e51a 100644--- a/.github/workflows/bump-nix-package.yml+++ b/.github/workflows/bump-nix-package.yml@@ -111,7 +111,7 @@ jobs:- \`version\` → \`${VERSION}\`- \`npmDepsHash\` → \`${HASH}\` (computed via \`prefetch-npm-deps package-lock.json\`)- Merge this so Nix users (NixOS, Home Manager, \`nix run github:siddharthvaddem/openscreen\`) pick up the new release.+ Merge this so Nix users (NixOS, Home Manager, \`nix run github:${{ github.repository }}\`) pick up the new release.> Note: PRs opened by \`GITHUB_TOKEN\` don't auto-trigger CI. The diff is two lines — review the change here, then merge. If you want CI to run, push an empty commit to this branch or close-and-reopen the PR.EOFdiff --git a/.github/workflows/publish-winget.yml b/.github/workflows/publish-winget.ymlindex 62b4b7adf..12fd0404a 100644--- a/.github/workflows/publish-winget.yml+++ b/.github/workflows/publish-winget.yml@@ -2,7 +2,7 @@ name: Publish release to WinGeton:release:- types: [released]+ types: [published]workflow_dispatch:inputs:tag:@@ -13,14 +13,13 @@ on:jobs:publish:runs-on: windows-latest- if: github.event_name == 'workflow_dispatch' || !github.event.release.prerelease+ if: (github.event_name == 'workflow_dispatch' || !github.event.release.prerelease) && vars.WINGET_IDENTIFIER != ''steps:- uses: vedantmgoyal9/winget-releaser@v2with:- identifier: SiddharthVaddem.OpenScreen- # Match the Windows installer asset attached to each release.- # Today: "Openscreen.Setup.latest.exe". Adjust this regex if you- # ever rename the installer to include a version (e.g. "Setup\.\d+\.\d+\.\d+\.exe").+ identifier: ${{ vars.WINGET_IDENTIFIER }}+ # Matches the Windows installer asset attached to each release,+ # e.g. "Openscreen.Setup.1.5.0.exe".installers-regex: 'Setup\..*\.exe$'release-tag: ${{ inputs.tag || github.event.release.tag_name }}token: ${{ secrets.WINGET_ACC_TOKEN }}diff --git a/.github/workflows/update-homebrew-cask.yml b/.github/workflows/update-homebrew-cask.ymlindex 3d65cb0aa..030b893bd 100644--- a/.github/workflows/update-homebrew-cask.yml+++ b/.github/workflows/update-homebrew-cask.yml@@ -16,11 +16,11 @@ permissions:jobs:update-cask:runs-on: ubuntu-latest- if: github.event_name == 'workflow_dispatch' || !github.event.release.prerelease+ if: (github.event_name == 'workflow_dispatch' || !github.event.release.prerelease) && vars.HOMEBREW_TAP_OWNER != '' && vars.HOMEBREW_TAP_REPO != ''env:- TAP_OWNER: siddharthvaddem- TAP_REPO: homebrew-openscreen- CASK_NAME: openscreen+ TAP_OWNER: ${{ vars.HOMEBREW_TAP_OWNER }}+ TAP_REPO: ${{ vars.HOMEBREW_TAP_REPO }}+ CASK_NAME: ${{ vars.HOMEBREW_CASK_NAME || 'openscreen' }}steps:- name: Resolve tag and versionid: meta@@ -143,10 +143,10 @@ jobs:zap trash: ["~/Library/Application Support/Openscreen",- "~/Library/Caches/com.siddharthvaddem.openscreen",+ "~/Library/Caches/com.etiennelescot.openscreen","~/Library/Logs/Openscreen",- "~/Library/Preferences/com.siddharthvaddem.openscreen.plist",- "~/Library/Saved Application State/com.siddharthvaddem.openscreen.savedState",+ "~/Library/Preferences/com.etiennelescot.openscreen.plist",+ "~/Library/Saved Application State/com.etiennelescot.openscreen.savedState",]endEOFdiff --git a/README.md b/README.mdindex b7703d0cb..fdbf4726f 100644--- a/README.md+++ b/README.md@@ -54,9 +54,6 @@ The goal of this continuation is to keep OpenScreen alive as a fully open-sourceDownload the latest installer for your platform from the [GitHub Releases](https://github.com/EtienneLescot/openscreen/releases) page.-> [!NOTE]-> This fork is a continuation of the archived upstream project. Some package-manager distributions may still point to the original repository until the release pipeline is fully updated for this continuation.-### macOSDownload the `.dmg` installer directly from the [Releases page](https://github.com/EtienneLescot/openscreen/releases). If Gatekeeper blocks the app, you can bypass it by running the following command in your terminal after installation:diff --git a/electron-builder.json5 b/electron-builder.json5index 16a7f2c60..0ff145383 100644--- a/electron-builder.json5+++ b/electron-builder.json5@@ -1,7 +1,7 @@// @see - https://www.electron.build/configuration/configuration{"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",- "appId": "com.siddharthvaddem.openscreen",+ "appId": "com.etiennelescot.openscreen","asar": true,// .node binaries can't be dlopen'd from inside an asar — must live unpacked."asarUnpack": [@@ -74,24 +74,26 @@"NSCameraUseContinuityCameraDeviceType": true}},- "linux": {- "target": [- "AppImage",- "deb",- "pacman"- ],- "icon": "icons/icons/png",- "artifactName": "${productName}-Linux-${version}.${ext}",- "category": "AudioVideo"- },- "win": {- "target": [- "nsis"- ],- "icon": "icons/icons/win/icon.ico",- "extraResources": [- {- "from": "electron/native/bin",+ "linux": {+ "target": [+ "AppImage",+ "deb",+ "pacman"+ ],+ "icon": "icons/icons/png",+ "artifactName": "${productName}-Linux-${version}.${ext}",+ "maintainer": "Etienne Lescot <[email protected]>",+ "category": "AudioVideo"+ },+ "win": {+ "target": [+ "nsis"+ ],+ "icon": "icons/icons/win/icon.ico",+ "artifactName": "${productName}.Setup.${version}.${ext}",+ "extraResources": [+ {+ "from": "electron/native/bin","to": "electron/native/bin","filter": ["win32-*/*"]}diff --git a/electron/native/wgc-capture/CMakeLists.txt b/electron/native/wgc-capture/CMakeLists.txtindex 4b9a24a4e..32c5d6ef5 100644--- a/electron/native/wgc-capture/CMakeLists.txt+++ b/electron/native/wgc-capture/CMakeLists.txt@@ -37,7 +37,7 @@ target_compile_definitions(wgc-capture PRIVATE_WIN32_WINNT=0x0A00)-target_compile_options(wgc-capture PRIVATE /EHsc /W4 /utf-8 /await)+target_compile_options(wgc-capture PRIVATE /EHsc /W4 /utf-8)target_link_libraries(wgc-capture PRIVATEd3d11diff --git a/package.json b/package.jsonindex 54e0c833d..dffae9025 100644--- a/package.json+++ b/package.json@@ -9,9 +9,15 @@"npm": "10.9.4"},"author": {- "name": "Sid",- "email": "[email protected]"+ "name": "Siddharth Vaddem",+ "url": "https://github.com/siddharthvaddem"},+ "maintainers": [+ {+ "name": "Etienne Lescot",+ "url": "https://github.com/EtienneLescot"+ }+ ],"scripts": {"dev": "vite","build": "tsc && vite build && electron-builder",diff --git a/scripts/build-windows-wgc-helper.mjs b/scripts/build-windows-wgc-helper.mjsindex 29df4d842..e0e3219bb 100644--- a/scripts/build-windows-wgc-helper.mjs+++ b/scripts/build-windows-wgc-helper.mjs@@ -1,4 +1,4 @@-import { spawn } from "node:child_process";+import { spawn, spawnSync } from "node:child_process";import fs from "node:fs";import os from "node:os";import path from "node:path";@@ -18,8 +18,37 @@ function findVcVarsAll() {return explicit;}+ const vswhere = "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vswhere.exe";+ if (fs.existsSync(vswhere)) {+ const result = spawnSync(+ vswhere,+ [+ "-latest",+ "-products",+ "*",+ "-requires",+ "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",+ "-property",+ "installationPath",+ ],+ { encoding: "utf8", windowsHide: true },+ );+ const installPath = result.stdout?.trim();+ if (result.status === 0 && installPath) {+ const candidate = path.join(installPath, "VC", "Auxiliary", "Build", "vcvarsall.bat");+ if (fs.existsSync(candidate)) {+ return candidate;+ }+ }+ }+const roots = [process.env.VSINSTALLDIR,+ "C:\\Program Files\\Microsoft Visual Studio\\2026\\Community",+ "C:\\Program Files\\Microsoft Visual Studio\\2026\\Professional",+ "C:\\Program Files\\Microsoft Visual Studio\\2026\\Enterprise",+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\2026\\BuildTools",+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\2026\\Community","C:\\Program Files\\Microsoft Visual Studio\\2022\\Community","C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional","C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise",