Skip to content

Commit

Permalink
CI: linux AppImage build
Browse files Browse the repository at this point in the history
  • Loading branch information
BLumia committed Aug 17, 2024
1 parent b5faa0f commit 848b101
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: blumia
41 changes: 41 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Linux Package

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build dept.
run: |
sudo apt update
sudo apt install cmake qt6-base-dev qt6-tools-dev qt6-declarative-dev portaudio19-dev libopenmpt-dev
# for linuxdeploy: https://github.com/AppImage/AppImageKit/wiki/FUSE
# linuxdeploy-plugin-qt still requires qmake currently: https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/156
sudo add-apt-repository universe
sudo apt install libfuse2 qmake6
- name: Get 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-*.AppImage
- name: Build
working-directory: ./
run: |
cmake -B build .
cmake --build build -j
- name: Package
env:
QMAKE: /usr/bin/qmake6
run: |
./linuxdeploy-x86_64.AppImage --appdir AppDir -e build/widget/pineapple-tracker-player -d dist/net.blumia.pineapple-tracker-player.desktop -i dist/pineapple-tracker-player.svg --icon-filename net.blumia.pineapple-tracker-player -p qt -o appimage
rm ./linuxdeploy*x86_64.AppImage
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Linux-Build
path: "*.AppImage"
4 changes: 2 additions & 2 deletions dist/net.blumia.pineapple-tracker-player.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Categories=Audio;AudioVideo;Player;
Comment=Pineapple Tracker Player is a modular music player
Comment[zh_CN]=菠萝トラッカー播放器是一个模块音乐播放器
Exec=env QT_QUICK_CONTROLS_MATERIAL_THEME=Dark pineapple-tracker-player-quick -style Material %F
Exec=pineapple-tracker-player %F
GenericName=Modular Music Player
GenericName[zh_CN]=模块音乐播放器
Icon=pineapple-tracker-player
Icon=net.blumia.pineapple-tracker-player
Keywords=OpenMPT;XM;
MimeType=audio/x-xm;audio/x-mod;audio/x-it;audio/x-s3m;
Name=Pineapple Tracker Player
Expand Down
13 changes: 0 additions & 13 deletions quick/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,6 @@ install(TARGETS pineapple-tracker-player-quick
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

# install icon
install (
FILES ../dist/pineapple-tracker-player.svg
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps"
RENAME pineapple-tracker-player.svg
)

# install shortcut
install (
FILES ../dist/net.blumia.pineapple-tracker-player.desktop
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
)

if(QT_VERSION_MAJOR EQUAL 6)
# qt_import_qml_plugins(pineapple-tracker-player-quick) # do we really need this?
qt_finalize_executable(pineapple-tracker-player-quick)
Expand Down
13 changes: 13 additions & 0 deletions widget/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ install(TARGETS pineapple-tracker-player
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

# install icon
install (
FILES ../dist/pineapple-tracker-player.svg
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps"
RENAME net.blumia.pineapple-tracker-player.svg
)

# install shortcut
install (
FILES ../dist/net.blumia.pineapple-tracker-player.desktop
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
)

if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(pineapple-tracker-player)
endif()
1 change: 1 addition & 0 deletions widget/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <QTime>
#include <QMessageBox>
#include <QSortFilterProxyModel>
#include <QStringBuilder>

#include <portaudio.h>
#include <libopenmpt/libopenmpt.hpp>
Expand Down

0 comments on commit 848b101

Please sign in to comment.