Build AppImage with linuxdeployqt #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build AppImage with linuxdeployqt | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| yyyymmdd: | |
| description: 'Release date (yyyymmdd)' | |
| required: true | |
| jobs: | |
| build-app: | |
| name: Build in Docker | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/csreviser/qt6-static:6.9.0-ubuntu22.04 | |
| options: --privileged | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v3 | |
| - name: Install Dependencies | |
| run: | | |
| apt update && apt install sudo -y | |
| sudo apt update | |
| sudo apt install -y \ | |
| build-essential \ | |
| libgl1-mesa-dev \ | |
| qt6-base-dev qt6-base-dev-tools \ | |
| cmake make g++ \ | |
| desktop-file-utils patchelf wget file git fuse libfuse2 p7zip-full zip | |
| - name: Clone CaptureStream2 | |
| run: | | |
| git clone https://github.com/CSReviser/CaptureStream2.git | |
| cd CaptureStream2 | |
| git checkout feature | |
| git submodule update --init --recursive | |
| cp ./qss_files/stylesheet-ubu.qss ./ | |
| - name: Build Application | |
| run: | | |
| cd CaptureStream2 | |
| mkdir -p build | |
| cd build | |
| /opt/qt6-static/bin/qmake ../CaptureStream2.pro | |
| make -j$(nproc) | |
| - name: Download linuxdeploy and plugin | |
| run: | | |
| cd CaptureStream2 | |
| wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
| chmod +x linuxdeploy-x86_64.AppImage | |
| wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | |
| chmod +x linuxdeploy-plugin-qt-x86_64.AppImage | |
| wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage -O linuxdeployqt.AppImage | |
| chmod +x linuxdeployqt.AppImage | |
| wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool | |
| chmod +x appimagetool | |
| - name: Set QMAKE path | |
| run: echo "QMAKE=/opt/qt6-static/bin/qmake" >> $GITHUB_ENV | |
| - name: Prepare AppDir | |
| run: | | |
| cd CaptureStream2 | |
| mkdir -p AppDir/usr/bin | |
| cp build/CaptureStream2 AppDir/usr/bin/ | |
| cp icon.png AppDir/ | |
| cp CaptureStream2.desktop AppDir/ | |
| - name: Prepare AppDir (without creating AppImage yet) | |
| run: | | |
| cd CaptureStream2 | |
| ./linuxdeployqt AppDir/CaptureStream2.desktop -no-appimage -verbose=2 | |
| - name: Build AppImage (Type 1, FUSE-less) | |
| run: | | |
| cd CaptureStream2 | |
| ./appimagetool --comp gzip AppDir | |
| - name: Run linuxdeployqt | |
| run: | | |
| cd CaptureStream2 | |
| cd build | |
| mkdir -p LinCaptureStream2 | |
| cp ../CaptureStream2*.AppImage ./LinCaptureStream2/CaptureStream2 | |
| cp ../qss_files/stylesheet-ubu.qss ./LinCaptureStream2 | |
| cp -r ../qss_files/License ./LinCaptureStream2 | |
| wget -qO ffmpeg-static-ubuntu.zip https://github.com/CSReviser/ffmpeg-build/releases/download/7.1.1/ffmpeg-static-ubuntu.zip | |
| 7z e ffmpeg-static-ubuntu.zip ffmpeg -o./LinCaptureStream2 | |
| chmod -R 755 ./LinCaptureStream2 | |
| # ./linuxdeployqt.AppImage AppDir/CaptureStream2.desktop \ | |
| # -appimage -bundle-non-qt-libs | |
| - name: Create ZIP file | |
| run: | | |
| cd CaptureStream2/build | |
| zip -r "CaptureStream2-AppImage-${{ github.event.inputs.yyyymmdd }}.zip" LinCaptureStream2 | |
| - name: Upload AppImage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CaptureStream2-AppImage | |
| path: ./CaptureStream2/build/CaptureStream2*.zip |