From 35f9001eec1c77a049ebfa219cff27251d329239 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Thu, 28 Jan 2021 14:13:21 -0800 Subject: [PATCH] build APPX for both 32-bit and 64-bit Previous APPX packages were 32-bit by default. At some point this switched to 64-bit by default, but I didn't notice because the APPX release was blocked at the time. This change enables both, which seems ideal the MS Store will choose the right build for a given client. --- electron-builder.yaml | 2 +- scripts/electron-builder-wrapper.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/electron-builder.yaml b/electron-builder.yaml index e52e662..58a9dd6 100644 --- a/electron-builder.yaml +++ b/electron-builder.yaml @@ -40,7 +40,7 @@ appx: identityName: ScratchFoundation.ScratchDesktop publisherDisplayName: "Scratch Foundation" publisher: "CN=2EC43DF1-469A-4119-9AB9-568A0A1FF65F" - artifactName: "Scratch ${version}.${ext}" + artifactName: "Scratch ${version} ${arch}.${ext}" nsis: oneClick: false # allow user to choose per-user or per-machine artifactName: "Scratch ${version} Setup.${ext}" diff --git a/scripts/electron-builder-wrapper.js b/scripts/electron-builder-wrapper.js index a7e7126..9d4f615 100644 --- a/scripts/electron-builder-wrapper.js +++ b/scripts/electron-builder-wrapper.js @@ -46,7 +46,7 @@ const getPlatformFlag = function () { */ const runBuilder = function (wrapperConfig, target) { // the AppX build fails if CSC_* or WIN_CSC_* variables are set - const shouldStripCSC = (target.name === 'appx') || (!wrapperConfig.doSign); + const shouldStripCSC = (target.name.indexOf('appx') === 0) || (!wrapperConfig.doSign); const childEnvironment = shouldStripCSC ? stripCSC(process.env) : process.env; if (wrapperConfig.doSign && (target.name.indexOf('nsis') === 0) && @@ -110,7 +110,7 @@ const calculateTargets = function (wrapperConfig) { platform: 'darwin' }, microsoftStore: { - name: 'appx', + name: 'appx:ia32 appx:x64', platform: 'win32' }, windowsDirectDownload: {