mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
123 lines
3.6 KiB
YAML
123 lines
3.6 KiB
YAML
name: Build Linux
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
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 \
|
|
libfuse2 \
|
|
libunwind-dev \
|
|
libxcb-cursor0 \
|
|
libxkbcommon-x11-0 \
|
|
libheif-dev \
|
|
libqtermwidget6-2-dev \
|
|
libplist-dev \
|
|
libtatsu-dev \
|
|
libimobiledevice-dev \
|
|
libimobiledevice-glue-dev \
|
|
libirecovery-1.0-dev
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
version: "6.7.2"
|
|
modules: "qtmultimedia qtlocation qtpositioning qtserialport"
|
|
|
|
# - 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 AppDir
|
|
run: |
|
|
mkdir -p build/AppDir/usr/bin
|
|
mkdir -p build/AppDir/usr/share/applications
|
|
mkdir -p build/AppDir/usr/share/icons/hicolor/256x256/apps
|
|
mv build/iDescriptor build/AppDir/usr/bin/
|
|
cp resources/icons/app-icon/icon.png build/AppDir/usr/share/icons/hicolor/256x256/apps/iDescriptor.png
|
|
cat <<EOF > build/AppDir/usr/share/applications/iDescriptor.desktop
|
|
[Desktop Entry]
|
|
Name=iDescriptor
|
|
Exec=iDescriptor
|
|
Icon=iDescriptor
|
|
Type=Application
|
|
Categories=Utility;
|
|
EOF
|
|
|
|
- name: Install appimagetool
|
|
run: |
|
|
wget -c "https://github.com$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)"
|
|
chmod a+x appimagetool-*.AppImage
|
|
|
|
- name: Build AppImage
|
|
working-directory: ./build
|
|
run: |
|
|
../appimagetool-*.AppImage deploy AppDir/usr/share/applications/*.desktop
|
|
VERSION=1.0.0 ../appimagetool-*.AppImage AppDir
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: iDescriptor-Linux
|
|
path: build/iDescriptor-*.AppImage
|