Skip to content

Commit

Permalink
fix issue for 2023 builds (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
DBraun authored Apr 7, 2024
1 parent 3a72c74 commit 1f4aea1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 25 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 "$<TARGET_FILE:ChucKDesignerCHOP>"
COMMAND install_name_tool -change /Library/Frameworks/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$<TARGET_FILE:ChucKDesignerCHOP>"
)
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 "$<TARGET_FILE:ChucKListenerCHOP>"
COMMAND install_name_tool -change /Library/Frameworks/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$<TARGET_FILE:ChucKListenerCHOP>"
)

# 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 "$<TARGET_FILE:ChucKDesignerCHOP>"
COMMAND install_name_tool -change @rpath/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$<TARGET_FILE:ChucKDesignerCHOP>"
)
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 "$<TARGET_FILE:ChucKListenerCHOP>"
COMMAND install_name_tool -change @rpath/Python.framework/Versions/${PYTHONVER}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHONVER}/Python "$<TARGET_FILE:ChucKListenerCHOP>"
)

# libChucKDesignerShared replacements
Expand Down
12 changes: 3 additions & 9 deletions src/ChucKDesignerCHOP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,9 @@
#include <assert.h>
#include "chuck_globals.h"

#ifdef _WIN32
#include <Python.h>
#include <structmember.h>
#include <unicodeobject.h>
#else
#include <Python/Python.h>
#include <Python/structmember.h>
#include <Python/unicodeobject.h>
#endif
#include <Python.h>
#include <structmember.h>
#include <unicodeobject.h>

#define FAIL_IN_CUSTOM_OPERATOR_METHOD Py_INCREF(Py_None);return Py_None;

Expand Down
9 changes: 2 additions & 7 deletions src/ChucKListenerCHOP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@

//#include <vector>

#ifdef _WIN32
#include <Python.h>
#include <structmember.h>
#else
#include <Python/Python.h>
#include <Python/structmember.h>
#endif
#include <Python.h>
#include <structmember.h>

const char* PythonCallbacksDATStubs =
"# This is an example callbacks DAT for a ChucK Listener Operator.\n"
Expand Down
9 changes: 5 additions & 4 deletions thirdparty/TouchDesigner/CPlusPlus_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1f4aea1

Please sign in to comment.