mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
148 lines
4.2 KiB
YAML
148 lines
4.2 KiB
YAML
name: Build Linux
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: "recursive"
|
|
token: ${{ secrets.PAT }}
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "^1.23.0"
|
|
|
|
- name: Install Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
build-essential \
|
|
autoconf \
|
|
automake \
|
|
checkinstall \
|
|
git \
|
|
pkg-config \
|
|
libpugixml-dev \
|
|
libusb-1.0-0-dev \
|
|
libqrencode-dev \
|
|
libirecovery-1.0-dev \
|
|
libcurl4-openssl-dev \
|
|
libusbmuxd-dev \
|
|
libssl-dev \
|
|
libtool-bin \
|
|
libreadline-dev \
|
|
libavahi-compat-libdnssd-dev \
|
|
libavcodec-dev \
|
|
libavutil-dev \
|
|
libswscale-dev \
|
|
libgstreamer1.0-dev \
|
|
libgstreamer-plugins-base1.0-dev \
|
|
gstreamer1.0-plugins-good \
|
|
gstreamer1.0-plugins-bad \
|
|
gstreamer1.0-plugins-ugly \
|
|
libfuse2 \
|
|
libunwind-dev \
|
|
libxcb-cursor0 \
|
|
libxkbcommon-x11-0 \
|
|
libheif-dev \
|
|
libzip-dev \
|
|
libssh-dev
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
version: "6.7.2"
|
|
modules: "qtmultimedia qtlocation qtpositioning qtserialport"
|
|
dir: ${{ github.workspace }}
|
|
|
|
- name: Compile additional dependencies
|
|
run: |
|
|
git clone https://github.com/lxqt/lxqt-build-tools.git
|
|
pushd lxqt-build-tools
|
|
mkdir build && cd build
|
|
cmake ..
|
|
sudo make install
|
|
popd
|
|
|
|
git clone https://github.com/uncor3/qtermwidget.git
|
|
pushd qtermwidget
|
|
mkdir build && cd build
|
|
cmake ..
|
|
sudo make install
|
|
popd
|
|
|
|
- name: Build libimobiledevice suite
|
|
run: |
|
|
repos=("libplist" "libtatsu" "libimobiledevice-glue" "libimobiledevice" "libirecovery")
|
|
|
|
for repo in "${repos[@]}"; do
|
|
echo "Building $repo..."
|
|
|
|
git clone --depth=1 --recursive "https://github.com/libimobiledevice/$repo"
|
|
pushd "$repo"
|
|
./autogen.sh
|
|
sudo make install
|
|
popd
|
|
|
|
echo "Built $repo successfully."
|
|
done
|
|
|
|
- name: Update linker cache
|
|
run: sudo ldconfig
|
|
|
|
- name: Configure CMake
|
|
run: |
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DRUN_CLANG_TIDY=OFF
|
|
|
|
- name: Build with CMake
|
|
run: cmake --build build --config Release
|
|
|
|
- name: Prepare for AppImage
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
cp resources/icons/app-icon/icon.png build/iDescriptor.png
|
|
|
|
# Create a .desktop file required for the AppImage
|
|
cat <<EOF > build/iDescriptor.desktop
|
|
[Desktop Entry]
|
|
Name=iDescriptor
|
|
Exec=iDescriptor
|
|
Icon=iDescriptor
|
|
Type=Application
|
|
Categories=Utility;
|
|
EOF
|
|
|
|
- name: Install linuxdeployqt
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
|
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
|
|
|
- name: Build AppImage
|
|
if: runner.os == 'Linux'
|
|
working-directory: ./build
|
|
run: |
|
|
export VERSION=1.0.0
|
|
../linuxdeployqt-continuous-x86_64.AppImage iDescriptor -qmldir=../qml -appimage -show-exclude-libs -ignore-glob="libmimerapi.so"
|
|
|
|
- name: Upload Artifact (Linux)
|
|
if: runner.os == 'Linux'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: iDescriptor-AppImage
|
|
path: build/iDescriptor-*.AppImage
|
|
|
|
- name: Upload Artifact (Windows)
|
|
if: runner.os == 'Windows'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: iDescriptor-Windows
|
|
path: build/Release/iDescriptor.exe
|