mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 16:15:13 +00:00
Fix AppImage action (#96)
* Fix AppImage action * AppImage testing is done, merge update channels
This commit is contained in:
44
.github/workflows/appimage.yml
vendored
44
.github/workflows/appimage.yml
vendored
@@ -6,8 +6,8 @@ on:
|
|||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- '**.md'
|
- '**.md'
|
||||||
- '!docs/building-cmake.md'
|
- '!docs/building-cmake.md'
|
||||||
- 'changelog.txt'
|
|
||||||
- 'kotatogram_changes.txt'
|
- 'kotatogram_changes.txt'
|
||||||
|
- 'changelog.txt'
|
||||||
- 'LEGAL'
|
- 'LEGAL'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
@@ -27,8 +27,8 @@ on:
|
|||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- '**.md'
|
- '**.md'
|
||||||
- '!docs/building-cmake.md'
|
- '!docs/building-cmake.md'
|
||||||
- 'changelog.txt'
|
|
||||||
- 'kotatogram_changes.txt'
|
- 'kotatogram_changes.txt'
|
||||||
|
- 'changelog.txt'
|
||||||
- 'LEGAL'
|
- 'LEGAL'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
@@ -63,6 +63,7 @@ jobs:
|
|||||||
defines:
|
defines:
|
||||||
- ""
|
- ""
|
||||||
- "DESKTOP_APP_DISABLE_DBUS_INTEGRATION"
|
- "DESKTOP_APP_DISABLE_DBUS_INTEGRATION"
|
||||||
|
- "TDESKTOP_DISABLE_GTK_INTEGRATION"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GIT: "https://github.com"
|
GIT: "https://github.com"
|
||||||
@@ -100,13 +101,12 @@ jobs:
|
|||||||
sudo add-apt-repository ppa:git-core/ppa -y && \
|
sudo add-apt-repository ppa:git-core/ppa -y && \
|
||||||
sudo apt-get update && \
|
sudo apt-get update && \
|
||||||
sudo apt-get install libice-dev libsm-dev libicu-dev liblzma-dev zlib1g-dev \
|
sudo apt-get install libice-dev libsm-dev libicu-dev liblzma-dev zlib1g-dev \
|
||||||
git wget autoconf automake build-essential libtool pkg-config bison \
|
git wget autoconf automake build-essential libtool pkg-config bison yasm \
|
||||||
libasound2-dev libpulse-dev portaudio19-dev libdrm-dev libfuse2 \
|
libasound2-dev libpulse-dev portaudio19-dev libdrm-dev libfuse2 \
|
||||||
libgtk-3-dev libgtk2.0-dev libatspi2.0-dev libgl1-mesa-dev libegl1-mesa-dev \
|
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 \
|
libffi-dev libxcb1-dev libxcb-keysyms1-dev libxcb-res0-dev libxcb-screensaver0-dev \
|
||||||
libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-util0-dev \
|
libxcb-xkb-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev \
|
||||||
libxcb-xkb-dev libxcb-sync0-dev libxcb-randr0-dev libxcb-res0-dev libx11-xcb-dev \
|
xutils-dev libva-dev libvdpau-dev libjpeg-dev unzip -y --force-yes && \
|
||||||
libxrender-dev xutils-dev libva-dev libvdpau-dev unzip -y --force-yes && \
|
|
||||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
||||||
sudo apt-get update && \
|
sudo apt-get update && \
|
||||||
sudo apt-get install gcc-8 g++-8 -y && \
|
sudo apt-get install gcc-8 g++-8 -y && \
|
||||||
@@ -315,7 +315,6 @@ jobs:
|
|||||||
--disable-network \
|
--disable-network \
|
||||||
--disable-autodetect \
|
--disable-autodetect \
|
||||||
--disable-everything \
|
--disable-everything \
|
||||||
--disable-neon \
|
|
||||||
--disable-alsa \
|
--disable-alsa \
|
||||||
--disable-iconv \
|
--disable-iconv \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
@@ -435,7 +434,7 @@ jobs:
|
|||||||
-DALSOFT_UTILS=OFF \
|
-DALSOFT_UTILS=OFF \
|
||||||
-DALSOFT_CONFIG=OFF
|
-DALSOFT_CONFIG=OFF
|
||||||
|
|
||||||
cmake --build . -- -j$(nproc)
|
cmake --build . -j$(nproc)
|
||||||
sudo cmake --install .
|
sudo cmake --install .
|
||||||
sudo ldconfig
|
sudo ldconfig
|
||||||
|
|
||||||
@@ -544,8 +543,9 @@ jobs:
|
|||||||
cd kwindowsystem
|
cd kwindowsystem
|
||||||
cmake . \
|
cmake . \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
-DKDE_INSTALL_LIBDIR=lib
|
-DKDE_INSTALL_LIBDIR=lib
|
||||||
cmake --build . -- -j$(nproc)
|
cmake --build . -j$(nproc)
|
||||||
sudo cmake --install .
|
sudo cmake --install .
|
||||||
sudo ldconfig
|
sudo ldconfig
|
||||||
cd ..
|
cd ..
|
||||||
@@ -558,13 +558,31 @@ jobs:
|
|||||||
git clone -b V0.15.3 --depth=1 $GIT/tsujan/Kvantum.git
|
git clone -b V0.15.3 --depth=1 $GIT/tsujan/Kvantum.git
|
||||||
cd Kvantum/Kvantum
|
cd Kvantum/Kvantum
|
||||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
cmake . -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build . -- -j$(nproc)
|
cmake --build . -j$(nproc)
|
||||||
sudo cmake --install .
|
sudo cmake --install .
|
||||||
cd ../..
|
cd ../..
|
||||||
rm -rf Kvantum
|
rm -rf Kvantum
|
||||||
|
|
||||||
|
- name: WebRTC cache.
|
||||||
|
id: cache-webrtc
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.LibrariesPath }}/tg_owt
|
||||||
|
key: ${{ runner.OS }}-webrtc-${{ env.CACHE_KEY }}
|
||||||
|
- name: WebRTC.
|
||||||
|
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $LibrariesPath
|
||||||
|
|
||||||
|
git clone $GIT/desktop-app/tg_owt.git
|
||||||
|
cd tg_owt
|
||||||
|
cmake -B build . -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build build -j$(nproc)
|
||||||
|
|
||||||
- name: Kotatogram Desktop build.
|
- name: Kotatogram Desktop build.
|
||||||
if: env.ONLY_CACHE == 'false'
|
if: env.ONLY_CACHE == 'false'
|
||||||
|
env:
|
||||||
|
tg_owt_DIR: ${{ env.LibrariesPath }}/tg_owt/build
|
||||||
run: |
|
run: |
|
||||||
cd $REPO_NAME/Telegram
|
cd $REPO_NAME/Telegram
|
||||||
|
|
||||||
@@ -582,12 +600,10 @@ jobs:
|
|||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
-DTDESKTOP_API_TEST=ON \
|
-DTDESKTOP_API_TEST=ON \
|
||||||
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
||||||
-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF \
|
|
||||||
-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=OFF \
|
|
||||||
$DEFINE
|
$DEFINE
|
||||||
|
|
||||||
cd ../out/Release
|
cd ../out/Release
|
||||||
cmake --build . -- -j$(nproc)
|
cmake --build . -j$(nproc)
|
||||||
DESTDIR=../../AppDir cmake --install .
|
DESTDIR=../../AppDir cmake --install .
|
||||||
|
|
||||||
- name: AppImage build.
|
- name: AppImage build.
|
||||||
|
@@ -503,13 +503,7 @@ bool ParseCommonMap(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto platforms = document.object();
|
const auto platforms = document.object();
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC && defined KTGDESKTOP_APPIMAGE_BUILD
|
|
||||||
const auto platform = Platform::InAppImage()
|
|
||||||
? "appimage"
|
|
||||||
: Platform::AutoUpdateKey();
|
|
||||||
#else // Q_OS_UNIX && !Q_OS_MAC && KTGDESKTOP_APPIMAGE_BUILD
|
|
||||||
const auto platform = Platform::AutoUpdateKey();
|
const auto platform = Platform::AutoUpdateKey();
|
||||||
#endif // !Q_OS_UNIX || Q_OS_MAC || !KTGDESKTOP_APPIMAGE_BUILD
|
|
||||||
const auto it = platforms.constFind(platform);
|
const auto it = platforms.constFind(platform);
|
||||||
if (it == platforms.constEnd()) {
|
if (it == platforms.constEnd()) {
|
||||||
LOG(("Update Error: MTP platform '%1' not found in response."
|
LOG(("Update Error: MTP platform '%1' not found in response."
|
||||||
|
@@ -9,7 +9,6 @@ option(TDESKTOP_DISABLE_NETWORK_PROXY "Disable all code for working through Sock
|
|||||||
option(TDESKTOP_DISABLE_GTK_INTEGRATION "Disable all code for GTK integration (Linux only)." OFF)
|
option(TDESKTOP_DISABLE_GTK_INTEGRATION "Disable all code for GTK integration (Linux only)." OFF)
|
||||||
option(TDESKTOP_API_TEST "Use test API credentials." OFF)
|
option(TDESKTOP_API_TEST "Use test API credentials." OFF)
|
||||||
option(KTGDESKTOP_ENABLE_PACKER "Enable building update packer on non-special targets." OFF)
|
option(KTGDESKTOP_ENABLE_PACKER "Enable building update packer on non-special targets." OFF)
|
||||||
option(KTGDESKTOP_APPIMAGE_BUILD "Build with 'appimage' updater key." OFF)
|
|
||||||
set(TDESKTOP_API_ID "0" CACHE STRING "Provide 'api_id' for the Telegram API access.")
|
set(TDESKTOP_API_ID "0" CACHE STRING "Provide 'api_id' for the Telegram API access.")
|
||||||
set(TDESKTOP_API_HASH "" CACHE STRING "Provide 'api_hash' for the Telegram API access.")
|
set(TDESKTOP_API_HASH "" CACHE STRING "Provide 'api_hash' for the Telegram API access.")
|
||||||
set(TDESKTOP_LAUNCHER_BASENAME "" CACHE STRING "Desktop file base name (Linux only).")
|
set(TDESKTOP_LAUNCHER_BASENAME "" CACHE STRING "Desktop file base name (Linux only).")
|
||||||
@@ -49,7 +48,3 @@ if (NOT TDESKTOP_LAUNCHER_BASENAME)
|
|||||||
set(TDESKTOP_LAUNCHER_BASENAME "kotatogramdesktop")
|
set(TDESKTOP_LAUNCHER_BASENAME "kotatogramdesktop")
|
||||||
endif()
|
endif()
|
||||||
target_compile_definitions(Telegram PRIVATE TDESKTOP_LAUNCHER_BASENAME=${TDESKTOP_LAUNCHER_BASENAME})
|
target_compile_definitions(Telegram PRIVATE TDESKTOP_LAUNCHER_BASENAME=${TDESKTOP_LAUNCHER_BASENAME})
|
||||||
|
|
||||||
if (KTGDESKTOP_APPIMAGE_BUILD)
|
|
||||||
target_compile_definitions(Telegram PRIVATE KTGDESKTOP_APPIMAGE_BUILD)
|
|
||||||
endif()
|
|
||||||
|
Reference in New Issue
Block a user