From 916b67cb99106a160de265ee31da31b43c5454db Mon Sep 17 00:00:00 2001 From: Christof Date: Tue, 8 Oct 2024 00:28:32 +0200 Subject: [PATCH 01/19] [JUCE] Jump to Juce 8 from Juce 7. Add an Ubuntu 24.04 build machine to see how far we can get. --- .github/workflows/builds-ubuntu24.yml | 60 +++++++++++++++++++++++++++ third_party/JUCE | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/builds-ubuntu24.yml diff --git a/.github/workflows/builds-ubuntu24.yml b/.github/workflows/builds-ubuntu24.yml new file mode 100644 index 00000000..84bb4504 --- /dev/null +++ b/.github/workflows/builds-ubuntu24.yml @@ -0,0 +1,60 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: Ubuntu KnobKraft Orm + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-22.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.0-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 + + - name: Publish release + uses: xresloader/upload-to-github-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Linux.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/third_party/JUCE b/third_party/JUCE index ae514483..7e73ed7c 160000 --- a/third_party/JUCE +++ b/third_party/JUCE @@ -1 +1 @@ -Subproject commit ae5144833e852815d61642af87c69b9db44984f7 +Subproject commit 7e73ed7c36d8f61c996b9ca2e6d99b965a0ec62a From a0eb042894517e2501da8e94f22b8c7c018eb4dc Mon Sep 17 00:00:00 2001 From: Christof Date: Tue, 8 Oct 2024 00:30:12 +0200 Subject: [PATCH 02/19] [Linux] Update to webgtk 4.1 for Ubuntu 24.04 --- .github/workflows/builds-ubuntu24.yml | 4 ++-- CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/builds-ubuntu24.yml b/.github/workflows/builds-ubuntu24.yml index 84bb4504..698ff5d8 100644 --- a/.github/workflows/builds-ubuntu24.yml +++ b/.github/workflows/builds-ubuntu24.yml @@ -6,7 +6,7 @@ on: [push] jobs: build-linux: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout repository with tags uses: actions/checkout@v2 @@ -18,7 +18,7 @@ jobs: 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.0-dev libglew-dev libjack-dev libicu-dev + 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cc1119b..075e611f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,7 @@ ELSEIF(UNIX) # 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) + pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.1) find_package(ICU REQUIRED data uc) ENDIF() From cb420898a2e1a1ee4c4fb9020c8e511bfbd0f267 Mon Sep 17 00:00:00 2001 From: Christof Date: Tue, 8 Oct 2024 00:34:54 +0200 Subject: [PATCH 03/19] [Linux] Change the names of the two Ubuntu build machines --- .github/workflows/builds-ubuntu.yml | 4 ++-- .github/workflows/builds-ubuntu24.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/builds-ubuntu.yml b/.github/workflows/builds-ubuntu.yml index 84bb4504..bda9db16 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 diff --git a/.github/workflows/builds-ubuntu24.yml b/.github/workflows/builds-ubuntu24.yml index 698ff5d8..176c21f0 100644 --- a/.github/workflows/builds-ubuntu24.yml +++ b/.github/workflows/builds-ubuntu24.yml @@ -1,11 +1,11 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json -name: Ubuntu KnobKraft Orm +name: Ubuntu 24 KnobKraft Orm on: [push] jobs: - build-linux: + build-ubuntu-24: runs-on: ubuntu-24.04 steps: - name: Checkout repository with tags From 96953e78ee5c1b950e02549d6206c19f1b6f9fa4 Mon Sep 17 00:00:00 2001 From: Christof Date: Wed, 9 Oct 2024 00:09:11 +0200 Subject: [PATCH 04/19] Trying to fix Ubuntu 22, and upload artifacts of a successful build for testing --- .github/workflows/builds-ubuntu.yml | 7 +++++++ .github/workflows/builds-ubuntu24.yml | 7 +++++++ CMakeLists.txt | 22 +++++++++++++--------- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/builds-ubuntu.yml b/.github/workflows/builds-ubuntu.yml index bda9db16..fadebd4e 100644 --- a/.github/workflows/builds-ubuntu.yml +++ b/.github/workflows/builds-ubuntu.yml @@ -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 index 176c21f0..ec37a74b 100644 --- a/.github/workflows/builds-ubuntu24.yml +++ b/.github/workflows/builds-ubuntu24.yml @@ -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: ubuntu24-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/CMakeLists.txt b/CMakeLists.txt index 075e611f..e10e36f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,15 +116,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.1) - 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 From c18a95f1666641e3be2a710c9befb526b4667a9d Mon Sep 17 00:00:00 2001 From: Christof Date: Wed, 9 Oct 2024 00:18:31 +0200 Subject: [PATCH 05/19] [Mac] Bump version minimum to 10.11, as JUCE does not seem to support older versions anymore. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e10e36f6..34c38208 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) From 667baa27ed9e2a4e92925ecb141205284f0717c5 Mon Sep 17 00:00:00 2001 From: Christof Date: Wed, 9 Oct 2024 00:22:43 +0200 Subject: [PATCH 06/19] [JUCE] Update juce-widgets to match JUCE 8 --- juce-widgets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 79ddb814874c61970e0427ee39c0ce5d8cd8a17c Mon Sep 17 00:00:00 2001 From: Christof Date: Wed, 9 Oct 2024 00:29:39 +0200 Subject: [PATCH 07/19] [Linux] Avoid name collision of Ubuntu 22 and Ubuntu 24 versions. --- .github/workflows/builds-ubuntu24.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/builds-ubuntu24.yml b/.github/workflows/builds-ubuntu24.yml index ec37a74b..435406ec 100644 --- a/.github/workflows/builds-ubuntu24.yml +++ b/.github/workflows/builds-ubuntu24.yml @@ -34,21 +34,23 @@ jobs: 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 + 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}}-Linux.tar.gz + 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}}-Linux.tar.gz + file: builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Ubuntu24.tar.gz tags: true draft: false From cedacb8a9b3090e263aa90623228b7664cdd8d06 Mon Sep 17 00:00:00 2001 From: salzaverde Date: Mon, 28 Oct 2024 11:02:03 +0100 Subject: [PATCH 08/19] [JUCE] Replace deprecated juce::Font::getStringWidth calls with recommended juce::TextLayout::getStringWidth calls in order to fix mac builds --- .gitignore | 1 + The-Orm/PatchButtonPanel.cpp | 2 +- The-Orm/PatchTextBox.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c959e50a..eb156d1f 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/The-Orm/PatchButtonPanel.cpp b/The-Orm/PatchButtonPanel.cpp index 2ef4dcbd..d93decfd 100644 --- a/The-Orm/PatchButtonPanel.cpp +++ b/The-Orm/PatchButtonPanel.cpp @@ -333,7 +333,7 @@ void PatchButtonPanel::resized() } } pageNumberBox.performLayout(pageNumberStrip); - auto width_label = buttonSendModeLabel_.getFont().getStringWidth(buttonSendModeLabel_.getText()); + auto width_label = TextLayout::getStringWidth(buttonSendModeLabel_.getFont(), buttonSendModeLabel_.getText()); buttonSendModeLabel_.setBounds(pageNumberStrip.removeFromLeft(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)); 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; From 4d10da542c5cb586d49af3a5e59b62b1c6def491 Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:20:01 +0100 Subject: [PATCH 09/19] Fix Windows build --- The-Orm/PatchButtonPanel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/The-Orm/PatchButtonPanel.cpp b/The-Orm/PatchButtonPanel.cpp index 993f4e98..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 = TextLayout::getStringWidth(buttonSendModeLabel_.getFont(), 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)); From a3edf27eaafed73e34ab0943063ff3d393b20c51 Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:27:43 +0100 Subject: [PATCH 10/19] Update to SQLiteCPP to release 3.2.0 --- third_party/SQLiteCpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4a4c5db62a861aa5c22048a1c7b5125ffc887cf1 Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:35:08 +0100 Subject: [PATCH 11/19] Update spdlog to 1.15.0 --- third_party/spdlog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From f99736b94a8bdd4a893cb2e45cb0d6e7c4c9e32a Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:38:07 +0100 Subject: [PATCH 12/19] Update sentry-native to 0.7.12 --- third_party/sentry-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From f00652d0e57b4f7747153c6dc7685db3ecddfa52 Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:40:08 +0100 Subject: [PATCH 13/19] Update pybind to 2.13.1 --- third_party/pybind11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0201ee36ef1953412f3b6fce70cf821f6be6af85 Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:43:01 +0100 Subject: [PATCH 14/19] Set JUCE release to 8.0.3 --- third_party/JUCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/JUCE b/third_party/JUCE index 7e73ed7c..5179f4e7 160000 --- a/third_party/JUCE +++ b/third_party/JUCE @@ -1 +1 @@ -Subproject commit 7e73ed7c36d8f61c996b9ca2e6d99b965a0ec62a +Subproject commit 5179f4e720d8406ebd1b5401c86aea8da6cc83c9 From 0519f37476eeb995aa9b8d6163f7d6a13755432a Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:45:52 +0100 Subject: [PATCH 15/19] Use json schema validator 2.3.0 --- third_party/json-schema-validator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 40ba9fdeb83cf6a171754b458dce109cfdc6bf56 Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:48:30 +0100 Subject: [PATCH 16/19] Update nlohmann json to 3.11.3 --- third_party/json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 401b4dcfd90d78bd1c85d25f888855270b046b9b Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:52:06 +0100 Subject: [PATCH 17/19] Update Gin --- third_party/Gin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4d5b0022c33eddc2312c8a85c5bdbbc2c8400160 Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 14:55:06 +0100 Subject: [PATCH 18/19] Update fmt to 11.0.2 --- third_party/fmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From edaa9618f11afd737701ca5893c0349695526feb Mon Sep 17 00:00:00 2001 From: Christof Date: Sun, 10 Nov 2024 15:37:38 +0100 Subject: [PATCH 19/19] Update to C++ 20 for gin, and fix formatting issues with the new fmt library. --- CMakeLists.txt | 3 ++- The-Orm/PatchListTree.cpp | 2 +- juce-utils | 2 +- synths/kawai-k3/KawaiK3_BCR2000.cpp | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34c38208..ab6a6842 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,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) 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/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/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_)