Compare commits
115 Commits
Author | SHA1 | Date |
---|---|---|
|
2f37d80111 | |
|
971971a60f | |
|
f58795bd1e | |
|
fcc6798187 | |
|
9c5e1966a0 | |
|
f13cd4264a | |
|
efd995acbf | |
|
43c4add1fc | |
|
e4a8ac215c | |
|
4d65a50db4 | |
|
4071762b9a | |
|
77592b12ff | |
|
e67295a3d0 | |
|
8780b994a3 | |
|
f888c87459 | |
|
1aa720a7fd | |
|
1676e740c0 | |
|
4a279da24b | |
|
45be5ebeda | |
|
8a911ccd75 | |
|
685f3f1e1a | |
|
baed570f14 | |
|
5de1d1f65e | |
|
75ca8fc723 | |
|
006db92fd3 | |
|
1a100a2def | |
|
4eae4fe654 | |
|
949232dc00 | |
|
a62d741363 | |
|
ce40d311f2 | |
|
ac254d2082 | |
|
f7027cbf96 | |
|
234dd5f096 | |
|
575a556412 | |
|
a0f1202880 | |
|
c23567a3f7 | |
|
525e4acc3b | |
|
d92ac512f9 | |
|
57e2c518c2 | |
|
656d65ea17 | |
|
c8b2dd4fd8 | |
|
0109c8ced3 | |
|
a5a6ba1c52 | |
|
4d838cf4de | |
|
b1b545a65b | |
|
ef54fd823e | |
|
c61e4c27c5 | |
|
d830f3171a | |
|
4b750aa02e | |
|
97d89e634c | |
|
2df3c0b5e2 | |
|
a14970bc43 | |
|
ff2ade262c | |
|
2321717c83 | |
|
c116685b21 | |
|
d0eeca32d1 | |
|
83b45a013c | |
|
680ff58756 | |
|
8c3ba3f3cb | |
|
1c6994546c | |
|
6cb347c576 | |
|
c7a0d8c13b | |
|
946a28da0e | |
|
63b59b7d16 | |
|
2a25dbb22f | |
|
374411e05a | |
|
a50d782ab7 | |
|
889e931a99 | |
|
bcb16d34ef | |
|
022f657cd7 | |
|
d03837b47f | |
|
ecd8f988cf | |
|
bb0b86d9b8 | |
|
e1b6d1f1ce | |
|
e8a7924794 | |
|
0b8919d919 | |
|
be5fe08dfc | |
|
7aba1ddcb9 | |
|
8e5afad538 | |
|
c9920d5e18 | |
|
edfbefb11e | |
|
dfe53e13e9 | |
|
59778f4452 | |
|
74767e6234 | |
|
c58b209f33 | |
|
8f73fb6b30 | |
|
a80121593b | |
|
a33705dfb6 | |
|
145b1b2723 | |
|
642f63cbaa | |
|
b2a756baa6 | |
|
e53edc8d42 | |
|
263ce4c87d | |
|
49b15d12b7 | |
|
507d05a256 | |
|
1ab240d44b | |
|
d8071bd947 | |
|
04f7d6457d | |
|
6c9889d4e8 | |
|
ba4a54bf9d | |
|
7e9cb8c501 | |
|
dc2a837450 | |
|
e5b7bccdf2 | |
|
3905de7110 | |
|
c716617bbd | |
|
b0a610ffec | |
|
334b1f81cc | |
|
b527c7c0bb | |
|
d091c8802f | |
|
6207b0ab0b | |
|
8401ee5ea3 | |
|
5f65164e1a | |
|
8b9d9f87e5 | |
|
de90c6fefc | |
|
52d757c660 |
|
@ -1,12 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: kiwix # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # https://kiwix.org/support-us/
|
|
@ -0,0 +1,46 @@
|
|||
[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/
|
|
@ -22,9 +22,9 @@ BUILD_DEF = """
|
|||
| manylinux | aarch64_mixed | BP | | | | | linux-aarch64-manylinux | |
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# On Windows, we build only libzim for now. And only native_mixed as xapian doesn't compile as dll
|
||||
| windows | native_static | Bd | d | d | d | | win-x86_64 | win-x86_64-static |
|
||||
| windows | native_static | Bd | d | BPd | BPd | | win-x86_64 | win-x86_64-static |
|
||||
| windows | native_dyn | Bd | | | | | win-x86_64 | win-x86_64-dyn |
|
||||
| windows | native_mixed | BPd | d | | | Bd | win-x86_64 | win-x86_64-mixed |
|
||||
| windows | native_mixed | BPd | d | | | BPd | win-x86_64 | win-x86_64-mixed |
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Osx builds, build binaries on native_dyn and native_static. On anyother things, build only the libraries
|
||||
| macos | native_dyn | d | d | dB | B | | | macos-x86_64-dyn |
|
||||
|
@ -38,34 +38,33 @@ BUILD_DEF = """
|
|||
| macos | macOS_x86_64 | B | B | | | | | |
|
||||
| macos | apple_all_static | | BP | | | | xcframework | |
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
| | 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 |
|
||||
| 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 |
|
||||
# libzim CI is building alpine_dyn but not us
|
||||
| | 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 | |
|
||||
| | win32_static | d | dB | dBP | dBP | | win-i686 |win32-static |
|
||||
| | win32_dyn | d | dB | dB | dB | | |win32-dyn |
|
||||
| | i586_static | | | BP | BP | | linux-i586 | |
|
||||
| | i586_dyn | | | B | B | | | |
|
||||
| | wasm | dBP | | | | | wasm-emscripten | wasm |
|
||||
| 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 |
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -21,16 +21,15 @@ from common import (
|
|||
from build_definition import select_build_targets, BUILD, PUBLISH, SOURCE_PUBLISH
|
||||
|
||||
|
||||
def release_filter(project):
|
||||
return release_versions.get(project) is not None
|
||||
|
||||
|
||||
# Filter what to build if we are doing a release.
|
||||
TARGETS = select_build_targets(PUBLISH)
|
||||
|
||||
if MAKE_RELEASE:
|
||||
TARGETS = select_build_targets(PUBLISH)
|
||||
|
||||
def release_filter(project):
|
||||
return release_versions.get(project) is not None
|
||||
|
||||
TARGETS = tuple(filter(release_filter, TARGETS))
|
||||
else:
|
||||
TARGETS = select_build_targets(BUILD)
|
||||
|
||||
for target in TARGETS:
|
||||
run_kiwix_build(target, config=COMPILE_CONFIG, make_release=MAKE_RELEASE)
|
||||
|
|
|
@ -46,8 +46,10 @@ default_tmp_dir = os.getenv("TEMP") if platform.system() == "Windows" else "/tmp
|
|||
TMP_DIR = Path(os.getenv("TMP_DIR", default_tmp_dir))
|
||||
if platform.system() == "Windows":
|
||||
KBUILD_SOURCE_DIR = Path(_environ["GITHUB_WORKSPACE"])
|
||||
BIN_EXT = ".exe"
|
||||
else:
|
||||
KBUILD_SOURCE_DIR = HOME / "kiwix-build"
|
||||
BIN_EXT = ""
|
||||
|
||||
|
||||
_ref = _environ.get("GITHUB_REF", "").split("/")[-1]
|
||||
|
@ -62,13 +64,19 @@ else:
|
|||
FLATPAK_HTTP_GIT_REMOTE = "https://github.com/flathub/org.kiwix.desktop.git"
|
||||
FLATPAK_GIT_REMOTE = "git@github.com:flathub/org.kiwix.desktop.git"
|
||||
|
||||
BIN_EXT = ".exe" if COMPILE_CONFIG.startswith("win32_") else ""
|
||||
|
||||
|
||||
def major_version(version: str) -> str:
|
||||
return version.split(".")[0]
|
||||
|
||||
|
||||
# Depending of base distribution, libraries are in "lib64" (redhat base) or "lib/<arch>" (debian base).
|
||||
# On top of that, when cross-compiling, libraries are always put in `lib/<arch>`.
|
||||
# As we use this as glob regex to select which files to add to archive, this is not a problem to have both.
|
||||
def lib_prefix(file):
|
||||
yield "lib64/" + file
|
||||
yield "lib/*/" + file
|
||||
|
||||
|
||||
# We have build everything. Now create archives for public deployement.
|
||||
EXPORT_FILES = {
|
||||
"kiwix-tools": (
|
||||
|
@ -97,18 +105,25 @@ EXPORT_FILES = {
|
|||
"libzim": (
|
||||
INSTALL_DIR,
|
||||
(
|
||||
## Linux
|
||||
# We need to package all dependencies (`*.a`) on wasm
|
||||
"lib/*/libzim.a" if COMPILE_CONFIG != "wasm" else "lib/*.a",
|
||||
"lib/*/libzim.so",
|
||||
"lib/*/libzim.so.{version}".format(version=main_project_versions["libzim"]),
|
||||
"lib/*/libzim.so.{version}".format(
|
||||
version=major_version(main_project_versions["libzim"])
|
||||
*lib_prefix("libzim.a" if COMPILE_CONFIG != "wasm" else "*.a"),
|
||||
*lib_prefix("libzim.so"),
|
||||
*lib_prefix(
|
||||
"libzim.so.{version}".format(version=main_project_versions["libzim"])
|
||||
),
|
||||
*lib_prefix(
|
||||
"libzim.so.{version}".format(
|
||||
version=major_version(main_project_versions["libzim"])
|
||||
)
|
||||
),
|
||||
## MacOS
|
||||
"lib/libzim.{}.dylib".format(
|
||||
major_version(main_project_versions["libzim"])
|
||||
),
|
||||
"lib/libzim.dylib",
|
||||
"lib/*/libzim.pc",
|
||||
## Windows
|
||||
"bin/zim-{version}.dll".format(
|
||||
version=major_version(main_project_versions["libzim"])
|
||||
),
|
||||
|
@ -117,6 +132,7 @@ EXPORT_FILES = {
|
|||
version=major_version(main_project_versions["libzim"])
|
||||
),
|
||||
"lib/zim.lib",
|
||||
## Includes and others
|
||||
"include/zim/**/*.h",
|
||||
"share/icu/{}/icudt{}l.dat".format(
|
||||
base_deps_versions["icu4c"], major_version(base_deps_versions["icu4c"])
|
||||
|
@ -137,7 +153,14 @@ EXPORT_FILES = {
|
|||
"lib/libkiwix.{}.dylib".format(
|
||||
major_version(main_project_versions["libkiwix"])
|
||||
),
|
||||
"bin/kiwix-{version}.dll".format(
|
||||
version=major_version(main_project_versions["libkiwix"])
|
||||
),
|
||||
"bin/icu*.dll",
|
||||
"bin/kiwix-{version}.pdb".format(
|
||||
version=major_version(main_project_versions["libkiwix"])
|
||||
),
|
||||
"lib/kiwix.lib",
|
||||
"lib/libkiwix.dylib",
|
||||
"lib/*/libkiwix.pc",
|
||||
"include/kiwix/**/*.h",
|
||||
|
@ -287,7 +310,10 @@ except ModuleNotFoundError:
|
|||
else:
|
||||
port = "22"
|
||||
|
||||
# sending SFTP mkdir command to the sftp interactive mode and not batch (-b) mode
|
||||
# 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
|
||||
# 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(
|
||||
|
@ -298,6 +324,8 @@ except ModuleNotFoundError:
|
|||
)
|
||||
command = [
|
||||
"sftp",
|
||||
"-c",
|
||||
"aes128-ctr",
|
||||
"-i",
|
||||
_environ.get("SSH_KEY"),
|
||||
"-P",
|
||||
|
@ -433,6 +461,25 @@ def get_postfix(project):
|
|||
return postfix
|
||||
|
||||
|
||||
def sign_binary(path):
|
||||
# We assume here that signtool and certificate are properly configured.
|
||||
# Env var `SIGNTOOL_THUMBPRINT` must contain thumbprint of the certificate to use.
|
||||
command = [
|
||||
os.getenv("SIGNTOOL_PATH", "signtool.exe"),
|
||||
"sign",
|
||||
"/fd",
|
||||
"sha256",
|
||||
"/tr",
|
||||
"http://ts.ssl.com",
|
||||
"/td",
|
||||
"sha256",
|
||||
"/sha1",
|
||||
os.environ["SIGNTOOL_THUMBPRINT"],
|
||||
str(path),
|
||||
]
|
||||
subprocess.run(command, check=True)
|
||||
|
||||
|
||||
def make_archive(project, make_release):
|
||||
platform_name = get_platform_name()
|
||||
if not platform_name:
|
||||
|
@ -454,6 +501,12 @@ def make_archive(project, make_release):
|
|||
files_to_archive = []
|
||||
for export_file in export_files:
|
||||
files_to_archive.extend(base_dir.glob(export_file))
|
||||
|
||||
if make_release and platform.system() == "Windows":
|
||||
for file in files_to_archive:
|
||||
if str(file).endswith(".exe"):
|
||||
sign_binary(file)
|
||||
|
||||
if platform_name == "win-i686" or platform.system() == "Windows":
|
||||
open_archive = lambda a: zipfile.ZipFile(
|
||||
str(a), "w", compression=zipfile.ZIP_DEFLATED
|
||||
|
@ -489,9 +542,9 @@ def create_desktop_image(make_release):
|
|||
app_name = "org.kiwix.desktop.{}.flatpak".format(postfix)
|
||||
print_message("archive is {}", build_path)
|
||||
elif platform.system() == "Windows":
|
||||
archive_basename = "Kiwix-{}-win-amd64".format(postfix)
|
||||
archive_basename = "kiwix-desktop_windows_x64_{}".format(postfix)
|
||||
working_dir = INSTALL_DIR / archive_basename
|
||||
build_path = working_dir.with_suffix(".zip")
|
||||
build_path = Path(str(working_dir) + ".zip")
|
||||
app_name = build_path.name
|
||||
command = [
|
||||
"python",
|
||||
|
@ -542,7 +595,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"]:
|
||||
for dep in ["pugixml", "libmicrohttpd"]:
|
||||
for f in patch_dir.glob("{}_*.patch".format(dep)):
|
||||
shutil.copy(str(f), str(git_repo_dir / "patches"))
|
||||
command = ["git", "add", "-A", "."]
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
daysUntilClose: false
|
||||
staleLabel: stale
|
||||
|
||||
issues:
|
||||
daysUntilStale: 60
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be now be reviewed manually. Thank you
|
||||
for your contributions.
|
||||
pulls:
|
||||
daysUntilStale: 7
|
||||
markComment: >
|
||||
This pull request has been automatically marked as stale because it has not had
|
||||
recent activity. It will be now be reviewed manually. Thank you
|
||||
for your contributions.
|
|
@ -1,11 +1,11 @@
|
|||
name: Release&Nigthly
|
||||
name: CD
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- r_[0-9]+
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
- cron: '0 3 * * *'
|
||||
|
||||
jobs:
|
||||
Windows:
|
||||
|
@ -23,9 +23,9 @@ jobs:
|
|||
HOME: 'C:\\Users\\runneradmin'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup python 3.12
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install packages
|
||||
|
@ -37,11 +37,14 @@ 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:
|
||||
|
@ -52,6 +55,37 @@ jobs:
|
|||
echo "${{secrets.ssh_key}}" > $SSH_KEY
|
||||
env:
|
||||
SSH_KEY: ${{ runner.temp }}/id_rsa
|
||||
- name: Install and configure eSigner CKA and Windows SDK
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
ESIGNER_URL: https://github.com/SSLcom/eSignerCKA/releases/download/v1.0.7/SSL.COM-eSigner-CKA_1.0.7.zip
|
||||
run: |
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
||||
# Download and Unzip eSignerCKA Setup
|
||||
Invoke-WebRequest -OutFile eSigner_CKA_Setup.zip "$env:ESIGNER_URL"
|
||||
Expand-Archive -Force eSigner_CKA_Setup.zip
|
||||
Remove-Item eSigner_CKA_Setup.zip
|
||||
Move-Item -Destination “eSigner_CKA_Installer.exe” -Path “eSigner_CKA_*\*.exe”
|
||||
|
||||
# Install eSignerCKA
|
||||
New-Item -ItemType Directory -Force -Path "C:\esigner"
|
||||
./eSigner_CKA_Installer.exe /CURRENTUSER /VERYSILENT /SUPPRESSMSGBOXES /DIR=”C:\esigner” /TYPE=automatic | Out-Null
|
||||
Remove-Item "eSigner_CKA_Installer.exe"
|
||||
|
||||
# Configure the CKA with SSL.com credentials
|
||||
C:\esigner\eSignerCKATool.exe config -mode product -user "${{ secrets.ESIGNER_USERNAME }}" -pass "${{ secrets.ESIGNER_PASSWORD }}" -totp "${{ secrets.ESIGNER_TOTP_SECRET }}" -key "C:\esigner\master.key" -r
|
||||
C:\esigner\eSignerCKATool.exe unload
|
||||
C:\esigner\eSignerCKATool.exe load
|
||||
|
||||
# Find certificate
|
||||
$CodeSigningCert = Get-ChildItem Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
|
||||
echo Certificate: $CodeSigningCert
|
||||
|
||||
# Extract thumbprint and subject name
|
||||
$Thumbprint = $CodeSigningCert.Thumbprint
|
||||
echo "SIGNTOOL_THUMBPRINT=$Thumbprint" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Ensure base deps
|
||||
run: |
|
||||
python .github\\scripts\\ensure_base_deps.py
|
||||
|
@ -61,6 +95,7 @@ jobs:
|
|||
run: |
|
||||
python .github\\scripts\\build_release_nightly.py
|
||||
env:
|
||||
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x86/signtool.exe"
|
||||
SSH_KEY: ${{ runner.temp }}/id_rsa
|
||||
- name: Upload failure logs
|
||||
if: failure()
|
||||
|
@ -99,14 +134,14 @@ jobs:
|
|||
image_variant: manylinux
|
||||
- config: aarch64_mixed
|
||||
image_variant: manylinux
|
||||
- config: win32_static
|
||||
image_variant: f35
|
||||
- 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-06-03"
|
||||
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-11-30"
|
||||
options: "--device /dev/fuse --privileged"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -138,11 +173,9 @@ 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.sh
|
||||
run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.py
|
||||
env:
|
||||
COMPILE_CONFIG: ${{matrix.config}}
|
||||
|
||||
|
@ -187,7 +220,7 @@ jobs:
|
|||
kiwix-build/.github/scripts/build_release_nightly.py
|
||||
- name: Upload failure logs
|
||||
if: failure()
|
||||
run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.sh
|
||||
run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.py
|
||||
|
||||
Macos:
|
||||
strategy:
|
||||
|
@ -221,7 +254,7 @@ jobs:
|
|||
python-version: '3.10'
|
||||
- name: Install packages
|
||||
run:
|
||||
brew install pkg-config ninja automake autoconf
|
||||
brew install automake # ninja
|
||||
- name: Install python modules
|
||||
run: |
|
||||
pip3 install meson pytest requests distro
|
||||
|
@ -266,7 +299,7 @@ jobs:
|
|||
COMPILE_CONFIG: ${{matrix.config}}
|
||||
- name: Upload failure logs
|
||||
if: failure()
|
||||
run: $GITHUB_WORKSPACE/.github/scripts/upload_failure_logs.sh
|
||||
run: $GITHUB_WORKSPACE/.github/scripts/upload_failure_logs.py
|
||||
env:
|
||||
COMPILE_CONFIG: ${{matrix.config}}
|
||||
|
||||
|
@ -276,7 +309,7 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
COMPILE_CONFIG: native_static
|
||||
OS_NAME: linux
|
||||
OS_NAME: focal
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
|
@ -21,9 +21,9 @@ jobs:
|
|||
HOME: 'C:\\Users\\runneradmin'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup python 3.12
|
||||
uses: actions/setup-python@v3
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install packages
|
||||
|
@ -35,11 +35,14 @@ 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"
|
||||
version: 6.4.3
|
||||
modules: "qtwebengine qtwebchannel qtpositioning"
|
||||
setup-python: false
|
||||
env:
|
||||
AQT_CONFIG: ${{ github.workspace }}/.github/configs/aqt.ini
|
||||
- name: Setup MSVC compiler
|
||||
uses: bus1/cabuild/action/msdevshell@v1
|
||||
with:
|
||||
|
@ -107,16 +110,15 @@ jobs:
|
|||
image_variant: manylinux
|
||||
- config: aarch64_mixed
|
||||
image_variant: manylinux
|
||||
- config: win32_static
|
||||
image_variant: f35
|
||||
- config: win32_dyn
|
||||
image_variant: f35
|
||||
- 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-06-03"
|
||||
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-11-30"
|
||||
options: "--device /dev/fuse --privileged"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -240,7 +242,7 @@ jobs:
|
|||
python-version: '3.10'
|
||||
- name: Install packages
|
||||
run:
|
||||
brew install pkg-config ninja automake autoconf
|
||||
brew install automake # ninja
|
||||
- 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/releaseNigthly.yml?query=branch%3Amain)
|
||||
[](https://github.com/kiwix/kiwix-build/actions/workflows/cd.yml?query=branch%3Amain)
|
||||
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||
|
||||
Prerequisites
|
||||
|
@ -89,8 +89,6 @@ platforms:
|
|||
- native_dyn
|
||||
- native_mixed
|
||||
- native_static
|
||||
- win32_dyn
|
||||
- win32_static
|
||||
- android
|
||||
- android_arm
|
||||
- android_arm64
|
||||
|
@ -101,11 +99,6 @@ platforms:
|
|||
All `native_*` config means using the native compiler without any cross-compilation option.
|
||||
Other may simply use cross-compilation or may download a specific toolchain to use.
|
||||
|
||||
If you want to compile `kiwix-tools` for win32 using static linkage:
|
||||
```bash
|
||||
kiwix-build --config win32_dyn
|
||||
```
|
||||
|
||||
Android
|
||||
-------
|
||||
|
||||
|
|
|
@ -114,9 +114,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.28.2",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz",
|
||||
"integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==",
|
||||
"version": "5.28.4",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
|
||||
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
|
||||
"dependencies": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
},
|
||||
|
|
69
appveyor.yml
69
appveyor.yml
|
@ -1,69 +0,0 @@
|
|||
image: Visual Studio 2019
|
||||
version: '0.1.{build}'
|
||||
environment:
|
||||
EXTRA_DIR: 'C:\extra'
|
||||
MINGW64_EXTRA_DIR: '/c/extra'
|
||||
PATH: 'C:\\Python312\\Scripts;%PATH%;%EXTRA_DIR%\bin;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\%platform%'
|
||||
PKG_CONFIG_PATH: '%EXTRA_DIR%\lib\pkgconfig'
|
||||
MSYS2_PATH_TYPE: 'inherit'
|
||||
MSYS2_ARG_CONV_EXCL: '-Tp'
|
||||
MINGW64_RUN: 'C:\msys64\usr\bin\bash.exe --login -c'
|
||||
MSYSTEM: 'MINGW64'
|
||||
KIWIX_DESKTOP_VERSION: '2.3.1-3'
|
||||
KIWIX_DESKTOP_RELEASE: 0
|
||||
|
||||
|
||||
init:
|
||||
- cmd: |
|
||||
echo %TEST_VAR%
|
||||
REM Set VC 2019
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
mkdir C:\extra\bin
|
||||
|
||||
install:
|
||||
- cmd: |
|
||||
cd C:\projects
|
||||
REM Install meson
|
||||
C:\Python312\Scripts\pip install meson
|
||||
|
||||
REM Install ninja
|
||||
curl -o ninja-win.zip -L https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
|
||||
7z e ninja-win.zip -o%EXTRA_DIR%\bin
|
||||
|
||||
REM Install pkg-config-lite
|
||||
curl -o pkg-config-lite-0.28-1.zip -L https://deac-fra.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip
|
||||
7z e pkg-config-lite-0.28-1.zip -o%EXTRA_DIR%\bin pkg-config-lite-0.28-1/bin/pkg-config.exe
|
||||
cd kiwix-build
|
||||
|
||||
REM Install openssh (scp) for deployement
|
||||
choco install openssh openssl.light
|
||||
|
||||
- cmd: openssl enc -d -aes-256-cbc -md sha256 -pass pass:%ENC_PASSWD% -in appveyor\nightlybot_id_key.enc -out appveyor\nightlybot_id_key
|
||||
|
||||
|
||||
|
||||
build_script:
|
||||
- IF "%USE_CACHE%" EQU "1" appveyor\setup_from_cache.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_zlib.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_lzma.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_zstd.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_libcurl.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_pthread.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_dirent.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_xapian.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_icu.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_pugixml.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_aria2.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_mustache.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_libmicrohttpd.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" %MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/create_cache.sh"
|
||||
- appveyor\install_libzim.cmd
|
||||
- appveyor\install_libkiwix.cmd
|
||||
- appveyor\install_kiwix-desktop.cmd
|
||||
|
||||
before_deploy:
|
||||
- cmd: openssl enc -d -pbkdf2 -aes-256-cbc -md sha256 -pass pass:%win_certificate_secret% -in appveyor\kiwix.pfx.enc -out appveyor\kiwix.pfx
|
||||
- cmd: '%MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/package_kiwix-desktop.sh"'
|
||||
|
||||
deploy_script:
|
||||
- cmd: '%MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/deploy.sh"'
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
XAPIAN_SOURCE=$(pwd)/..
|
||||
|
||||
$XAPIAN_SOURCE/configure \
|
||||
CC="cl -nologo" \
|
||||
CXX="$XAPIAN_SOURCE/compile cl -nologo" \
|
||||
CXXFLAGS="-EHsc -MD" AR=lib \
|
||||
CPPFLAGS="-I${MINGW64_EXTRA_DIR}/include" \
|
||||
LDFLAGS="-L${MINGW64_EXTRA_DIR}/lib" \
|
||||
--disable-backend-remote \
|
||||
--disable-documentation \
|
||||
--prefix=${MINGW64_EXTRA_DIR}
|
||||
|
||||
make -j2
|
||||
|
||||
make install
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
set -e
|
||||
|
||||
ARCHIVE_NAME="deps_windows_windows.zip"
|
||||
SSH_KEY=C:\\projects\\kiwix-build\\appveyor\\nightlybot_id_key
|
||||
|
||||
7z a -tzip $ARCHIVE_NAME $MINGW64_EXTRA_DIR
|
||||
scp -P 30022 -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
|
||||
${ARCHIVE_NAME} \
|
||||
ci@tmp.kiwix.org:/data/tmp/ci
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
set -e
|
||||
|
||||
NIGHTLY_DATE=$(date +%Y-%m-%d)
|
||||
NIGHTLY_KIWIX_ARCHIVES_DIR=/c/projects/NIGHTLY_KIWIX_ARCHIVES/${NIGHTLY_DATE}
|
||||
RELEASE_KIWIX_ARCHIVES_DIR=/c/projects/RELEASE_KIWIX_ARCHIVES
|
||||
SSH_KEY=C:\\projects\\kiwix-build\\appveyor\\nightlybot_id_key
|
||||
|
||||
if [[ "$APPVEYOR_SCHEDULED_BUILD" = "True" ]]
|
||||
then
|
||||
scp -P 30022 -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
|
||||
${NIGHTLY_KIWIX_ARCHIVES_DIR} \
|
||||
ci@master.download.kiwix.org:/data/download/nightly
|
||||
fi
|
||||
|
||||
if [[ "$APPVEYOR_REPO_TAG" = "true" ]]
|
||||
then
|
||||
RELEASE_ARCHIVES=$(find $RELEASE_KIWIX_ARCHIVES_DIR -type f)
|
||||
scp -P 30022 -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
|
||||
${RELEASE_ARCHIVES} \
|
||||
ci@master.download.kiwix.org:/data/download/release/kiwix-desktop
|
||||
fi
|
|
@ -1,29 +0,0 @@
|
|||
import re, sys, os
|
||||
|
||||
makefile = sys.argv[-1]
|
||||
print("Patching '{}'".format(makefile))
|
||||
|
||||
with open(makefile, 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
with open(makefile, 'w') as f:
|
||||
for line in lines:
|
||||
# if "/SUBSYSTEM:WINDOWS" in line:
|
||||
# line = line.replace("/SUBSYSTEM:WINDOWS", "/SUBSYSTEM:CONSOLE")
|
||||
# f.write(line)
|
||||
# continue
|
||||
if not line.startswith('LIBS '):
|
||||
f.write(line)
|
||||
continue
|
||||
print("-- INPUT : {}".format(line))
|
||||
for lib in ('kiwix', 'zim', 'pugixml', 'z', 'zstd'):
|
||||
line = line.replace('{}.lib'.format(lib), 'lib{}.a'.format(lib))
|
||||
for lib in ('lzma', 'curl'):
|
||||
line = line.replace('lib{}.lib'.format(lib), 'lib{}.a'.format(lib))
|
||||
line = line.strip()
|
||||
# line += " pthreadVC2.lib"
|
||||
# line += " icuin.lib icudt.lib icuuc.lib"
|
||||
line += " Rpcrt4.lib Ws2_32.lib winmm.lib Shlwapi.lib"
|
||||
line += os.linesep
|
||||
print("++ OUTPUT : {}".format(line))
|
||||
f.write(line)
|
|
@ -1,4 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install aria2
|
||||
curl -fsSL -O https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0-win-64bit-build1.zip || exit /b 1
|
||||
7z e aria2-1.36.0-win-64bit-build1.zip -o%EXTRA_DIR% aria2-1.36.0-win-64bit-build1\aria2c.exe || exit /b 1
|
|
@ -1,3 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install dirent.h
|
||||
curl -fsSL -o%EXTRA_DIR%\include\dirent.h https://raw.githubusercontent.com/tronkko/dirent/master/include/dirent.h || exit /b 1
|
|
@ -1,14 +0,0 @@
|
|||
REM Set VC 2017
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
mkdir C:\extra\bin
|
||||
cd C:\projects
|
||||
C:\Python36\Scripts\pip install meson || exit /b 1
|
||||
|
||||
REM Set ninja
|
||||
curl -fsSL -o ninja-win.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip || exit /b 1
|
||||
7z e ninja-win.zip -o%EXTRA_DIR%\bin || exit /b 1
|
||||
|
||||
REM Set pkg-config-lit
|
||||
curl --insecure -fsSL -o pkg-config-lite-0.28-1.zip https://netix.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip || exit /b 1
|
||||
7z e pkg-config-lite-0.28-1.zip -o%EXTRA_DIR%\bin pkg-config-lite-0.28-1/bin/pkg-config.exe || exit /b 1
|
||||
cd kiwix-build
|
|
@ -1,7 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install icu
|
||||
curl -SL -O http://public.kymeria.fr/KIWIX/windows/icu4c-62_1-Win64-MSVC2017.zip || exit /b 1
|
||||
7z x icu4c-62_1-Win64-MSVC2017.zip -o%EXTRA_DIR% -r include || exit /b 1
|
||||
7z e icu4c-62_1-Win64-MSVC2017.zip -o%EXTRA_DIR%\lib lib64\* || exit /b 1
|
||||
7z e icu4c-62_1-Win64-MSVC2017.zip -o%EXTRA_DIR%\bin bin64\*.dll || exit /b 1
|
||||
curl -fsSL -o%PKG_CONFIG_PATH%\icu-i18n.pc http://public.kymeria.fr/KIWIX/windows/icu-i18n.pc || exit /b 1
|
|
@ -1,22 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install kiwix-desktop
|
||||
git clone https://github.com/kiwix/kiwix-desktop || exit /b 1
|
||||
cd kiwix-desktop
|
||||
echo "Running qmake"
|
||||
SET _WITH_CONSOLE=1
|
||||
IF %KIWIX_DESKTOP_RELEASE% EQU 1 (
|
||||
IF %APPVEYOR_REPO_TAG% == true (
|
||||
SET _WITH_CONSOLE=0
|
||||
)
|
||||
)
|
||||
IF %_WITH_CONSOLE% EQU 1 (
|
||||
C:\Qt\5.15\msvc2019_64\bin\qmake.exe "CONFIG+=static console" || exit /b 1
|
||||
) else (
|
||||
C:\Qt\5.15\msvc2019_64\bin\qmake.exe "CONFIG+=static" || exit /b 1
|
||||
)
|
||||
|
||||
echo "Running fix_desktop"
|
||||
C:\Python312\Python ..\appveyor\fix_desktop_makefile.py Makefile.Release || exit /b 1
|
||||
echo "Running nmake"
|
||||
nmake || exit /b 1
|
||||
cd ..
|
|
@ -1,14 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install libcurl
|
||||
curl -fsSL -O https://curl.haxx.se/download/curl-7.61.1.zip || exit /b 1
|
||||
7z x curl-7.61.1.zip || exit /b 1
|
||||
cd curl-7.61.1\winbuild
|
||||
nmake /f Makefile.vc mode=static MACHINE=x64 DEBUG=no VC=15 ENABLE_IDN=no || exit /b 1
|
||||
mkdir %EXTRA_DIR%\include\curl
|
||||
copy ..\builds\libcurl-vc15-x64-release-static-ipv6-sspi-winssl\include\curl\*.h %EXTRA_DIR%\include\curl
|
||||
copy ..\builds\libcurl-vc15-x64-release-static-ipv6-sspi-winssl\lib\libcurl_a.lib %EXTRA_DIR%\lib
|
||||
move %EXTRA_DIR%\lib\libcurl_a.lib %EXTRA_DIR%\lib\libcurl.a
|
||||
dir %EXTRA_DIR%\include\curl
|
||||
dir %EXTRA_DIR%\lib
|
||||
curl -fsSl -o%PKG_CONFIG_PATH%\libcurl.pc http://public.kymeria.fr/KIWIX/windows/libcurl.pc || exit /b 1
|
||||
cd ..\..
|
|
@ -1,10 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install libkiwix
|
||||
git clone https://github.com/kiwix/libkiwix.git || exit /b 1
|
||||
cd libkiwix
|
||||
set CPPFLAGS="-I%EXTRA_DIR%/include"
|
||||
meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
|
@ -1,11 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install libmicrohttpd
|
||||
curl -fsSL -O https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-latest-w32-bin.zip || exit /b 1
|
||||
7z e libmicrohttpd-latest-w32-bin.zip -o%EXTRA_DIR%/include libmicrohttpd-*-w32-bin/x86_64/VS2019/Release-static/microhttpd.h || exit /b 1
|
||||
7z e libmicrohttpd-latest-w32-bin.zip -o%EXTRA_DIR%/lib libmicrohttpd-*-w32-bin/x86_64/VS2019/Release-static/libmicrohttpd.lib || exit /b 1
|
||||
7z e libmicrohttpd-latest-w32-bin.zip -o%EXTRA_DIR%/lib/pkgconfig libmicrohttpd-*-w32-bin/x86_64/MinGW/static/mingw64/lib/pkgconfig/* || exit /b 1
|
||||
|
||||
rename %EXTRA_DIR%\lib\libmicrohttpd.lib microhttpd.lib
|
||||
dir %EXTRA_DIR%
|
||||
dir %EXTRA_DIR%\lib
|
||||
dir %EXTRA_DIR%\lib\pkgconfig
|
|
@ -1,9 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install libzim
|
||||
git clone https://github.com/openzim/libzim.git || exit /b 1
|
||||
cd libzim
|
||||
meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
|
@ -1,6 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install lzma
|
||||
curl -fsSL -O https://tukaani.org/xz/xz-5.2.4-windows.zip || exit /b 1
|
||||
7z x xz-5.2.4-windows.zip -o%EXTRA_DIR% -r include || exit /b 1
|
||||
7z e xz-5.2.4-windows.zip -o%EXTRA_DIR%\lib bin_x86-64\liblzma.a || exit /b 1
|
||||
curl -fsSL -o%PKG_CONFIG_PATH%\liblzma.pc http://public.kymeria.fr/KIWIX/windows/liblzma.pc || exit /b 1
|
|
@ -1,3 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install mustache.hpp
|
||||
curl -fsSL -o%EXTRA_DIR%\include\mustache.hpp https://raw.githubusercontent.com/kainjow/mustache/v3.2.1/mustache.hpp || exit /b 1
|
|
@ -1,14 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install pthread
|
||||
curl -fsSL -O ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip || exit /b 1
|
||||
7z x pthreads-w32-2-9-1-release.zip -r pthreads.2 || exit /b 1
|
||||
cd pthreads.2
|
||||
REM Patch is pthread_timespec.patch
|
||||
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/pthread.h || exit /b 1
|
||||
nmake clean VC-inlined || exit /b 1
|
||||
copy pthread.h %EXTRA_DIR%\include
|
||||
copy sched.h %EXTRA_DIR%\include
|
||||
copy pthreadVC2.lib %EXTRA_DIR%\lib
|
||||
copy pthreadVC2.dll %EXTRA_DIR%\bin
|
||||
curl -fsSL -o%PKG_CONFIG_PATH%\libpthreadVC2.pc http://public.kymeria.fr/KIWIX/windows/libpthreadVC2.pc || exit /b 1
|
||||
cd ..
|
|
@ -1,10 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install pugixml
|
||||
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/pugixml-1.2-meson.zip || exit /b 1
|
||||
7z x pugixml-1.2-meson.zip -o. || exit /b 1
|
||||
cd pugixml-1.2-meson
|
||||
meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
|
@ -1,9 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install xapian
|
||||
curl -fsSL -O http://mirror.download.kiwix.org/dev/kiwix-build/xapian-core-1.4.18.zip || exit /b 1
|
||||
7z x xapian-core-1.4.18.zip || exit /b 1
|
||||
cd xapian-core-1.4.18
|
||||
mkdir build
|
||||
cd build
|
||||
%MINGW64_RUN% "cd /c/Projects/kiwix-build/xapian-core-1.4.18/build && /c/Projects/kiwix-build/appveyor/build_xapian.sh" > build_xapian.log || exit /b 1
|
||||
cd ..\..
|
|
@ -1,10 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install zlib
|
||||
curl -fsSL -O http://mirror.download.kiwix.org/dev/kiwix-build/zlib-1.2.12.meson.zip || exit /b 1
|
||||
7z x zlib-1.2.12.meson.zip || exit /b 1
|
||||
cd zlib-1.2.12
|
||||
meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
|
||||
cd build
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..
|
|
@ -1,10 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Install zstd
|
||||
curl -fsSL -o zstd-v1.5.2.zip https://github.com/facebook/zstd/archive/refs/tags/v1.5.2.zip || exit /b 1
|
||||
7z x zstd-v1.5.2.zip || exit /b 1
|
||||
cd zstd-1.5.2/build/meson
|
||||
meson . builddir --prefix %EXTRA_DIR% --default-library static --buildtype release -Dbin_programs=false -Dbin_contrib=false || exit /b 1
|
||||
cd builddir
|
||||
ninja || exit /b 1
|
||||
ninja install || exit /b 1
|
||||
cd ..\..\..\..
|
Binary file not shown.
Binary file not shown.
|
@ -1,35 +0,0 @@
|
|||
|
||||
set -e
|
||||
|
||||
if [[ "$APPVEYOR_REPO_TAG" = "false" ]]
|
||||
then
|
||||
NIGHTLY_DATE=$(date +%Y-%m-%d)
|
||||
KIWIX_ARCHIVES_DIR=/c/projects/NIGHTLY_KIWIX_ARCHIVES/${NIGHTLY_DATE}
|
||||
KIWIX_DIR=kiwix-desktop_windows_x64_$NIGHTLY_DATE
|
||||
else
|
||||
if [ $KIWIX_DESKTOP_RELEASE -eq 1 ]
|
||||
then
|
||||
KIWIX_ARCHIVES_DIR=/c/projects/RELEASE_KIWIX_ARCHIVES
|
||||
KIWIX_DIR=kiwix-desktop_windows_x64_${KIWIX_DESKTOP_VERSION}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$KIWIX_DIR" ]]
|
||||
then
|
||||
KIWIX_ARCH_NAME=${KIWIX_DIR}.zip
|
||||
|
||||
mkdir $KIWIX_DIR
|
||||
mkdir -p KIWIX_ARCHIVES_DIR
|
||||
|
||||
cp /c/projects/kiwix-build/kiwix-desktop/Release/kiwix-desktop.exe $KIWIX_DIR
|
||||
/c/Qt/5.15/msvc2019_64/bin/windeployqt --compiler-runtime $KIWIX_DIR
|
||||
|
||||
cp $MINGW64_EXTRA_DIR/aria2c.exe $KIWIX_DIR
|
||||
cp $MINGW64_EXTRA_DIR/bin/*.dll $KIWIX_DIR
|
||||
cp /c/OpenSSL-v111-Win64/bin/libcrypto-1_1-x64.dll $KIWIX_DIR
|
||||
cp /c/OpenSSL-v111-Win64/bin/libssl-1_1-x64.dll $KIWIX_DIR
|
||||
|
||||
signtool.exe sign -f appveyor/kiwix.pfx -p $win_certificate_password -t http://timestamp.digicert.com -d "Kiwix-desktop application" -fd SHA256 $KIWIX_DIR/kiwix-desktop.exe
|
||||
|
||||
7z a -tzip $KIWIX_ARCHIVES_DIR/$KIWIX_ARCH_NAME $KIWIX_DIR
|
||||
fi
|
|
@ -1,4 +0,0 @@
|
|||
REM ========================================================
|
||||
REM Setup from cache
|
||||
curl -fsSL -O http://tmp.kiwix.org/ci/deps_windows_windows.zip || exit /b 1
|
||||
7z x deps_windows_windows.zip -oc: -aoa || exit /b 1
|
|
@ -1,3 +1,3 @@
|
|||
from .base import *
|
||||
|
||||
from . import android, armhf, musl, flatpak, i586, ios, native, neutral, win32, wasm
|
||||
from . import android, armhf, musl, flatpak, i586, ios, native, neutral, wasm
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
import subprocess
|
||||
|
||||
from .base import ConfigInfo
|
||||
from kiwixbuild.utils import which, pj
|
||||
from kiwixbuild._global import neutralEnv
|
||||
|
||||
|
||||
class Win32ConfigInfo(ConfigInfo):
|
||||
build = "win32"
|
||||
compatible_hosts = ["fedora", "debian"]
|
||||
arch_full = "i686-w64-mingw32"
|
||||
extra_libs = ["-lwinmm", "-lshlwapi", "-lws2_32", "-lssp"]
|
||||
|
||||
def get_cross_config(self):
|
||||
return {
|
||||
"exe_wrapper_def": self.exe_wrapper_def,
|
||||
"binaries": self.binaries,
|
||||
"root_path": self.root_path,
|
||||
"extra_libs": self.extra_libs,
|
||||
"extra_cflags": [
|
||||
"-DWIN32",
|
||||
*(
|
||||
"-I{}".format(include_dir)
|
||||
for include_dir in self.get_include_dirs()
|
||||
),
|
||||
],
|
||||
"host_machine": {
|
||||
"system": "Windows",
|
||||
"lsystem": "windows",
|
||||
"cpu_family": "x86",
|
||||
"cpu": "i686",
|
||||
"endian": "little",
|
||||
"abi": "",
|
||||
},
|
||||
}
|
||||
|
||||
def finalize_setup(self):
|
||||
super().finalize_setup()
|
||||
self.buildEnv.cmake_crossfile = self._gen_crossfile("cmake_cross_file.txt")
|
||||
self.buildEnv.meson_crossfile = self._gen_crossfile("meson_cross_file.txt")
|
||||
|
||||
@property
|
||||
def root_path(self):
|
||||
root_paths = {
|
||||
"fedora": "/usr/i686-w64-mingw32/sys-root/mingw",
|
||||
"debian": "/usr/i686-w64-mingw32",
|
||||
}
|
||||
return root_paths[neutralEnv("distname")]
|
||||
|
||||
@property
|
||||
def binaries(self):
|
||||
return {
|
||||
k: which("{}-{}".format(self.arch_full, v))
|
||||
for k, v in (
|
||||
("CC", "gcc"),
|
||||
("CXX", "g++"),
|
||||
("AR", "ar"),
|
||||
("STRIP", "strip"),
|
||||
("WINDRES", "windres"),
|
||||
("RANLIB", "ranlib"),
|
||||
("PKGCONFIG", "pkg-config"),
|
||||
)
|
||||
}
|
||||
|
||||
@property
|
||||
def exe_wrapper_def(self):
|
||||
try:
|
||||
which("wine")
|
||||
except subprocess.CalledProcessError:
|
||||
return ""
|
||||
else:
|
||||
return "exe_wrapper = 'wine'"
|
||||
|
||||
@property
|
||||
def configure_options(self):
|
||||
yield f"--host={self.arch_full}"
|
||||
|
||||
def set_compiler(self, env):
|
||||
for k, v in self.binaries.items():
|
||||
env[k] = v
|
||||
|
||||
def get_bin_dir(self):
|
||||
return [pj(self.root_path, "bin")]
|
||||
|
||||
def get_env(self):
|
||||
env = super().get_env()
|
||||
env["PKG_CONFIG_LIBDIR"] = pj(self.root_path, "lib", "pkgconfig")
|
||||
env["LIBS"] = " ".join(self.extra_libs) + " " + env["LIBS"]
|
||||
return env
|
||||
|
||||
|
||||
class Win32Dyn(Win32ConfigInfo):
|
||||
name = "win32_dyn"
|
||||
static = False
|
||||
|
||||
|
||||
class Win32Static(Win32ConfigInfo):
|
||||
name = "win32_static"
|
||||
static = True
|
|
@ -24,7 +24,7 @@ class AllBaseDependencies(Dependency):
|
|||
"zim-testing-suite",
|
||||
"icu4c",
|
||||
"boostregex",
|
||||
"docoptcpp"
|
||||
"docoptcpp",
|
||||
]
|
||||
|
||||
if not configInfo.name.endswith("_dyn"):
|
||||
|
@ -50,10 +50,7 @@ class AllBaseDependencies(Dependency):
|
|||
# Add specific dependencies depending of the config
|
||||
if configInfo.build not in ("android", "iOS"):
|
||||
# For zimtools
|
||||
base_deps += ["docoptcpp"]
|
||||
if configInfo.build != "win32":
|
||||
# zimwriterfs
|
||||
base_deps += ["libmagic", "gumbo"]
|
||||
base_deps += ["docoptcpp", "libmagic", "gumbo"]
|
||||
if (
|
||||
configInfo.build == "native"
|
||||
and neutralEnv("distname") != "Darwin"
|
||||
|
|
|
@ -4,6 +4,8 @@ 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"
|
||||
|
@ -14,7 +16,7 @@ class Aria2(Dependency):
|
|||
archive = Remotefile(
|
||||
"aria2-1.37.0-win-64bit-build1.zip",
|
||||
"67d015301eef0b612191212d564c5bb0a14b5b9c4796b76454276a4d28d9b288",
|
||||
"https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip",
|
||||
"https://dev.kiwix.org/kiwix-desktop/aria2-1.37.0-win-64bit-build1.zip",
|
||||
)
|
||||
|
||||
class Builder(NoopBuilder):
|
||||
|
@ -34,7 +36,7 @@ class Aria2(Dependency):
|
|||
archive = Remotefile(
|
||||
"aria2-1.37.0.tar.xz",
|
||||
"60a420ad7085eb616cb6e2bdf0a7206d68ff3d37fb5a956dc44242eb2f79b66b",
|
||||
"https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.xz",
|
||||
"https://dev.kiwix.org/kiwix-desktop/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,6 +538,9 @@ class MesonBuilder(Builder):
|
|||
|
||||
@property
|
||||
def build_type(self):
|
||||
if platform.system() == "Windows":
|
||||
return "release"
|
||||
|
||||
return "release" if option("make_release") else "debug"
|
||||
|
||||
@property
|
||||
|
|
|
@ -15,19 +15,19 @@ class KiwixDesktop(Dependency):
|
|||
dependencies = ["qt", "qtwebengine", "libkiwix", "aria2"]
|
||||
configure_env = None
|
||||
|
||||
flatpack_build_options = {"env": {"QMAKEPATH": "/app/lib"}}
|
||||
flatpack_build_options = {"env": {"QMAKEPATH": "/app"}}
|
||||
|
||||
@property
|
||||
def make_targets(self):
|
||||
if platform.system() == "Windows":
|
||||
yield "release-all" if option("make_release") else "debug-all"
|
||||
yield "release-all"
|
||||
else:
|
||||
yield from super().make_targets
|
||||
|
||||
@property
|
||||
def make_install_targets(self):
|
||||
if platform.system() == "Windows":
|
||||
yield "release-install" if option("make_release") else "debug-install"
|
||||
yield "release-install"
|
||||
else:
|
||||
yield "install"
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class LibCurl(Dependency):
|
|||
meson_archive = Remotefile(
|
||||
"curl_8.4.0-2_patch.zip",
|
||||
"bbb6ae75225c36ef9bb336cface729794c7c070c623a003fff40bd416042ff6e",
|
||||
"https://public.kymeria.fr/KIWIX/curl_8.4.0-2_patch.zip",
|
||||
"https://dev.kiwix.org/libkiwix/curl_8.4.0-2_patch.zip",
|
||||
)
|
||||
archives = [src_archive, meson_archive]
|
||||
|
||||
|
@ -32,8 +32,10 @@ class LibCurl(Dependency):
|
|||
configure_options = [
|
||||
f"-D{p}=disabled"
|
||||
for p in (
|
||||
"psl",
|
||||
"kerberos-auth",
|
||||
"gss-api",
|
||||
"ssh",
|
||||
"ssl",
|
||||
"rtmp",
|
||||
"http2",
|
||||
"idn",
|
||||
|
@ -51,6 +53,7 @@ class LibCurl(Dependency):
|
|||
"smb",
|
||||
"smtp",
|
||||
"gopher",
|
||||
"tool",
|
||||
)
|
||||
]
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ class MicroHttpd(Dependency):
|
|||
patches = [
|
||||
"libmicrohttpd_meson_pkgconfig.patch",
|
||||
"libmicrohttpd_meson_timeval_tvsec_size.patch",
|
||||
"libmicrohttpd_meson_winet6.patch",
|
||||
]
|
||||
|
||||
class Builder(MesonBuilder):
|
||||
|
|
|
@ -24,6 +24,10 @@ 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):
|
||||
|
|
|
@ -50,9 +50,6 @@ class Xapian(Dependency):
|
|||
@classmethod
|
||||
def get_dependencies(cls, configInfo, allDeps):
|
||||
deps = ["zlib", "lzma"]
|
||||
if (
|
||||
configInfo.build in ("win32", "win64", "wasm")
|
||||
or neutralEnv("distname") == "Darwin"
|
||||
):
|
||||
if configInfo.build == "wasm" or neutralEnv("distname") == "Darwin":
|
||||
return deps
|
||||
return deps + ["uuid"]
|
||||
|
|
|
@ -9,9 +9,9 @@ class ZimTestingSuite(Dependency):
|
|||
|
||||
class Source(ReleaseDownload):
|
||||
archive = Remotefile(
|
||||
"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",
|
||||
"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",
|
||||
)
|
||||
|
||||
Builder = NoopBuilder
|
||||
|
|
|
@ -14,17 +14,14 @@ class ZimTools(Dependency):
|
|||
@classmethod
|
||||
def get_dependencies(cls, configInfo, allDeps):
|
||||
base_deps = ["libzim", "docoptcpp", "mustache"]
|
||||
if configInfo.build != "win32" and neutralEnv("distname") != "Windows":
|
||||
if neutralEnv("distname") != "Windows":
|
||||
base_deps += ["libmagic", "gumbo"]
|
||||
return base_deps
|
||||
|
||||
@property
|
||||
def configure_options(self):
|
||||
# We don't build zimwriterfs on win32, and so we don't have magic
|
||||
if (
|
||||
self.buildEnv.configInfo.build != "win32"
|
||||
and neutralEnv("distname") != "Windows"
|
||||
):
|
||||
# We don't build zimwriterfs on Windows, and so we don't have magic
|
||||
if neutralEnv("distname") != "Windows":
|
||||
yield f"-Dmagic-install-prefix={self.buildEnv.install_dir}"
|
||||
if self.buildEnv.configInfo.static:
|
||||
yield "-Dstatic-linkage=true"
|
||||
|
|
|
@ -49,6 +49,7 @@ MANIFEST = {
|
|||
"--socket=pulseaudio",
|
||||
"--share=network",
|
||||
"--share=ipc",
|
||||
"--filesystem=host:ro",
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
|
|
|
@ -50,7 +50,7 @@ PACKAGE_NAME_MAPPERS = {
|
|||
},
|
||||
"fedora_native_static": {
|
||||
"COMMON": _fedora_common + ["glibc-static", "libstdc++-static"],
|
||||
"lzma": ["xz-devel", "xz-static"]
|
||||
"lzma": ["xz-devel", "xz-static"],
|
||||
# Either there is no packages, or no static or too old
|
||||
},
|
||||
"fedora_i586_dyn": {
|
||||
|
@ -59,33 +59,6 @@ PACKAGE_NAME_MAPPERS = {
|
|||
"fedora_i586_static": {
|
||||
"COMMON": _fedora_common + ["glibc-devel.i686"],
|
||||
},
|
||||
"fedora_win32_dyn": {
|
||||
"COMMON": _fedora_common
|
||||
+ [
|
||||
"mingw32-gcc-c++",
|
||||
"mingw32-bzip2",
|
||||
"mingw32-win-iconv",
|
||||
"mingw32-winpthreads",
|
||||
"wine",
|
||||
],
|
||||
"zlib": ["mingw32-zlib"],
|
||||
"lzma": ["mingw32-xz-libs"],
|
||||
"libmicrohttpd": ["mingw32-libmicrohttpd"],
|
||||
},
|
||||
"fedora_win32_static": {
|
||||
"COMMON": _fedora_common
|
||||
+ [
|
||||
"mingw32-gcc-c++",
|
||||
"mingw32-bzip2-static",
|
||||
"mingw32-win-iconv-static",
|
||||
"mingw32-winpthreads-static",
|
||||
"wine",
|
||||
],
|
||||
"zlib": ["mingw32-zlib-static"],
|
||||
"lzma": ["mingw32-xz-libs-static"],
|
||||
"libmicrohttpd": None, # ['mingw32-libmicrohttpd-static'] packaging dependecy seems buggy, and some static lib are name libfoo.dll.a and
|
||||
# gcc cannot found them.
|
||||
},
|
||||
"fedora_armhf_static": {"COMMON": _fedora_common},
|
||||
"fedora_armhf_dyn": {"COMMON": _fedora_common},
|
||||
"fedora_android": {"COMMON": _fedora_common},
|
||||
|
@ -109,24 +82,6 @@ PACKAGE_NAME_MAPPERS = {
|
|||
"COMMON": _debian_common
|
||||
+ ["libc6-dev-i386", "lib32stdc++6", "gcc-multilib", "g++-multilib"],
|
||||
},
|
||||
"debian_win32_dyn": {
|
||||
"COMMON": _debian_common
|
||||
+ [
|
||||
"g++-mingw-w64-i686",
|
||||
"gcc-mingw-w64-i686",
|
||||
"gcc-mingw-w64-base",
|
||||
"mingw-w64-tools",
|
||||
],
|
||||
},
|
||||
"debian_win32_static": {
|
||||
"COMMON": _debian_common
|
||||
+ [
|
||||
"g++-mingw-w64-i686",
|
||||
"gcc-mingw-w64-i686",
|
||||
"gcc-mingw-w64-base",
|
||||
"mingw-w64-tools",
|
||||
],
|
||||
},
|
||||
"debian_armhf_static": {
|
||||
"COMMON": _debian_common,
|
||||
},
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
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')
|
|
@ -0,0 +1,15 @@
|
|||
--- libmicrohttpd-0.9.76_orig/meson.build 2024-10-08 15:53:53.370828250 +0400
|
||||
+++ libmicrohttpd-0.9.76/meson.build 2024-10-08 16:23:24.985668690 +0400
|
||||
@@ -77,7 +77,11 @@
|
||||
endforeach
|
||||
|
||||
cdata.set('HAVE_ASSERT', cc.has_header_symbol('assert.h', 'assert'))
|
||||
-cdata.set10('HAVE_INET6', cc.has_header_symbol('netinet/in.h', 'struct in6_addr'))
|
||||
+if host_machine.system() == 'windows'
|
||||
+ cdata.set10('HAVE_INET6', 1)
|
||||
+else
|
||||
+ cdata.set10('HAVE_INET6', cc.has_header_symbol('netinet/in.h', 'struct in6_addr'))
|
||||
+endif
|
||||
|
||||
functions = [
|
||||
'accept4',
|
|
@ -28,7 +28,7 @@ COLORS = {
|
|||
}
|
||||
|
||||
|
||||
REMOTE_PREFIX = "http://mirror.download.kiwix.org/dev/kiwix-build/"
|
||||
REMOTE_PREFIX = "https://dev.kiwix.org/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.2.3",
|
||||
"libkiwix": "13.1.0",
|
||||
"libzim": "9.3.0",
|
||||
"libkiwix": "14.0.0",
|
||||
"kiwix-tools": "3.7.0",
|
||||
"zim-tools": "3.4.2",
|
||||
"kiwix-desktop": "2.3.1", # Also change KIWIX_DESKTOP_VERSION and KIWIX_DESKTOP_RELEASE in appveyor.yml
|
||||
"zim-tools": "3.6.0",
|
||||
"kiwix-desktop": "2.4.1",
|
||||
}
|
||||
|
||||
# This dictionnary specify what we need to build at each release process.
|
||||
|
@ -22,24 +22,18 @@ main_project_versions = {
|
|||
# `(was ...)`.
|
||||
# - Else, increment the value. If no value was present, see `(was ...)`.
|
||||
|
||||
# For kiwix-desktop, if this is not None:
|
||||
# - set KIWIX_DESKTOP_RELEASE to 1
|
||||
# - set KIWIX_DESKTOP_VERSION to the version of the release (including release_versions)
|
||||
# If this is None:
|
||||
# - set KIWIX_DESKTOP_RELEASE to 0
|
||||
|
||||
release_versions = {
|
||||
"libzim": 1, # Depends of base deps (was 0)
|
||||
"libkiwix": None, # Depends of libzim (was 4)
|
||||
"libkiwix": None, # Depends of libzim (was 1)
|
||||
"kiwix-tools": None, # Depends of libkiwix and libzim (was 2)
|
||||
"zim-tools": None, # Depends of libzim (was 0)
|
||||
"kiwix-desktop": None, # Depends of libkiwix and libzim (was 4)
|
||||
"zim-tools": 0, # Depends of libzim (was None)
|
||||
"kiwix-desktop": None, # Depends of libkiwix and libzim (was 0)
|
||||
}
|
||||
|
||||
|
||||
# This is the "version" of the whole base_deps_versions dict.
|
||||
# Change this when you change base_deps_versions.
|
||||
base_deps_meta_version = "07"
|
||||
base_deps_meta_version = "12"
|
||||
|
||||
base_deps_versions = {
|
||||
"zlib": "1.2.12",
|
||||
|
@ -56,8 +50,8 @@ base_deps_versions = {
|
|||
"libaria2": "1.37.0",
|
||||
"libmagic": "5.44",
|
||||
"android-ndk": "r21e",
|
||||
"org.kde": "5.15-23.08",
|
||||
"io.qt.qtwebengine": "5.15-23.08",
|
||||
"zim-testing-suite": "0.6.0",
|
||||
"org.kde": "6.7",
|
||||
"io.qt.qtwebengine": "6.7",
|
||||
"zim-testing-suite": "0.8.0",
|
||||
"emsdk": "3.1.41",
|
||||
}
|
||||
|
|
|
@ -14,98 +14,33 @@ fi
|
|||
ICONFILE=$SOURCEDIR/resources/icons/kiwix/scalable/kiwix-desktop.svg
|
||||
DESKTOPFILE=$SOURCEDIR/resources/org.kiwix.desktop.desktop
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# Fill with all deps libs and so
|
||||
./linuxdeployqt $APPDIR/usr/bin/kiwix-desktop -bundle-non-qt-libs -extra-plugins=imageformats,iconengines
|
||||
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/
|
||||
|
||||
# Fix the RPATH of QtWebEngineProcess [TODO] Fill a issue ?
|
||||
patchelf --set-rpath '$ORIGIN/../lib' $APPDIR/usr/libexec/QtWebEngineProcess
|
||||
|
||||
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
|
||||
|
||||
mv $APPDIR/{AppRun.wrapped,kiwix-desktop}
|
||||
sed -i 's/AppRun\.wrapped/kiwix-desktop/g' $APPDIR/AppRun
|
||||
wget --continue https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
|
||||
chmod u+x appimagetool-x86_64.AppImage
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys, subprocess, shutil, argparse
|
||||
import sys, subprocess, shutil, argparse, os
|
||||
from pathlib import Path
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
@ -48,9 +48,23 @@ ssl_directory = Path("C:/") / "Program Files" / "OpenSSL"
|
|||
shutil.copy2(ssl_directory / "libcrypto-1_1-x64.dll", out_dir)
|
||||
shutil.copy2(ssl_directory / "libssl-1_1-x64.dll", out_dir)
|
||||
|
||||
# [TODO] Sign binary
|
||||
if args.sign:
|
||||
pass
|
||||
# We assume here that signtool and certificate are properly configured.
|
||||
# Env var `SIGNTOOL_THUMBPRINT` must contain thumbprint of the certificate to use.
|
||||
command = [
|
||||
os.getenv("SIGNTOOL_PATH", "signtool.exe"),
|
||||
"sign",
|
||||
"/fd",
|
||||
"sha256",
|
||||
"/tr",
|
||||
"http://ts.ssl.com",
|
||||
"/td",
|
||||
"sha256",
|
||||
"/sha1",
|
||||
os.environ["SIGNTOOL_THUMBPRINT"],
|
||||
str(out_dir / "kiwix-desktop.exe"),
|
||||
]
|
||||
subprocess.run(command, check=True)
|
||||
|
||||
print(
|
||||
f"""Create archive
|
||||
|
@ -59,5 +73,5 @@ print(
|
|||
- With {out_dir.name}"""
|
||||
)
|
||||
shutil.make_archive(
|
||||
archive_path.with_suffix(""), "zip", root_dir=out_dir.parent, base_dir=out_dir.name
|
||||
archive_path.with_suffix(""), "zip", root_dir=out_dir, base_dir=""
|
||||
)
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
#!/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