Update BUILD.md & CI for Qt6
This commit is contained in:
parent
eb00f18b0c
commit
1903107766
68
.github/workflows/build.yml
vendored
68
.github/workflows/build.yml
vendored
|
@ -8,8 +8,8 @@ on:
|
||||||
- "master"
|
- "master"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux-build:
|
oldlinux-build:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2.0.0
|
uses: actions/checkout@v2.0.0
|
||||||
|
@ -34,7 +34,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
|
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DQT_PACKAGE_NAME=Qt5
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install DESTDIR=AppDir
|
make install DESTDIR=AppDir
|
||||||
# Package
|
# Package
|
||||||
|
@ -53,7 +53,61 @@ jobs:
|
||||||
- name: Upload Linux Build
|
- name: Upload Linux Build
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: pianobooster-${{ env.PB_VERSION }}-linux
|
name: pianobooster-${{ env.PB_VERSION }}-linux-Qt5-ubuntu-20.04
|
||||||
|
path: |
|
||||||
|
${{ env.PB_APP_NAME }}.AppImage
|
||||||
|
checksum.txt
|
||||||
|
|
||||||
|
newlinux-build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2.0.0
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install build-essential cmake pkg-config libftgl-dev qt6-base-dev libqt6core5compat6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools librtmidi-dev fluid-soundfont-gm libfluidsynth-dev
|
||||||
|
sudo apt-get install libfuse2 qmake6
|
||||||
|
- name: Install linuxdeploy
|
||||||
|
run: |
|
||||||
|
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||||
|
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||||
|
chmod +x linuxdeploy*.AppImage
|
||||||
|
- name: Define variables
|
||||||
|
run: |
|
||||||
|
pb_ver=`grep PB_VERSION src/version.h | cut -d "\"" -f 2`
|
||||||
|
pb_app_name="PianoBooster-${pb_ver}-x86_64"
|
||||||
|
echo "PB_VERSION=${pb_ver}">> $GITHUB_ENV
|
||||||
|
echo "PB_APP_NAME=${pb_app_name}">> $GITHUB_ENV
|
||||||
|
echo "PB_APP_NAME=${pb_app_name}"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
pb_app_name: ${{ env.PB_APP_NAME }}
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DQT_PACKAGE_NAME=Qt6
|
||||||
|
make -j$(nproc)
|
||||||
|
make install DESTDIR=AppDir
|
||||||
|
# Package
|
||||||
|
export QT_SELECT=6
|
||||||
|
export QMAKE=/usr/lib/qt6/bin/qmake6
|
||||||
|
export QML_SOURCES_PATHS="${GITHUB_WORKSPACE}"/src
|
||||||
|
# initialize AppDir, bundle shared libraries for PianoBooster, use Qt plugin to bundle additional resources, and build AppImage, all in one single command
|
||||||
|
../linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
|
||||||
|
find .
|
||||||
|
echo "Done!"
|
||||||
|
chmod +x *AppImage
|
||||||
|
mv *AppImage ../${pb_app_name}.AppImage
|
||||||
|
cd ..
|
||||||
|
ls -lh ${pb_app_name}.AppImage
|
||||||
|
md5sum ${pb_app_name}.AppImage >checksum.txt
|
||||||
|
cat checksum.txt
|
||||||
|
- name: Upload Linux Build
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: pianobooster-${{ env.PB_VERSION }}-linux-Qt6-ubuntu-22.04
|
||||||
path: |
|
path: |
|
||||||
${{ env.PB_APP_NAME }}.AppImage
|
${{ env.PB_APP_NAME }}.AppImage
|
||||||
checksum.txt
|
checksum.txt
|
||||||
|
@ -65,7 +119,7 @@ jobs:
|
||||||
uses: actions/checkout@v2.0.0
|
uses: actions/checkout@v2.0.0
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
brew install cmake qt@5 ftgl pkg-config fluid-synth
|
brew install cmake qt@6 ftgl pkg-config fluid-synth
|
||||||
- name: Define variables
|
- name: Define variables
|
||||||
run: |
|
run: |
|
||||||
pb_ver=`grep PB_VERSION src/version.h | cut -d "\"" -f 2`
|
pb_ver=`grep PB_VERSION src/version.h | cut -d "\"" -f 2`
|
||||||
|
@ -80,10 +134,10 @@ jobs:
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
export PKG_CONFIG_PATH="$(brew --prefix readline)/lib/pkgconfig:$PKG_CONFIG_PATH"
|
export PKG_CONFIG_PATH="$(brew --prefix readline)/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5);"
|
cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6);" -DQT_PACKAGE_NAME=Qt6
|
||||||
make
|
make
|
||||||
make install-translations
|
make install-translations
|
||||||
$(brew --prefix qt@5)/bin/macdeployqt build/pianobooster.app -dmg
|
$(brew --prefix qt@6)/bin/macdeployqt build/pianobooster.app -dmg
|
||||||
find .
|
find .
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
mv build/*dmg ../${pb_app_name}.dmg
|
mv build/*dmg ../${pb_app_name}.dmg
|
||||||
|
|
5
BUILD.md
5
BUILD.md
|
@ -1,8 +1,9 @@
|
||||||
# Build instructions for Linux and BSD Unix
|
# Build instructions for Linux and BSD Unix
|
||||||
|
|
||||||
Ensure that the following packages are installed:
|
Ensure that the following packages are installed:
|
||||||
`build-essential`, `cmake`, `pkg-config`, `libftgl-dev`, `qtbase5-dev`, `qttools5-dev`, `librtmidi-dev` , `libfluidsynth-dev`, `fluid-soundfont-gm`
|
|
||||||
|
|
||||||
|
- For Qt5: `build-essential`, `cmake`, `pkg-config`, `libftgl-dev`, `qtbase5-dev`, `qttools5-dev`, `librtmidi-dev` , `libfluidsynth-dev`, `fluid-soundfont-gm`
|
||||||
|
- For Qt6: `build-essential`, `cmake`, `pkg-config`, `libftgl-dev`, `qt6-base-dev`, `libqt6core5compat6-dev`, `qt6-tools-dev`, `qt6-tools-dev-tools`, `qt6-l10n-tools`, `librtmidi-dev` , `libfluidsynth-dev`, `fluid-soundfont-gm`
|
||||||
|
|
||||||
|
|
||||||
To generate a project makefile using CMake, create a build folder
|
To generate a project makefile using CMake, create a build folder
|
||||||
|
@ -10,7 +11,7 @@ and then run CMake from it:
|
||||||
```
|
```
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build
|
$ cd build
|
||||||
$ cmake ..
|
$ cmake .. -DQT_PACKAGE_NAME=Qt6 # or cmake .. -DQT_PACKAGE_NAME=Qt5
|
||||||
```
|
```
|
||||||
|
|
||||||
To compile the PianoBooster source code type:
|
To compile the PianoBooster source code type:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user