Add Kvantum to AppImage (#39)
* Add Kvantum to AppImage * Add support for define matrix in AppImage action * Remove unused variables
This commit is contained in:
parent
e425912490
commit
de27598161
1 changed files with 66 additions and 14 deletions
80
.github/workflows/appimage.yml
vendored
80
.github/workflows/appimage.yml
vendored
|
|
@ -60,6 +60,12 @@ jobs:
|
|||
image: ubuntu:trusty
|
||||
options: --privileged --device /dev/fuse
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
defines:
|
||||
- ""
|
||||
- "DESKTOP_APP_DISABLE_DBUS_INTEGRATION"
|
||||
|
||||
env:
|
||||
GIT: "https://github.com"
|
||||
QT: "5_12_8"
|
||||
|
|
@ -101,8 +107,8 @@ jobs:
|
|||
libgtk-3-dev libgtk2.0-dev libatspi2.0-dev libgl1-mesa-dev libegl1-mesa-dev \
|
||||
libffi-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-xfixes0-dev \
|
||||
libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-util0-dev \
|
||||
libxcb-xkb-dev libxcb-sync0-dev libxcb-randr0-dev libx11-xcb-dev libxrender-dev \
|
||||
xutils-dev libva-dev libvdpau-dev unzip -y --force-yes && \
|
||||
libxcb-xkb-dev libxcb-sync0-dev libxcb-randr0-dev libxcb-res0-dev libx11-xcb-dev \
|
||||
libxrender-dev xutils-dev libva-dev libvdpau-dev unzip -y --force-yes && \
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install gcc-8 g++-8 -y && \
|
||||
|
|
@ -201,6 +207,18 @@ jobs:
|
|||
|
||||
cmake --version
|
||||
|
||||
- name: Extra CMake Modules.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v5.69.0 --depth=1 $GIT/KDE/extra-cmake-modules.git
|
||||
cd extra-cmake-modules
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . -- -j$(nproc)
|
||||
sudo cmake --install .
|
||||
cd ..
|
||||
rm -rf extra-cmake-modules
|
||||
|
||||
- name: Meson.
|
||||
run: |
|
||||
sudo python3 -m pip install meson==0.54.0
|
||||
|
|
@ -434,8 +452,8 @@ jobs:
|
|||
|
||||
git clone -b v5.12.8 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT}
|
||||
cd qt_${QT}
|
||||
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg
|
||||
git submodule update qtbase qtwayland qtimageformats qtsvg
|
||||
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qttools,qtx11extras
|
||||
git submodule update qtbase qtwayland qtimageformats qtsvg qttools qtx11extras
|
||||
cd qtbase
|
||||
git apply ../../../$REPO_NAME/Telegram/Patches/qtbase_${QT}_appimage.diff
|
||||
cd ..
|
||||
|
|
@ -483,20 +501,54 @@ jobs:
|
|||
cd ..
|
||||
rm -rf qtstyleplugins
|
||||
|
||||
- name: KWindowSystem.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v5.69.0 --depth=1 $GIT/KDE/kwindowsystem.git
|
||||
cd kwindowsystem
|
||||
cmake . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DKDE_INSTALL_LIBDIR=lib
|
||||
cmake --build . -- -j$(nproc)
|
||||
sudo cmake --install .
|
||||
sudo ldconfig
|
||||
cd ..
|
||||
rm -rf kwindowsystem
|
||||
|
||||
- name: Kvantum.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b V0.15.3 --depth=1 $GIT/tsujan/Kvantum.git
|
||||
cd Kvantum/Kvantum
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . -- -j$(nproc)
|
||||
sudo cmake --install .
|
||||
cd ../..
|
||||
rm -rf Kvantum
|
||||
|
||||
- name: Kotatogram Desktop build.
|
||||
if: env.ONLY_CACHE == 'false'
|
||||
env:
|
||||
API_ID: ${{ secrets.API_ID }}
|
||||
API_HASH: ${{ secrets.API_HASH }}
|
||||
run: |
|
||||
cd $REPO_NAME/Telegram
|
||||
|
||||
DEFINE=""
|
||||
if [ -n "${{ matrix.defines }}" ]; then
|
||||
DEFINE="-D ${{ matrix.defines }}=ON"
|
||||
echo Define from matrix: $DEFINE
|
||||
echo ::set-env name=ARTIFACT_NAME::Kotatogram_${{ matrix.defines }}
|
||||
else
|
||||
echo ::set-env name=ARTIFACT_NAME::Kotatogram
|
||||
fi
|
||||
|
||||
./configure.sh \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DTDESKTOP_API_TEST=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF \
|
||||
-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=OFF
|
||||
-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=OFF \
|
||||
$DEFINE
|
||||
|
||||
cd ../out/Release
|
||||
cmake --build . -- -j$(nproc)
|
||||
|
|
@ -527,18 +579,18 @@ 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-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,wayland-decoration-client,wayland-graphics-integration-client,wayland-shell-integration
|
||||
-extra-plugins=bearer,iconengines,imageformats,platforminputcontexts,platforms/libqwayland-egl.so,platforms/libqwayland-generic.so,platformthemes/libqgtk3.so,platformthemes/libqxdgdesktopportal.so,styles/libkvantum.so,wayland-decoration-client,wayland-graphics-integration-client,wayland-shell-integration
|
||||
|
||||
artifact_name=$(echo Kotatogram_Desktop*.AppImage)
|
||||
echo ::set-env name=ARTIFACT_NAME::$artifact_name
|
||||
appimage_name=$(echo Kotatogram_Desktop*.AppImage)
|
||||
echo ::set-env name=APPIMAGE_NAME::$appimage_name
|
||||
|
||||
# We don't need AppImagelauncher's desktop integration due to bad UX
|
||||
dd if=/dev/zero of=$artifact_name bs=1 count=3 seek=8 conv=notrunc
|
||||
dd if=/dev/zero of=$appimage_name bs=1 count=3 seek=8 conv=notrunc
|
||||
|
||||
- name: Check.
|
||||
if: env.ONLY_CACHE == 'false'
|
||||
run: |
|
||||
filePath="$REPO_NAME/$ARTIFACT_NAME"
|
||||
filePath="$REPO_NAME/$APPIMAGE_NAME"
|
||||
if test -f "$filePath"; then
|
||||
echo "Build successfully done! :)"
|
||||
|
||||
|
|
@ -554,7 +606,7 @@ jobs:
|
|||
run: |
|
||||
cd $REPO_NAME
|
||||
mkdir artifact
|
||||
mv $ARTIFACT_NAME artifact/
|
||||
mv $APPIMAGE_NAME artifact/
|
||||
- uses: actions/upload-artifact@master
|
||||
if: env.UPLOAD_ARTIFACT == 'true'
|
||||
name: Upload artifact.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue