mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-17 00:12:28 -04:00
Update build scripts
Former-commit-id: a04c46ab8800f3e84476f3a9b7b8c3fdeca9deec [formerly 13afe530efacb659afabdb2182c9e6e4a8af3fad [formerly fabdee9b2b61b70dad3b81394d687b3b60e0c4ac]] Former-commit-id: 133b1645559b300a4075303c522f35ba88ea07ef Former-commit-id: c9bc04fcacc358741f324d06efdc70c28c673d56
This commit is contained in:
parent
81c78e5604
commit
f229060765
3
scripts/Build-AppImage.sh
Normal file
3
scripts/Build-AppImage.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. ~/.profile
|
||||||
|
npm run dist-linux
|
@ -96,8 +96,8 @@ if ($dryrun -or $release.assets_url -imatch '^https:') {
|
|||||||
$base_dir = "$PSScriptRoot/../bld/electron/"
|
$base_dir = "$PSScriptRoot/../bld/electron/"
|
||||||
$compressed_archive = $base_dir + "Kiwix.JS.$text_tag.$base_tag.zip"
|
$compressed_archive = $base_dir + "Kiwix.JS.$text_tag.$base_tag.zip"
|
||||||
if (-Not (Test-Path $compressed_archive -PathType Leaf)) {
|
if (-Not (Test-Path $compressed_archive -PathType Leaf)) {
|
||||||
# Package electron app
|
# Package electron app for Windows
|
||||||
"Building Electron app"
|
"Building Electron app for Windows"
|
||||||
if (-Not $dryrun) { npm run package-win }
|
if (-Not $dryrun) { npm run package-win }
|
||||||
"Compressing release package for Electron..."
|
"Compressing release package for Electron..."
|
||||||
$compressed_assets_dir = "$PSScriptRoot/../bld/electron/kiwix-js-windows-win32-ia32"
|
$compressed_assets_dir = "$PSScriptRoot/../bld/electron/kiwix-js-windows-win32-ia32"
|
||||||
@ -107,6 +107,26 @@ if ($dryrun -or $release.assets_url -imatch '^https:') {
|
|||||||
"Compressing: $AddAppPackage, $compressed_assets_dir to $compressed_archive"
|
"Compressing: $AddAppPackage, $compressed_assets_dir to $compressed_archive"
|
||||||
if (-Not $dryrun) { "$AddAppPackage", "$compressed_assets_dir" | Compress-Archive -DestinationPath $compressed_archive -Force }
|
if (-Not $dryrun) { "$AddAppPackage", "$compressed_assets_dir" | Compress-Archive -DestinationPath $compressed_archive -Force }
|
||||||
}
|
}
|
||||||
|
# Package Electron app for Linux
|
||||||
|
"`nChecking for Electron packages for Linux"
|
||||||
|
$LinuxBasePackage = $base_dir + "Kiwix JS $text_tag-" + ($base_tag -replace "([\d.]+)E", "`${1}-E")
|
||||||
|
$AppImageArchives = @("$LinuxBasePackage.AppImage", ($LinuxBasePackage + "-i386.AppImage"))
|
||||||
|
"Processing $AppImageArchives"
|
||||||
|
foreach ($AppImageArchive in $AppImageArchives) {
|
||||||
|
if (-Not (Test-Path $AppImageArchive -PathType Leaf)) {
|
||||||
|
"No packages found: building $AppImageArchive"
|
||||||
|
if (-Not $dryrun) {
|
||||||
|
# To get docker to start, you might need to run below commands as admin
|
||||||
|
# net stop com.docker.service
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
"Linux Electron package $AppImageArchive is available"
|
||||||
|
}
|
||||||
|
}
|
||||||
$ReleaseBundle = ''
|
$ReleaseBundle = ''
|
||||||
} elseif ($flavour -eq '_N') {
|
} elseif ($flavour -eq '_N') {
|
||||||
# Package NWJS app if necessary
|
# Package NWJS app if necessary
|
||||||
@ -189,6 +209,7 @@ if ($dryrun -or $release.assets_url -imatch '^https:') {
|
|||||||
# Upload the release
|
# Upload the release
|
||||||
$upload_assets = @($compressed_archive, $ReleaseBundle)
|
$upload_assets = @($compressed_archive, $ReleaseBundle)
|
||||||
if ($flavour -eq '_N') { $upload_assets = $NWJSAssets }
|
if ($flavour -eq '_N') { $upload_assets = $NWJSAssets }
|
||||||
|
if ($flavour -eq '_E') { $upload_assets = ($AppImageArchives += $compressed_archive) }
|
||||||
$upload_uri = $release.upload_url -ireplace '\{[^{}]+}', ''
|
$upload_uri = $release.upload_url -ireplace '\{[^{}]+}', ''
|
||||||
"Uploading assets to: $upload_uri..."
|
"Uploading assets to: $upload_uri..."
|
||||||
|
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
## This is a portable build of Kiwix JS WikiMed Electron Edition for any 32bit or 64bit Windows 7/8/10
|
## This is a portable build of Kiwix JS WikiMed Electron Edition for Windows 7/8/10 and Linux
|
||||||
|
|
||||||
**Includes updated articles on COVID-19 current as of <<date>> (see screenshot)**
|
**Includes updated articles on COVID-19 current as of <<date>> (see screenshot)**
|
||||||
|
|
||||||
This is **not** the UWP/Microsoft Store build. If you are using Windows 10, you may prefer to use [the WikiMed release for the Microsoft Store](https://kiwix.github.io/kiwix-js-windows/wikimed-uwp.html), which will keep itself up-to-date automatically. This portable version runs on the included [Electron platform](https://www.electronjs.org/) version 10.3.0. This build will run on 32bit and 64bit editions of Windows. It 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.
|
This is **not** the UWP/Microsoft Store build. If you are using Windows 10, you may prefer to use [the WikiMed release for the Microsoft Store](https://kiwix.github.io/kiwix-js-windows/wikimed-uwp.html), which will keep itself up-to-date automatically. This portable version runs on the included [Electron platform](https://www.electronjs.org/) version 10.4.0. 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.
|
||||||
|
|
||||||
There is no installation required: the app is fully portable. **Warning: the download is 1.2GB (it includes the full WikiMed archive).** See instructions for unzipping and launching below the screenshot.
|
* Choose the correct build:
|
||||||
|
- Win7/8/10 32bit/64bit (not ARM) - [Kiwix JS WikiMed <<base_tag>>.zip](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>-WikiMed/Kiwix.JS.WikiMed.<<base_tag>>.zip)
|
||||||
|
- Linux 64bit AMD (Ubuntu, Debian) - [Kiwix JS WikiMed-<<base_tag>>.AppImage](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>-WikiMed/Kiwix.JS.WikiMed-<<base_tag>>.AppImage)
|
||||||
|
- Linux 32bit i386 (Ubuntu, Debian) - [Kiwix JS WikiMed-<<base_tag>>-i386.AppImage](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>-WikiMed/Kiwix.JS.WikiMed-<<base_tag>>-i386.AppImage)
|
||||||
|
|
||||||
|
There is no installation required: the app is fully portable. It does NOT auto-update (yet). **Warning: the download is 1.2GB (it includes the full WikiMed archive).** See instructions for unzipping and launching below the screenshot.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -12,15 +17,15 @@ If you intend to use this app with other archives than WikiMed, then download th
|
|||||||
|
|
||||||
### Instructions:
|
### Instructions:
|
||||||
|
|
||||||
* Download [Kiwix JS WikiMed <<base_tag>>.zip](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>-WikiMed/Kiwix.JS.WikiMed.<<base_tag>>.zip), or open Assets below and download the zipped file (not the source code). Unzip the contents of the archive to any folder, or to a flash drive / thumb drive;
|
* For the Windows build, unzip the contents of the [Kiwix JS WikiMed <<base_tag>>.zip archive](https://github.com/kiwix/kiwix-js-windows/releases/download/v<<base_tag>>-WikiMed/Kiwix.JS.WikiMed.<<base_tag>>.zip) to any folder, or to a flash drive / thumb drive, and double click on `Start Kiwix JS WikiMed` or `Start Kiwix JS WikiMed via batch file.bat`, or open the `kiwix-js-windows-win32-ia32` folder and double click on `kiwix-js-windows.exe`;
|
||||||
* Double click on `Start Kiwix JS WikiMed`, or if that doesn't work, use the provided batch file `Start Kiwix JS WikiMed via batch file.bat`, or open the `kiwix-js-windows-win32-ia32` folder and double click on `kiwix-js-windows.exe`;
|
* For the Linux 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`;
|
||||||
* **Because the 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. The app was made using Electron Packager version 15.2.0, and the `electron.exe` binary (renamed `kiwix-js-window.exe` with the Kiwix icon). You will not be asked again on subsequent launches.
|
* Windows: **Because the 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. The app was made using Electron Packager version 15.2.0, and the `electron.exe` binary (renamed `kiwix-js-window.exe` with the Kiwix icon). You will not be asked again on subsequent launches.
|
||||||
|
|
||||||
### Release Notes
|
### Release Notes
|
||||||
|
|
||||||
* This app is packaged with the <<date>> English-language WikiMed archive `<<zim>>`. The packaged archive is located in the `archives` folder. See the readme in that folder if you wish to add a different archive as the packaged ZIM;
|
* This app is packaged with the <<date>> English-language WikiMed archive `<<zim>>`. The packaged archive is located in the `archives` folder. See the readme in that folder if you wish to add a different archive as the packaged ZIM;
|
||||||
* You can download WikiMed in other languages from the Configuration page;
|
* You can download WikiMed in other languages from the Configuration page;
|
||||||
* It supports dark mode, and opening a page in a separate browser window (see Configuration);
|
* 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.
|
* 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
|
### Known Issues
|
||||||
|
Loading…
x
Reference in New Issue
Block a user