Skip to content

Commit 420eee4

Browse files
authored
Add AppImage packaging for Linux (#13)
* 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.
1 parent 8e25f45 commit 420eee4

File tree

3 files changed

+94
-0
lines changed

3 files changed

+94
-0
lines changed

.github/workflows/ci_linux.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI-Linux
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- 'README.md'
9+
pull_request:
10+
branches:
11+
- master
12+
paths-ignore:
13+
- 'README.md'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Install Qt
26+
uses: jurplel/install-qt-action@v3
27+
with:
28+
version: '6.6'
29+
modules: 'qtmultimedia'
30+
31+
- name: Install build dependencies
32+
env:
33+
FFMPEG_DEPS: >
34+
libavutil-dev
35+
libavcodec-dev
36+
libavformat-dev
37+
libavfilter-dev
38+
libswscale-dev
39+
libswresample-dev
40+
libfuse2
41+
APPIMAGE_DEPS: >
42+
libfuse2
43+
libxcb-cursor0
44+
run: sudo apt install -y $FFMPEG_DEPS $APPIMAGE_DEPS
45+
46+
- name: Build
47+
run: |
48+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
49+
cmake --build ${{github.workspace}}/build
50+
51+
- name: Install linuxdeploy
52+
run: |
53+
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
54+
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
55+
chmod +x linuxdeploy-x86_64.AppImage
56+
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
57+
58+
- name: Build AppImage
59+
# Qt6_DIR is set by the install-qt-action
60+
run: >
61+
QMAKE=$Qt6_DIR/bin/qmake
62+
PATH=$Qt6_DIR/libexec:$PATH
63+
./linuxdeploy-x86_64.AppImage
64+
--appdir AppDir
65+
-e ${{github.workspace}}/build/app/si-edit
66+
-i ${{github.workspace}}/app/res/icon.svg
67+
-d ${{github.workspace}}/app/res/AppImage.desktop
68+
--plugin qt
69+
--output appimage
70+
71+
- name: 'Upload Artifact: libweaver'
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: libweaver-Linux
75+
path: ${{github.workspace}}/build/lib/libweaver.so
76+
if-no-files-found: error
77+
78+
- name: 'Upload Artifact: AppImage'
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: SI-Edit-Linux.AppImage
82+
path: ${{github.workspace}}/SI_Edit*.AppImage
83+
if-no-files-found: error
84+

app/res/AppImage.desktop

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Name=SI Edit
3+
Comment=Tool for working with SI files
4+
Exec=si-edit
5+
Terminal=false
6+
Type=Application
7+
Icon=icon
8+
Categories=Development;Graphics;AudioVideo;
9+

lib/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ endif()
2727
set_target_properties(libweaver PROPERTIES
2828
CXX_STANDARD 98
2929
CXX_STANDARD_REQUIRED ON
30+
PREFIX ""
3031
)
3132

3233
if(LIBWEAVER_BUILD_DOXYGEN)

0 commit comments

Comments
 (0)