diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index acf9aa9c..068e9f47 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -34,17 +34,17 @@ jobs: - name: "windows clap first" os: windows-latest - target: scxt_clapfirst_all + target: shortcircuit-installer cmakeConfig: -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DSCXT_JUCE_CLASSIC_STYLE=FALSE runTests: false - name: "mac clap first" os: macos-latest - target: scxt_clapfirst_all + target: shortcircuit-installer cmakeConfig: -DSCXT_JUCE_CLASSIC_STYLE=FALSE runTests: false - name: "ubuntu clap first" os: ubuntu-latest - target: scxt_clapfirst_all + target: shortcircuit-installer cmakeConfig: -DSCXT_JUCE_CLASSIC_STYLE=FALSE runTests: false diff --git a/clients/clap-first/CMakeLists.txt b/clients/clap-first/CMakeLists.txt index 36d8a022..2a9342e5 100644 --- a/clients/clap-first/CMakeLists.txt +++ b/clients/clap-first/CMakeLists.txt @@ -1,5 +1,6 @@ project(scxt_clapfirst) +set(name "Shortcircuit XT") set(IMPL_TARGET ${PROJECT_NAME}_impl) add_library(${IMPL_TARGET} STATIC clap-config.cpp scxt-plugin/scxt-plugin.cpp) @@ -17,36 +18,37 @@ target_link_libraries(${IMPL_TARGET} PUBLIC target_include_directories(${IMPL_TARGET} PUBLIC .) -set(CLAP_TARGET ${PROJECT_NAME}_clap) +set(CLAP_TARGET ${PROJECT_NAME}_CLAP) add_library(${CLAP_TARGET} MODULE scxt-clap-entry.cpp) target_link_libraries(${CLAP_TARGET} PUBLIC ${IMPL_TARGET}) target_library_make_clap(TARGET ${CLAP_TARGET} - CLAP_NAME "Shortcircuit XT Clap First" + CLAP_NAME ${name} CLAP_MACOS_BUNDLE_IDENTIFIER "org.surge-synth-team.scxt.clap_first.clap" CLAP_MACOS_BUNDLE_VERSION "0.0.1" COPY_AFTER_BUILD ${SCXT_COPY_PLUGIN_AFTER_BUILD} ) -set(VST3_TARGET ${PROJECT_NAME}_vst3) +set(VST3_TARGET ${PROJECT_NAME}_VST3) add_library(${VST3_TARGET} MODULE scxt-clap-entry.cpp) target_link_libraries(${VST3_TARGET} PUBLIC ${IMPL_TARGET}) target_add_vst3_wrapper(TARGET ${VST3_TARGET} - OUTPUT_NAME "Shortcircuit XT Clap First" + OUTPUT_NAME ${name} SUPPORTS_ALL_NOTE_EXPRESSIONS TRUE + WINDOWS_FOLDER_VST3 TRUE ) if (${SCXT_COPY_PLUGIN_AFTER_BUILD}) target_vst3_copy_after_build(TARGET ${VST3_TARGET}) endif() if (APPLE) - set(AUV2_TARGET ${PROJECT_NAME}_auv2) + set(AUV2_TARGET ${PROJECT_NAME}_AU) add_library(${AUV2_TARGET} MODULE) target_sources(${AUV2_TARGET} PRIVATE scxt-clap-entry.cpp) target_link_libraries(${AUV2_TARGET} PRIVATE ${IMPL_TARGET}) target_add_auv2_wrapper( TARGET ${AUV2_TARGET} - OUTPUT_NAME "Shortcircuit XT Clap First" + OUTPUT_NAME ${name} BUNDLE_IDENTIFIER "org.surge-synth-team.scxt.clap_first.auv2" BUNDLE_VERSION 0.0.1 @@ -57,8 +59,10 @@ if (APPLE) endif() endif() -set(SA_TARGET ${PROJECT_NAME}_standalone) +set(SA_TARGET ${PROJECT_NAME}_Standalone) add_executable(${SA_TARGET} MACOSX_BUNDLE WIN32) +set_target_properties(${SA_TARGET} PROPERTIES + OUTPUT_NAME ${name}) target_sources(${SA_TARGET} PRIVATE scxt-juce-standalone/scxt-juce-standalone.cpp) target_link_libraries(${SA_TARGET} PRIVATE ${IMPL_TARGET} juce::juce_audio_devices juce::juce_audio_utils) target_compile_definitions(${SA_TARGET} PRIVATE JUCE_USE_FLAC=0) @@ -66,7 +70,7 @@ target_compile_definitions(${SA_TARGET} PRIVATE JUCE_USE_FLAC=0) #add_executable(${SA_TARGET} scxt-clap-entry.cpp) #target_link_libraries(${SA_TARGET} PRIVATE ${IMPL_TARGET}) #target_add_standalone_wrapper(TARGET ${SA_TARGET} -# OUTPUT_NAME "Shortcircuit XT Clap First" +# OUTPUT_NAME ${name} # STATICALLY_LINKED_CLAP_ENTRY True # PLUGIN_ID "org.surge-synth-team.scxt.clap-first.scxt-plugin") @@ -75,4 +79,6 @@ add_custom_target(${ALL_TARGET}) add_dependencies(${ALL_TARGET} ${CLAP_TARGET} ${SA_TARGET} ${VST3_TARGET}) if (APPLE) add_dependencies(${ALL_TARGET} ${AUV2_TARGET}) -endif() \ No newline at end of file +endif() + +set_target_properties(${ALL_TARGET} PROPERTIES ARTEFACT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/cmake/basic-installer.cmake b/cmake/basic-installer.cmake index dc0a1e7b..5e92575f 100644 --- a/cmake/basic-installer.cmake +++ b/cmake/basic-installer.cmake @@ -13,7 +13,7 @@ file(MAKE_DIRECTORY ${SCXT_PRODUCT_DIR}) add_custom_target(shortcircuit-products ALL) add_custom_target(shortcircuit-installer) -function(shortcircuit_package format) +function(shortcircuit_package format suffix) if (TARGET scxt_plugin) get_target_property(output_dir scxt_plugin RUNTIME_OUTPUT_DIRECTORY) @@ -29,18 +29,71 @@ function(shortcircuit_package format) ) endif () endif() + + if (TARGET scxt_clapfirst_all) + get_target_property(output_dir scxt_clapfirst_all ARTEFACT_DIRECTORY) + + if (TARGET scxt_clapfirst_${format}) + get_target_property(output_name scxt_clapfirst_${format} LIBRARY_OUTPUT_NAME) + if( ${output_name} STREQUAL "output_name-NOTFOUND") + get_target_property(output_name scxt_clapfirst_${format} OUTPUT_NAME) + endif() + + add_dependencies(shortcircuit-products scxt_clapfirst_${format}) + + set(isdir 0) + if (APPLE) + set(isdir 1) + set(target_to_root "../../..") + else() + if ("${suffix}" STREQUAL ".vst3") + set(isdir 1) + set(target_to_root "../../..") + endif() + endif() + + message(STATUS "Adding scxt_clapfirst_${format} to installer from '${output_name}${suffix}'") + + if (${isdir} EQUAL 1) + add_custom_command( + TARGET shortcircuit-products + POST_BUILD + USES_TERMINAL + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND echo "Installing directory '${output_name}${suffix}' to ${SCXT_PRODUCT_DIR}" + COMMAND ${CMAKE_COMMAND} -E copy_directory "$/${target_to_root}/${output_name}${suffix}" "${SCXT_PRODUCT_DIR}/${output_name}${suffix}" + ) + else() + add_custom_command( + TARGET shortcircuit-products + POST_BUILD + USES_TERMINAL + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND echo "Installing file '${output_dir}/${output_name}${suffix}' to ${SCXT_PRODUCT_DIR}" + COMMAND ${CMAKE_COMMAND} -E copy "$" "${SCXT_PRODUCT_DIR}/" + + ) + endif() + endif() + endif() endfunction() -shortcircuit_package(VST3) -shortcircuit_package(VST) -shortcircuit_package(LV2) -shortcircuit_package(AU) -shortcircuit_package(CLAP) -shortcircuit_package(Standalone) +shortcircuit_package(VST3 ".vst3") +shortcircuit_package(AU ".component") +shortcircuit_package(CLAP ".clap") +if (APPLE) + shortcircuit_package(Standalone ".app") +elseif (UNIX) + shortcircuit_package(Standalone "") +else() + shortcircuit_package(Standalone ".exe") +endif() if (WIN32) - message(STATUS "Including special Windows cleanup installer stage") - add_custom_command(TARGET shortcircuit-products + if (TARGET scxt_plugin) + + message(STATUS "Including special Windows cleanup installer stage") + add_custom_command(TARGET shortcircuit-products POST_BUILD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${CMAKE_COMMAND} -E echo "Cleaning up Windows goobits" @@ -49,6 +102,7 @@ if (WIN32) COMMAND ${CMAKE_COMMAND} -E rm -f "${SCXT_PRODUCT_DIR}/Shortcircuit XT.lib" COMMAND ${CMAKE_COMMAND} -E rm -f "${SCXT_PRODUCT_DIR}/Shortcircuit XT.pdb" ) + endif() endif () add_dependencies(shortcircuit-installer shortcircuit-products) diff --git a/cmake/compiler-and-git.cmake b/cmake/compiler-and-git.cmake index 1cf10229..a0dd4b31 100644 --- a/cmake/compiler-and-git.cmake +++ b/cmake/compiler-and-git.cmake @@ -61,7 +61,6 @@ else () if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") set(OS_COMPILE_OPTIONS - /arch:SSE42 /wd4244 # convert float from double /wd4305 # truncate from double to float /wd4018 # signed unsigned compare diff --git a/src-ui/components/multi/MappingPane.cpp b/src-ui/components/multi/MappingPane.cpp index 60cb23fe..f7450c2b 100644 --- a/src-ui/components/multi/MappingPane.cpp +++ b/src-ui/components/multi/MappingPane.cpp @@ -1362,7 +1362,14 @@ void MappingZones::mouseUp(const juce::MouseEvent &e) namespace cmsg = scxt::messaging::client; auto za{editor->currentLeadZoneSelection}; - sendToSerialization(cmsg::AddBlankZone({za->part, za->group, ks, ke, vs, ve})); + if (!za.has_value()) + { + sendToSerialization(cmsg::AddBlankZone({0, 0, ks, ke, vs, ve})); + } + else + { + sendToSerialization(cmsg::AddBlankZone({za->part, za->group, ks, ke, vs, ve})); + } } mouseState = NONE; repaint();