diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6487cbb17..ffd88d8c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,33 @@ jobs: if-no-files-found: error retention-days: 30 + build-windows-store: + name: Windows Store package + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: ./.github/actions/setup + + - name: Cache caption assets + uses: actions/cache@v4 + with: + path: caption-assets + key: caption-assets-${{ runner.os }}-${{ hashFiles('scripts/fetch-caption-model.mjs') }} + + - name: Build Windows Store package + run: npm run build:win:store -- --publish never + + - name: Upload Windows Store package + uses: actions/upload-artifact@v4 + with: + name: openscreen-windows-store + path: release/**/Openscreen.Setup.*.appx + if-no-files-found: error + retention-days: 30 + build-macos: name: macOS ${{ matrix.arch }} DMG runs-on: macos-latest diff --git a/electron-builder.json5 b/electron-builder.json5 index 0ff145383..a3f342ee5 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.etiennelescot.openscreen", + "appId": "com.etiennelescot.openscreen", "asar": true, // .node binaries can't be dlopen'd from inside an asar — must live unpacked. "asarUnpack": [ @@ -74,26 +74,26 @@ "NSCameraUseContinuityCameraDeviceType": true } }, - "linux": { - "target": [ - "AppImage", - "deb", - "pacman" - ], - "icon": "icons/icons/png", - "artifactName": "${productName}-Linux-${version}.${ext}", - "maintainer": "Etienne Lescot ", - "category": "AudioVideo" - }, - "win": { - "target": [ - "nsis" - ], - "icon": "icons/icons/win/icon.ico", - "artifactName": "${productName}.Setup.${version}.${ext}", - "extraResources": [ - { - "from": "electron/native/bin", + "linux": { + "target": [ + "AppImage", + "deb", + "pacman" + ], + "icon": "icons/icons/png", + "artifactName": "${productName}-Linux-${version}.${ext}", + "maintainer": "Etienne Lescot ", + "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-*/*"] } @@ -102,5 +102,18 @@ "nsis": { "oneClick": false, "allowToChangeInstallationDirectory": true + }, + // Microsoft Store packaging identity, from Partner Center's "Product identity" page + // (Applications et jeux > OpenScreen > Product identity). + "appx": { + "identityName": "EtienneLescot.OpenScreen", + "publisher": "CN=03B0FC8C-2067-45D9-BE82-9F15CE264B4A", + "publisherDisplayName": "Etienne Lescot", + "applicationId": "Openscreen", + "displayName": "OpenScreen", + "backgroundColor": "transparent", + "capabilities": ["runFullTrust", "microphone", "webcam"], + "languages": ["en-US", "fr-FR"], + "showNameOnTiles": true } } diff --git a/package.json b/package.json index 5ffe596d3..02f778efc 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "build:mac": "npm run build:native:mac && tsc && vite build && electron-builder --mac", "build:native:win": "node scripts/build-windows-wgc-helper.mjs", "build:win": "npm run build:native:win && tsc && vite build && electron-builder --win --config.npmRebuild=false", + "build:win:store": "npm run build:native:win && tsc && vite build && electron-builder --win appx --config.npmRebuild=false", "build:linux": "tsc && vite build && electron-builder --linux AppImage deb pacman --config.npmRebuild=false", "test": "vitest --run", "test:watch": "vitest",