Merge pull request #489 from kiwix/lastQt

This commit is contained in:
Matthieu Gautier 2021-06-24 13:59:25 +02:00 committed by GitHub
commit 2e1986a0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 16 deletions

View File

@ -5,18 +5,21 @@ ENV OS_NAME bionic
RUN apt update -q \
&& dpkg --add-architecture i386 \
&& apt install -q -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic \
&& apt-get update \
&& apt install -q -y --no-install-recommends \
# Base build tools
build-essential automake libtool cmake ccache pkg-config autopoint patch \
python3-pip python3-setuptools python3-wheel git subversion wget unzip \
ninja-build openssh-client curl \
ninja-build openssh-client curl libgl-dev \
# Python (2) is needed to install android-ndk
python \
# Packaged dependencies
libbz2-dev libmagic-dev uuid-dev zlib1g-dev default-jdk \
libmicrohttpd-dev aria2 libgtest-dev \
libmicrohttpd-dev aria2 libgtest-dev libgl-dev \
# Qt packages
libqt5gui5 qtbase5-dev qtwebengine5-dev libqt5svg5-dev qt5-image-formats-plugins qt5-default \
qt515base qt515webengine qt515svg qt515imageformats qt515wayland \
# To create the appimage of kiwix-desktop
libfuse2 fuse patchelf \
# Flatpak tools
@ -34,3 +37,5 @@ RUN useradd --create-home runner
USER runner
WORKDIR /home/runner
ENV PATH /home/runner/.local/bin:$PATH
RUN echo "source /opt/qt515/bin/qt515-env.sh" >> /home/runner/.bashrc

View File

@ -133,7 +133,6 @@ def run_kiwix_build(
command.append(target)
command.append("--hide-progress")
command.append("--fast-clone")
if platform == "flatpak" or platform.startswith("win32_"):
command.append("--assume-packages-installed")
if target == "kiwix-lib-app" and platform.startswith("android_"):
command.extend(["--target-platform", "android", "--android-arch", platform[8:]])

View File

@ -6,7 +6,7 @@ on:
- cron: '0 1 * * *'
env:
DOCKER_VERSION: 30
DOCKER_VERSION: 31
jobs:
Docker:
@ -66,7 +66,7 @@ jobs:
runs-on: ubuntu-latest
needs: Docker
container:
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-30"
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-31"
steps:
- name: Checkout code
shell: bash

View File

@ -8,7 +8,7 @@ on:
- cron: '0 1 * * *'
env:
DOCKER_VERSION: 30
DOCKER_VERSION: 31
jobs:
Docker:
@ -79,7 +79,7 @@ jobs:
runs-on: ubuntu-latest
needs: Docker
container:
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-30"
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-31"
options: "--device /dev/fuse --privileged"
steps:
- name: Checkout code

View File

@ -10,9 +10,9 @@ IF %KIWIX_DESKTOP_RELEASE% EQU 1 (
)
)
IF %_WITH_CONSOLE% EQU 1 (
C:\Qt\5.12\msvc2017_64\bin\qmake.exe "CONFIG+=static console" || exit /b 1
C:\Qt\5.15\msvc2019_64\bin\qmake.exe "CONFIG+=static console" || exit /b 1
) else (
C:\Qt\5.12\msvc2017_64\bin\qmake.exe "CONFIG+=static" || exit /b 1
C:\Qt\5.15\msvc2019_64\bin\qmake.exe "CONFIG+=static" || exit /b 1
)
echo "Running fix_desktop"

View File

@ -294,6 +294,8 @@ class Builder:
module['buildsystem'] = self.flatpak_buildsystem
if getattr(self, 'subsource_dir', None):
module['subdir'] = self.subsource_dir
if getattr(self, 'flatpack_build_options', None):
module['build-options'] = self.flatpack_build_options
if getattr(self, 'configure_option', ''):
module['config-opts'] = self.configure_option.split(' ')

View File

@ -16,10 +16,21 @@ class KiwixDesktop(Dependency):
make_install_target = 'install'
configure_env = None
flatpack_build_options = {
"env": [
"QMAKEPATH=/app/lib"
]
}
@property
def configure_option(self):
if self.buildEnv.platformInfo.name == 'flatpak':
return []
options = [
'QMAKE_INCDIR+=/app/include/QtWebEngine',
'QMAKE_INCDIR+=/app/include/QtWebEngineCore',
'QMAKE_INCDIR+=/app/include/QtWebEngineWidgets'
]
else:
options = ["PREFIX={}".format(self.buildEnv.install_dir)]
if self.buildEnv.platformInfo.static:
options.append('"CONFIG+=static"')

View File

@ -33,6 +33,8 @@ MANIFEST = {
'app-id': 'org.kiwix.desktop',
'runtime': 'org.kde.Platform',
'runtime-version': base_deps_versions['org.kde'],
'base': 'io.qt.qtwebengine.BaseApp',
'base-version': base_deps_versions['org.kde'], # keep BaseApp (qwebengine) in sync with org.kde
'sdk': 'org.kde.Sdk',
'command': 'kiwix-desktop',
'rename-icon': 'kiwix-desktop',

View File

@ -59,6 +59,6 @@ base_deps_versions = {
'android-ndk' : 'r13b',
'qt' : '5.10.1',
'qtwebengine' : '5.10.1',
'org.kde' : '5.12',
'org.kde' : '5.15',
'zim-testing-suite': '0.3',
}