diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a93cdf2b6..ea789b86e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,6 +80,12 @@ jobs: prepare: "debian-based" build_on: linux + - run_on: ubuntu-20.04 + for: linux + prepare: "debian-based" + build_on: linux + pkg_suffix: wx30 + - run_on: ubuntu-20.04 for: appimage-x86_64 prepare: "debian-based" @@ -90,10 +96,22 @@ jobs: prepare: "debian-based" build_on: linux + - run_on: ubuntu-20.04 + for: linux-armhf + prepare: "debian-based" + build_on: linux + pkg_suffix: wx30 + + - run_on: ubuntu-20.04 + for: linux-aarch64 + prepare: "debian-based" + build_on: linux + - run_on: ubuntu-20.04 for: linux-aarch64 prepare: "debian-based" build_on: linux + pkg_suffix: wx30 - run_on: macos-11 for: osx @@ -112,11 +130,11 @@ jobs: submodules: true - name: Install Dependencies - run: ${{github.workspace}}/build-scripts/for-${{ matrix.for }}/prepare-${{ matrix.prepare }}.sh + run: ${{github.workspace}}/build-scripts/for-${{ matrix.for }}/prepare-${{ matrix.prepare }}.sh "${{ matrix.pkg_suffix }}" - name: Build working-directory: ${{github.workspace}} - run: ${{github.workspace}}/build-scripts/for-${{ matrix.for }}/build-on-${{ matrix.build_on }}.sh ${{needs.calc_ver.outputs.project_ver}} ${{needs.calc_ver.outputs.build_ver}} + run: ${{github.workspace}}/build-scripts/for-${{ matrix.for }}/build-on-${{ matrix.build_on }}.sh ${{needs.calc_ver.outputs.project_ver}} ${{needs.calc_ver.outputs.build_ver}} ${{github.workspace}} "${{ matrix.pkg_suffix }}" - name: Upload result uses: nanoufo/action-upload-artifacts-and-release-assets@v1.5 diff --git a/CHANGELOG.md b/CHANGELOG.md index 16fc1231f..ef6e45bfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Fixed uncompatibility with recent linux distros. Use grandorgue-wx32 on new linux distros (where wxWidgets 3.0 is not available) https://github.com/GrandOrgue/grandorgue/issues/1480 - Added support of negative y-axis adjustment of manual keys https://github.com/GrandOrgue/grandorgue/issues/1485 - Fixed opening an organ with more than 50 windchest groups https://github.com/GrandOrgue/grandorgue/issues/1484 # 3.11.0 (2023-04-17) diff --git a/CMakeLists.txt b/CMakeLists.txt index c29b644ea..f11184b2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,7 +214,17 @@ add_subdirectory(resources) # packaging -set(CPACK_PACKAGE_NAME "grandorgue") +# deal with possible package names among grandorgue, grandorgue-wx30 +set(BASE_PACKAGE_NAME "grandorgue") + +if("${CMAKE_PACKAGE_SUFFIX}" STREQUAL "wx30") + set(CPACK_PACKAGE_NAME "${BASE_PACKAGE_NAME}-wx30") + set(OTHER_PACKAGE_NAME "${BASE_PACKAGE_NAME}") +else() + set(CPACK_PACKAGE_NAME "${BASE_PACKAGE_NAME}") + set(OTHER_PACKAGE_NAME "${BASE_PACKAGE_NAME}-wx30") +endif() + set(CPACK_PACKAGE_VENDOR "Our Organ") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GrandOrgue - OpenSource Virtual Pipe Organ Software") set( @@ -330,7 +340,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(CPACK_RPM_DEMO_FILE_NAME RPM-DEFAULT) if(NOT GO_SEPARATE_LINUX_PACKAGES) # For automatic removal of previously installed suppackages - set(CPACK_RPM_PACKAGE_OBSOLETES "grandorgue-resources grandorgue-demo") + set(CPACK_RPM_PACKAGE_OBSOLETES "grandorgue-resources grandorgue-demo ${OTHER_PACKAGE_NAME}") endif() # for source rpms @@ -349,12 +359,12 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON) set(CPACK_DEBIAN_PACKAGE_SECTION sound) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) - set(CPACK_DEBIAN_UNSPECIFIED_PACKAGE_RECOMMENDS "grandorgue-demo, wx3.0-i18n") + set(CPACK_DEBIAN_UNSPECIFIED_PACKAGE_RECOMMENDS "grandorgue-demo") set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) set(CPACK_DEBIAN_PACKAGE_SOURCE "${CPACK_DEBIAN_UNSPECIFIED_PACKAGE_NAME}") if(NOT GO_SEPARATE_LINUX_PACKAGES) # For automatic removal of previously installed suppackages - set(CPACK_DEBIAN_PACKAGE_REPLACES "grandorgue-resources, grandorgue-demo") + set(CPACK_DEBIAN_PACKAGE_REPLACES "grandorgue-resources, grandorgue-demo, ${OTHER_PACKAGE_NAME}") endif() endif() @@ -366,5 +376,6 @@ message(STATUS " Project : ${PROJECT_NAME}") message(STATUS " Description : ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") message(STATUS " Version : ${VERSION}") message(STATUS " Build : ${CPACK_PACKAGE_RELEASE}") +message(STATUS " Package name : ${CPACK_PACKAGE_NAME}") message(STATUS "============================================================================") message(STATUS " ") diff --git a/build-scripts/for-appimage-x86_64/prepare-debian-based.sh b/build-scripts/for-appimage-x86_64/prepare-debian-based.sh index 7f837f768..2732712e7 100755 --- a/build-scripts/for-appimage-x86_64/prepare-debian-based.sh +++ b/build-scripts/for-appimage-x86_64/prepare-debian-based.sh @@ -3,7 +3,7 @@ set -e DIR=`dirname $0` -$DIR/../for-linux/prepare-debian-based.sh +$DIR/../for-linux/prepare-debian-based.sh "" amd64 # linuxdeploy, linuxdeploy-plugin-gtk and appimagetool must be downloaded sudo wget -P /usr/local/bin https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh diff --git a/build-scripts/for-linux-aarch64/build-on-linux.sh b/build-scripts/for-linux-aarch64/build-on-linux.sh index ae6e94541..641f2bc8b 100755 --- a/build-scripts/for-linux-aarch64/build-on-linux.sh +++ b/build-scripts/for-linux-aarch64/build-on-linux.sh @@ -3,6 +3,7 @@ # $1 - Version # $2 - Build version # $3 - Go source Dir. If not set then relative to the script dir +# $4 - package suffix: empty or wx30 set -e @@ -13,6 +14,8 @@ if [[ -n "$3" ]]; then else SRC_DIR=$(readlink -f $(dirname $0)/../..) fi +PACKAGE_SUFFIX=$4 + PARALLEL_PRMS="-j$(nproc)" @@ -38,7 +41,7 @@ GO_ARM_PRMS="-DCMAKE_SYSTEM_NAME=Linux \ -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=arm64 \ -DCPACK_RPM_PACKAGE_ARCHITECTURE=aarch64 \ -DIMPORT_EXECUTABLES=../build-tools/ImportExecutables.cmake" -GO_PRMS="-DCMAKE_BUILD_TYPE=Release $CMAKE_VERSION_PRMS" +GO_PRMS="-DCMAKE_BUILD_TYPE=Release $CMAKE_VERSION_PRMS -DCMAKE_PACKAGE_SUFFIX=$PACKAGE_SUFFIX" echo "cmake -G \"Unix Makefiles\" $GO_PRMS . $SRC_DIR" cmake -G "Unix Makefiles" $GO_PRMS $GO_ARM_PRMS . $SRC_DIR make -k $PARALLEL_PRMS VERBOSE=1 package diff --git a/build-scripts/for-linux-aarch64/prepare-debian-based.sh b/build-scripts/for-linux-aarch64/prepare-debian-based.sh index 718c2b408..0f31eb719 100755 --- a/build-scripts/for-linux-aarch64/prepare-debian-based.sh +++ b/build-scripts/for-linux-aarch64/prepare-debian-based.sh @@ -1,6 +1,8 @@ #!/bin/bash +# $1 - wxWidgets package version: empty - libwxgtk3.2-dev or wx30 - libwxgtk3.0-gtk3-dev + set -e DIR=`dirname $0` -$DIR/../for-linux/prepare-debian-based.sh arm64 +$DIR/../for-linux/prepare-debian-based.sh "$1" arm64 diff --git a/build-scripts/for-linux-armhf/build-on-linux.sh b/build-scripts/for-linux-armhf/build-on-linux.sh index 49164c3e3..81d867779 100755 --- a/build-scripts/for-linux-armhf/build-on-linux.sh +++ b/build-scripts/for-linux-armhf/build-on-linux.sh @@ -3,6 +3,7 @@ # $1 - Version # $2 - Build version # $3 - Go source Dir. If not set then relative to the script dir +# $4 - package suffix: empty or wx30 set -e @@ -13,6 +14,7 @@ if [[ -n "$3" ]]; then else SRC_DIR=$(readlink -f $(dirname $0)/../..) fi +PACKAGE_SUFFIX=$4 PARALLEL_PRMS="-j$(nproc)" @@ -38,7 +40,7 @@ GO_ARM_PRMS="-DCMAKE_SYSTEM_NAME=Linux \ -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=armhf \ -DCPACK_RPM_PACKAGE_ARCHITECTURE=armhf \ -DIMPORT_EXECUTABLES=../build-tools/ImportExecutables.cmake" -GO_PRMS="-DCMAKE_BUILD_TYPE=Release $CMAKE_VERSION_PRMS" +GO_PRMS="-DCMAKE_BUILD_TYPE=Release $CMAKE_VERSION_PRMS -DCMAKE_PACKAGE_SUFFIX=$PACKAGE_SUFFIX" echo "cmake -G \"Unix Makefiles\" $GO_PRMS . $SRC_DIR" cmake -G "Unix Makefiles" $GO_PRMS $GO_ARM_PRMS . $SRC_DIR make -k $PARALLEL_PRMS VERBOSE=1 package diff --git a/build-scripts/for-linux-armhf/prepare-debian-based.sh b/build-scripts/for-linux-armhf/prepare-debian-based.sh index 1ca5271db..448ef2d3a 100755 --- a/build-scripts/for-linux-armhf/prepare-debian-based.sh +++ b/build-scripts/for-linux-armhf/prepare-debian-based.sh @@ -1,6 +1,8 @@ #!/bin/bash +# $1 - wxWidgets package version: empty - libwxgtk3.2-dev or wx30 - libwxgtk3.0-gtk3-dev + set -e DIR=`dirname $0` -$DIR/../for-linux/prepare-debian-based.sh armhf +$DIR/../for-linux/prepare-debian-based.sh "$1" armhf diff --git a/build-scripts/for-linux/build-on-linux.sh b/build-scripts/for-linux/build-on-linux.sh index 5a24ffc3a..95797eeee 100755 --- a/build-scripts/for-linux/build-on-linux.sh +++ b/build-scripts/for-linux/build-on-linux.sh @@ -3,6 +3,7 @@ # $1 - Version # $2 - Build version # $3 - Go source Dir. If not set then relative to the script dir +# $4 - package suffix: empty or wx30 set -e @@ -14,6 +15,8 @@ else SRC_DIR=$(readlink -f $(dirname $0)/../..) fi +PACKAGE_SUFFIX=$4 + PARALLEL_PRMS="-j$(nproc)" mkdir -p build/linux @@ -22,7 +25,7 @@ pushd build/linux rm -rf * export LANG=C -GO_PRMS="-DCMAKE_BUILD_TYPE=Release $CMAKE_VERSION_PRMS" +GO_PRMS="-DCMAKE_BUILD_TYPE=Release $CMAKE_VERSION_PRMS -DCMAKE_PACKAGE_SUFFIX=$PACKAGE_SUFFIX" echo "cmake -G \"Unix Makefiles\" $GO_PRMS . $SRC_DIR" cmake -G "Unix Makefiles" $GO_PRMS . $SRC_DIR make -k $PARALLEL_PRMS VERBOSE=1 package diff --git a/build-scripts/for-linux/prepare-debian-based.sh b/build-scripts/for-linux/prepare-debian-based.sh index a3c6b5359..da3f3a284 100755 --- a/build-scripts/for-linux/prepare-debian-based.sh +++ b/build-scripts/for-linux/prepare-debian-based.sh @@ -1,13 +1,20 @@ #!/bin/bash -#rem $1 - target architecture: ex arm64, amd64, armhf +# $1 - wxWidgets package version: empty - libwxgtk3.2-dev or wx30 - libwxgtk3.0-gtk3-dev +# $2 - target architecture: ex arm64, amd64, armhf set -e DIR=`dirname $0` +WX_PKG_NAME=libwxgtk3.2-dev +[[ "$1" == "wx30" ]] && WX_PKG_NAME=libwxgtk3.0-gtk3-dev + CURRENT_ARCH=$(dpkg --print-architecture) -TARGET_ARCH="${1:-$CURRENT_ARCH}" +TARGET_ARCH="${2:-$CURRENT_ARCH}" + +OS_DISTR=$(awk -F= '$1=="ID" {print $2;}' /etc/os-release) +[[ "$OS_DISTR" == "ubuntu" ]] && $DIR/prepare-ubuntu-wx-repo.bash $WX_PKG_NAME if [[ "$TARGET_ARCH" == "$CURRENT_ARCH" ]]; then GCC_SUFFIX="" @@ -15,7 +22,6 @@ if [[ "$TARGET_ARCH" == "$CURRENT_ARCH" ]]; then else sudo dpkg --add-architecture "$TARGET_ARCH" - OS_DISTR=$(awk -F= '$1=="ID" {print $2;}' /etc/os-release) # ubuntu has different urls for different architectures [[ "$OS_DISTR" == "ubuntu" ]] && $DIR/prepare-ubuntu-multiarch-repos.sh sudo apt update @@ -30,6 +36,7 @@ fi sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ cmake \ docbook-xsl \ + dpkg-dev \ file \ gettext \ imagemagick \ @@ -44,7 +51,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ libjack-dev:$TARGET_ARCH \ libudev-dev:$TARGET_ARCH \ libwavpack-dev:$TARGET_ARCH \ - libwxgtk3.0-gtk3-dev:$TARGET_ARCH \ + ${WX_PKG_NAME}:$TARGET_ARCH \ libyaml-cpp-dev:$TARGET_ARCH \ zlib1g-dev:$TARGET_ARCH diff --git a/build-scripts/for-linux/prepare-fedora.sh b/build-scripts/for-linux/prepare-fedora.sh index 1c723791f..34e949be7 100755 --- a/build-scripts/for-linux/prepare-fedora.sh +++ b/build-scripts/for-linux/prepare-fedora.sh @@ -1,7 +1,13 @@ #!/bin/sh +# $1 - wxWidgets package version: empty - libwxgtk3.2-dev or wx30 - libwxgtk3.0-gtk3-dev +# $2 - target architecture: ex arm64, amd64, armhf + +WX_PKG_NAME=wxGTK-devel +[[ "$1" == "wx30" ]] && WX_PKG_NAME=wxGTK3-devel + set -e sudo dnf install -y \ cmake gcc-c++ make gettext docbook-style-xsl zip po4a ImageMagick rpm-build \ pipewire-jack-audio-connection-kit-devel fftw-devel zlib-devel wavpack-devel \ - wxGTK3-devel alsa-lib-devel systemd-devel yaml-cpp-static + $WX_PKG_NAME alsa-lib-devel systemd-devel yaml-cpp-static diff --git a/build-scripts/for-linux/prepare-ubuntu-wx-repo.bash b/build-scripts/for-linux/prepare-ubuntu-wx-repo.bash new file mode 100755 index 000000000..a006282ae --- /dev/null +++ b/build-scripts/for-linux/prepare-ubuntu-wx-repo.bash @@ -0,0 +1,18 @@ +#!/bin/bash + +# add an ppa repository for wxWidgets + +# $1 - wx package name + +set -e + +WX_PACKAGE_NAME=$1 + +sudo apt-get update +if ! apt-cache show $WX_PACKAGE_NAME; then + # the wx package is not found + if [[ "$WX_PACKAGE_NAME" == "libwxgtk3.2-dev" ]]; then + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common + echo "" | sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:sjr/wx32 + fi +fi