2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix AppImage action (#96)

* Fix AppImage action
* AppImage testing is done, merge update channels
This commit is contained in:
ilya-fedin
2020-09-04 00:09:26 +00:00
committed by GitHub
parent fb30773bd5
commit b9c7d2e133
3 changed files with 30 additions and 25 deletions

View File

@@ -6,8 +6,8 @@ on:
- 'docs/**'
- '**.md'
- '!docs/building-cmake.md'
- 'changelog.txt'
- 'kotatogram_changes.txt'
- 'changelog.txt'
- 'LEGAL'
- 'LICENSE'
- '.github/**'
@@ -27,8 +27,8 @@ on:
- 'docs/**'
- '**.md'
- '!docs/building-cmake.md'
- 'changelog.txt'
- 'kotatogram_changes.txt'
- 'changelog.txt'
- 'LEGAL'
- 'LICENSE'
- '.github/**'
@@ -63,6 +63,7 @@ jobs:
defines:
- ""
- "DESKTOP_APP_DISABLE_DBUS_INTEGRATION"
- "TDESKTOP_DISABLE_GTK_INTEGRATION"
env:
GIT: "https://github.com"
@@ -100,13 +101,12 @@ jobs:
sudo add-apt-repository ppa:git-core/ppa -y && \
sudo apt-get update && \
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 \
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 libxcb-res0-dev libx11-xcb-dev \
libxrender-dev xutils-dev libva-dev libvdpau-dev unzip -y --force-yes && \
libffi-dev libxcb1-dev libxcb-keysyms1-dev libxcb-res0-dev libxcb-screensaver0-dev \
libxcb-xkb-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev \
xutils-dev libva-dev libvdpau-dev libjpeg-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 && \
@@ -315,7 +315,6 @@ jobs:
--disable-network \
--disable-autodetect \
--disable-everything \
--disable-neon \
--disable-alsa \
--disable-iconv \
--enable-shared \
@@ -435,7 +434,7 @@ jobs:
-DALSOFT_UTILS=OFF \
-DALSOFT_CONFIG=OFF
cmake --build . -- -j$(nproc)
cmake --build . -j$(nproc)
sudo cmake --install .
sudo ldconfig
@@ -544,8 +543,9 @@ jobs:
cd kwindowsystem
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DKDE_INSTALL_LIBDIR=lib
cmake --build . -- -j$(nproc)
cmake --build . -j$(nproc)
sudo cmake --install .
sudo ldconfig
cd ..
@@ -558,13 +558,31 @@ jobs:
git clone -b V0.15.3 --depth=1 $GIT/tsujan/Kvantum.git
cd Kvantum/Kvantum
cmake . -DCMAKE_BUILD_TYPE=Release
cmake --build . -- -j$(nproc)
cmake --build . -j$(nproc)
sudo cmake --install .
cd ../..
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.
if: env.ONLY_CACHE == 'false'
env:
tg_owt_DIR: ${{ env.LibrariesPath }}/tg_owt/build
run: |
cd $REPO_NAME/Telegram
@@ -582,12 +600,10 @@ jobs:
-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 \
$DEFINE
cd ../out/Release
cmake --build . -- -j$(nproc)
cmake --build . -j$(nproc)
DESTDIR=../../AppDir cmake --install .
- name: AppImage build.

View File

@@ -503,13 +503,7 @@ bool ParseCommonMap(
return false;
}
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();
#endif // !Q_OS_UNIX || Q_OS_MAC || !KTGDESKTOP_APPIMAGE_BUILD
const auto it = platforms.constFind(platform);
if (it == platforms.constEnd()) {
LOG(("Update Error: MTP platform '%1' not found in response."

View File

@@ -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_API_TEST "Use test API credentials." 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_HASH "" CACHE STRING "Provide 'api_hash' for the Telegram API access.")
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")
endif()
target_compile_definitions(Telegram PRIVATE TDESKTOP_LAUNCHER_BASENAME=${TDESKTOP_LAUNCHER_BASENAME})
if (KTGDESKTOP_APPIMAGE_BUILD)
target_compile_definitions(Telegram PRIVATE KTGDESKTOP_APPIMAGE_BUILD)
endif()