diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml index 2d6a440..58de9d6 100644 --- a/.github/workflows/build-plugin.yml +++ b/.github/workflows/build-plugin.yml @@ -63,7 +63,7 @@ jobs: - name: Build release version if: github.event_name != 'pull_request' run: | - cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release + cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release -DCOPY_AFTER_BUILD=FALSE cmake --build ./build --config Release --target six-sines_all --parallel 3 - name: Make windows zip @@ -72,8 +72,12 @@ jobs: mkdir build/inst mkdir build/insttmp mv build/CLAP/*.clap build/insttmp - mv build/VST3/*.vst3 build/insttmp + mv build/*.vst3 build/insttmp mv build/*.exe build/insttmp + + pushd build/insttmp + ls -al + popd 7z a -r build/inst/six-sines-windows-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.zip build/insttmp/* @@ -117,7 +121,7 @@ jobs: - name: Configure pull request version if: github.event_name == 'pull_request' run: | - cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug + cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug -DCOPY_AFTER_BUILD=FALSE - name: Build pull request version if: github.event_name == 'pull_request' diff --git a/CMakeLists.txt b/CMakeLists.txt index 1924e75..6cf9771 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,22 +5,23 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15 CACHE STRING "Build for 10.15") set(CMAKE_POSITION_INDEPENDENT_CODE ON) +## This could be a function in plugin infra string(TIMESTAMP DAY_OF_YEAR "%j") string(TIMESTAMP YEAR "%Y") math(EXPR PART0 "${YEAR}-2023 + 2") math(EXPR PART1 "${DAY_OF_YEAR}/2") message(STATUS "Using date-driven version starting with '0'. 0.${PART0}.${PART1}.0") +## end function in plugin infra project(six-sines VERSION 0.${PART0}.${PART1}.0 LANGUAGES C CXX) - set(PRODUCT_NAME "Six Sines") -# use asan as an option (currently mac only) + option(USE_SANITIZER "Build and link with ASAN" FALSE) option(COPY_AFTER_BUILD "Will copy after build" TRUE) - include(cmake/compile-options.cmake) +## THis can be way better, and go to plugin infra file(READ ${CMAKE_SOURCE_DIR}/VERSION VERSION_FILE) string(STRIP ${VERSION_FILE} VERSION_FILE) message(STATUS "Version is ${VERSION_FILE}") @@ -39,6 +40,7 @@ else () endif () message(STATUS "Compiling with git hash ${BUILD_HASH}") +## End of way better in plugin infra bit include(cmake/CmakeRC.cmake) file(GLOB_RECURSE PATCHES "resources/factory_patches/*.sxsnp") @@ -101,80 +103,30 @@ target_link_libraries(${PROJECT_NAME}-impl PRIVATE samplerate ) -# Hmm - why do I need this? -add_compile_definitions(CLAP_WRAPPER_LOGLEVEL=0) - -set(CLAP_TARGET ${PROJECT_NAME}_clap) -add_library(${CLAP_TARGET} MODULE - src/clap/six-sines-clap-entry.cpp -) -target_link_libraries(${CLAP_TARGET} ${PROJECT_NAME}-impl) -target_library_make_clap(TARGET ${CLAP_TARGET} - CLAP_NAME "${PRODUCT_NAME}" - CLAP_MACOS_BUNDLE_IDENTIFIER org.baconpaul.six-sines.clap - CLAP_MACOS_BUNDLE_VERSION ${PROJECT_VERSION} - COPY_AFTER_BUILD TRUE -) -set_target_properties(${CLAP_TARGET} PROPERTIES BUNDLE TRUE MACOSX_BUNDLE TRUE) +make_clapfirst_plugins( + TARGET_NAME ${PROJECT_NAME} + IMPL_TARGET ${PROJECT_NAME}-impl -set(VST3_TARGET ${PROJECT_NAME}_vst3) -add_library(${VST3_TARGET} MODULE) -target_sources(${VST3_TARGET} PRIVATE src/clap/six-sines-clap-entry.cpp) -target_link_libraries(${VST3_TARGET} PRIVATE ${PROJECT_NAME}-impl) -target_add_vst3_wrapper(TARGET ${VST3_TARGET} OUTPUT_NAME "${PRODUCT_NAME}" - SUPPORTS_ALL_NOTE_EXPRESSIONS TRUE -) -if (WIN32) - # Question - do we want this default in the helpers - set_target_properties(${VST3_TARGET} - PROPERTIES - LIBRARY_OUTPUT_DIRECTORY VST3 - ) -endif() -if (${COPY_AFTER_BUILD}) - target_vst3_copy_after_build(TARGET ${VST3_TARGET}) -endif() - -if (APPLE) - set(AUV2_TARGET ${PROJECT_NAME}_auv2) - add_library(${AUV2_TARGET} MODULE) - target_sources(${AUV2_TARGET} PRIVATE src/clap/six-sines-clap-entry.cpp) - target_link_libraries(${AUV2_TARGET} PRIVATE ${PROJECT_NAME}-impl) - message(STATUS "Adding AUv2 with ${PROJECT_VERSION}") - target_add_auv2_wrapper( - TARGET ${AUV2_TARGET} - OUTPUT_NAME "${PRODUCT_NAME}" - BUNDLE_IDENTIFIER "org.baconpaul.six-sines.auv2" - BUNDLE_VERSION ${PROJECT_VERSION} - - CLAP_TARGET_FOR_CONFIG ${PROJECT_NAME}_clap - ) - if (${COPY_AFTER_BUILD}) - message(STATUS "ifm: will install auv2") - target_auv2_copy_after_build(TARGET ${AUV2_TARGET}) - endif() -endif() + ENTRY_SOURCE src/clap/six-sines-clap-entry.cpp + BUNDLE_IDENTIFER "org.baconpaul.six-sines" + BUNDLE_VERSION ${PROJECT_VERSION} -set(sat ${PROJECT_NAME}_standalone) -add_executable(${sat}) -target_sources(${sat} PRIVATE src/clap/six-sines-clap-entry.cpp) -target_link_libraries(${sat} PRIVATE ${PROJECT_NAME}-impl) -target_add_standalone_wrapper(TARGET ${sat} - OUTPUT_NAME "${PRODUCT_NAME}" - STATICALLY_LINKED_CLAP_ENTRY True - MACOS_ICON "${CMAKE_SOURCE_DIR}/resources/mac_installer/Icon.icns" - PLUGIN_ID "org.baconpaul.six-sines") - -add_custom_target(${PROJECT_NAME}_all) -add_dependencies(${PROJECT_NAME}_all - ${PROJECT_NAME}_clap - ${PROJECT_NAME}_standalone - ${PROJECT_NAME}_vst3 + COPY_AFTER_BUILD ${COPY_AFTER_BUILD} + + PLUGIN_FORMATS CLAP VST3 AUV2 + + # You can add a target-per-standalone you want. Syntax here is + # target-postfix output-name clap-id + # This allows you to make multiple standalones from a multi-plugin clap + STANDALONE_CONFIGURATIONS + standalone "${PRODUCT_NAME}" "org.baconpaul.six-sines" + + STANDALONE_MACOS_ICON "${CMAKE_SOURCE_DIR}/resources/mac_installer/Icon.icns" ) -if (APPLE) - add_dependencies(${PROJECT_NAME}_all ${PROJECT_NAME}_auv2) -endif() + + + diff --git a/libs/clap-libs/clap-wrapper b/libs/clap-libs/clap-wrapper index 924295f..4dbddb0 160000 --- a/libs/clap-libs/clap-wrapper +++ b/libs/clap-libs/clap-wrapper @@ -1 +1 @@ -Subproject commit 924295f43baf33cd3eee9a1f6c59377ff5ff41bf +Subproject commit 4dbddb03e49f1170b1fb10636be488271e5f92a9 diff --git a/resources/factory_patches/Keys/UpDown Funker.sxsnp b/resources/factory_patches/Keys/UpDown Funker.sxsnp new file mode 100644 index 0000000..54c0f39 --- /dev/null +++ b/resources/factory_patches/Keys/UpDown Funker.sxsnp @@ -0,0 +1 @@ +

\ No newline at end of file