From 1f4aea18deefa5db70ec2edc6532143f1463164f Mon Sep 17 00:00:00 2001 From: David Braun <2096055+DBraun@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:41:10 -0400 Subject: [PATCH] fix issue for 2023 builds (#23) --- CMakeLists.txt | 12 +++++++----- src/ChucKDesignerCHOP.cpp | 12 +++--------- src/ChucKListenerCHOP.cpp | 9 ++------- thirdparty/TouchDesigner/CPlusPlus_Common.h | 9 +++++---- 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1844f69..0aadd2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,7 +220,7 @@ add_library(ChucKDesignerCHOP MODULE ${CMAKE_CURRENT_SOURCE_DIR}/src/ChucKDesignerCHOP.cpp ${TOUCHDESIGNER_SOURCES} ) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) set_target_properties(${PROJECT_NAME} PROPERTIES BUNDLE true BUNDLE_EXTENSION "plugin" @@ -297,18 +297,20 @@ add_custom_command(TARGET ${PROJECT_NAME} ) else() +# These two are for renaming what GitHub actions produces add_custom_command(TARGET ChucKDesignerCHOP POST_BUILD - COMMAND install_name_tool -change /Library/Frameworks/Python.framework/Versions/${PYTHONVER}/Python $ENV{TOUCHDESIGNER_APP}/Contents/Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" + COMMAND install_name_tool -change /Library/Frameworks/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" ) add_custom_command(TARGET ChucKListenerCHOP POST_BUILD - COMMAND install_name_tool -change /Library/Frameworks/Python.framework/Versions/${PYTHONVER}/Python $ENV{TOUCHDESIGNER_APP}/Contents/Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" + COMMAND install_name_tool -change /Library/Frameworks/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" ) +# These two are for renaming what an ordinary mac produces add_custom_command(TARGET ChucKDesignerCHOP POST_BUILD - COMMAND install_name_tool -change @rpath/Python.framework/Versions/${PYTHONVER}/Python $ENV{TOUCHDESIGNER_APP}/Contents/Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" + COMMAND install_name_tool -change @rpath/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" ) add_custom_command(TARGET ChucKListenerCHOP POST_BUILD - COMMAND install_name_tool -change @rpath/Python.framework/Versions/${PYTHONVER}/Python $ENV{TOUCHDESIGNER_APP}/Contents/Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" + COMMAND install_name_tool -change @rpath/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$" ) # libChucKDesignerShared replacements diff --git a/src/ChucKDesignerCHOP.cpp b/src/ChucKDesignerCHOP.cpp index aa8b420..76e7217 100644 --- a/src/ChucKDesignerCHOP.cpp +++ b/src/ChucKDesignerCHOP.cpp @@ -20,15 +20,9 @@ #include #include "chuck_globals.h" -#ifdef _WIN32 - #include - #include - #include -#else - #include - #include - #include -#endif +#include +#include +#include #define FAIL_IN_CUSTOM_OPERATOR_METHOD Py_INCREF(Py_None);return Py_None; diff --git a/src/ChucKListenerCHOP.cpp b/src/ChucKListenerCHOP.cpp index 34aa43e..4d3f8e9 100644 --- a/src/ChucKListenerCHOP.cpp +++ b/src/ChucKListenerCHOP.cpp @@ -22,13 +22,8 @@ //#include -#ifdef _WIN32 - #include - #include -#else - #include - #include -#endif +#include +#include const char* PythonCallbacksDATStubs = "# This is an example callbacks DAT for a ChucK Listener Operator.\n" diff --git a/thirdparty/TouchDesigner/CPlusPlus_Common.h b/thirdparty/TouchDesigner/CPlusPlus_Common.h index 1be640d..fb69424 100755 --- a/thirdparty/TouchDesigner/CPlusPlus_Common.h +++ b/thirdparty/TouchDesigner/CPlusPlus_Common.h @@ -103,6 +103,10 @@ enum class OP_PixelFormat : int32_t MonoA16Float, MonoA32Float, + // RGBX, Alpha channel is ignored, will be treated a 1.0 for operations. + RGBX16Float = 500, + RGBX32Float, + // sRGB. use SBGRA if possible since that's what most GPUs use SBGRA8Fixed = 600, SRGBA8Fixed, @@ -467,10 +471,7 @@ class OP_NodeInfo // Used to do other operations to the node such as call python callbacks OP_Context* context; - // The number of times this node has cooked. Incremented at the start of the cook. - uint32_t cookCount; - - int32_t reserved[14]; + int32_t reserved[15]; }; class OP_DATInput