diff --git a/.github/workflows/builds-ubuntu.yml b/.github/workflows/builds-ubuntu.yml index 84bb4504..fadebd4e 100644 --- a/.github/workflows/builds-ubuntu.yml +++ b/.github/workflows/builds-ubuntu.yml @@ -1,11 +1,11 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json -name: Ubuntu KnobKraft Orm +name: Ubuntu 22 KnobKraft Orm on: [push] jobs: - build-linux: + build-ubuntu-22: runs-on: ubuntu-22.04 steps: - name: Checkout repository with tags @@ -36,6 +36,13 @@ jobs: - name: CMake build run: cmake --build builds --target package -- -j4 + - name: Upload artifact for testing outside of a release + uses: actions/upload-artifact@v4 + with: + name: ubuntu22-release + path: | + builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Linux.tar.gz + - name: Publish release uses: xresloader/upload-to-github-release@v1 env: diff --git a/.github/workflows/builds-ubuntu24.yml b/.github/workflows/builds-ubuntu24.yml new file mode 100644 index 00000000..435406ec --- /dev/null +++ b/.github/workflows/builds-ubuntu24.yml @@ -0,0 +1,69 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: Ubuntu 24 KnobKraft Orm + +on: [push] + +jobs: + build-ubuntu-24: + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository with tags + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Additionally checkout submodules - don't use checkout action as it will overwrite refs + run: | + git submodule update --recursive --init --depth 1 + + - name: Install dependencies from apt-get + run: sudo apt-get -y update && sudo apt-get install -y libcurl4-openssl-dev pkg-config libtbb-dev libasound2-dev libboost-dev libgtk-3-dev libwebkit2gtk-4.1-dev libglew-dev libjack-dev libicu-dev + + - name: Select proper Python version + uses: actions/setup-python@v2 + with: + python-version: '3.12' + architecture: 'x64' + + - name: CMake configure + env: # We get the SENTRY DSN from the repository's secret store + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + shell: bash + run: | + cmake -S . -B builds -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=off -DPYTHON_VERSION_TO_EMBED=3.12 -DSENTRY_CRASH_REPORTING=ON -DSENTRY_DSN=$SENTRY_DSN + + - name: CMake build + run: | + cmake --build builds --target package -- -j4 + mv builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Linux.tar.gz builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Ubuntu24.tar.gz + + - name: Upload artifact for testing outside of a release + uses: actions/upload-artifact@v4 + with: + name: ubuntu24-release + path: | + builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Ubuntu24.tar.gz + + - name: Publish release + uses: xresloader/upload-to-github-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Ubuntu24.tar.gz + tags: true + draft: false + + - name: Setup Sentry CLI + uses: mathieu-bour/setup-sentry-cli@1.2.0 + if: startsWith(github.ref, 'refs/tags/') + with: + token: ${{ secrets.SENTRY_AUTH_TOKEN }} + organization: knobkraft + project: knobkraft + + - name: Upload PDB files to Sentry for stack unwinding when this is a tagged build + if: startsWith(github.ref, 'refs/tags/') + working-directory: builds + run: | + sentry-cli upload-dif . --log-level=debug diff --git a/.gitignore b/.gitignore index 46092cc3..2775cadc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ builds/ *__pycache__* .idea/ +.vscode/ adaptations/CompiledAdaptions.h third_party/Tools.InnoSetup.6.0.5/ builds6/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cc1119b..ab6a6842 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,9 @@ cmake_minimum_required(VERSION 3.14) -# Target a specific MacOS version (I have no idea which version I need, so let's try with Mavericks) -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X version to target for deployment") +# Target a specific MacOS version. +# JUCE 8 refuses to build for anything older than 10.11, so let's try that. +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X version to target for deployment") # For old Apple < macOS 10.15 and Linux, do not allow C++ 17 because it won't work. With the newer nlohmann::json, we can specify the C++ version to use add_compile_definitions(JSON_HAS_CPP_14) @@ -18,7 +19,8 @@ project(KnobKraft_Orm) option(ASAN "Use Address Sanitization for Debug version (Windows only for now)" OFF) # Since we also build MacOS, we need C++ 17. Which is not a bad thing. -set(CMAKE_CXX_STANDARD 17) +# Gin requests C++ 20. +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_definitions(-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING) @@ -116,15 +118,19 @@ ELSEIF(APPLE) # The JUCE font rendering is really fat on macOS, let us try to disable this flag add_definitions(-DJUCE_DISABLE_COREGRAPHICS_FONT_SMOOTHING) ELSEIF(UNIX) - # Include useful scripts for CMake - find_package(PkgConfig REQUIRED) - find_package(OpenGL) - - # These calls create special `PkgConfig::` variables - pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) - pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew) - pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0) - find_package(ICU REQUIRED data uc) + # Include useful scripts for CMake + find_package(PkgConfig REQUIRED) + find_package(OpenGL) + + # These calls create special `PkgConfig::` variables + pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew) + pkg_check_modules(WEBKIT IMPORTED_TARGET webkit2gtk-4.1) + if (NOT WEBKIT_FOUND EQUAL 1) + # If 4.1 is not available, we need 4.0 + pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0) + endif() + find_package(ICU REQUIRED data uc) ENDIF() # We need to put our own CMake helpers on the module path diff --git a/The-Orm/PatchButtonPanel.cpp b/The-Orm/PatchButtonPanel.cpp index 018591fa..f630a1c7 100644 --- a/The-Orm/PatchButtonPanel.cpp +++ b/The-Orm/PatchButtonPanel.cpp @@ -336,8 +336,8 @@ void PatchButtonPanel::resized() } } pageNumberBox.performLayout(pageNumberStrip); - auto width_label = buttonSendModeLabel_.getFont().getStringWidth(buttonSendModeLabel_.getText()); - buttonSendModeLabel_.setBounds(pageNumberStrip.removeFromLeft(width_label)); + float width_label = TextLayout::getStringWidth(buttonSendModeLabel_.getFont(), buttonSendModeLabel_.getText()); + buttonSendModeLabel_.setBounds(pageNumberStrip.removeFromLeft((int) width_label)); buttonSendMode_.setBounds(pageNumberStrip.removeFromLeft(LAYOUT_BUTTON_WIDTH + LAYOUT_INSET_NORMAL).withTrimmedLeft(LAYOUT_INSET_NORMAL)); gridSizeSliderY_.setBounds(pageNumberStrip.removeFromRight(LAYOUT_BUTTON_WIDTH + LAYOUT_SMALL_ICON_WIDTH)); gridSizeSliderX_.setBounds(pageNumberStrip.withTrimmedRight(LAYOUT_SMALL_ICON_WIDTH).removeFromRight(LAYOUT_BUTTON_WIDTH + LAYOUT_SMALL_ICON_WIDTH)); diff --git a/The-Orm/PatchListTree.cpp b/The-Orm/PatchListTree.cpp index 5da6a973..fcd21045 100644 --- a/The-Orm/PatchListTree.cpp +++ b/The-Orm/PatchListTree.cpp @@ -674,7 +674,7 @@ TreeViewNode* PatchListTree::newTreeViewItemForPatchList(midikraft::ListInfo lis // Add all patches of the dragged list to the target ist auto loaded_list = db_.getPatchList({ infos["list_id"], infos["list_name"] }, synths_); if (AlertWindow::showOkCancelBox(AlertWindow::AlertIconType::QuestionIcon, "Add list to list?" - , fmt::format("This will add all {} patches of the list '{}' to the list '{}' at the given position. Continue?", loaded_list->patches().size(), infos["list_name"], list.name + , fmt::format("This will add all {} patches of the list '{}' to the list '{}' at the given position. Continue?", loaded_list->patches().size(), (std::string) infos["list_name"], list.name ))) { for (auto& patch : loaded_list->patches()) { db_.addPatchToList(list, patch, insertIndex++); diff --git a/The-Orm/PatchTextBox.cpp b/The-Orm/PatchTextBox.cpp index c90349c4..9cba172c 100644 --- a/The-Orm/PatchTextBox.cpp +++ b/The-Orm/PatchTextBox.cpp @@ -123,7 +123,7 @@ String PatchTextBox::makeHexDocument(std::shared_ptr pat do { testLine += " 00"; testLineLength += 1; - } while (fontUsed.getStringWidth(testLine) < width - 22); + } while (TextLayout::getStringWidth(fontUsed, testLine) < width - 22); testLineLength = std::max(testLineLength-1, 1); lastLayoutedWidth_ = width; diff --git a/juce-utils b/juce-utils index 26f613a7..e529cdcd 160000 --- a/juce-utils +++ b/juce-utils @@ -1 +1 @@ -Subproject commit 26f613a70c565948ee487a0fd7f57ea1844373a1 +Subproject commit e529cdcd29a7bd544416eb1c3fdedfa1bf179aa3 diff --git a/juce-widgets b/juce-widgets index 2e244a07..431b7c0e 160000 --- a/juce-widgets +++ b/juce-widgets @@ -1 +1 @@ -Subproject commit 2e244a076b863a5249094d5e17729b884c2ffd4c +Subproject commit 431b7c0e8dd12898849159ddc093ce3d03d0b023 diff --git a/synths/kawai-k3/KawaiK3_BCR2000.cpp b/synths/kawai-k3/KawaiK3_BCR2000.cpp index fdc9be93..f13503d9 100644 --- a/synths/kawai-k3/KawaiK3_BCR2000.cpp +++ b/synths/kawai-k3/KawaiK3_BCR2000.cpp @@ -13,6 +13,7 @@ #include "KawaiK3WaveParameter.h" #include +#include "SpdLogJuce.h" namespace midikraft { @@ -140,7 +141,7 @@ namespace midikraft { " .showvalue on\n" " .resolution {} {} {} {}\n" , number_ , paramDef->name() - , (knobkraftChannel + 1) , paramDef->paramNo() , 0 , paramDef->maxValue() + , (knobkraftChannel + 1) , (int)paramDef->paramNo() , 0 , paramDef->maxValue() //% (channel & 0x0f) % param_ //% paramDef->maxValue() , 0 , BCRdefinition::ledMode(ledMode_) diff --git a/third_party/Gin b/third_party/Gin index 3e5ef727..916b26a5 160000 --- a/third_party/Gin +++ b/third_party/Gin @@ -1 +1 @@ -Subproject commit 3e5ef727aab0562cefe6956f09461571a0f7d3ad +Subproject commit 916b26a52fbb2dd54975e4e3c32184be402c20e9 diff --git a/third_party/JUCE b/third_party/JUCE index ae514483..5179f4e7 160000 --- a/third_party/JUCE +++ b/third_party/JUCE @@ -1 +1 @@ -Subproject commit ae5144833e852815d61642af87c69b9db44984f7 +Subproject commit 5179f4e720d8406ebd1b5401c86aea8da6cc83c9 diff --git a/third_party/SQLiteCpp b/third_party/SQLiteCpp index bd5bf799..08aa70a4 160000 --- a/third_party/SQLiteCpp +++ b/third_party/SQLiteCpp @@ -1 +1 @@ -Subproject commit bd5bf7996adaafad736ec5b4a185e9822edbe95c +Subproject commit 08aa70a45ea52abcd8ee6b5d1ab1542140b3c7f5 diff --git a/third_party/fmt b/third_party/fmt index a3370119..0c9fce2f 160000 --- a/third_party/fmt +++ b/third_party/fmt @@ -1 +1 @@ -Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50 +Subproject commit 0c9fce2ffefecfdce794e1859584e25877b7b592 diff --git a/third_party/json b/third_party/json index bc889afb..9cca280a 160000 --- a/third_party/json +++ b/third_party/json @@ -1 +1 @@ -Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d +Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03 diff --git a/third_party/json-schema-validator b/third_party/json-schema-validator index 6b17782d..349cba9f 160000 --- a/third_party/json-schema-validator +++ b/third_party/json-schema-validator @@ -1 +1 @@ -Subproject commit 6b17782d6a5d1dee5d2c4fc5d25ffb1123913431 +Subproject commit 349cba9f7e3cb423bbc1811bdd9f6770f520b468 diff --git a/third_party/pybind11 b/third_party/pybind11 index 3e9dfa28..941f45bc 160000 --- a/third_party/pybind11 +++ b/third_party/pybind11 @@ -1 +1 @@ -Subproject commit 3e9dfa2866941655c56877882565e7577de6fc7b +Subproject commit 941f45bcb51457884fa1afd6e24a67377d70f75c diff --git a/third_party/sentry-native b/third_party/sentry-native index 9bc0fc75..bf14b853 160000 --- a/third_party/sentry-native +++ b/third_party/sentry-native @@ -1 +1 @@ -Subproject commit 9bc0fc75e34cb43e7019d76b0decb6c0cddbfd34 +Subproject commit bf14b8533a3b26853e4e6fecf2f955deaa29e2d8 diff --git a/third_party/spdlog b/third_party/spdlog index ad0e89cb..51a0deca 160000 --- a/third_party/spdlog +++ b/third_party/spdlog @@ -1 +1 @@ -Subproject commit ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36 +Subproject commit 51a0deca2c825f1d4461655a18bb37d6df76646d