Skip to content

Commit

Permalink
CI: add ubuntu 24.04 build
Browse files Browse the repository at this point in the history
  • Loading branch information
BLumia committed May 30, 2024
1 parent ae37e11 commit 3063c30
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 21 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is a basic workflow to help you get started with Actions

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 portaudio19-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/pmidi -d dist/net.blumia.pineapple-midi-player.desktop.desktop -i assets/icons/app-icon.svg --icon-filename net.blumia.pineapple-midi-player -p qt -o appimage
ls
mv TouHou_Player*.AppImage thplayer-linux.AppImage
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Linux-Build
path: thplayer-linux.AppImage
40 changes: 19 additions & 21 deletions app/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,22 +385,20 @@ void MainWindow::on_actionSelectSoundFont_triggered()

void MainWindow::on_actionHelp_triggered()
{
const QString helpText = tr("Pineapple MIDI Player is a simple SoundFont MIDI player, which requires both MIDI file and SoundFont file to play.")
% QStringLiteral("\n\n")
% tr("You can simply drag and drop SoundFont or MIDI file to quickly load/replace a SoundFont or play the given MIDI file.")
% QStringLiteral("\n\n")
% tr("When trying to load a MIDI file, this player will try to load the SoundFont file with the same file name as the MIDI file by default, "
"which is suitable for playing MIDI file extracted by, for example, [VGMTrans](https://github.com/vgmtrans/vgmtrans/).")
% QStringLiteral("\n\n")
% tr("If you don't know where to get a SoundFont, check out <a href='https://musescore.org/en/handbook/3/soundfonts-and-sfz-files#list'>this page</a> provided by MuseScore.")
% QStringLiteral("\n\n")
% tr("To be clear, this player is (currently) not intended to support all features in a MIDI or SoundFont file. If you want "
"a more advanced MIDI player, consider try [QMidiPlayer](https://chrisoft.org/QMidiPlayer/) instead.");
const QStringList helpTexts{
tr("Pineapple MIDI Player is a simple SoundFont MIDI player, which requires both MIDI file and SoundFont file to play."),
tr("You can simply drag and drop SoundFont or MIDI file to quickly load/replace a SoundFont or play the given MIDI file."),
tr("When trying to load a MIDI file, this player will try to load the SoundFont file with the same file name as the MIDI file by default, "
"which is suitable for playing MIDI file extracted by, for example, [VGMTrans](https://github.com/vgmtrans/vgmtrans/)."),
tr("If you don't know where to get a SoundFont, check out <a href='https://musescore.org/en/handbook/3/soundfonts-and-sfz-files#list'>this page</a> provided by MuseScore."),
tr("To be clear, this player is (currently) not intended to support all features in a MIDI or SoundFont file. If you want "
"a more advanced MIDI player, consider try [QMidiPlayer](https://chrisoft.org/QMidiPlayer/) instead.")
};

QMessageBox helpBox(this);
helpBox.setIcon(QMessageBox::Information);
helpBox.setWindowTitle(tr("Help"));
helpBox.setText(helpText);
helpBox.setText(helpTexts.join(QStringLiteral("\n\n")));
helpBox.setTextFormat(Qt::MarkdownText);
helpBox.exec();
}
Expand Down Expand Up @@ -445,28 +443,28 @@ SOFTWARE.
licenseBox.exec();
});
infoBox.setText(
"Pineapple MIDI Player " PMIDI_VERSION_STRING
"\n\n" %
QStringLiteral("Pineapple MIDI Player " PMIDI_VERSION_STRING) %
QStringLiteral("\n\n") %
tr("Based on the following free software libraries:") %
"\n\n" %
QStringLiteral("\n\n") %
QStringLiteral("- [Qt](https://www.qt.io/) %1\n").arg(QT_VERSION_STR) %
QStringLiteral("- [PortAudio](https://www.portaudio.com/) %1.%2.%3\n").arg(Pa_GetVersionInfo()->versionMajor)
.arg(Pa_GetVersionInfo()->versionMinor)
.arg(Pa_GetVersionInfo()->versionSubMinor) %
"- `tsf.h` and `tml.h` from [TinySoundFont](https://github.com/schellingb/TinySoundFont/)\n"
QStringLiteral("- `tsf.h` and `tml.h` from [TinySoundFont](https://github.com/schellingb/TinySoundFont/)\n"
"- `dr_wav.h` from [dr_libs](https://github.com/mackron/dr_libs)\n"
"- `stb_vorbis.c` from [stb](https://github.com/nothings/stb)\n"
"- `opl.h` from [dos-like](https://github.com/mattiasgustavsson/dos-like)\n"
"- `opl.h` from [dos-like](https://github.com/mattiasgustavsson/dos-like)\n") %
#ifdef Q_OS_WIN
"- `widgetsopenwithhandler_win.cpp` from [KIO](https://invent.kde.org/frameworks/kio)\n"
QStringLiteral("- `widgetsopenwithhandler_win.cpp` from [KIO](https://invent.kde.org/frameworks/kio)\n") %
#endif
#ifdef HAVE_KIO
% QStringLiteral("- [KIO](https://invent.kde.org/frameworks/kio) %1\n").arg(KIO_VERSION_STRING) %
QStringLiteral("- [KIO](https://invent.kde.org/frameworks/kio) %1\n").arg(KIO_VERSION_STRING) %
#endif
"\n"
QStringLiteral("\n"
"[Source Code](https://github.com/BLumia/pineapple-midi-player)\n"
"\n"
"Copyright &copy; 2024 [BLumia](https://github.com/BLumia/)"
"Copyright &copy; 2024 [BLumia](https://github.com/BLumia/)")
);
infoBox.setTextFormat(Qt::MarkdownText);
infoBox.exec();
Expand Down

0 comments on commit 3063c30

Please sign in to comment.