Add AppImage packaging for Linux ()

* Fix filename for libweaver.so

CMake was adding an extra "lib" prefix on linux, with filename resulting
in "liblibweaver.so". Now it generates it as "libweaver.so."

* Add Linux workflow

The workflow runs on ubuntu and creates 2 arficacts: libweaver.so and an
AppImage containing the SI Editor GUI app.

Also adding a .desktop file as required for building an AppImage.
This commit is contained in:
Şan Güneş 2024-12-19 00:08:01 +02:00 committed by GitHub
parent 8e25f458e1
commit 420eee4e98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 94 additions and 0 deletions

84
.github/workflows/ci_linux.yml vendored Normal file
View file

@ -0,0 +1,84 @@
name: CI-Linux
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
pull_request:
branches:
- master
paths-ignore:
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.6'
modules: 'qtmultimedia'
- name: Install build dependencies
env:
FFMPEG_DEPS: >
libavutil-dev
libavcodec-dev
libavformat-dev
libavfilter-dev
libswscale-dev
libswresample-dev
libfuse2
APPIMAGE_DEPS: >
libfuse2
libxcb-cursor0
run: sudo apt install -y $FFMPEG_DEPS $APPIMAGE_DEPS
- name: Build
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
cmake --build ${{github.workspace}}/build
- name: Install linuxdeploy
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
- name: Build AppImage
# Qt6_DIR is set by the install-qt-action
run: >
QMAKE=$Qt6_DIR/bin/qmake
PATH=$Qt6_DIR/libexec:$PATH
./linuxdeploy-x86_64.AppImage
--appdir AppDir
-e ${{github.workspace}}/build/app/si-edit
-i ${{github.workspace}}/app/res/icon.svg
-d ${{github.workspace}}/app/res/AppImage.desktop
--plugin qt
--output appimage
- name: 'Upload Artifact: libweaver'
uses: actions/upload-artifact@v4
with:
name: libweaver-Linux
path: ${{github.workspace}}/build/lib/libweaver.so
if-no-files-found: error
- name: 'Upload Artifact: AppImage'
uses: actions/upload-artifact@v4
with:
name: SI-Edit-Linux.AppImage
path: ${{github.workspace}}/SI_Edit*.AppImage
if-no-files-found: error

9
app/res/AppImage.desktop Normal file
View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=SI Edit
Comment=Tool for working with SI files
Exec=si-edit
Terminal=false
Type=Application
Icon=icon
Categories=Development;Graphics;AudioVideo;

View file

@ -27,6 +27,7 @@ endif()
set_target_properties(libweaver PROPERTIES
CXX_STANDARD 98
CXX_STANDARD_REQUIRED ON
PREFIX ""
)
if(LIBWEAVER_BUILD_DOXYGEN)