From a5479433de578b7d44a3099b484aa2abc1606d4e Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Sat, 28 Sep 2024 07:44:31 +0100 Subject: [PATCH 1/4] Change messaging --- www/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/app.js b/www/js/app.js index f7985b213..cf6eb30ec 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -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 From b62b41a015e8807826334d1317b25b22133cf798 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Sun, 27 Oct 2024 20:00:26 +0000 Subject: [PATCH 2/4] Copy corrected versions of package.json to dist --- .github/workflows/build-electron.yml | 4 ++++ www/js/init.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index 61072c570..ddb7cbde2 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -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)" @@ -293,6 +295,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)" diff --git a/www/js/init.js b/www/js/init.js index 45cfb31d1..c79e607e2 100644 --- a/www/js/init.js +++ b/www/js/init.js @@ -66,7 +66,7 @@ params['cachedStartPages'] = { // 'mdwiki_en_all_maxi': 'A/Wikipedia:WikiProject_Medicine/Open_Textbook_of_Medicine2', wikivoyage_en_all_maxi: 'A/Main_Page' }; -params['win7ElectronVersion'] = '22.3'; // KEEP UP TO DATE!!! This is the last minor version to support Win 7/8/8.1. Auto-update is embargoed for values starting with this. +params['win7ElectronVersion'] = '22.3.25'; // KEEP UP TO DATE!!! This is the last minor version to support Win 7/8/8.1. Auto-update is embargoed for values starting with this. params['kiwixDownloadLink'] = 'https://download.kiwix.org/zim/'; // Include final slash params['kiwixHiddenDownloadLink'] = 'https://master.download.kiwix.org/zim/'; /** ***** DEV: ENSURE SERVERS BELOW ARE LISTED IN package.appxmanifest ************/ From ea8c4e034032d3dbbbcbddccb1e0b2bc7f98984f Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Sun, 27 Oct 2024 20:55:14 +0000 Subject: [PATCH 3/4] Try to get nsis-web to run last --- .github/workflows/build-electron.yml | 1 + package.json | 14 +++++++------- scripts/Publish-ElectronPackages.ps1 | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index a011a4db6..ebd2040d0 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -274,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') { diff --git a/package.json b/package.json index f1c0ac5a0..325b00583 100644 --- a/package.json +++ b/package.json @@ -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" } ] }, diff --git a/scripts/Publish-ElectronPackages.ps1 b/scripts/Publish-ElectronPackages.ps1 index f3d74335e..1e32fb577 100644 --- a/scripts/Publish-ElectronPackages.ps1 +++ b/scripts/Publish-ElectronPackages.ps1 @@ -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)$' } From fe305ec5dfb152958fa81a2fdf8016b20b32624e Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Sun, 27 Oct 2024 21:23:24 +0000 Subject: [PATCH 4/4] Revert win7ElectronVersion to prefix --- www/js/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/init.js b/www/js/init.js index ddbe88330..1f11a2555 100644 --- a/www/js/init.js +++ b/www/js/init.js @@ -78,7 +78,7 @@ params['cachedStartPages'] = { // 'mdwiki_en_all_maxi': 'A/Wikipedia:WikiProject_Medicine/Open_Textbook_of_Medicine2', wikivoyage_en_all_maxi: 'A/Main_Page' }; -params['win7ElectronVersion'] = '22.3.25'; // KEEP UP TO DATE!!! This is the last minor version to support Win 7/8/8.1. Auto-update is embargoed for values starting with this. +params['win7ElectronVersion'] = '22.3'; // KEEP UP TO DATE!!! This is the last minor version to support Win 7/8/8.1. Auto-update is embargoed for values starting with this. params['kiwixDownloadLink'] = 'https://download.kiwix.org/zim/'; // Include final slash params['kiwixHiddenDownloadLink'] = 'https://master.download.kiwix.org/zim/'; /** ***** DEV: ENSURE SERVERS BELOW ARE LISTED IN package.appxmanifest ************/