mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-15 23:37:59 -04:00
Update scripts for combined NWJS - Electron release
Former-commit-id: 8e168efd578cb9f0275846974c85fc6d93c2f4f8 [formerly 444fdbb2507208e7826559cc250a47983e72be1f] [formerly dd6c1ab40597f70f931eb9e35964ad538daa2f78] [formerly 38f64d5eeeff0f5d9dd0c696076ba5bdb8a8fcba [formerly aa87cb024b7cdeedb2dcb7b194fbf64fbe0c7c37 [formerly 2281f21a673ec462a0aeb44579af8f478d11a981]]] Former-commit-id: dceddf7a07e20c7bd95796516695a0e3264c41d9 [formerly 6a08c11536eaa31bb65f19e64fcce0c0d6903089 [formerly 72202f4a167f04ee8b1a029fc704d623097379fe]] Former-commit-id: 76ac5871158ba13cb6222567804a1251da14fcbb [formerly 0443ca1eb36ff77370e436d7eb969bd70c119c61] Former-commit-id: 5e1f46422aad6740974a685c35a68bb3a7baf478
This commit is contained in:
parent
3873b50277
commit
f707e87938
25
kiwix-js-electron.html
Normal file
25
kiwix-js-electron.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Redirecting to latest Kiwix JS Electron and NWJS release</title>
|
||||
<meta http-equiv="refresh"
|
||||
content="2; URL=https://github.com/kiwix/kiwix-js-windows/releases/tag/v1.3.0E">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="max-width: 1240px; margin: 3em auto">
|
||||
<h1>Redirecting to latest Kiwix JS Electron and NWJS release...</h1>
|
||||
<p>If your browser does not automatically redirect, please click on:</p>
|
||||
<p><a href="https://github.com/kiwix/kiwix-js-windows/releases/tag/v1.3.0E">
|
||||
Kiwix JS Electron/NWJS: releases
|
||||
</a>
|
||||
</p>
|
||||
<img style="margin-left: auto; margin-right: auto; width: 25%; display: block;" alt="Kiwix JS Logo" src="images/Kiwix_logo_v3_300_midnight_blue.png">
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
|
||||
|
30
package.json
30
package.json
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "kiwix-js-windows",
|
||||
"productName": "Kiwix JS Windows",
|
||||
"version": "1.3.0",
|
||||
"description": "Kiwix JS Windows packaged for the Electron framework",
|
||||
"name": "kiwix-js-pwa",
|
||||
"productName": "Kiwix JS PWA",
|
||||
"version": "1.3.0E",
|
||||
"description": "Kiwix JS PWA packaged for the Electron framework",
|
||||
"main": "main.js",
|
||||
"build": {
|
||||
"appId": "kiwix.js.windows",
|
||||
"productName": "Kiwix JS Windows",
|
||||
"appId": "kiwix.js.pwa",
|
||||
"productName": "Kiwix JS PWA",
|
||||
"directories": {
|
||||
"output": "bld/Electron",
|
||||
"buildResources": "bld"
|
||||
@ -36,7 +36,8 @@
|
||||
"ia32"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"category": "education"
|
||||
},
|
||||
"nsis": {
|
||||
"oneClick": "false",
|
||||
@ -62,7 +63,7 @@
|
||||
"package-mac": "electron-packager . kiwix-js-windows --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds",
|
||||
"package-win": "electron-packager . kiwix-js-windows --electron-version='10.4.0' --ignore=archives --ignore=AppPackages --ignore=BundleArtifacts --ignore=images$ --ignore=bin$ --ignore=bld$ --ignore=KiwixWebApp.* --ignore=[pP]ackage.[aSl] --ignore=node_ --ignore=[.]git[hi][ug][bn] --ignore=[.]vs$ --ignore=vscode --overwrite --platform=win32 --arch=ia32 --icon=www/img/icons/kiwix-64.ico --prune=true --out=bld/electron --version-string.CompanyName=Kiwix --version-string.FileDescription='Kiwix JS ZIM File Reader' --version-string.ProductName='Kiwix JS Windows Electron Edition'",
|
||||
"postpackage-win": "(robocopy archives bld\\Electron\\kiwix-js-windows-win32-ia32\\resources\\app\\archives\\ > null) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0",
|
||||
"package-linux": "electron-packager . kiwix-js-windows --overwrite --platform=linux --icon=www/img/icons/kiwix-64.png --electron-version='10.4.0' --ignore=archives --ignore=AppPackages --ignore=BundleArtifacts --ignore=images$ --ignore=bin$ --ignore=bld$ --ignore=KiwixWebApp.* --ignore=[pP]ackage.[aSl] --ignore=node_ --ignore=[.]git[hi][ug][bn] --ignore=[.]vs$ --ignore=vscode --overwrite --arch=x64 --prune=true --out=bld/electron --version-string.CompanyName=Kiwix --version-string.FileDescription='Kiwix JS ZIM File Reader' --version-string.ProductName='Kiwix JS WikiMed Electron Edition'",
|
||||
"package-linux": "electron-packager . kiwix-js-windows --overwrite --platform=linux --icon=www/img/icons/kiwix-64.png --electron-version='10.4.0' --ignore=archives --ignore=AppPackages --ignore=BundleArtifacts --ignore=images$ --ignore=bin$ --ignore=bld$ --ignore=KiwixWebApp.* --ignore=[pP]ackage.[aSl] --ignore=node_ --ignore=[.]git[hi][ug][bn] --ignore=[.]vs$ --ignore=vscode --overwrite --arch=x64 --prune=true --out=bld/electron --version-string.CompanyName=Kiwix --version-string.FileDescription='Kiwix JS ZIM File Reader' --version-string.ProductName='Kiwix JS Windows Electron Edition'",
|
||||
"postpackage-linux": "(robocopy archives bld\\Electron\\kiwix-js-windows-linux-x64\\archives\\ > null) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0"
|
||||
},
|
||||
"repository": "https://github.com/kiwix/kiwix-js-windows",
|
||||
@ -88,3 +89,16 @@
|
||||
"@types/fs-extra": "^9.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -111,7 +111,7 @@ if (-Not ($dryrun -or $buildonly)) {
|
||||
if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
if (-Not $buildonly) { "The draft release details were successfully created." }
|
||||
"`nUpdating release version in package.json"
|
||||
$json_object = $json_object -replace '("version": ")[^"]+', "`${1}$numeric_tag"
|
||||
$json_object = $json_object -replace '("version": ")[^"]+', "`${1}$base_tag"
|
||||
if ($dryrun) {
|
||||
"[DRYRUN] would have written:`n"
|
||||
$json_object
|
||||
@ -132,16 +132,35 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
"Building portable Electron app for Windows"
|
||||
if (-Not $dryrun) { npm run package-win }
|
||||
"Compressing release package for Electron..."
|
||||
$compressed_assets_dir = "$PSScriptRoot/../bld/electron/kiwix-js-windows-win32-ia32"
|
||||
$foldername = "kiwix-js-windows-win32-ia32"
|
||||
$compressed_assets_dir = "$PSScriptRoot/../bld/electron/$foldername"
|
||||
$base_dir = "$PSScriptRoot/../bld/electron/"
|
||||
$compressed_archive = $base_dir + "Kiwix.JS.$text_tag.$base_tag.zip"
|
||||
"Creating launchers..."
|
||||
$launcherStub = "$base_dir\Start Kiwix JS Windows"
|
||||
# Batch file
|
||||
$batch = '@cd "' + $foldername + '"' + "`r`n" + '@start "Kiwix JS Windows" "kiwix-js-windows.exe"' + "`r`n"
|
||||
if (-Not $dryrun) {
|
||||
$batch > "$launcherStub.bat"
|
||||
# Shortcut
|
||||
$WshShell = New-Object -ComObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut("$launcherStub.lnk")
|
||||
$Shortcut.TargetPath = '%windir%\explorer.exe'
|
||||
$Shortcut.Arguments = "$foldername\kiwix-js-windows.exe"
|
||||
$Shortcut.IconLocation = '%windir%\explorer.exe,12'
|
||||
$Shortcut.Save()
|
||||
} else {
|
||||
"Would have written batch file:"
|
||||
"$batch"
|
||||
}
|
||||
$AddAppPackage = $base_dir + "Start*.*"
|
||||
"Compressing: $AddAppPackage, $compressed_assets_dir to $compressed_archive"
|
||||
if (-Not $dryrun) { "$AddAppPackage", "$compressed_assets_dir" | Compress-Archive -DestinationPath $compressed_archive -Force }
|
||||
}
|
||||
# Package installer electron app for Windows
|
||||
"`nChecking for installer package for Windows..."
|
||||
$WinInstaller = $base_dir + "Kiwix JS $text_tag Setup $numeric_tag-E.exe"
|
||||
$alt_tag = $text_tag -ireplace 'Windows', 'PWA'
|
||||
$WinInstaller = $base_dir + "Kiwix JS $alt_tag Setup $numeric_tag-E.exe"
|
||||
if (-Not (Test-Path $WinInstaller -PathType Leaf)) {
|
||||
"No package found: building $WinInstaller..."
|
||||
if (-Not $dryrun) {
|
||||
@ -149,8 +168,7 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
if (Test-Path $WinInstaller -PathType Leaf) {
|
||||
"Successfully built."
|
||||
} else {
|
||||
"Oh no! The build failed!"
|
||||
return
|
||||
"Oh no! The Windows installer build failed!"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -158,7 +176,7 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
}
|
||||
# Package Electron app for Linux
|
||||
"`nChecking for Electron packages for Linux..."
|
||||
$LinuxBasePackage = $base_dir + "Kiwix JS $text_tag-$numeric_tag-E"
|
||||
$LinuxBasePackage = $base_dir + "Kiwix JS $alt_tag-$numeric_tag-E"
|
||||
$DebBasePackage = $base_dir + $package_name + "_$numeric_tag-E"
|
||||
$AppImageArchives = @("$LinuxBasePackage.AppImage", ($LinuxBasePackage + "-i386.AppImage"),
|
||||
("$DebBasePackage" + "_i386.deb"), ("$DebBasePackage" + "_amd64.deb"))
|
||||
@ -172,7 +190,11 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
# taskkill /IM "Docker Desktop.exe" /F
|
||||
# net start com.docker.service
|
||||
# runas /noprofile /user:Administrator "net stop com.docker.service; taskkill /IM 'Docker Desktop.exe' /F; net start com.docker.service"
|
||||
docker run -v C:\Users\geoff\Source\Repos\kiwix-js-windows-wikimed\:/project -w /project electronuserland/builder npm run dist-linux
|
||||
$repo_dir = ($PSScriptRoot -replace '[\\/]scripts[\\/]*$', '')
|
||||
"Using docker command:"
|
||||
"docker run -v $repo_dir\:/project -w /project electronuserland/builder npm run dist-linux"
|
||||
docker run -v $repo_dir\:/project -w /project electronuserland/builder npm run dist-linux
|
||||
# docker $build_command
|
||||
}
|
||||
} else {
|
||||
"Linux Electron package $AppImageArchive is available"
|
||||
|
43
scripts/Kiwix_JS_Windows_E_Release_Body.md
Normal file
43
scripts/Kiwix_JS_Windows_E_Release_Body.md
Normal file
@ -0,0 +1,43 @@
|
||||
## Portable and installable builds of Kiwix JS Electron and NWJS Editions for Windows XP/Vista/7/8/10 and Linux
|
||||
|
||||
This is **not** the UWP/Microsoft Store build. If you are using Windows 10, you may prefer to use [the Kiwix JS UWP release](https://kiwix.github.io/kiwix-js-windows/kiwix-js-uwp.html), which will keep itself up-to-date automatically. These portable and installable versions runs on the included [Electron platform](https://www.electronjs.org/) version 10.4.0 and [NWJS](https://nwjs.io/). This build will run on 32bit and 64bit editions of Windows or Linux (tested on Ubuntu and Debian). The Windows build is not compatible with Windows XP or Windows Vista. If you need an app compatible with those old platforms, get [Kiwix JS Windows reader](https://kiwix.github.io/kiwix-js-windows/kiwix-js-nwjs.html) and download the latest WikiMed archive from within the app.
|
||||
|
||||
Choose the correct build:
|
||||
* **Windows**:
|
||||
- **Portable** (just unzip, no install needed)
|
||||
+ Windows 7/8/10 - [Kiwix JS Windows <<base_tag>>.zip](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>/Kiwix.JS.Windows.<<base_tag>>.zip) (NWJS) - _recommended_
|
||||
+ Windows XP/Vista - [Kiwix JS Windows <<base_tag>>.zip](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>/Kiwix.JS.Windows.<<base_tag>>.zip) (NWJS)
|
||||
- **Installable** (signed NSIS installer)
|
||||
+ Windows 7/8/10 - [Kiwix JS Windows Setup <<numeric_tag>>-E.exe](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>/Kiwix.JS.PWA.Setup.<<numeric_tag>>-E.exe) (Electron)
|
||||
* **Linux**:
|
||||
- **Portable**
|
||||
+ AppImage 64bit (Ubuntu, Debian) - [Kiwix JS PWA-<<numeric_tag>>-E.AppImage](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>/Kiwix.JS.PWA-<<numeric_tag>>-E.AppImage) (Electron)
|
||||
+ AppImage 32bit (Ubuntu, Debian) - [Kiwix JS PWA-<<numeric_tag>>-E-i386.AppImage](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>/Kiwix.JS.PWA-<<numeric_tag>>-E-i386.AppImage) (Electron)
|
||||
- **Installable**
|
||||
+ Deb package 64bit (Ubuntu, Debian) - [kiwix-js-pwa_<<numeric_tag>>-E_amd64.deb](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>/kiwix-js-pwa_<<numeric_tag>>-E_amd64.deb) (Electron)
|
||||
+ Deb package 32bit (Ubuntu, Debian) - [kiwix-js-pwa_<<numeric_tag>>-E_i386.deb](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>-WikiMed/kiwix-js-pwa_<<numeric_tag>>-E_i386.deb)
|
||||
|
||||
There is no installation required for the Portable versions, or you can install the Setup versions if you prefer. It does NOT auto-update (yet).
|
||||
|
||||

|
||||
|
||||
### Instructions:
|
||||
|
||||
* For the Windows Portable build, unzip the contents of the [Kiwix JS Windows <<base_tag>>.zip archive](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>/Kiwix.JS.Windows.<<base_tag>>.zip) to any folder, or to a flash drive / thumb drive, and double click on `Start Kiwix JS Windows` or `Start Kiwix JS Windows via batch file.bat`, or open the `kiwix-js-windows-win32-ia32` folder and double click on `kiwix-js-windows.exe`;
|
||||
* For the Windows Setup (installable) build, simply download and launch. It will install itself, together with a shortcut in your shortcut menu, and run. When you want to update the app, uninstall it from "Add or Remove Programs".
|
||||
* For the Linux portable builds, download and save the correct AppImage file anywhere (e.g. your Desktop), and double-click it. If it doesn't work, open Terminal and run `chmod a+x Kiwix.JS.WikiMed*.AppImage` and then `./Kiwix.JS.WikiMed*.AppImage`;
|
||||
* For the Linux installable builds, download the correct `.deb` package and double-click to see if your graphical package manager can install it. If not, open a terminal, `cd` to the directory containing the package, and type `sudo apt install ./kiwix-js-pwa*.deb`
|
||||
* Windows: **Because the portable archive may not be commonly downloaded, you may face Windows SmartScreen issues** on first launch. Follow instructions to "Run anyway" if you trust this site. If you prefer, use the installable version [Kiwix JS Windows Setup <<numeric_tag>>-E.exe](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>-WikiMed/Kiwix.JS.WikiMed.Setup.<<numeric_tag>>-E.exe) which is digitally signed.
|
||||
|
||||
### Release Notes
|
||||
|
||||
* This app is packaged with a sample atchive of the <<date>> English-language top 100 Wikipedia articles (`<<zim>>`). The packaged archive is located in the `archives` folder (only accessible in the portable Windows version). See the readme in that folder if you wish to add a different archive as the packaged ZIM;
|
||||
* You can download many different archives in multiple languages from the Configuration page;
|
||||
* It supports dark mode, and opening different navigable windows by right-clicking or ctrl-clicking a link (see Configuration);
|
||||
* You can print by pressing Ctrl-P or using the print icon. If local printers are not available (after clicking on More options...) then print to PDF and use another app to print.
|
||||
|
||||
### Known Issues
|
||||
|
||||
* REGRESSION: Due to a change in format, headings are always open in jQuery mode regardless of the "Open all sections" option in Configuration (the setting is respected in Service Worker mode)
|
||||
* INCONSISTENCY: When printing in jQuery mode, all sections are opened before printing (if the user had closed any), whereas in SW mode, closed sections are not opened before printing
|
||||
* Please see https://github.com/kiwix/kiwix-js-windows/issues for further known issues. If you find a new issue, please open a new issue on that page.
|
Loading…
x
Reference in New Issue
Block a user