Skip to content

Commit

Permalink
Fix building of 32bit Win7 version of app #652 (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid authored Oct 27, 2024
1 parent 9de6212 commit cdfd42c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ jobs:
echo "ORIGINAL_ELECTRON_VERSION=$ORIGINAL_ELECTRON_VERSION" | Out-File $Env:GITHUB_ENV -Encoding utf8 -Append
echo "Setting the Electron version to the latest supporting Windows 7/8/8.1 (=22.3.25)"
(Get-Content ./package.json) -replace '("electron":\s+)"[\d.]+[\w\d-.]*?"', '$1"22.3.25"' | Set-Content ./package.json
echo "Copying the package.json to dist"
cp ./package.json ./dist/package.json
echo "Installing dependencies in root and dist"
npm install; cd dist; npm install; cd ..
echo "Installed Electron version:$(npx electron --version)"
Expand All @@ -272,6 +274,7 @@ jobs:
mv "dist/bld/Electron/$file Setup*.exe" "dist/bld/Electron/$file Win7 Setup $INPUT_VERSION_E.exe"
mv "dist/bld/Electron/$file Setup*.exe.blockmap" "dist/bld/Electron/$file Win7 Setup $INPUT_VERSION_E.exe.blockmap"
}
mv "dist/bld/Electron/latest.yml" "dist/bld/Electron/latest-win7.yml"
ls ./dist/bld/Electron/
# DEV: We did not use electron-builder to publish because we needed to change the filenames, so we need to publish to GitHub here
if ($INPUT_TARGET -ne 'artefacts') {
Expand All @@ -293,6 +296,8 @@ jobs:
./scripts/Rewrite-DraftReleaseTag.ps1
# Set the module type to one supported by Electron
# (Get-Content ./package.json) -replace '("type":\s+)"module"', '$1"commonjs"' | Set-Content ./package.json
echo "Copying the rewritten package.json to dist"
cp ./package.json ./dist/package.json
echo "Installing dependencies in root and dist"
npm install; cd dist; npm install; cd ..
echo "Installed Electron version:$(npx electron --version)"
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@
"arch": "ia32"
},
{
"target": "nsis-web",
"target": "portable",
"arch": "ia32"
},
{
"target": "nsis-web",
"arch": "x64"
"target": "appx"
},
{
"target": "nsis-web",
"arch": "arm64"
"arch": "ia32"
},
{
"target": "portable",
"arch": "ia32"
"target": "nsis-web",
"arch": "x64"
},
{
"target": "appx"
"target": "nsis-web",
"arch": "arm64"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/Publish-ElectronPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if (-not $CRON_LAUNCHED) {
}
$upload_uri = $release.upload_url -ireplace '\{[^{}]+}', ''
"`nUploading assets to: $upload_uri..."
$filter = '\.(exe|zip|msix|appx|7z)$'
$filter = '\.(exe|zip|msix|appx|7z|yml)$'
if ($portableonly) {
$filter = '\.(zip)$'
}
Expand Down
2 changes: 1 addition & 1 deletion www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ function checkUpdateServer () {
// Do update checks 10s after startup
setTimeout(function () {
if (/PWA/.test(params.appType)) {
console.log('Checking for updates to the PWA...');
console.log('Internally checking for updates to the PWA...');
checkPWAUpdate();
}
// Delay GitHub checks so that any needed PWA update can be notified first
Expand Down

0 comments on commit cdfd42c

Please sign in to comment.