Merge pull request #270 from ilya-fedin/fix-actions
This commit is contained in:
commit
894dc7d927
3 changed files with 109 additions and 74 deletions
62
.github/workflows/linux-kotato.yml
vendored
62
.github/workflows/linux-kotato.yml
vendored
|
|
@ -93,14 +93,13 @@ jobs:
|
||||||
p doc
|
p doc
|
||||||
|
|
||||||
- name: Apt install.
|
- name: Apt install.
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install software-properties-common -y && \
|
apt-get install software-properties-common -y && \
|
||||||
add-apt-repository ppa:git-core/ppa -y && \
|
add-apt-repository ppa:git-core/ppa -y && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install clang libglibmm-2.4-dev libicu-dev libssl-dev liblzma-dev zlib1g-dev \
|
apt-get install clang libglibmm-2.4-dev libicu-dev libssl-dev liblzma-dev zlib1g-dev \
|
||||||
git wget autoconf automake build-essential libtool pkg-config bison nasm yasm unzip \
|
git wget autoconf automake build-essential libtool pkg-config bison yasm unzip python3-pip \
|
||||||
libasound2-dev libpulse-dev libfuse2 libgtk-3-dev libgtk2.0-dev libatspi2.0-dev \
|
libasound2-dev libpulse-dev libfuse2 libgtk-3-dev libgtk2.0-dev libatspi2.0-dev \
|
||||||
libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb1-dev \
|
libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb1-dev \
|
||||||
libxcb-glx0-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \
|
libxcb-glx0-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \
|
||||||
|
|
@ -124,7 +123,6 @@ jobs:
|
||||||
path: ${{ env.REPO_NAME }}
|
path: ${{ env.REPO_NAME }}
|
||||||
|
|
||||||
- name: First set up.
|
- name: First set up.
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||||
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
||||||
|
|
@ -182,19 +180,35 @@ jobs:
|
||||||
|
|
||||||
git clone -b v5.88.0 --depth=1 $GIT/KDE/extra-cmake-modules.git
|
git clone -b v5.88.0 --depth=1 $GIT/KDE/extra-cmake-modules.git
|
||||||
cd extra-cmake-modules
|
cd extra-cmake-modules
|
||||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
cmake -B build -GNinja . -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build . --parallel
|
cmake --build build --parallel
|
||||||
cmake --install .
|
cmake --install build
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf extra-cmake-modules
|
rm -rf extra-cmake-modules
|
||||||
|
|
||||||
|
- name: Meson.
|
||||||
|
run: |
|
||||||
|
python3 -m pip install meson==0.54.0
|
||||||
|
meson --version
|
||||||
|
|
||||||
|
- name: Ninja.
|
||||||
|
run: |
|
||||||
|
cd $LibrariesPath
|
||||||
|
|
||||||
|
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
|
||||||
|
unzip ninja-linux.zip
|
||||||
|
chmod +x ninja
|
||||||
|
mv ninja /usr/local/bin
|
||||||
|
|
||||||
|
ninja --version
|
||||||
|
|
||||||
- name: MozJPEG.
|
- name: MozJPEG.
|
||||||
run: |
|
run: |
|
||||||
cd $LibrariesPath
|
cd $LibrariesPath
|
||||||
|
|
||||||
git clone -b v4.0.3 --depth=1 $GIT/mozilla/mozjpeg.git
|
git clone -b v4.0.3 --depth=1 $GIT/mozilla/mozjpeg.git
|
||||||
cd mozjpeg
|
cd mozjpeg
|
||||||
cmake -B build . \
|
cmake -B build -GNinja . \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||||
-DWITH_JPEG8=ON \
|
-DWITH_JPEG8=ON \
|
||||||
|
|
@ -277,16 +291,16 @@ jobs:
|
||||||
cd $LibrariesPath
|
cd $LibrariesPath
|
||||||
|
|
||||||
git clone -b fix_pulse_default --depth=1 $GIT/telegramdesktop/openal-soft.git
|
git clone -b fix_pulse_default --depth=1 $GIT/telegramdesktop/openal-soft.git
|
||||||
cd openal-soft/build
|
cd openal-soft
|
||||||
cmake .. \
|
cmake -B build -GNinja \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DALSOFT_EXAMPLES=OFF \
|
-DALSOFT_EXAMPLES=OFF \
|
||||||
-DALSOFT_TESTS=OFF \
|
-DALSOFT_TESTS=OFF \
|
||||||
-DALSOFT_UTILS=OFF \
|
-DALSOFT_UTILS=OFF \
|
||||||
-DALSOFT_CONFIG=OFF
|
-DALSOFT_CONFIG=OFF
|
||||||
|
|
||||||
cmake --build . --parallel
|
cmake --build build --parallel
|
||||||
cmake --install .
|
cmake --install build
|
||||||
ldconfig
|
ldconfig
|
||||||
|
|
||||||
cd -
|
cd -
|
||||||
|
|
@ -310,7 +324,7 @@ jobs:
|
||||||
|
|
||||||
git clone -b v1.4.0 --depth=1 $GIT/KDE/plasma-wayland-protocols.git
|
git clone -b v1.4.0 --depth=1 $GIT/KDE/plasma-wayland-protocols.git
|
||||||
cd plasma-wayland-protocols
|
cd plasma-wayland-protocols
|
||||||
cmake -B build . -DCMAKE_BUILD_TYPE=Release
|
cmake -B build -GNinja . -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build build --parallel
|
cmake --build build --parallel
|
||||||
cmake --install build
|
cmake --install build
|
||||||
cd ..
|
cd ..
|
||||||
|
|
@ -381,12 +395,12 @@ jobs:
|
||||||
|
|
||||||
git clone -b v5.88.0 --depth=1 $GIT/KDE/kwayland.git
|
git clone -b v5.88.0 --depth=1 $GIT/KDE/kwayland.git
|
||||||
cd kwayland
|
cd kwayland
|
||||||
cmake . \
|
cmake -B build -GNinja \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBUILD_TESTING=OFF \
|
-DBUILD_TESTING=OFF \
|
||||||
-DKDE_INSTALL_LIBDIR=lib
|
-DKDE_INSTALL_LIBDIR=lib
|
||||||
cmake --build . --parallel
|
cmake --build build --parallel
|
||||||
cmake --install .
|
cmake --install build
|
||||||
ldconfig
|
ldconfig
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf kwayland
|
rm -rf kwayland
|
||||||
|
|
@ -413,9 +427,9 @@ jobs:
|
||||||
|
|
||||||
svn checkout https://svn.code.sf.net/p/qt5ct/code/tags/qt5ct-1.5 qt5ct
|
svn checkout https://svn.code.sf.net/p/qt5ct/code/tags/qt5ct-1.5 qt5ct
|
||||||
cd qt5ct
|
cd qt5ct
|
||||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build . --parallel
|
cmake --build build --parallel
|
||||||
cmake --install .
|
cmake --install build
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf qt5ct
|
rm -rf qt5ct
|
||||||
|
|
||||||
|
|
@ -425,9 +439,9 @@ jobs:
|
||||||
|
|
||||||
git clone -b V0.20.2 --depth=1 $GIT/tsujan/Kvantum.git
|
git clone -b V0.20.2 --depth=1 $GIT/tsujan/Kvantum.git
|
||||||
cd Kvantum/Kvantum
|
cd Kvantum/Kvantum
|
||||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build . --parallel
|
cmake --build build --parallel
|
||||||
cmake --install .
|
cmake --install build
|
||||||
cd ../..
|
cd ../..
|
||||||
rm -rf Kvantum
|
rm -rf Kvantum
|
||||||
|
|
||||||
|
|
@ -455,7 +469,11 @@ jobs:
|
||||||
meson build -Dspa-plugins=disabled
|
meson build -Dspa-plugins=disabled
|
||||||
cd ../../..
|
cd ../../..
|
||||||
|
|
||||||
cmake -B build . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DTG_OWT_DLOPEN_PIPEWIRE=ON
|
cmake -B build -GNinja . \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DTG_OWT_DLOPEN_PIPEWIRE=ON
|
||||||
|
|
||||||
cmake --build build --parallel
|
cmake --build build --parallel
|
||||||
|
|
||||||
- name: Kotatogram Desktop build.
|
- name: Kotatogram Desktop build.
|
||||||
|
|
|
||||||
55
.github/workflows/mac-kotato.yml
vendored
55
.github/workflows/mac-kotato.yml
vendored
|
|
@ -58,11 +58,8 @@ jobs:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GIT: "https://github.com"
|
GIT: "https://github.com"
|
||||||
PKG_CONFIG_PATH: /usr/local/ffmpeg/lib/pkgconfig
|
|
||||||
CMAKE_LIBRARY_PATH: /usr/local/ffmpeg/lib
|
|
||||||
OPENALDIR: /usr/local/opt/openal-soft
|
OPENALDIR: /usr/local/opt/openal-soft
|
||||||
OPENSSL_ROOT_DIR: /usr/local/opt/openssl@1.1
|
OPENSSL_ROOT_DIR: /usr/local/opt/openssl@1.1
|
||||||
Qt5_DIR: /usr/local/opt/qt@5/lib/cmake/Qt5
|
|
||||||
UPLOAD_ARTIFACT: "false"
|
UPLOAD_ARTIFACT: "false"
|
||||||
ONLY_CACHE: "false"
|
ONLY_CACHE: "false"
|
||||||
MANUAL_CACHING: "1"
|
MANUAL_CACHING: "1"
|
||||||
|
|
@ -80,7 +77,7 @@ jobs:
|
||||||
|
|
||||||
- name: First set up.
|
- name: First set up.
|
||||||
run: |
|
run: |
|
||||||
brew install autoconf automake cmake meson openal-soft openssl opus nasm ninja pkg-config python qt yasm xz
|
brew install autoconf automake cmake ffmpeg openal-soft openssl@1.1 opus ninja pkg-config python qt yasm xz
|
||||||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
||||||
|
|
||||||
xcodebuild -version > CACHE_KEY.txt
|
xcodebuild -version > CACHE_KEY.txt
|
||||||
|
|
@ -92,8 +89,6 @@ jobs:
|
||||||
fi
|
fi
|
||||||
echo "CACHE_KEY=`md5 -q CACHE_KEY.txt`" >> $GITHUB_ENV
|
echo "CACHE_KEY=`md5 -q CACHE_KEY.txt`" >> $GITHUB_ENV
|
||||||
|
|
||||||
echo /usr/local/opt/qt/bin >> $GITHUB_PATH
|
|
||||||
|
|
||||||
mkdir -p Libraries/macos
|
mkdir -p Libraries/macos
|
||||||
cd Libraries/macos
|
cd Libraries/macos
|
||||||
echo "LibrariesPath=`pwd`" >> $GITHUB_ENV
|
echo "LibrariesPath=`pwd`" >> $GITHUB_ENV
|
||||||
|
|
@ -111,49 +106,6 @@ jobs:
|
||||||
make -j$(sysctl -n hw.logicalcpu)
|
make -j$(sysctl -n hw.logicalcpu)
|
||||||
make install
|
make install
|
||||||
|
|
||||||
- name: FFmpeg cache.
|
|
||||||
id: cache-ffmpeg
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ env.LibrariesPath }}/ffmpeg-cache
|
|
||||||
key: ${{ runner.OS }}-ffmpeg-${{ env.CACHE_KEY }}
|
|
||||||
- name: FFmpeg build.
|
|
||||||
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
cd $LibrariesPath
|
|
||||||
|
|
||||||
git clone --branch release/4.4 $GIT/FFmpeg/FFmpeg ffmpeg
|
|
||||||
cd ffmpeg
|
|
||||||
./configure \
|
|
||||||
--prefix=/usr/local/ffmpeg \
|
|
||||||
--disable-debug \
|
|
||||||
--disable-programs \
|
|
||||||
--disable-doc \
|
|
||||||
--disable-network \
|
|
||||||
--disable-autodetect \
|
|
||||||
--disable-encoders \
|
|
||||||
--disable-muxers \
|
|
||||||
--disable-bsfs \
|
|
||||||
--disable-protocols \
|
|
||||||
--disable-devices \
|
|
||||||
--disable-filters \
|
|
||||||
--enable-audiotoolbox \
|
|
||||||
--enable-videotoolbox \
|
|
||||||
--enable-libopus \
|
|
||||||
--enable-protocol=file \
|
|
||||||
--enable-encoder=libopus \
|
|
||||||
--enable-muxer=ogg \
|
|
||||||
--enable-muxer=opus
|
|
||||||
|
|
||||||
make -j$(sysctl -n hw.logicalcpu)
|
|
||||||
sudo make DESTDIR="$LibrariesPath/ffmpeg-cache" install
|
|
||||||
cd ..
|
|
||||||
rm -rf ffmpeg
|
|
||||||
- name: FFmpeg install.
|
|
||||||
run: |
|
|
||||||
cd $LibrariesPath
|
|
||||||
sudo cp -R ffmpeg-cache/. /
|
|
||||||
|
|
||||||
- name: WebRTC cache.
|
- name: WebRTC cache.
|
||||||
id: cache-webrtc
|
id: cache-webrtc
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
|
@ -172,8 +124,7 @@ jobs:
|
||||||
-GNinja \
|
-GNinja \
|
||||||
-DCMAKE_BUILD_TYPE=Debug \
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DTG_OWT_BUILD_AUDIO_BACKENDS=OFF \
|
-DTG_OWT_BUILD_AUDIO_BACKENDS=OFF
|
||||||
-DTG_OWT_PACKAGED_BUILD_FFMPEG_STATIC=ON
|
|
||||||
|
|
||||||
cmake --build build --parallel
|
cmake --build build --parallel
|
||||||
|
|
||||||
|
|
@ -200,7 +151,6 @@ jobs:
|
||||||
-DCMAKE_CXX_FLAGS="-Werror" \
|
-DCMAKE_CXX_FLAGS="-Werror" \
|
||||||
-DTDESKTOP_API_TEST=ON \
|
-DTDESKTOP_API_TEST=ON \
|
||||||
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
||||||
-DDESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC=ON \
|
|
||||||
$DEFINE
|
$DEFINE
|
||||||
|
|
||||||
cmake --build build --parallel
|
cmake --build build --parallel
|
||||||
|
|
@ -208,6 +158,7 @@ jobs:
|
||||||
cd build
|
cd build
|
||||||
macdeployqt Kotatogram.app
|
macdeployqt Kotatogram.app
|
||||||
codesign --remove-signature Kotatogram.app
|
codesign --remove-signature Kotatogram.app
|
||||||
|
python ../Telegram/build/fix_paths_mac.py Kotatogram.app/Contents/MacOS/Kotatogram
|
||||||
|
|
||||||
mkdir dmgsrc
|
mkdir dmgsrc
|
||||||
mv Kotatogram.app dmgsrc
|
mv Kotatogram.app dmgsrc
|
||||||
|
|
|
||||||
66
Telegram/build/fix_paths_mac.py
Normal file
66
Telegram/build/fix_paths_mac.py
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from shutil import copyfile
|
||||||
|
|
||||||
|
executable = sys.argv[1]
|
||||||
|
app_folder = os.path.join(*executable.split('/')[:-3])
|
||||||
|
content_folder = os.path.join(app_folder, "Contents")
|
||||||
|
framework_path = os.path.join(content_folder, "Frameworks")
|
||||||
|
|
||||||
|
print(executable)
|
||||||
|
print("Working in {} ".format(app_folder))
|
||||||
|
|
||||||
|
def file_in_folder(file, folder):
|
||||||
|
return os.path.exists(os.path.join(folder, file))
|
||||||
|
|
||||||
|
def otool(s):
|
||||||
|
o = subprocess.Popen(['/usr/bin/otool', '-L', s], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
|
for l in o.stdout:
|
||||||
|
l = l.decode()
|
||||||
|
|
||||||
|
if l[0] == '\t':
|
||||||
|
path = l.split(' ', 1)[0][1:]
|
||||||
|
|
||||||
|
if "@executable_path" in path:
|
||||||
|
path = path.replace("@executable_path", "")
|
||||||
|
path = os.path.join(content_folder, path[4:])
|
||||||
|
|
||||||
|
if "@loader_path" in path:
|
||||||
|
path = path.replace("@loader_path", framework_path)
|
||||||
|
|
||||||
|
if "@rpath" in path:
|
||||||
|
path = path.replace("@rpath", framework_path)
|
||||||
|
|
||||||
|
dependency_dylib_name = os.path.split(path)[-1]
|
||||||
|
|
||||||
|
if "usr/local" in path:
|
||||||
|
if app_folder in s:
|
||||||
|
|
||||||
|
print("Warning: {} depends on {}".format(s, path))
|
||||||
|
|
||||||
|
if file_in_folder(dependency_dylib_name, framework_path):
|
||||||
|
print("Dependent library {} is already in framework folder".format(dependency_dylib_name))
|
||||||
|
|
||||||
|
print("Running install name tool to fix {}.".format(s))
|
||||||
|
|
||||||
|
if dependency_dylib_name == os.path.split(s)[-1]:
|
||||||
|
_ = subprocess.Popen(['install_name_tool', '-id', os.path.join("@loader_path", dependency_dylib_name), s], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
|
_ = subprocess.Popen(['install_name_tool', '-change', path, os.path.join("@loader_path", dependency_dylib_name), s], stdout=subprocess.PIPE)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
|
yield path
|
||||||
|
|
||||||
|
need = set([executable])
|
||||||
|
done = set()
|
||||||
|
|
||||||
|
while need:
|
||||||
|
needed = set(need)
|
||||||
|
need = set()
|
||||||
|
for f in needed:
|
||||||
|
need.update(otool(f))
|
||||||
|
done.update(needed)
|
||||||
|
need.difference_update(done)
|
||||||
Loading…
Add table
Reference in a new issue