Compare commits
No commits in common. "main" and "r_71" have entirely different histories.
|
@ -1,46 +0,0 @@
|
|||
[DEFAULTS]
|
||||
|
||||
[aqt]
|
||||
concurrency: 4
|
||||
baseurl: https://qt.mirror.constant.com/
|
||||
7zcmd: 7z
|
||||
print_stacktrace_on_error: False
|
||||
always_keep_archives: False
|
||||
archive_download_location: .
|
||||
min_module_size: 41
|
||||
|
||||
[requests]
|
||||
connection_timeout: 3.5
|
||||
response_timeout: 30
|
||||
max_retries_on_connection_error: 5
|
||||
retry_backoff: 0.1
|
||||
max_retries_on_checksum_error: 5
|
||||
max_retries_to_retrieve_hash: 5
|
||||
hash_algorithm: sha256
|
||||
INSECURE_NOT_FOR_PRODUCTION_ignore_hash: False
|
||||
|
||||
[mirrors]
|
||||
trusted_mirrors:
|
||||
https://download.qt.io
|
||||
https://qt.mirror.constant.com/
|
||||
https://ftp.fau.de/qtproject/
|
||||
blacklist:
|
||||
http://mirrors.ocf.berkeley.edu
|
||||
http://mirrors.tuna.tsinghua.edu.cn
|
||||
http://mirrors.geekpie.club
|
||||
fallbacks:
|
||||
https://qtproject.mirror.liquidtelecom.com/
|
||||
https://mirrors.aliyun.com/qt/
|
||||
https://mirrors.ustc.edu.cn/qtproject/
|
||||
https://ftp.jaist.ac.jp/pub/qtproject/
|
||||
https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/
|
||||
https://qt-mirror.dannhauer.de/
|
||||
https://ftp.fau.de/qtproject/
|
||||
https://mirror.netcologne.de/qtproject/
|
||||
https://mirrors.dotsrc.org/qtproject/
|
||||
https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/
|
||||
https://master.qt.io/
|
||||
https://mirrors.ukfast.co.uk/sites/qt.io/
|
||||
https://ftp2.nluug.nl/languages/qt/
|
||||
https://ftp1.nluug.nl/languages/qt/
|
||||
https://qt.mirror.constant.com/
|
|
@ -38,33 +38,32 @@ BUILD_DEF = """
|
|||
| macos | macOS_x86_64 | B | B | | | | | |
|
||||
| macos | apple_all_static | | BP | | | | xcframework | |
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
| focal | flatpak | | | | | BP | | |
|
||||
| focal | native_static | d | d | dBPSD | dBPSD | | linux-x86_64 | linux-x86_64-static |
|
||||
| focal | native_mixed | BPS | BPS | | | | linux-x86_64 | |
|
||||
| focal | native_dyn | d | d | dB | dB | | | linux-x86_64-dyn |
|
||||
| jammy | native_dyn | | | | | dBPS | | linux-x86_64-dyn |
|
||||
| | flatpak | | | | | BP | | |
|
||||
| | native_static | d | d | dBPSD | dBPSD | | linux-x86_64 | linux-x86_64-static |
|
||||
| | native_mixed | BPS | BPS | | | | linux-x86_64 | |
|
||||
| | native_dyn | d | d | dB | dB | dBPS | | linux-x86_64-dyn |
|
||||
# libzim CI is building alpine_dyn but not us
|
||||
| focal | android_arm | dBP | dBP | | | | android-arm | android-arm |
|
||||
| focal | android_arm64 | dBP | dBP | | | | android-arm64 | android-arm64 |
|
||||
| focal | android_x86 | BP | BP | | | | android-x86 | |
|
||||
| focal | android_x86_64 | BP | BP | | | | android-x86_64 | |
|
||||
| focal | armv6_static | | | BP | BP | | linux-armv6 | |
|
||||
| focal | armv6_mixed | BP | | | | | linux-armv6 | |
|
||||
| focal | armv6_dyn | | | B | B | | | |
|
||||
| focal | armv8_static | | | BP | BP | | linux-armv8 | |
|
||||
| focal | armv8_mixed | BP | | | | | linux-armv8 | |
|
||||
| focal | armv8_dyn | | | B | B | | | |
|
||||
| focal | aarch64_static | | | BP | BP | | linux-aarch64 | |
|
||||
| focal | aarch64_mixed | BP | | | | | linux-aarch64 | |
|
||||
| focal | aarch64_dyn | d | | B | B | | | linux-aarch64-dyn |
|
||||
| focal | aarch64_musl_static| | | BP | BP | | linux-aarch64-musl | |
|
||||
| focal | aarch64_musl_mixed | BP | | | | | linux-aarch64-musl | |
|
||||
| focal | aarch64_musl_dyn | d | | B | B | | | linux-aarch64-musl-dyn |
|
||||
| focal | x86-64_musl_static | | | BP | BP | | linux-x86_64-musl | |
|
||||
| focal | x86-64_musl_mixed | BP | | | | | linux-x86_64-musl | |
|
||||
| focal | i586_static | | | BP | BP | | linux-i586 | |
|
||||
| focal | i586_dyn | | | B | B | | | |
|
||||
| focal | wasm | dBP | | | | | wasm-emscripten | wasm |
|
||||
| | android_arm | dBP | dBP | | | | android-arm | android-arm |
|
||||
| | android_arm64 | dBP | dBP | | | | android-arm64 | android-arm64 |
|
||||
| | android_x86 | BP | BP | | | | android-x86 | |
|
||||
| | android_x86_64 | BP | BP | | | | android-x86_64 | |
|
||||
| | armv6_static | | | BP | BP | | linux-armv6 | |
|
||||
| | armv6_mixed | BP | | | | | linux-armv6 | |
|
||||
| | armv6_dyn | | | B | B | | | |
|
||||
| | armv8_static | | | BP | BP | | linux-armv8 | |
|
||||
| | armv8_mixed | BP | | | | | linux-armv8 | |
|
||||
| | armv8_dyn | | | B | B | | | |
|
||||
| | aarch64_static | | | BP | BP | | linux-aarch64 | |
|
||||
| | aarch64_mixed | BP | | | | | linux-aarch64 | |
|
||||
| | aarch64_dyn | d | | B | B | | | linux-aarch64-dyn |
|
||||
| | aarch64_musl_static| | | BP | BP | | linux-aarch64-musl | |
|
||||
| | aarch64_musl_mixed | BP | | | | | linux-aarch64-musl | |
|
||||
| | aarch64_musl_dyn | d | | B | B | | | linux-aarch64-musl-dyn |
|
||||
| | x86-64_musl_static | | | BP | BP | | linux-x86_64-musl | |
|
||||
| | x86-64_musl_mixed | BP | | | | | linux-x86_64-musl | |
|
||||
| | i586_static | | | BP | BP | | linux-i586 | |
|
||||
| | i586_dyn | | | B | B | | | |
|
||||
| | wasm | dBP | | | | | wasm-emscripten | wasm |
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -310,10 +310,7 @@ except ModuleNotFoundError:
|
|||
else:
|
||||
port = "22"
|
||||
|
||||
# Using SFTP to create the directory hierarchy because we can not
|
||||
# use SSH (no shell for this user); and then scp to upload the file.
|
||||
#
|
||||
# Sending SFTP mkdir command to the SFTP interactive mode and not batch (-b) mode
|
||||
# sending SFTP mkdir command to the sftp interactive mode and not batch (-b) mode
|
||||
# as the latter would exit on any mkdir error while it is most likely
|
||||
# the first parts of the destination is already present and thus can't be created
|
||||
sftp_commands = "\n".join(
|
||||
|
@ -324,8 +321,6 @@ except ModuleNotFoundError:
|
|||
)
|
||||
command = [
|
||||
"sftp",
|
||||
"-c",
|
||||
"aes128-ctr",
|
||||
"-i",
|
||||
_environ.get("SSH_KEY"),
|
||||
"-P",
|
||||
|
@ -544,7 +539,7 @@ def create_desktop_image(make_release):
|
|||
elif platform.system() == "Windows":
|
||||
archive_basename = "kiwix-desktop_windows_x64_{}".format(postfix)
|
||||
working_dir = INSTALL_DIR / archive_basename
|
||||
build_path = Path(str(working_dir) + ".zip")
|
||||
build_path = working_dir.with_suffix(".zip")
|
||||
app_name = build_path.name
|
||||
command = [
|
||||
"python",
|
||||
|
@ -595,7 +590,7 @@ def update_flathub_git():
|
|||
call(command)
|
||||
shutil.copy(str(BASE_DIR / "org.kiwix.desktop.json"), str(git_repo_dir))
|
||||
patch_dir = KBUILD_SOURCE_DIR / "kiwixbuild" / "patches"
|
||||
for dep in ["pugixml", "libmicrohttpd"]:
|
||||
for dep in ["pugixml"]:
|
||||
for f in patch_dir.glob("{}_*.patch".format(dep)):
|
||||
shutil.copy(str(f), str(git_repo_dir / "patches"))
|
||||
command = ["git", "add", "-A", "."]
|
||||
|
|
|
@ -5,7 +5,7 @@ on:
|
|||
tags:
|
||||
- r_[0-9]+
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
- cron: '0 1 * * *'
|
||||
|
||||
jobs:
|
||||
Windows:
|
||||
|
@ -37,14 +37,11 @@ jobs:
|
|||
pip3 install meson pytest requests distro paramiko
|
||||
pip3 install --no-deps $GITHUB_WORKSPACE
|
||||
- name: Install QT
|
||||
if: ${{ matrix.config == 'native_mixed' }}
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 5.15.2
|
||||
modules: "qtwebengine"
|
||||
setup-python: false
|
||||
env:
|
||||
AQT_CONFIG: ${{ github.workspace }}/.github/configs/aqt.ini
|
||||
- name: Setup MSVC compiler
|
||||
uses: bus1/cabuild/action/msdevshell@v1
|
||||
with:
|
||||
|
@ -134,14 +131,12 @@ jobs:
|
|||
image_variant: manylinux
|
||||
- config: aarch64_mixed
|
||||
image_variant: manylinux
|
||||
- config: native_dyn
|
||||
image_variant: jammy
|
||||
env:
|
||||
HOME: /home/runner
|
||||
SSH_KEY: /tmp/id_rsa
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-11-30"
|
||||
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-06-03"
|
||||
options: "--device /dev/fuse --privileged"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -173,6 +168,8 @@ jobs:
|
|||
kiwix-build/.github/scripts/build_release_nightly.py
|
||||
env:
|
||||
COMPILE_CONFIG: ${{matrix.config}}
|
||||
BINTRAY_USER: kiwix
|
||||
BINTRAY_PASS: ${{secrets.bintray_pass}}
|
||||
- name: Upload failure logs
|
||||
if: failure()
|
||||
run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.py
|
||||
|
@ -254,7 +251,7 @@ jobs:
|
|||
python-version: '3.10'
|
||||
- name: Install packages
|
||||
run:
|
||||
brew install automake # ninja
|
||||
brew install pkg-config ninja automake autoconf
|
||||
- name: Install python modules
|
||||
run: |
|
||||
pip3 install meson pytest requests distro
|
||||
|
@ -309,7 +306,7 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
COMPILE_CONFIG: native_static
|
||||
OS_NAME: focal
|
||||
OS_NAME: linux
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
|
|
@ -35,14 +35,11 @@ jobs:
|
|||
pip3 install meson pytest requests distro paramiko
|
||||
pip3 install --no-deps $GITHUB_WORKSPACE
|
||||
- name: Install QT
|
||||
if: ${{ matrix.config == 'native_mixed' }}
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.4.3
|
||||
modules: "qtwebengine qtwebchannel qtpositioning"
|
||||
version: 5.15.2
|
||||
modules: "qtwebengine"
|
||||
setup-python: false
|
||||
env:
|
||||
AQT_CONFIG: ${{ github.workspace }}/.github/configs/aqt.ini
|
||||
- name: Setup MSVC compiler
|
||||
uses: bus1/cabuild/action/msdevshell@v1
|
||||
with:
|
||||
|
@ -110,15 +107,12 @@ jobs:
|
|||
image_variant: manylinux
|
||||
- config: aarch64_mixed
|
||||
image_variant: manylinux
|
||||
- config: native_dyn
|
||||
image_variant: jammy
|
||||
env:
|
||||
HOME: /home/runner
|
||||
SSH_KEY: /tmp/id_rsa
|
||||
OS_NAME: ${{matrix.image_variant}}
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-11-30"
|
||||
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-06-03"
|
||||
options: "--device /dev/fuse --privileged"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -242,7 +236,7 @@ jobs:
|
|||
python-version: '3.10'
|
||||
- name: Install packages
|
||||
run:
|
||||
brew install automake # ninja
|
||||
brew install pkg-config ninja automake autoconf
|
||||
- name: Install python modules
|
||||
run: |
|
||||
pip3 install meson pytest requests distro paramiko
|
||||
|
|
|
@ -12,7 +12,7 @@ Kiwix Build audience is:
|
|||
* Kiwix developer team for its own CI/CD
|
||||
|
||||
[](https://github.com/kiwix/kiwix-build/actions/workflows/ci.yml?query=branch%3Amain)
|
||||
[](https://github.com/kiwix/kiwix-build/actions/workflows/cd.yml?query=branch%3Amain)
|
||||
[](https://github.com/kiwix/kiwix-build/actions/workflows/releaseNigthly.yml?query=branch%3Amain)
|
||||
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||
|
||||
Prerequisites
|
||||
|
|
|
@ -114,9 +114,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.28.4",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
|
||||
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
|
||||
"version": "5.28.2",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz",
|
||||
"integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==",
|
||||
"dependencies": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
},
|
||||
|
|
|
@ -4,8 +4,6 @@ from kiwixbuild.utils import Remotefile, run_command, pj
|
|||
import platform
|
||||
from shutil import copy2
|
||||
|
||||
# Important: in case of aria2c update,
|
||||
# 'scripts/create_kiwix-desktop_appImage.sh' should not be forgotten!
|
||||
|
||||
class Aria2(Dependency):
|
||||
name = "aria2"
|
||||
|
@ -16,7 +14,7 @@ class Aria2(Dependency):
|
|||
archive = Remotefile(
|
||||
"aria2-1.37.0-win-64bit-build1.zip",
|
||||
"67d015301eef0b612191212d564c5bb0a14b5b9c4796b76454276a4d28d9b288",
|
||||
"https://dev.kiwix.org/kiwix-desktop/aria2-1.37.0-win-64bit-build1.zip",
|
||||
"https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip",
|
||||
)
|
||||
|
||||
class Builder(NoopBuilder):
|
||||
|
@ -36,7 +34,7 @@ class Aria2(Dependency):
|
|||
archive = Remotefile(
|
||||
"aria2-1.37.0.tar.xz",
|
||||
"60a420ad7085eb616cb6e2bdf0a7206d68ff3d37fb5a956dc44242eb2f79b66b",
|
||||
"https://dev.kiwix.org/kiwix-desktop/aria2-1.37.0.tar.xz",
|
||||
"https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.xz",
|
||||
)
|
||||
|
||||
def _post_prepare_script(self, context):
|
||||
|
|
|
@ -524,8 +524,8 @@ class QMakeBuilder(MakeBuilder):
|
|||
*neutralEnv("git_command"),
|
||||
"archive",
|
||||
"-o",
|
||||
f"{self.build_path}/{self.target.full_name()}.tar.gz",
|
||||
f"--prefix={self.target.full_name()}/",
|
||||
f"{self.build_path}/{self.target_full_name()}.tar.gz",
|
||||
f"--prefix={self.target_full_name()}/",
|
||||
"HEAD",
|
||||
]
|
||||
run_command(command, self.source_path, context)
|
||||
|
@ -538,9 +538,6 @@ class MesonBuilder(Builder):
|
|||
|
||||
@property
|
||||
def build_type(self):
|
||||
if platform.system() == "Windows":
|
||||
return "release"
|
||||
|
||||
return "release" if option("make_release") else "debug"
|
||||
|
||||
@property
|
||||
|
|
|
@ -8,9 +8,9 @@ class Gumbo(Dependency):
|
|||
|
||||
class Source(ReleaseDownload):
|
||||
archive = Remotefile(
|
||||
"gumbo-parser-0.12.1.tar.gz",
|
||||
"c0bb5354e46539680724d638dbea07296b797229a7e965b13305c930ddc10d82",
|
||||
"https://dev.kiwix.org/kiwix-build/gumbo-parser-0.12.1.tar.gz",
|
||||
"gumbo-0.10.1.tar.gz",
|
||||
"28463053d44a5dfbc4b77bcf49c8cee119338ffa636cc17fc3378421d714efad",
|
||||
"https://github.com/google/gumbo-parser/archive/v0.10.1.tar.gz",
|
||||
)
|
||||
|
||||
def _post_prepare_script(self, context):
|
||||
|
|
|
@ -15,19 +15,19 @@ class KiwixDesktop(Dependency):
|
|||
dependencies = ["qt", "qtwebengine", "libkiwix", "aria2"]
|
||||
configure_env = None
|
||||
|
||||
flatpack_build_options = {"env": {"QMAKEPATH": "/app"}}
|
||||
flatpack_build_options = {"env": {"QMAKEPATH": "/app/lib"}}
|
||||
|
||||
@property
|
||||
def make_targets(self):
|
||||
if platform.system() == "Windows":
|
||||
yield "release-all"
|
||||
yield "release-all" if option("make_release") else "debug-all"
|
||||
else:
|
||||
yield from super().make_targets
|
||||
|
||||
@property
|
||||
def make_install_targets(self):
|
||||
if platform.system() == "Windows":
|
||||
yield "release-install"
|
||||
yield "release-install" if option("make_release") else "debug-install"
|
||||
else:
|
||||
yield "install"
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class LibCurl(Dependency):
|
|||
"kerberos-auth",
|
||||
"gss-api",
|
||||
"ssh",
|
||||
"ssl",
|
||||
"rtmp",
|
||||
"http2",
|
||||
"idn",
|
||||
|
@ -53,7 +54,6 @@ class LibCurl(Dependency):
|
|||
"smb",
|
||||
"smtp",
|
||||
"gopher",
|
||||
"tool",
|
||||
)
|
||||
]
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class Mustache(Dependency):
|
|||
archive = Remotefile(
|
||||
"Mustache-4.1.tar.gz",
|
||||
"acd66359feb4318b421f9574cfc5a511133a77d916d0b13c7caa3783c0bfe167",
|
||||
"https://dev.kiwix.org/kiwix-build/mustache-4.1.tar.gz",
|
||||
"https://github.com/kainjow/Mustache/archive/v4.1.tar.gz",
|
||||
)
|
||||
|
||||
class Builder(BaseBuilder):
|
||||
|
|
|
@ -24,10 +24,6 @@ class android_ndk(Dependency):
|
|||
def source_dir(self):
|
||||
return self.target.full_name()
|
||||
|
||||
patches = [
|
||||
"android-ndk-r21e-linux-x86_64-python3.12+.patch",
|
||||
]
|
||||
|
||||
class Builder(Builder):
|
||||
@property
|
||||
def install_path(self):
|
||||
|
|
|
@ -9,9 +9,9 @@ class ZimTestingSuite(Dependency):
|
|||
|
||||
class Source(ReleaseDownload):
|
||||
archive = Remotefile(
|
||||
"zim-testing-suite-0.8.0.tar.gz",
|
||||
"28f51449a3f9aea02652ca21f32c5598fd610d6cec3810fa552bd0c0f7a2d5fc",
|
||||
"https://github.com/openzim/zim-testing-suite/releases/download/0.8.0/zim-testing-suite-0.8.0.tar.gz",
|
||||
"zim-testing-suite-0.6.0.tar.gz",
|
||||
"5aa91349a2791c862217b4d2ddd002f08589146ec047f10d5fa1f5fd85d0ea92",
|
||||
"https://github.com/openzim/zim-testing-suite/releases/download/0.6.0/zim-testing-suite-0.6.0.tar.gz",
|
||||
)
|
||||
|
||||
Builder = NoopBuilder
|
||||
|
|
|
@ -49,7 +49,6 @@ MANIFEST = {
|
|||
"--socket=pulseaudio",
|
||||
"--share=network",
|
||||
"--share=ipc",
|
||||
"--filesystem=host:ro",
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
diff -ur android-ndk-r21e/build/tools/make_standalone_toolchain.py android-ndk-r21e.patched/build/tools/make_standalone_toolchain.py
|
||||
--- android-ndk-r21e/build/tools/make_standalone_toolchain.py 2025-03-04 20:48:14.681288830 +0400
|
||||
+++ android-ndk-r21e.patched/build/tools/make_standalone_toolchain.py 2025-03-05 12:10:47.252578915 +0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2016 The Android Open Source Project
|
||||
#
|
||||
@@ -21,7 +21,6 @@
|
||||
"""
|
||||
import argparse
|
||||
import atexit
|
||||
-from distutils.dir_util import copy_tree
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
@@ -221,13 +220,13 @@
|
||||
|
||||
def create_toolchain(install_path, arch, api, toolchain_path, host_tag):
|
||||
"""Create a standalone toolchain."""
|
||||
- copy_tree(toolchain_path, install_path)
|
||||
+ shutil.copytree(toolchain_path, install_path)
|
||||
triple = get_triple(arch)
|
||||
make_clang_scripts(install_path, arch, api, host_tag == 'windows-x86_64')
|
||||
replace_gcc_wrappers(install_path, triple, host_tag == 'windows-x86_64')
|
||||
|
||||
prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
|
||||
- copy_tree(prebuilt_path, install_path)
|
||||
+ shutil.copytree(prebuilt_path, install_path, dirs_exist_ok=True)
|
||||
|
||||
gdbserver_path = os.path.join(
|
||||
NDK_DIR, 'prebuilt', 'android-' + arch, 'gdbserver')
|
|
@ -28,7 +28,7 @@ COLORS = {
|
|||
}
|
||||
|
||||
|
||||
REMOTE_PREFIX = "https://dev.kiwix.org/kiwix-build/"
|
||||
REMOTE_PREFIX = "http://mirror.download.kiwix.org/dev/kiwix-build/"
|
||||
|
||||
|
||||
def which(name):
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# This file reference all the versions of the depedencies we use in kiwix-build.
|
||||
|
||||
main_project_versions = {
|
||||
"libzim": "9.3.0",
|
||||
"libzim": "9.2.3",
|
||||
"libkiwix": "14.0.0",
|
||||
"kiwix-tools": "3.7.0",
|
||||
"zim-tools": "3.6.0",
|
||||
"kiwix-desktop": "2.4.1",
|
||||
"zim-tools": "3.5.0",
|
||||
"kiwix-desktop": "2.3.1",
|
||||
}
|
||||
|
||||
# This dictionnary specify what we need to build at each release process.
|
||||
|
@ -23,17 +23,17 @@ main_project_versions = {
|
|||
# - Else, increment the value. If no value was present, see `(was ...)`.
|
||||
|
||||
release_versions = {
|
||||
"libzim": 1, # Depends of base deps (was 0)
|
||||
"libkiwix": None, # Depends of libzim (was 1)
|
||||
"libzim": None, # Depends of base deps (was 2)
|
||||
"libkiwix": 1, # Depends of libzim (was 0)
|
||||
"kiwix-tools": None, # Depends of libkiwix and libzim (was 2)
|
||||
"zim-tools": 0, # Depends of libzim (was None)
|
||||
"kiwix-desktop": None, # Depends of libkiwix and libzim (was 0)
|
||||
"zim-tools": None, # Depends of libzim (was 0)
|
||||
"kiwix-desktop": None, # Depends of libkiwix and libzim (was 4)
|
||||
}
|
||||
|
||||
|
||||
# This is the "version" of the whole base_deps_versions dict.
|
||||
# Change this when you change base_deps_versions.
|
||||
base_deps_meta_version = "13"
|
||||
base_deps_meta_version = "09"
|
||||
|
||||
base_deps_versions = {
|
||||
"zlib": "1.2.12",
|
||||
|
@ -45,13 +45,13 @@ base_deps_versions = {
|
|||
"mustache": "4.1",
|
||||
"pugixml": "1.2",
|
||||
"libmicrohttpd": "0.9.76",
|
||||
"gumbo": "0.12.1",
|
||||
"gumbo": "0.10.1",
|
||||
"icu4c": "73.2",
|
||||
"libaria2": "1.37.0",
|
||||
"libmagic": "5.44",
|
||||
"android-ndk": "r21e",
|
||||
"org.kde": "6.7",
|
||||
"io.qt.qtwebengine": "6.7",
|
||||
"zim-testing-suite": "0.8.0",
|
||||
"org.kde": "5.15-23.08",
|
||||
"io.qt.qtwebengine": "5.15-23.08",
|
||||
"zim-testing-suite": "0.6.0",
|
||||
"emsdk": "3.1.41",
|
||||
}
|
||||
|
|
|
@ -14,33 +14,98 @@ fi
|
|||
ICONFILE=$SOURCEDIR/resources/icons/kiwix/scalable/kiwix-desktop.svg
|
||||
DESKTOPFILE=$SOURCEDIR/resources/org.kiwix.desktop.desktop
|
||||
|
||||
# Get linuxdeploy
|
||||
wget --continue https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage
|
||||
chmod u+x linuxdeploy-x86_64.AppImage
|
||||
wget --continue https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
chmod u+x linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
# Create structure
|
||||
mkdir -p $APPDIR/usr/{bin,lib,share} $APPDIR/usr/share/applications $APPDIR/usr/share/icons/hicolor/48x48/apps
|
||||
# Copy our files
|
||||
cp $INSTALLDIR/bin/kiwix-desktop $APPDIR/usr/bin/
|
||||
cp $INSTALLDIR/$SYSTEMLIBDIR/*.so* $APPDIR/usr/lib
|
||||
# Remove it as it break with linuxdeployqt (should we compile without it) ?
|
||||
rm -f $APPDIR/usr/lib/libmagic.so*
|
||||
# Copy nss lib (to not conflict with host's ones)
|
||||
cp -a /usr/$SYSTEMLIBDIR/nss $APPDIR/usr/lib
|
||||
# Copy libthai.so (see kiwix-desktop issue#1016)
|
||||
cp -a /usr/$SYSTEMLIBDIR/libthai.so* $APPDIR/usr/lib
|
||||
|
||||
# Copy ssl libs so that the appimage runs on newer systems
|
||||
# that use a backward incompatible version of openssl
|
||||
cp /usr/$SYSTEMLIBDIR/lib{crypto,ssl}.so.1.1 $APPDIR/usr/lib
|
||||
|
||||
patch_rodata()
|
||||
{
|
||||
local elffile=$1
|
||||
local sedscript=$2
|
||||
local rodatafile=$elffile.rodata
|
||||
objcopy --dump-section .rodata="$rodatafile" "$elffile"
|
||||
sed -i "$sedscript" "$rodatafile"
|
||||
objcopy --update-section .rodata="$rodatafile" "$elffile"
|
||||
rm $rodatafile
|
||||
}
|
||||
|
||||
# copy and patch a couple of libs depending on ssl functionalty before
|
||||
# linuxdeployqt copies and modifies them whereupon the patch_rodata procedure
|
||||
# stops working on them correctly
|
||||
cp -rL /usr/$SYSTEMLIBDIR/{libgnutls.so.30,libQt5Network.so.5} $APPDIR/usr/lib
|
||||
|
||||
# patch libQt5Network.so so that if it fails to load certificates from
|
||||
# system paths the last path that it tries points to the certificate bundle
|
||||
# included with the appimage
|
||||
|
||||
# !!! crt_bundle_new_path must have the same length as crt_bundle_old_path
|
||||
crt_bundle_old_path=/usr/local/share/certs/ca-root-nss.crt
|
||||
crt_bundle_new_path=/tmp/cert_bundle_provided_by_kiwix.crt
|
||||
# !!! crt_bundle_new_path must have the same length as crt_bundle_old_path
|
||||
|
||||
libQtNetworkPatchingSedScript="s|$crt_bundle_old_path|$crt_bundle_new_path|"
|
||||
|
||||
patch_rodata $APPDIR/usr/lib/libQt5Network.so.5 "$libQtNetworkPatchingSedScript"
|
||||
|
||||
|
||||
cp $ICONFILE $APPDIR/usr/share/icons/hicolor/48x48/apps/kiwix-desktop.svg
|
||||
mkdir -p $APPDIR/usr/share/applications
|
||||
cp $DESKTOPFILE $APPDIR/usr/share/applications/kiwix-desktop.desktop
|
||||
|
||||
# get the aria2
|
||||
wget --continue https://github.com/q3aql/aria2-static-builds/releases/download/v1.36.0/aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2
|
||||
mkdir -p $APPDIR/usr/bin/ && tar -C $APPDIR/usr/bin/ -xf aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.36.0-linux-gnu-64bit-build1/aria2c --strip-components=1
|
||||
mkdir -p $APPDIR/etc/ssl/certs/ && tar -C $APPDIR/etc/ssl/certs/ -xf aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.36.0-linux-gnu-64bit-build1/ca-certificates.crt --strip-components=1
|
||||
|
||||
# Get linuxdeployqt
|
||||
# Dispite the 'continuous' in the file name, it IS release 8
|
||||
wget --continue https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage -O linuxdeployqt
|
||||
chmod u+x linuxdeployqt
|
||||
|
||||
# Fill with all deps libs and so
|
||||
LD_LIBRARY_PATH=$INSTALLDIR/lib/x86_64-linux-gnu ./linuxdeploy-x86_64.AppImage \
|
||||
--plugin=qt \
|
||||
--appdir="$APPDIR" \
|
||||
--executable=$INSTALLDIR/bin/kiwix-desktop \
|
||||
--desktop-file=$DESKTOPFILE \
|
||||
--icon-file=$ICONFILE \
|
||||
--library=/usr/lib/x86_64-linux-gnu/libthai.so.0 \
|
||||
|
||||
# Get the aria2c (https://github.com/abcfy2/aria2-static-build/releases/download/1.37.0/aria2-x86_64-linux-musl_libressl_static.zip)
|
||||
wget --continue https://dev.kiwix.org/kiwix-desktop/aria2-1.37.0-x86_64-linux-musl_libressl_static.zip
|
||||
mkdir -p $APPDIR/usr/bin/ && unzip aria2-1.37.0-x86_64-linux-musl_libressl_static.zip -d $APPDIR/usr/bin/
|
||||
|
||||
# Copy the CA trustore from the hosting system
|
||||
mkdir -p $APPDIR/etc/ssl/certs/ && cp /etc/ssl/certs/ca-certificates.crt $APPDIR/etc/ssl/certs/
|
||||
|
||||
./linuxdeployqt $APPDIR/usr/bin/kiwix-desktop -bundle-non-qt-libs -extra-plugins=imageformats,iconengines
|
||||
# Fix the RPATH of QtWebEngineProcess [TODO] Fill a issue ?
|
||||
patchelf --set-rpath '$ORIGIN/../lib' $APPDIR/usr/libexec/QtWebEngineProcess
|
||||
|
||||
mv $APPDIR/{AppRun.wrapped,kiwix-desktop}
|
||||
sed -i 's/AppRun\.wrapped/kiwix-desktop/g' $APPDIR/AppRun
|
||||
cp $DESKTOPFILE $APPDIR/kiwix-desktop.desktop
|
||||
cp $ICONFILE $APPDIR/
|
||||
cp $ICONFILE $APPDIR/.DirIcon
|
||||
|
||||
rm "$APPDIR"/AppRun
|
||||
|
||||
cat > "$APPDIR"/AppRun <<'END'
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mydir=$(dirname "$0")
|
||||
mydir=$(cd "$mydir" && pwd)
|
||||
|
||||
crt_path=??? # this is set by postprocessing via sed
|
||||
|
||||
if [ ! -e "$crt_path" ]
|
||||
then
|
||||
ln -s "$mydir"/etc/ssl/certs/ca-certificates.crt "$crt_path"
|
||||
trap "rm '$crt_path'" EXIT
|
||||
fi
|
||||
|
||||
"$mydir"/usr/bin/kiwix-desktop "$@"
|
||||
END
|
||||
|
||||
sed -i "s#^crt_path=.*#crt_path=$crt_bundle_new_path#" "$APPDIR"/AppRun
|
||||
|
||||
chmod 0755 "$APPDIR"/AppRun
|
||||
|
||||
wget --continue https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
|
||||
chmod u+x appimagetool-x86_64.AppImage
|
||||
|
||||
|
|
|
@ -73,5 +73,5 @@ print(
|
|||
- With {out_dir.name}"""
|
||||
)
|
||||
shutil.make_archive(
|
||||
archive_path.with_suffix(""), "zip", root_dir=out_dir, base_dir=""
|
||||
archive_path.with_suffix(""), "zip", root_dir=out_dir.parent, base_dir=out_dir.name
|
||||
)
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os, sys
|
||||
import json
|
||||
import requests
|
||||
|
||||
bintray_auth = (os.environ['BINTRAY_USER'], os.environ['BINTRAY_PASS'])
|
||||
|
||||
def create_version(version):
|
||||
url = "https://api.bintray.com/packages/kiwix/kiwix/kiwixlib/versions"
|
||||
payload = {
|
||||
'name': version,
|
||||
'desc': 'Release of libkiwix'
|
||||
}
|
||||
headers = {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
r = requests.post(url, data=json.dumps(payload), headers=headers, auth=bintray_auth)
|
||||
rcode = r.status_code
|
||||
|
||||
if rcode == 409:
|
||||
print("Bintray version %s already exists, skipping." % version)
|
||||
return True
|
||||
|
||||
rcode_family = rcode // 100
|
||||
if rcode_family in (2, 3):
|
||||
print("Bintray Version created!")
|
||||
return True
|
||||
|
||||
print("ERROR : Bintray API response {}".format(rcode))
|
||||
return False
|
||||
|
||||
|
||||
def upload(version, filepath, artefact):
|
||||
url_template = "https://api.bintray.com/content/kiwix/kiwix/kiwixlib/{version}/org/kiwix/kiwixlib/kiwixlib/{version}/{artefact}"
|
||||
parameters = {
|
||||
'publish': 1,
|
||||
'override': 1
|
||||
}
|
||||
|
||||
# Upload the main artefact
|
||||
url = url_template.format(version=version, artefact=artefact)
|
||||
with open(filepath, 'rb') as f:
|
||||
r = requests.put(url, data=f, auth=bintray_auth, params=parameters)
|
||||
|
||||
rcode = r.status_code
|
||||
rcode_family = rcode // 100
|
||||
if rcode_family not in (2, 3):
|
||||
print("ERROR: Fail to upload artefact")
|
||||
print(r.text)
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def upload_from_json(json_path):
|
||||
basedir = os.path.dirname(json_path)
|
||||
with open(str(json_path)) as f:
|
||||
options = json.load(f)
|
||||
|
||||
if not create_version(options['version']):
|
||||
raise RuntimeError("Cannot create version")
|
||||
|
||||
for file_ in options['files']:
|
||||
path = os.path.join(basedir, file_)
|
||||
if not upload(options['version'], path, file_):
|
||||
raise RuntimeError("Cannot upload file {}".format(file_))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
info_file = sys.argv[1]
|
||||
except IndexError:
|
||||
print("Usage {} infofile".format(sys.argv[0]))
|
||||
sys.exit(-1)
|
||||
|
||||
print("Use info file {}".format(info_file))
|
||||
try:
|
||||
upload_from_json(info_file)
|
||||
except RuntimeError as e:
|
||||
sys.exit(str(e))
|
||||
|
Loading…
Reference in New Issue