diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cad5ee68..bb8f9865 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: HOME: /home/runner runs-on: ubuntu-22.04 container: - image: ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-12-18 + image: ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2024-12-26 steps: - name: Install dependencies diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 52d60eb0..adb2bdd8 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -21,7 +21,7 @@ jobs: # - debian-bullseye - ubuntu-noble - ubuntu-jammy - - ubuntu-focal +# - ubuntu-focal steps: - uses: actions/checkout@v4 @@ -72,7 +72,7 @@ jobs: # with: # args: --no-sign - - uses: legoktm/gh-action-build-deb@9114a536498b65c40b932209b9833aa942bf108d # pin@ubuntu-noble + - uses: legoktm/gh-action-build-deb@ubuntu-noble if: matrix.distro == 'ubuntu-noble' name: Build package for ubuntu-noble id: build-ubuntu-noble @@ -88,13 +88,13 @@ jobs: args: --no-sign ppa: ${{ steps.ppa.outputs.ppa }} - - uses: legoktm/gh-action-build-deb@ubuntu-focal - if: matrix.distro == 'ubuntu-focal' - name: Build package for ubuntu-focal - id: build-ubuntu-focal - with: - args: --no-sign - ppa: ${{ steps.ppa.outputs.ppa }} +# - uses: legoktm/gh-action-build-deb@ubuntu-focal +# if: matrix.distro == 'ubuntu-focal' +# name: Build package for ubuntu-focal +# id: build-ubuntu-focal +# with: +# args: --no-sign +# ppa: ${{ steps.ppa.outputs.ppa }} - uses: actions/upload-artifact@v4 with: diff --git a/README.md b/README.md index 67f3cac1..8b7ae09f 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Download on Flathub -Kiwix Desktop -============= +Kiwix Linux/Windows +===================== -The Kiwix Desktop is a viewer/manager of ZIM files for GNU/Linux and -Microsoft Windows OSes. +The Kiwix Linux/Windows is a viewer/manager of ZIM files for GNU/Linux +and Microsoft Windows OSes. [![Release](https://img.shields.io/github/v/tag/kiwix/kiwix-desktop?label=release&sort=semver)](https://download.kiwix.org/release/kiwix-desktop/) [![Repositories](https://img.shields.io/repology/repositories/kiwix-desktop?label=repositories)](https://github.com/kiwix/kiwix-desktop/wiki/Repology) @@ -25,7 +25,7 @@ at [kiwix-build](https://github.com/kiwix/kiwix-build). Dependencies ------------ -The Kiwix Desktop application relies on many third party software libraries. +The Kiwix application relies on many third party software libraries. The following libraries need to be available: * [libkiwix](https://github.com/kiwix/libkiwix/) @@ -41,19 +41,33 @@ version by hand. Libkiwix has to be compiled dynamically, the best way to have it is to use [kiwix-build](https://github.com/kiwix/kiwix-build). -Install needed packages (on Ubuntu 18.04+): +Install needed packages (on Ubuntu 22.04+): ```bash -sudo apt-get install libqt5gui5 qtbase5-dev qtwebengine5-dev \ - libqt5svg5-dev qt5-image-formats-plugins aria2 \ - qttools5-dev-tools qtchooser qt5-qmake \ - qtbase5-dev-tools +sudo apt install qt6-base-dev qt6-base-dev-tools qt6-webengine-dev \ + libqt6webenginecore6-bin libqt6svg6 qt6-speech-flite-plugin \ + qt6-speech-speechd-plugin qt6-speech-flite-plugin ``` Compilation ----------- -Once all dependencies are installed, you can compile Kiwix Desktop: +`qmake` needs to be configured to use Qt6: + +```bash +qtchooser -install qt6 $(which qmake6) # run once +export QT_SELECT=qt6 # set in environments where Qt6 builds are desired +``` + +First confirm `qmake` is using the right version, this should produces this output: + +```bash +$ qmake --version +QMake version 3.1 +Using Qt version 6.2.4 in /usr/lib/aarch64-linux-gnu +``` + +Once all dependencies are installed, you can compile Kiwix: ```bash qmake . @@ -69,35 +83,30 @@ for example, for x86-64 native systems: export PKG_CONFIG_PATH="<...>/BUILD_native_dyn/INSTALL/lib/x86_64-linux-gnu/pkgconfig" ``` -You may want to simply open the kiwix-desktop project in QtCreator and +You may want to simply open the `kiwix-desktop` project in QtCreator and then compile the project from there (don't forget to update `PKG_CONFIG_PATH` if necessary). -Compilation with Qt6 +Compilation with Qt5 -------------------- -There is initial support for Qt6. Additional packages are needed: +It is still possible to compile using Qt5, following packages are needed: ```bash -sudo apt install qt6-base-dev qt6-base-dev-tools qt6-webengine-dev libqt6webenginecore6-bin libqt6svg6 +sudo apt-get install libqt5gui5 qtbase5-dev qtwebengine5-dev \ + libqt5svg5-dev qt5-image-formats-plugins aria2 \ + qttools5-dev-tools qtchooser qt5-qmake \ + qtbase5-dev-tools libqt5texttospeech5-dev ``` -And `qmake` needs to be configured to use Qt6. First confirm `qmake` is using the right version: +`qmake` needs to be configured to use Qt5: ```bash -qtchooser -install qt6 $(which qmake6) # run once -export QT_SELECT=qt6 # set in environments where Qt6 builds are desired +qtchooser -install qt5 $(which qmake5) # run once +export QT_SELECT=qt5 # set in environments where Qt5 builds are desired qmake --version ``` -produces this output: - -```bash -$ qmake --version -QMake version 3.1 -Using Qt version 6.2.4 in /usr/lib/aarch64-linux-gnu -``` - then build as normal: ```bash @@ -114,7 +123,7 @@ documentation](https://github.com/kiwix/kiwix-build/wiki/Compile-on-Microsoft-Wi Installation ------------ -To install Kiwix Desktop on the system: +To install Kiwix on the system: ```bash sudo make install ``` @@ -122,9 +131,9 @@ sudo make install Run --- -To run Kiwix Desktop +To run Kiwix: ```bash -kiwix-desktop +kiwix ``` You might have to refresh the `ld` database before: diff --git a/debian/control b/debian/control index 5e6e722a..cca11e95 100644 --- a/debian/control +++ b/debian/control @@ -4,9 +4,11 @@ Priority: optional Maintainer: Kiwix team Build-Depends: debhelper-compat (= 13), pkg-config, - qtbase5-dev, - qtwebengine5-dev, - libqt5texttospeech5-dev, + qtchooser, + qt6-base-dev, + qt6-svg-dev, + qt6-webengine-dev, + qt6-speech-dev, libkiwix-dev (>= 14.0), libkiwix-dev (<< 15.0), libzim-dev (>= 9.0), libzim-dev (<< 10.0), Standards-Version: 4.5.0 diff --git a/debian/rules b/debian/rules index f0236630..12e7f3b1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,5 @@ #!/usr/bin/make -f -export QT_SELECT=qt5 +export QT_SELECT = qt6 export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: diff --git a/kiwix-desktop.pro b/kiwix-desktop.pro index c1f4f93e..7f40882e 100644 --- a/kiwix-desktop.pro +++ b/kiwix-desktop.pro @@ -20,12 +20,22 @@ CONFIG += link_pkgconfig greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = kiwix-desktop +TARGET = kiwix TEMPLATE = app QMAKE_CXXFLAGS += -std=c++17 QMAKE_LFLAGS += -std=c++17 +# Kiwix requires per default on Qt6 (but can still compile with Qt5 if explicitly +# requested, see README.md for more information). +QT_SELECT += $$(QT_SELECT) +lessThan(QT_MAJOR_VERSION, 6) { + !equals(QT_SELECT, "qt5") { + message("Qt 6 is required, but Qt $${QT_VERSION} is used") + error("Use Qt 6.0.0 or newer") + } +} + !win32 { QMAKE_CXXFLAGS += -Werror equals(QT_MAJOR_VERSION, 6):equals(QT_MINOR_VERSION, 6) { diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 9a4fe05e..1d73aa9f 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -6,7 +6,7 @@ "name":"English", "error-title":"Error", "error-downloader-window-title":"Cannot create downloader", - "error-downloader-launch-message":"Impossible to launch downloader, Kiwix-desktop will start but all download functions will not working!", + "error-downloader-launch-message":"Impossible to launch downloader, Kiwix will start but all download functions will not working!", "error-launch-server-message":"An error has occured!", "error-archive":"Cannot get the archive", "error-opening-file": "There was an error opening the file.", @@ -78,14 +78,14 @@ "reset":"Reset", "clear":"Clear", "browse":"Browse", - "about-kiwix-desktop-title":"Kiwix Desktop", + "about-kiwix-desktop-title":"Kiwix", "about-kiwix-desktop-description":"Kiwix allows you to have the entirety of Wikipedia at hand wherever you go! On a boat, in the middle of nowhere, or in jail, Kiwix gives you access to all of human knowledge. You don't need Internet, everything is stored on your computer.", "about-learn-more-about-kiwix":"Learn more about Kiwix", "about-release-title":"Release", "about-source-code":"This software is released under the terms of the GNU General Public License version 3. View the source code on Github.", "about-version":"Version: {{VERSION}}", "about-reporting-problem-title":"Reporting problems", - "about-report-issue":"To open an issue, visit Kiwix-desktop issue tracker and open an issue describing your problem.", + "about-report-issue":"To open an issue, visit Kiwix issue tracker and open an issue describing your problem.", "about-report-issue-2":"Please mention the version in the issue.", "about-libraries-title":"Libraries", "kiwix-server-running-message":"The Kiwix Server is running and can be accessed in the local network at:", diff --git a/src/main.cpp b/src/main.cpp index 13a9a3ee..47ed554c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) KiwixApp a(argc, argv); QCommandLineParser parser; - parser.setApplicationDescription(QStringLiteral("The Kiwix Desktop is a viewer/manager of ZIM files for GNU/Linux and Microsoft Windows OSes.")); + parser.setApplicationDescription(QStringLiteral("Kiwix is a viewer/manager of ZIM files for GNU/Linux and Microsoft Windows OSes.")); parser.addHelpOption(); parser.addPositionalArgument("zimfile", "The zim file");