diff --git a/.github/workflows/linux-kotato.yml b/.github/workflows/linux-kotato.yml index 386b4c791..ee7779d5b 100644 --- a/.github/workflows/linux-kotato.yml +++ b/.github/workflows/linux-kotato.yml @@ -68,7 +68,7 @@ jobs: env: GIT: "https://github.com" - QT: "5_15_2" + QT: "6_2_3" CMAKE_VER: "3.21.3" UPLOAD_ARTIFACT: "true" ONLY_CACHE: "false" @@ -124,7 +124,7 @@ jobs: - name: First set up. run: | - wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" + wget -c -nv "$GIT/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" chmod a+x linuxdeployqt-continuous-x86_64.AppImage ./linuxdeployqt-continuous-x86_64.AppImage -version @@ -178,7 +178,7 @@ jobs: run: | cd $LibrariesPath - git clone -b v5.88.0 --depth=1 $GIT/KDE/extra-cmake-modules.git + git clone -b v5.90.0 --depth=1 $GIT/KDE/extra-cmake-modules.git cd extra-cmake-modules cmake -B build -GNinja . -DCMAKE_BUILD_TYPE=Release cmake --build build --parallel @@ -195,7 +195,7 @@ jobs: run: | cd $LibrariesPath - wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip + wget $GIT/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip unzip ninja-linux.zip chmod +x ninja mv ninja /usr/local/bin @@ -229,7 +229,7 @@ jobs: run: | cd $LibrariesPath - git clone -b v1.3 --depth=1 $GIT/xiph/opus + git clone -b v1.3.1 --depth=1 $GIT/xiph/opus cd opus ./autogen.sh ./configure @@ -310,11 +310,11 @@ jobs: run: | cd $LibrariesPath - git clone -b 1.23 --depth=1 https://gitlab.freedesktop.org/wayland/wayland-protocols.git + git clone -b 1.24 --depth=1 https://gitlab.freedesktop.org/wayland/wayland-protocols.git cd wayland-protocols - ./autogen.sh - make -j$(nproc) - make install + meson build --buildtype=release -Dtests=false + meson compile -C build + meson install -C build cd .. rm -rf wayland-protocols @@ -322,7 +322,7 @@ jobs: run: | cd $LibrariesPath - git clone -b v1.4.0 --depth=1 $GIT/KDE/plasma-wayland-protocols.git + git clone -b v1.5.0 --depth=1 $GIT/KDE/plasma-wayland-protocols.git cd plasma-wayland-protocols cmake -B build -GNinja . -DCMAKE_BUILD_TYPE=Release cmake --build build --parallel @@ -330,116 +330,103 @@ jobs: cd .. rm -rf plasma-wayland-protocols - - name: Qt 5.15.2 cache. + - name: Libepoxy. + run: | + cd $LibrariesPath + + git clone -b 1.5.9 --depth=1 $GIT/anholt/libepoxy.git + + cd libepoxy + git apply ../patches/libepoxy.patch + + meson build \ + --buildtype=release \ + --default-library=static \ + -Dtests=false + + meson compile -C build + meson install -C build + cd .. + rm -rf libepoxy + + - name: Qt 6.2.3 cache. id: cache-qt uses: actions/cache@v2 with: path: ${{ env.LibrariesPath }}/qt-cache - key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qtbase_5_15_2/*') }}-${{ hashFiles('**/qtwayland_5_15_2/*') }} - - name: Qt 5.15.2 build. + key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qtbase_6_2_3/*') }}-${{ hashFiles('**/qtwayland_6_2_3/*') }}-${{ hashFiles('**/qt5compat_6_2_3/*') }} + - name: Qt 6.2.3 build. if: steps.cache-qt.outputs.cache-hit != 'true' run: | cd $LibrariesPath - git clone -b v5.15.2 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT} + git clone -b v6.2.3 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT} cd qt_${QT} - perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qttools,qtx11extras + perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qt5compat,qttools cd qtbase find ../../patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply cd ../qtwayland find ../../patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply + cd ../qt5compat + find ../../patches/qt5compat_${QT} -type f -print0 | sort -z | xargs -r0 git apply cd .. ./configure -prefix /usr/local \ -release \ -opensource \ -confirm-license \ - -xcb \ -qt-libpng \ -qt-harfbuzz \ -qt-pcre \ -no-feature-xcb-sm \ - -no-feature-wayland-server \ + -no-feature-highdpiscaling \ -openssl-linked \ - QMAKE_CXX="$CXX" \ - QMAKE_LINK="$CXX" \ -nomake examples \ -nomake tests - make -j$(nproc) - make INSTALL_ROOT="$LibrariesPath/qt-cache" install + cmake --build . --parallel + DESTDIR="$LibrariesPath/qt-cache" cmake --install . cd .. rm -rf qt_${QT} - - name: Qt 5.15.2 install. + - name: Qt 6.2.3 install. run: | cd $LibrariesPath cp -R qt-cache/. / ldconfig - - name: Qt Style Plugins. + - name: Qt6Gtk2. run: | cd $LibrariesPath - git clone --depth=1 git://code.qt.io/qt/qtstyleplugins.git - cd qtstyleplugins - find ../patches/qtstyleplugins -type f -print0 | sort -z | xargs -r0 git apply + git clone -b 0.1 --depth=1 $GIT/trialuser02/qt6gtk2.git + cd qt6gtk2 + wget https://github.com/trialuser02/qt6gtk2/commit/3d2cf8cbade92a175b2c878090f5f44a1b8a395c.patch + git apply 3d2cf8cbade92a175b2c878090f5f44a1b8a395c.patch qmake make -j$(nproc) make install cd .. - rm -rf qtstyleplugins + rm -rf qt6gtk2 - - name: KWayland. + - name: Qt6Ct. run: | cd $LibrariesPath - git clone -b v5.88.0 --depth=1 $GIT/KDE/kwayland.git - cd kwayland - cmake -B build -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=OFF \ - -DKDE_INSTALL_LIBDIR=lib - cmake --build build --parallel - cmake --install build - ldconfig - cd .. - rm -rf kwayland - - - name: KWindowSystem. - run: | - cd $LibrariesPath - - git clone -b v5.88.0 --depth=1 $GIT/KDE/kwindowsystem.git - cd kwindowsystem - cmake -B build -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=OFF \ - -DKDE_INSTALL_LIBDIR=lib - cmake --build build --parallel - cmake --install build - ldconfig - cd .. - rm -rf kwindowsystem - - - name: Qt5Ct. - run: | - cd $LibrariesPath - - svn checkout https://svn.code.sf.net/p/qt5ct/code/tags/qt5ct-1.5 qt5ct - cd qt5ct + git clone -b 0.5 --depth=1 $GIT/trialuser02/qt6ct.git + cd qt6ct cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release cmake --build build --parallel cmake --install build cd .. - rm -rf qt5ct + rm -rf qt6ct - name: Kvantum. run: | cd $LibrariesPath - git clone -b V0.20.2 --depth=1 $GIT/tsujan/Kvantum.git + git clone -b V1.0.0 --depth=1 $GIT/tsujan/Kvantum.git cd Kvantum/Kvantum - cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release + cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_QT5=OFF cmake --build build --parallel cmake --install build cd ../.. @@ -496,9 +483,9 @@ jobs: -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_C_FLAGS="-Werror" \ -DCMAKE_CXX_FLAGS="-Werror" \ + -DCMAKE_EXE_LINKER_FLAGS="-s" \ -DTDESKTOP_API_TEST=ON \ -DDESKTOP_APP_USE_PACKAGED_LAZY=ON \ - -DDESKTOP_APP_QT6=OFF \ $DEFINE cmake --build ../out --config Debug --parallel @@ -514,7 +501,7 @@ jobs: AppDir/usr/share/applications/*.desktop \ -appimage \ -exclude-libs=libatk-1.0.so.0,libatk-bridge-2.0.so.0,libatspi.so.0,libcairo-gobject.so.2,libcairo.so.2,libgdk-3.so.0,libgdk_pixbuf-2.0.so.0,libgdk-x11-2.0.so.0,libgmodule-2.0.so.0,libgtk-3.so.0,libgtk-x11-2.0.so.0,libpixman-1.so.0,libpng12.so.0 \ - -extra-plugins=bearer,iconengines,imageformats,platforminputcontexts,platforms/libqwayland-egl.so,platforms/libqwayland-generic.so,platformthemes/libqgtk3.so,platformthemes/libqxdgdesktopportal.so,platformthemes/libqt5ct.so,styles/libqt5ct-style.so,styles/libkvantum.so,wayland-decoration-client,wayland-graphics-integration-client,wayland-shell-integration + -extra-plugins=iconengines,imageformats,platforminputcontexts,platforms/libqwayland-egl.so,platforms/libqwayland-generic.so,platformthemes/libqgtk3.so,platformthemes/libqxdgdesktopportal.so,platformthemes/libqt6ct.so,platformthemes/libqt6gtk2.so,styles/libqt6ct-style.so,styles/libqt6gtk2-style.so,styles/libkvantum.so,wayland-decoration-client,wayland-graphics-integration-client,wayland-shell-integration appimage_name=$(echo Kotatogram_Desktop*.AppImage) echo "APPIMAGE_NAME=$appimage_name" >> $GITHUB_ENV diff --git a/Telegram/SourceFiles/kotato/json_settings.cpp b/Telegram/SourceFiles/kotato/json_settings.cpp index 155fdad56..f635501e1 100644 --- a/Telegram/SourceFiles/kotato/json_settings.cpp +++ b/Telegram/SourceFiles/kotato/json_settings.cpp @@ -649,9 +649,11 @@ bool Manager::readCustomFile() { cSetShowTopBarUserpic(v); }); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) ReadBoolOption(settings, "qt_scale", [&](auto v) { cSetQtScale(v); }); +#endif // Qt < 6.0.0 ReadIntOption(settings, "file_dialog_type", [&](auto v) { using Platform::FileDialog::ImplementationType; diff --git a/Telegram/SourceFiles/kotato/settings_menu.cpp b/Telegram/SourceFiles/kotato/settings_menu.cpp index f396503e5..621b5abda 100644 --- a/Telegram/SourceFiles/kotato/settings_menu.cpp +++ b/Telegram/SourceFiles/kotato/settings_menu.cpp @@ -572,6 +572,7 @@ void SetupKotatoSystem( AddSkip(container); AddSubsectionTitle(container, rktr("ktg_settings_system")); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) const auto qtScaleToggled = Ui::CreateChild>( container.get()); AddButton( @@ -598,6 +599,7 @@ void SetupKotatoSystem( confirmed, cancelled)); }, container->lifetime()); +#endif // Qt < 6.0.0 if (Platform::IsLinux()) { auto fileDialogTypeText = rpl::single(