mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-08-03 19:38:36 -04:00
parent
9de6212599
commit
cdfd42ca5a
5
.github/workflows/build-electron.yml
vendored
5
.github/workflows/build-electron.yml
vendored
@ -257,6 +257,8 @@ jobs:
|
|||||||
echo "ORIGINAL_ELECTRON_VERSION=$ORIGINAL_ELECTRON_VERSION" | Out-File $Env:GITHUB_ENV -Encoding utf8 -Append
|
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)"
|
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
|
(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"
|
echo "Installing dependencies in root and dist"
|
||||||
npm install; cd dist; npm install; cd ..
|
npm install; cd dist; npm install; cd ..
|
||||||
echo "Installed Electron version:$(npx electron --version)"
|
echo "Installed Electron version:$(npx electron --version)"
|
||||||
@ -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" "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/$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/
|
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
|
# 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') {
|
if ($INPUT_TARGET -ne 'artefacts') {
|
||||||
@ -293,6 +296,8 @@ jobs:
|
|||||||
./scripts/Rewrite-DraftReleaseTag.ps1
|
./scripts/Rewrite-DraftReleaseTag.ps1
|
||||||
# Set the module type to one supported by Electron
|
# Set the module type to one supported by Electron
|
||||||
# (Get-Content ./package.json) -replace '("type":\s+)"module"', '$1"commonjs"' | Set-Content ./package.json
|
# (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"
|
echo "Installing dependencies in root and dist"
|
||||||
npm install; cd dist; npm install; cd ..
|
npm install; cd dist; npm install; cd ..
|
||||||
echo "Installed Electron version:$(npx electron --version)"
|
echo "Installed Electron version:$(npx electron --version)"
|
||||||
|
14
package.json
14
package.json
@ -31,6 +31,13 @@
|
|||||||
"target": "NSIS",
|
"target": "NSIS",
|
||||||
"arch": "ia32"
|
"arch": "ia32"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"target": "portable",
|
||||||
|
"arch": "ia32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"target": "appx"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"target": "nsis-web",
|
"target": "nsis-web",
|
||||||
"arch": "ia32"
|
"arch": "ia32"
|
||||||
@ -42,13 +49,6 @@
|
|||||||
{
|
{
|
||||||
"target": "nsis-web",
|
"target": "nsis-web",
|
||||||
"arch": "arm64"
|
"arch": "arm64"
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "portable",
|
|
||||||
"arch": "ia32"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "appx"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -76,7 +76,7 @@ if (-not $CRON_LAUNCHED) {
|
|||||||
}
|
}
|
||||||
$upload_uri = $release.upload_url -ireplace '\{[^{}]+}', ''
|
$upload_uri = $release.upload_url -ireplace '\{[^{}]+}', ''
|
||||||
"`nUploading assets to: $upload_uri..."
|
"`nUploading assets to: $upload_uri..."
|
||||||
$filter = '\.(exe|zip|msix|appx|7z)$'
|
$filter = '\.(exe|zip|msix|appx|7z|yml)$'
|
||||||
if ($portableonly) {
|
if ($portableonly) {
|
||||||
$filter = '\.(zip)$'
|
$filter = '\.(zip)$'
|
||||||
}
|
}
|
||||||
|
@ -1037,7 +1037,7 @@ function checkUpdateServer () {
|
|||||||
// Do update checks 10s after startup
|
// Do update checks 10s after startup
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (/PWA/.test(params.appType)) {
|
if (/PWA/.test(params.appType)) {
|
||||||
console.log('Checking for updates to the PWA...');
|
console.log('Internally checking for updates to the PWA...');
|
||||||
checkPWAUpdate();
|
checkPWAUpdate();
|
||||||
}
|
}
|
||||||
// Delay GitHub checks so that any needed PWA update can be notified first
|
// Delay GitHub checks so that any needed PWA update can be notified first
|
||||||
|
Loading…
x
Reference in New Issue
Block a user