Skip to content

Commit

Permalink
Repo Tidy - Phase 2 (#107)
Browse files Browse the repository at this point in the history
* Make sub-project dir names more relevant and consistent

* Move shared dir and update references. Uses correct include search dirs to avoid rel paths with upward traversal in #includes

* Consolidate copies/versions of nng_wrappers.h

* Consolidate copies of common_definition_helper

* ADM Export Source plugin uses shared bit instead of copies

* Shared JUCE Support Resources

Closes #92
  • Loading branch information
firthm01 authored Aug 13, 2021
1 parent f44b63b commit 7ad2918
Show file tree
Hide file tree
Showing 317 changed files with 700 additions and 93,369 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ include(check_nng)
find_package(nng REQUIRED QUIET)
add_subdirectory(submodules)

add_subdirectory(ear-production-suite)
set(EPS_SHARED_DIR ${CMAKE_CURRENT_SOURCE_DIR}/shared)
set(JUCE_SUPPORT_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/shared/resources)

add_subdirectory(ear-production-suite-plugins)
add_subdirectory(reaper-adm-extension)
add_subdirectory(reaper_adm_stem_plugin)
add_subdirectory(reaper-adm-export-source-plugin)
add_subdirectory(tools)

if(EPS_BUILD_PACKAGE)
Expand Down
18 changes: 10 additions & 8 deletions cmake_modules/juce_helpers.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
set(_JUCE_SUPPORT_RESOURCES ${PROJECT_SOURCE_DIR}/resources)

function(add_juce_vst3_plugin PLUGIN_NAME)
set(options)
set(oneValueArgs IDE_FOLDER DESCRIPTION DISPLAY_NAME OUTPUT_NAME CODE_SUFFIX)
set(oneValueArgs IDE_FOLDER DESCRIPTION DISPLAY_NAME OUTPUT_NAME CODE_PREFIX CODE_SUFFIX)
set(multiValueArgs SOURCES)
cmake_parse_arguments(PLUGIN "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN} )

if(NOT PLUGIN_CODE_PREFIX)
set(PLUGIN_CODE_PREFIX "455053") # Hex for "EPS"
endif()

if(NOT PLUGIN_CODE_SUFFIX)
set(PLUGIN_CODE_SUFFIX "00")
endif()
Expand All @@ -21,12 +23,12 @@ function(add_juce_vst3_plugin PLUGIN_NAME)

set(PRODUCT_BUNDLE_IDENTIFIER "ear.${PLUGIN_NAME}")
set(_SUPPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}_resources/)
configure_file(${_JUCE_SUPPORT_RESOURCES}/juce/AppConfig.h.in ${_SUPPORT_PATH}/AppConfig.h)
configure_file(${_JUCE_SUPPORT_RESOURCES}/juce/JuceHeader.h.in ${_SUPPORT_PATH}/JuceHeader.h)
configure_file(${_JUCE_SUPPORT_RESOURCES}/osx/VST-Info.plist.in ${_SUPPORT_PATH}/Info.plist)
file(COPY ${_JUCE_SUPPORT_RESOURCES}/osx/PkgInfo DESTINATION ${_SUPPORT_PATH})
configure_file(${JUCE_SUPPORT_RESOURCES}/juce/AppConfig.h.in ${_SUPPORT_PATH}/AppConfig.h)
configure_file(${JUCE_SUPPORT_RESOURCES}/juce/JuceHeader.h.in ${_SUPPORT_PATH}/JuceHeader.h)
configure_file(${JUCE_SUPPORT_RESOURCES}/osx/VST-Info.plist.in ${_SUPPORT_PATH}/Info.plist)
file(COPY ${JUCE_SUPPORT_RESOURCES}/osx/PkgInfo DESTINATION ${_SUPPORT_PATH})
add_library(${PLUGIN_NAME}_VST3 MODULE ${PLUGIN_SOURCES} ${_SUPPORT_PATH}/AppConfig.h ${_SUPPORT_PATH}/JuceHeader.h ${_SUPPORT_PATH}/Info.plist ${_SUPPORT_PATH}/PkgInfo)
target_include_directories(${PLUGIN_NAME}_VST3 PRIVATE ${_SUPPORT_PATH}/)
target_include_directories(${PLUGIN_NAME}_VST3 PRIVATE ${_SUPPORT_PATH}/ ${EPS_SHARED_DIR})
target_link_libraries(${PLUGIN_NAME}_VST3 PRIVATE Juce::VST3)

set_target_properties(${PLUGIN_NAME}_VST3 PROPERTIES
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ find_package(spdlog REQUIRED QUIET)
# add targets
############################################################

configure_file(${PROJECT_SOURCE_DIR}/resources/config.h.in ${PROJECT_BINARY_DIR}/ear-plugin-base/config.h)
configure_file(${JUCE_SUPPORT_RESOURCES}/config.h.in ${PROJECT_BINARY_DIR}/ear-plugin-base/config.h)
set(EPS_PLUGIN_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib)
add_subdirectory(lib)
add_subdirectory(plugins)
add_subdirectory(tools)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
set(SOURCES_DIRECT_SPEAKERS_INPUT
${EPS_SHARED_DIR}/binary_data.cpp
${EPS_SHARED_DIR}/components/look_and_feel/slider.cpp
${EPS_SHARED_DIR}/components/look_and_feel/name_text_editor.cpp
${EPS_SHARED_DIR}/components/ear_combo_box.cpp
${EPS_SHARED_DIR}/components/ear_slider_label.cpp
${EPS_SHARED_DIR}/components/level_meter_calculator.cpp
src/direct_speakers_frontend_connector.cpp
src/direct_speakers_plugin_editor.cpp
src/direct_speakers_plugin_processor.cpp
)

set(HEADERS_DIRECT_SPEAKERS_INPUT
${EPS_PLUGIN_BASE_DIR}/include/detail/constants.hpp
${EPS_PLUGIN_BASE_DIR}/include/direct_speakers_backend.hpp
${EPS_PLUGIN_BASE_DIR}/include/speaker_setups.hpp

${EPS_SHARED_DIR}/binary_data.hpp

${EPS_SHARED_DIR}/components/ear_button.hpp
${EPS_SHARED_DIR}/components/ear_combo_box.hpp
${EPS_SHARED_DIR}/components/ear_header.hpp
${EPS_SHARED_DIR}/components/ear_inverted_slider.hpp
${EPS_SHARED_DIR}/components/ear_name_text_editor.hpp
${EPS_SHARED_DIR}/components/ear_slider.hpp
${EPS_SHARED_DIR}/components/ear_slider_label.hpp
${EPS_SHARED_DIR}/components/level_meter.hpp
${EPS_SHARED_DIR}/components/level_meter_calculator.hpp
${EPS_SHARED_DIR}/components/non_automatable_parameter.hpp
${EPS_SHARED_DIR}/components/onboarding.hpp
${EPS_SHARED_DIR}/components/onboarding_slide.hpp
${EPS_SHARED_DIR}/components/overlay.hpp
${EPS_SHARED_DIR}/components/segment_progress_bar.hpp
${EPS_SHARED_DIR}/components/speaker_layer.hpp

${EPS_SHARED_DIR}/components/look_and_feel/colours.hpp
${EPS_SHARED_DIR}/components/look_and_feel/fonts.hpp
${EPS_SHARED_DIR}/components/look_and_feel/name_text_editor.hpp
${EPS_SHARED_DIR}/components/look_and_feel/shadows.hpp
${EPS_SHARED_DIR}/components/look_and_feel/slider.hpp

${EPS_SHARED_DIR}/helper/graphics.hpp
${EPS_SHARED_DIR}/helper/iso_lang_codes.hpp
${EPS_SHARED_DIR}/helper/multi_async_updater.h
${EPS_SHARED_DIR}/helper/properties_file.hpp

src/direct_speakers_frontend_connector.hpp
src/direct_speakers_plugin_editor.hpp
src/direct_speakers_plugin_processor.hpp
src/direct_speakers_component.hpp
src/channel_gains_box.hpp
src/channel_gain.hpp
src/value_box_main.hpp
src/value_box_metadata.hpp
src/value_box_channel_gain.hpp
src/value_box_speaker_layer.hpp
)

source_group("Header Files" FILES ${HEADERS_DIRECT_SPEAKERS_INPUT})

# Input plugin code suffixes to start from 10
add_juce_vst3_plugin(direct_speakers
SOURCES ${SOURCES_DIRECT_SPEAKERS_INPUT} ${HEADERS_DIRECT_SPEAKERS_INPUT}
IDE_FOLDER ${IDE_FOLDER_PLUGINS}
CODE_SUFFIX "10"
DISPLAY_NAME "EAR DirectSpeakers"
DESCRIPTION "The metadata input plugin for channel-based audio"
OUTPUT_NAME "EAR DirectSpeakers")

target_link_libraries(direct_speakers_VST3 PRIVATE ear-plugin-base)

install_juce_vst3_plugin(direct_speakers "${EPS_PLUGIN_INSTALL_PREFIX}VST3/ear-production-suite")
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include "JuceHeader.h"

#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"

namespace ear {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include "JuceHeader.h"

#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"
#include "channel_gain.hpp"

namespace ear {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

#include "JuceHeader.h"

#include "../../shared/components/ear_combo_box.hpp"
#include "../../shared/components/onboarding.hpp"
#include "../../shared/components/overlay.hpp"
#include "../../shared/helper/properties_file.hpp"
#include "../../shared/components/ear_header.hpp"
#include "components/ear_combo_box.hpp"
#include "components/onboarding.hpp"
#include "components/overlay.hpp"
#include "helper/properties_file.hpp"
#include "components/ear_header.hpp"
#include "detail/constants.hpp"
#include "value_box_channel_gain.hpp"
#include "value_box_main.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "direct_speakers_frontend_connector.hpp"

#include "../../shared/components/ear_combo_box.hpp"
#include "../../shared/components/ear_name_text_editor.hpp"
#include "components/ear_combo_box.hpp"
#include "components/ear_name_text_editor.hpp"

namespace ear {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#include "direct_speakers_plugin_processor.hpp"
#include "ui/direct_speakers_frontend_backend_connector.hpp"
#include "../../shared/components/ear_combo_box.hpp"
#include "../../shared/components/ear_name_text_editor.hpp"
#include "../../shared/helper/multi_async_updater.h"
#include "components/ear_combo_box.hpp"
#include "components/ear_name_text_editor.hpp"
#include "helper/multi_async_updater.h"
#include "value_box_channel_gain.hpp"
#include "value_box_speaker_layer.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "direct_speakers_plugin_editor.hpp"

#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "../../shared/components/look_and_feel/shadows.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"
#include "components/look_and_feel/shadows.hpp"
#include "direct_speakers_plugin_processor.hpp"
#include "direct_speakers_frontend_connector.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "direct_speakers_plugin_processor.hpp"
#include "speaker_setups.hpp"

#include "../../shared/components/non_automatable_parameter.hpp"
#include "components/non_automatable_parameter.hpp"
#include "direct_speakers_plugin_editor.hpp"
#include "direct_speakers_frontend_connector.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "JuceHeader.h"

#include "direct_speakers_backend.hpp"
#include "../../shared/components/level_meter_calculator.hpp"
#include "components/level_meter_calculator.hpp"

#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

#include "JuceHeader.h"

#include "../../shared/components/ear_slider.hpp"
#include "../../shared/components/level_meter.hpp"
#include "../../shared/components/ear_button.hpp"
#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "../../shared/components/look_and_feel/slider.hpp"
#include "components/ear_slider.hpp"
#include "components/level_meter.hpp"
#include "components/ear_button.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"
#include "components/look_and_feel/slider.hpp"
#include "channel_gains_box.hpp"
#include "speaker_setups.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include "JuceHeader.h"

#include "../../shared/components/ear_combo_box.hpp"
#include "../../shared/components/ear_name_text_editor.hpp"
#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "components/ear_combo_box.hpp"
#include "components/ear_name_text_editor.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"

namespace ear {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include "JuceHeader.h"

#include "../../shared/components/ear_combo_box.hpp"
#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "../../shared/helper/iso_lang_codes.hpp"
#include "components/ear_combo_box.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"
#include "helper/iso_lang_codes.hpp"

namespace ear {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include "JuceHeader.h"

#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "../../shared/components/look_and_feel/slider.hpp"
#include "../../shared/components/speaker_layer.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"
#include "components/look_and_feel/slider.hpp"
#include "components/speaker_layer.hpp"

namespace ear {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
set(SOURCES_MONITORING
${CMAKE_CURRENT_SOURCE_DIR}/../shared/binary_data.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/level_meter_calculator.cpp
${EPS_SHARED_DIR}/binary_data.cpp
${EPS_SHARED_DIR}/components/level_meter_calculator.cpp
src/monitoring_plugin_editor.cpp
src/monitoring_plugin_processor.cpp
)

set(HEADERS_MONITORING
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/include/detail/constants.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/include/monitoring_audio_processor.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/include/monitoring_backend.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/include/speaker_setups.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/include/variable_block_adapter.hpp
${EPS_PLUGIN_BASE_DIR}/include/detail/constants.hpp
${EPS_PLUGIN_BASE_DIR}/include/monitoring_audio_processor.hpp
${EPS_PLUGIN_BASE_DIR}/include/monitoring_backend.hpp
${EPS_PLUGIN_BASE_DIR}/include/speaker_setups.hpp
${EPS_PLUGIN_BASE_DIR}/include/variable_block_adapter.hpp

${CMAKE_CURRENT_SOURCE_DIR}/../shared/binary_data.hpp
${EPS_SHARED_DIR}/binary_data.hpp

${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/ear_button.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/ear_header.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/level_meter.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/level_meter_calculator.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/onboarding.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/onboarding_slide.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/overlay.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/segment_progress_bar.hpp
${EPS_SHARED_DIR}/components/ear_button.hpp
${EPS_SHARED_DIR}/components/ear_header.hpp
${EPS_SHARED_DIR}/components/level_meter.hpp
${EPS_SHARED_DIR}/components/level_meter_calculator.hpp
${EPS_SHARED_DIR}/components/onboarding.hpp
${EPS_SHARED_DIR}/components/onboarding_slide.hpp
${EPS_SHARED_DIR}/components/overlay.hpp
${EPS_SHARED_DIR}/components/segment_progress_bar.hpp

${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/look_and_feel/colours.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/look_and_feel/fonts.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/look_and_feel/shadows.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/components/look_and_feel/slider.hpp
${EPS_SHARED_DIR}/components/look_and_feel/colours.hpp
${EPS_SHARED_DIR}/components/look_and_feel/fonts.hpp
${EPS_SHARED_DIR}/components/look_and_feel/shadows.hpp
${EPS_SHARED_DIR}/components/look_and_feel/slider.hpp

${CMAKE_CURRENT_SOURCE_DIR}/../shared/helper/graphics.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../shared/helper/properties_file.hpp
${EPS_SHARED_DIR}/helper/graphics.hpp
${EPS_SHARED_DIR}/helper/properties_file.hpp

src/monitoring_plugin_editor.hpp
src/monitoring_plugin_processor.hpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "monitoring_plugin_editor.hpp"

#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "../../shared/helper/properties_file.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"
#include "helper/properties_file.hpp"
#include "detail/constants.hpp"
#include "monitoring_plugin_processor.hpp"
#include "speaker_setups.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

#include "JuceHeader.h"

#include "../../shared/components/ear_button.hpp"
#include "../../shared/components/level_meter.hpp"
#include "../../shared/components/onboarding.hpp"
#include "../../shared/components/overlay.hpp"
#include "../../shared/components/ear_header.hpp"
#include "components/ear_button.hpp"
#include "components/level_meter.hpp"
#include "components/onboarding.hpp"
#include "components/overlay.hpp"
#include "components/ear_header.hpp"
#include "monitoring_plugin_processor.hpp"
#include "speaker_meter.hpp"
#include "speaker_meter_box.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <ear/ear.hpp>
#include <memory>

#include "../../shared/components/level_meter_calculator.hpp"
#include "components/level_meter_calculator.hpp"

namespace ear {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include "JuceHeader.h"

#include "../../shared/components/level_meter.hpp"
#include "../../shared/components/look_and_feel/colours.hpp"
#include "../../shared/components/look_and_feel/fonts.hpp"
#include "components/level_meter.hpp"
#include "components/look_and_feel/colours.hpp"
#include "components/look_and_feel/fonts.hpp"

namespace ear {
namespace plugin {
Expand Down
Loading

0 comments on commit 7ad2918

Please sign in to comment.