diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index b6bf9f0..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,5 +0,0 @@ -# repo: Chowdhury-DSP/TempPlugin -# filename: FUNDING.YML - -patreon: chowdsp -custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=93S67ZSKMBG68&source=url diff --git a/.github/workflows/auto-format.yml b/.github/workflows/auto-format.yml index 80930fe..2c48ebb 100644 --- a/.github/workflows/auto-format.yml +++ b/.github/workflows/auto-format.yml @@ -20,11 +20,9 @@ jobs: steps: - name: Install Linux Deps run: | - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 12 - sudo apt-get install clang-format-12 - clang-format-12 --version + sudo apt update + sudo apt -y install clang-format-14 + clang-format-14 --version - name: Checkout code uses: actions/checkout@v2 @@ -34,7 +32,7 @@ jobs: - name: Run clang-format shell: bash - run: find src/ -iname *.h -o -iname *.cpp | xargs clang-format-12 -style=file -verbose -i + run: find src/ -iname *.h -o -iname *.cpp | xargs clang-format-14 -style=file -verbose -i - name: Commit & Push changes uses: actions-js/push@master diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4c55d77..914e8bf 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -19,7 +19,14 @@ jobs: strategy: fail-fast: false # show all errors for each platform (vs. cancel jobs on error) matrix: - os: [ubuntu-latest, windows-2019, macOS-latest] + include: + - os: ubuntu-22.04 + cmake_args: "-DCMAKE_CXX_COMPILER=g++-11" + - os: windows-2022 + cmake_gen: -G"Ninja Multi-Config" + cmake_args: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + - os: macos-13 + cmake_args: "-DCMAKE_BUILD_TYPE=Release" steps: - name: Install Linux Deps @@ -30,6 +37,24 @@ jobs: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 + - name: Set Xcode version + if: runner.os == 'MacOS' + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '15.2' + + - name: Install Ninja + if: runner.os == 'Windows' + uses: seanmiddleditch/gha-setup-ninja@master + + - name: Add msbuild to PATH + if: runner.os == 'Windows' + uses: microsoft/setup-msbuild@v2 + + - name: Setup MSVC devcmd + if: runner.os == 'Windows' + uses: ilammy/msvc-dev-cmd@v1 + - name: Get latest CMake uses: lukka/get-cmake@latest @@ -49,12 +74,12 @@ jobs: - name: Configure shell: bash - run: cmake -Bbuild + run: cmake -Bbuild ${{ matrix.cmake_args }} ${{ matrix.cmake_gen }} - name: Build shell: bash run: cmake --build build --config Release --parallel 4 - name: Validate - if: runner.os == 'Windows' || runner.os == 'MacOS' + if: runner.os == 'Windows' run: bash scripts/validate.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 5efb1d3..dea95bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,9 +9,9 @@ set(CMAKE_CXX_STANDARD 20) set(COMPANY_NAME "chowdsp") set(PRODUCT_NAME "TempPlugin") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/modules/cmake") add_subdirectory(modules) -# juce_set_vst2_sdk_path(C:/SDKs/VST_SDK/VST2_SDK) # set default plugin formats to build if(IOS) set(JUCE_FORMATS Standalone AUv3) @@ -19,18 +19,6 @@ else() set(JUCE_FORMATS AU VST3 Standalone) endif() -# Build LV2 only on Linux -if(UNIX AND NOT APPLE) - message(STATUS "Building LV2 plugin format") - list(APPEND JUCE_FORMATS LV2) -endif() - -# Build VST2 is SDK set -if(TARGET juce_vst2_sdk) - message(STATUS "Building VST2 plugin format") - list(APPEND JUCE_FORMATS VST) -endif() - juce_add_plugin(TempPlugin COMPANY_NAME "${COMPANY_NAME}" PLUGIN_MANUFACTURER_CODE Chow @@ -62,11 +50,3 @@ target_compile_definitions(TempPlugin PUBLIC ) target_link_libraries(TempPlugin PRIVATE juce_plugin_modules) - -# we need these flags for notarization on MacOS -option(MACOS_RELEASE "Set build flags for MacOS Release" OFF) -if(MACOS_RELEASE) - message(STATUS "Setting MacOS release flags...") - set_target_properties(TempPlugin_Standalone PROPERTIES - XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES) -endif() diff --git a/installers/mac/Intro.txt b/installers/mac/Intro.txt deleted file mode 100644 index 8ad2d00..0000000 --- a/installers/mac/Intro.txt +++ /dev/null @@ -1 +0,0 @@ -This application will install the TempPlugin audio plugin version ##APPVERSION## to your computer. diff --git a/installers/mac/TempPlugin.pkgproj b/installers/mac/TempPlugin.pkgproj deleted file mode 100644 index 03fe2f7..0000000 --- a/installers/mac/TempPlugin.pkgproj +++ /dev/null @@ -1,2564 +0,0 @@ - - - - - PACKAGES - - - MUST-CLOSE-APPLICATION-ITEMS - - MUST-CLOSE-APPLICATIONS - - PACKAGE_FILES - - DEFAULT_INSTALL_LOCATION - / - HIERARCHY - - CHILDREN - - - CHILDREN - - GID - 80 - PATH - Applications - PATH_TYPE - 0 - PERMISSIONS - 509 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 80 - PATH - Application Support - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - - CHILDREN - - - BUNDLE_CAN_DOWNGRADE - - BUNDLE_POSTINSTALL_PATH - - PATH_TYPE - 0 - - BUNDLE_PREINSTALL_PATH - - PATH_TYPE - 0 - - CHILDREN - - GID - 0 - PATH - ../../bin/Mac/TempPlugin.component - PATH_TYPE - 1 - PERMISSIONS - 493 - TYPE - 3 - UID - 0 - - - GID - 0 - PATH - Components - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - GID - 0 - PATH - Plug-Ins - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - GID - 0 - PATH - Audio - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Automator - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Documentation - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Extensions - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Filesystems - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Frameworks - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Input Methods - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Internet Plug-Ins - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchAgents - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchDaemons - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PreferencePanes - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Preferences - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 80 - PATH - Printers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PrivilegedHelperTools - PATH_TYPE - 0 - PERMISSIONS - 1005 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickLook - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickTime - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Screen Savers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Scripts - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Services - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Widgets - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - Library - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 0 - PATH - Shared - PATH_TYPE - 0 - PERMISSIONS - 1023 - TYPE - 1 - UID - 0 - - - GID - 80 - PATH - Users - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - / - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - PAYLOAD_TYPE - 0 - PRESERVE_EXTENDED_ATTRIBUTES - - SHOW_INVISIBLE - - SPLIT_FORKS - - TREAT_MISSING_FILES_AS_WARNING - - VERSION - 5 - - PACKAGE_SCRIPTS - - POSTINSTALL_PATH - - PATH_TYPE - 0 - - PREINSTALL_PATH - - PATH_TYPE - 0 - - RESOURCES - - - PACKAGE_SETTINGS - - AUTHENTICATION - 1 - CONCLUSION_ACTION - 0 - FOLLOW_SYMBOLIC_LINKS - - IDENTIFIER - com.chowdsp.TempPlugin.TempPluginAU - LOCATION - 0 - NAME - AU - OVERWRITE_PERMISSIONS - - PAYLOAD_SIZE - -1 - REFERENCE_PATH - - RELOCATABLE - - USE_HFS+_COMPRESSION - - VERSION - ##APPVERSION## - - TYPE - 0 - UUID - 69EED16E-B119-4D35-B464-12717823DE0E - - - MUST-CLOSE-APPLICATION-ITEMS - - MUST-CLOSE-APPLICATIONS - - PACKAGE_FILES - - DEFAULT_INSTALL_LOCATION - / - HIERARCHY - - CHILDREN - - - CHILDREN - - GID - 80 - PATH - Applications - PATH_TYPE - 0 - PERMISSIONS - 509 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 80 - PATH - Application Support - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - - CHILDREN - - - BUNDLE_CAN_DOWNGRADE - - BUNDLE_POSTINSTALL_PATH - - PATH_TYPE - 0 - - BUNDLE_PREINSTALL_PATH - - PATH_TYPE - 0 - - CHILDREN - - GID - 0 - PATH - ../../bin/Mac/TempPlugin.vst3 - PATH_TYPE - 1 - PERMISSIONS - 493 - TYPE - 3 - UID - 0 - - - GID - 0 - PATH - VST3 - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - GID - 0 - PATH - Plug-Ins - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - GID - 0 - PATH - Audio - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Automator - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Documentation - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Extensions - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Filesystems - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Frameworks - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Input Methods - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Internet Plug-Ins - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchAgents - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchDaemons - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PreferencePanes - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Preferences - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 80 - PATH - Printers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PrivilegedHelperTools - PATH_TYPE - 0 - PERMISSIONS - 1005 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickLook - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickTime - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Screen Savers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Scripts - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Services - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Widgets - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - Library - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 0 - PATH - Shared - PATH_TYPE - 0 - PERMISSIONS - 1023 - TYPE - 1 - UID - 0 - - - GID - 80 - PATH - Users - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - / - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - PAYLOAD_TYPE - 0 - PRESERVE_EXTENDED_ATTRIBUTES - - SHOW_INVISIBLE - - SPLIT_FORKS - - TREAT_MISSING_FILES_AS_WARNING - - VERSION - 5 - - PACKAGE_SETTINGS - - AUTHENTICATION - 1 - CONCLUSION_ACTION - 0 - FOLLOW_SYMBOLIC_LINKS - - IDENTIFIER - com.chowdsp.TempPlugin.TempPluginVST3 - LOCATION - 0 - NAME - VST3 - OVERWRITE_PERMISSIONS - - PAYLOAD_SIZE - -1 - REFERENCE_PATH - - RELOCATABLE - - USE_HFS+_COMPRESSION - - VERSION - ##APPVERSION## - - TYPE - 0 - UUID - 17D06D06-18AD-4175-AA45-047F4984BE1A - - - MUST-CLOSE-APPLICATION-ITEMS - - MUST-CLOSE-APPLICATIONS - - PACKAGE_FILES - - DEFAULT_INSTALL_LOCATION - / - HIERARCHY - - CHILDREN - - - CHILDREN - - - BUNDLE_CAN_DOWNGRADE - - BUNDLE_POSTINSTALL_PATH - - PATH_TYPE - 0 - - BUNDLE_PREINSTALL_PATH - - PATH_TYPE - 0 - - CHILDREN - - GID - 80 - PATH - ../../bin/Mac/TempPlugin.app - PATH_TYPE - 1 - PERMISSIONS - 493 - TYPE - 3 - UID - 0 - - - GID - 80 - PATH - Applications - PATH_TYPE - 0 - PERMISSIONS - 509 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 80 - PATH - Application Support - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Automator - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Documentation - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Extensions - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Filesystems - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Frameworks - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Input Methods - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Internet Plug-Ins - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchAgents - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchDaemons - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PreferencePanes - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Preferences - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 80 - PATH - Printers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PrivilegedHelperTools - PATH_TYPE - 0 - PERMISSIONS - 1005 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickLook - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickTime - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Screen Savers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Scripts - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Services - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Widgets - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - Library - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 0 - PATH - Shared - PATH_TYPE - 0 - PERMISSIONS - 1023 - TYPE - 1 - UID - 0 - - - GID - 80 - PATH - Users - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - / - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - PAYLOAD_TYPE - 0 - PRESERVE_EXTENDED_ATTRIBUTES - - SHOW_INVISIBLE - - SPLIT_FORKS - - TREAT_MISSING_FILES_AS_WARNING - - VERSION - 5 - - PACKAGE_SETTINGS - - AUTHENTICATION - 1 - CONCLUSION_ACTION - 0 - FOLLOW_SYMBOLIC_LINKS - - IDENTIFIER - com.chowdsp.TempPlugin - LOCATION - 0 - NAME - Standalone - OVERWRITE_PERMISSIONS - - PAYLOAD_SIZE - -1 - REFERENCE_PATH - - RELOCATABLE - - USE_HFS+_COMPRESSION - - VERSION - ##APPVERSION## - - TYPE - 0 - UUID - 54266BE4-CE88-4033-9C8D-248D3D38D1E1 - - - MUST-CLOSE-APPLICATION-ITEMS - - MUST-CLOSE-APPLICATIONS - - PACKAGE_FILES - - DEFAULT_INSTALL_LOCATION - / - HIERARCHY - - CHILDREN - - - CHILDREN - - GID - 80 - PATH - Applications - PATH_TYPE - 0 - PERMISSIONS - 509 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 80 - PATH - Application Support - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - - CHILDREN - - - BUNDLE_CAN_DOWNGRADE - - BUNDLE_POSTINSTALL_PATH - - PATH_TYPE - 0 - - BUNDLE_PREINSTALL_PATH - - PATH_TYPE - 0 - - CHILDREN - - GID - 0 - PATH - ../../bin/Mac/TempPlugin.clap - PATH_TYPE - 1 - PERMISSIONS - 493 - TYPE - 3 - UID - 0 - - - GID - 0 - PATH - CLAP - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - GID - 0 - PATH - Plug-Ins - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - GID - 0 - PATH - Audio - PATH_TYPE - 2 - PERMISSIONS - 509 - TYPE - 2 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Automator - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Documentation - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Extensions - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Filesystems - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Frameworks - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Input Methods - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Internet Plug-Ins - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchAgents - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - LaunchDaemons - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PreferencePanes - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Preferences - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 80 - PATH - Printers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - PrivilegedHelperTools - PATH_TYPE - 0 - PERMISSIONS - 1005 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickLook - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - QuickTime - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Screen Savers - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Scripts - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Services - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - GID - 0 - PATH - Widgets - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - Library - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - CHILDREN - - - CHILDREN - - GID - 0 - PATH - Shared - PATH_TYPE - 0 - PERMISSIONS - 1023 - TYPE - 1 - UID - 0 - - - GID - 80 - PATH - Users - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - - GID - 0 - PATH - / - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - - PAYLOAD_TYPE - 0 - PRESERVE_EXTENDED_ATTRIBUTES - - SHOW_INVISIBLE - - SPLIT_FORKS - - TREAT_MISSING_FILES_AS_WARNING - - VERSION - 5 - - PACKAGE_SETTINGS - - AUTHENTICATION - 1 - CONCLUSION_ACTION - 0 - FOLLOW_SYMBOLIC_LINKS - - IDENTIFIER - com.chowdsp.TempPlugin.TempPluginCLAP - LOCATION - 0 - NAME - CLAP - OVERWRITE_PERMISSIONS - - PAYLOAD_SIZE - -1 - REFERENCE_PATH - - RELOCATABLE - - USE_HFS+_COMPRESSION - - VERSION - ##APPVERSION## - - TYPE - 0 - UUID - DAC3949D-C2E3-4F76-84CF-E5DEB2A21E65 - - - PROJECT - - PROJECT_COMMENTS - - NOTES - - - - PROJECT_PRESENTATION - - BACKGROUND - - APPAREANCES - - DARK_AQUA - - LIGHT_AQUA - - - SHARED_SETTINGS_FOR_ALL_APPAREANCES - - - INSTALLATION TYPE - - HIERARCHIES - - INSTALLER - - LIST - - - CHILDREN - - DESCRIPTION - - OPTIONS - - HIDDEN - - STATE - 1 - - PACKAGE_UUID - 69EED16E-B119-4D35-B464-12717823DE0E - TITLE - - TYPE - 0 - UUID - 32A671B5-085A-4D25-9B73-CA9157DA33C8 - - - CHILDREN - - DESCRIPTION - - OPTIONS - - HIDDEN - - STATE - 1 - - PACKAGE_UUID - 17D06D06-18AD-4175-AA45-047F4984BE1A - TITLE - - TYPE - 0 - UUID - 6B0DDE9A-47F8-4615-BC79-4C475F3E41F7 - - - CHILDREN - - DESCRIPTION - - OPTIONS - - HIDDEN - - STATE - 1 - - PACKAGE_UUID - 54266BE4-CE88-4033-9C8D-248D3D38D1E1 - TITLE - - TYPE - 0 - UUID - 7BA12230-EFE4-49DA-B02C-EAB67D03EF2D - - - CHILDREN - - DESCRIPTION - - OPTIONS - - HIDDEN - - STATE - 1 - - PACKAGE_UUID - DAC3949D-C2E3-4F76-84CF-E5DEB2A21E65 - TITLE - - TYPE - 0 - UUID - 51A09826-5983-4D98-B8AA-2F8D2FE33347 - - - REMOVED - - - - MODE - 2 - - INSTALLATION_STEPS - - - ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS - ICPresentationViewIntroductionController - INSTALLER_PLUGIN - Introduction - LIST_TITLE_KEY - InstallerSectionTitle - - - ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS - ICPresentationViewReadMeController - INSTALLER_PLUGIN - ReadMe - LIST_TITLE_KEY - InstallerSectionTitle - - - ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS - ICPresentationViewLicenseController - INSTALLER_PLUGIN - License - LIST_TITLE_KEY - InstallerSectionTitle - - - ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS - ICPresentationViewDestinationSelectController - INSTALLER_PLUGIN - TargetSelect - LIST_TITLE_KEY - InstallerSectionTitle - - - ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS - ICPresentationViewInstallationTypeController - INSTALLER_PLUGIN - PackageSelection - LIST_TITLE_KEY - InstallerSectionTitle - - - ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS - ICPresentationViewInstallationController - INSTALLER_PLUGIN - Install - LIST_TITLE_KEY - InstallerSectionTitle - - - ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS - ICPresentationViewSummaryController - INSTALLER_PLUGIN - Summary - LIST_TITLE_KEY - InstallerSectionTitle - - - INTRODUCTION - - LOCALIZATIONS - - - LANGUAGE - English - VALUE - - PATH - Intro.txt - PATH_TYPE - 3 - - - - - LICENSE - - LOCALIZATIONS - - - LANGUAGE - English - VALUE - - PATH - LICENSE.txt - PATH_TYPE - 3 - - - - MODE - 0 - - README - - LOCALIZATIONS - - - TITLE - - LOCALIZATIONS - - - LANGUAGE - English - VALUE - TempPlugin - - - - - PROJECT_REQUIREMENTS - - LIST - - RESOURCES - - ROOT_VOLUME_ONLY - - - PROJECT_SETTINGS - - ADVANCED_OPTIONS - - installer-script.options:hostArchitectures - - x86_64,arm64 - - - BUILD_FORMAT - 0 - BUILD_PATH - - PATH - ../../build - PATH_TYPE - 1 - - EXCLUDED_FILES - - - PATTERNS_ARRAY - - - REGULAR_EXPRESSION - - STRING - .DS_Store - TYPE - 0 - - - PROTECTED - - PROXY_NAME - Remove .DS_Store files - PROXY_TOOLTIP - Remove ".DS_Store" files created by the Finder. - STATE - - - - PATTERNS_ARRAY - - - REGULAR_EXPRESSION - - STRING - .pbdevelopment - TYPE - 0 - - - PROTECTED - - PROXY_NAME - Remove .pbdevelopment files - PROXY_TOOLTIP - Remove ".pbdevelopment" files created by ProjectBuilder or Xcode. - STATE - - - - PATTERNS_ARRAY - - - REGULAR_EXPRESSION - - STRING - CVS - TYPE - 1 - - - REGULAR_EXPRESSION - - STRING - .cvsignore - TYPE - 0 - - - REGULAR_EXPRESSION - - STRING - .cvspass - TYPE - 0 - - - REGULAR_EXPRESSION - - STRING - .svn - TYPE - 1 - - - REGULAR_EXPRESSION - - STRING - .git - TYPE - 1 - - - REGULAR_EXPRESSION - - STRING - .gitignore - TYPE - 0 - - - PROTECTED - - PROXY_NAME - Remove SCM metadata - PROXY_TOOLTIP - Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems. - STATE - - - - PATTERNS_ARRAY - - - REGULAR_EXPRESSION - - STRING - classes.nib - TYPE - 0 - - - REGULAR_EXPRESSION - - STRING - designable.db - TYPE - 0 - - - REGULAR_EXPRESSION - - STRING - info.nib - TYPE - 0 - - - PROTECTED - - PROXY_NAME - Optimize nib files - PROXY_TOOLTIP - Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles. - STATE - - - - PATTERNS_ARRAY - - - REGULAR_EXPRESSION - - STRING - Resources Disabled - TYPE - 1 - - - PROTECTED - - PROXY_NAME - Remove Resources Disabled folders - PROXY_TOOLTIP - Remove "Resources Disabled" folders. - STATE - - - - SEPARATOR - - - - NAME - TempPlugin - PAYLOAD_ONLY - - TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING - - - - TYPE - 0 - VERSION - 2 - - diff --git a/installers/mac/build_mac_installer.sh b/installers/mac/build_mac_installer.sh deleted file mode 100644 index 79533d8..0000000 --- a/installers/mac/build_mac_installer.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -script_file=TempPlugin.pkgproj - -app_version=$(cut -f 2 -d '=' <<< "$(grep 'CMAKE_PROJECT_VERSION:STATIC' ../../build/CMakeCache.txt)") -echo "Setting app version: $app_version..." -sed -i '' "s/##APPVERSION##/${app_version}/g" $script_file -sed -i '' "s/##APPVERSION##/${app_version}/g" Intro.txt - -echo "Copying License..." -cp ../../LICENSE LICENSE.txt - -# build installer -echo Building... -/usr/local/bin/packagesbuild $script_file - -# reset version number -sed -i '' "s/${app_version}/##APPVERSION##/g" $script_file -sed -i '' "s/${app_version}/##APPVERSION##/g" Intro.txt - -# clean up license file -rm LICENSE.txt - -# sign the installer package -echo "Signing installer package..." -TEAM_ID=$(more ~/Developer/mac_id) -pkg_dir=TempPlugin_Installer_Packaged -rm -Rf $pkg_dir -mkdir $pkg_dir -productsign -s "$TEAM_ID" ../../build/TempPlugin.pkg $pkg_dir/TempPlugin-signed.pkg - -echo "Notarizing installer package..." -INSTALLER_PASS=$(more ~/Developer/mac_installer_pass) -npx notarize-cli --file $pkg_dir/TempPlugin-signed.pkg --bundle-id com.chowdsp.TempPlugin --asc-provider "$TEAM_ID" --username chowdsp@gmail.com --password "$INSTALLER_PASS" - -echo "Building disk image..." -vol_name=Install_TempPlugin-$app_version -rm -f "$vol_name" -hdiutil create "$vol_name.dmg" -fs HFS+ -srcfolder $pkg_dir -format UDZO -volname "$vol_name" diff --git a/installers/windows/TempPlugin_Install_Script.iss b/installers/windows/TempPlugin_Install_Script.iss deleted file mode 100644 index 541e1cf..0000000 --- a/installers/windows/TempPlugin_Install_Script.iss +++ /dev/null @@ -1,230 +0,0 @@ -#define MyAppPublisher "Chowdhury DSP" -#define MyAppURL "https://chowdsp.com" -#define MyAppName "TempPlugin" -#define MyAppVersion "##APPVERSION##" - -[Setup] -AppName="{#MyAppName} {#MyAppVersion}" -AppVersion={#MyAppVersion} -AppVerName={#MyAppName} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -DefaultDirName={commonpf64}\{#MyAppPublisher}\ -DefaultGroupName={#MyAppName} -DisableProgramGroupPage=yes -DisableDirPage=yes -DisableWelcomePage=no -LicenseFile=../../LICENSE -OutputBaseFilename="TempPlugin-Win-{#MyAppVersion}" -OutputDir=. -; SetupIconFile=myicon.ico -; UninstallDisplayIcon=myicon.ico -UninstallFilesDir={commonpf64}\{#MyAppPublisher}\{#MyAppName} -Compression=lzma -SolidCompression=yes - -[Types] -Name: "full"; Description: "Full installation" -Name: "custom"; Description: "Custom installation"; Flags: iscustom - -[Components] -Name: "VST3_64"; Description: "VST3 Plugin"; Types: full -Name: "CLAP_64"; Description: "CLAP Plugin"; Types: full -; Name: "VST_64"; Description: "VST Plugin"; Types: full -; Name: "Standalone"; Description: "Standalone Plugin"; Types: full -; Name: "AAX"; Description: "AAX Plugin"; Types: full - -[Files] -Source: "../../bin/Win64/TempPlugin.vst3"; Excludes: "*.aaxplugin,*.clap"; DestDir: "{code:GetDir|VST3_64}"; Components: VST3_64; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "../../bin/Win64/TempPlugin.clap"; Excludes: "*.aaxplugin,*.vst3"; DestDir: "{code:GetDir|CLAP_64}"; Components: CLAP_64; Flags: ignoreversion recursesubdirs createallsubdirs -; Source: "../../bin/Win64/TempPlugin.dll"; Excludes: "*.vst3,*.aaxplugin,*.clap"; DestDir: "{code:GetDir|VST_64}"; Components: VST_64; Flags: ignoreversion recursesubdirs createallsubdirs -; Source: "../../bin/Win64/TempPlugin.exe"; Excludes: "*.vst3,*.aaxplugin,*.clap"; DestDir: "{code:GetDir|Standalone}"; Components: Standalone; Flags: ignoreversion recursesubdirs createallsubdirs -; Source: "../../bin/Win64/TempPlugin.aaxplugin"; Excludes: "*.vst3,*.clap"; DestDir: "{code:GetDir|AAX}"; Components: AAX; Flags: ignoreversion recursesubdirs createallsubdirs - - -[Icons] -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" - -[Code] -var - AAXDirPage: TInputDirWizardPage; - Vst3_64DirPage: TinputDirWizardPage; - Vst_64DirPage: TinputDirWizardPage; - Vst3_32DirPage: TinputDirWizardPage; - Vst_32DirPage: TinputDirWizardPage; - -procedure InitializeWizard; -begin - Log('Initializing extra pages') - //AAX Dir Page - AAXDirPage := CreateInputDirPage(wpSelectComponents, - 'Select AAX Install Location', 'Where would you like to install the AAX plugin?', - 'AAX plugin will be installed in the following folder.'#13#10#13#10 + - 'To continue, click Next. If you would like to select a different folder, click Browse.', - False, 'New Folder'); - - AAXDirPage.add(''); - AAXDirPage.values[0] := ExpandConstant('{commoncf64}\Avid\Audio\Plug-Ins'); - - //VST3 64-bit Dir Page - Vst3_64DirPage := CreateInputDirPage(AAXDirPage.ID, - 'Select Install Location for VST3 64-bit', 'Where would you like to install the plugin?', - 'VST3 64-bit plugin will be installed in the following folder.'#13#10#13#10 + - 'To continue, click Next. If you would like to select a different folder, click Browse.', - False, 'New Folder'); - - Vst3_64DirPage.add(''); - Vst3_64DirPage.values[0] := ExpandConstant('{commoncf64}\VST3'); - - //VST 64-bit Dir Page - Vst_64DirPage := CreateInputDirPage(Vst3_64DirPage.ID, - 'Select Install Location for VST 64-bit', 'Where would you like to install the plugin?', - 'VST 64-bit plugin will be installed in the following folder.'#13#10#13#10 + - 'To continue, click Next. If you would like to select a different folder, click Browse.', - False, 'New Folder'); - - Vst_64DirPage.add(''); - Vst_64DirPage.values[0] := ExpandConstant('{commoncf64}\VST'); - - //VST3 32-bit Dir Page - Vst3_32DirPage := CreateInputDirPage(Vst_64DirPage.ID, - 'Select Install Location for VST3 32-bit', 'Where would you like to install the plugin?', - 'VST3 32-bit plugin will be installed in the following folder.'#13#10#13#10 + - 'To continue, click Next. If you would like to select a different folder, click Browse.', - False, 'New Folder'); - - Vst3_32DirPage.add(''); - Vst3_32DirPage.values[0] := ExpandConstant('{commoncf32}\VST3'); - - //VST 64-bit Dir Page - Vst_32DirPage := CreateInputDirPage(Vst3_32DirPage.ID, - 'Select Install Location for VST 32-bit', 'Where would you like to install the plugin?', - 'VST 32-bit plugin will be installed in the following folder.'#13#10#13#10 + - 'To continue, click Next. If you would like to select a different folder, click Browse.', - False, 'New Folder'); - - Vst_32DirPage.add(''); - Vst_32DirPage.values[0] := ExpandConstant('{commoncf32}\VST'); -end; - -function IsSelected(Param: String) : Boolean; -begin - if not (Pos(Param, WizardSelectedComponents(False)) = 0) then // WizardSelectedComponents(False)) then - Result := True -end; - -function ShouldSkipPage(PageID: Integer): Boolean; -begin - { Skip pages that shouldn't be shown } - Result := False; - - if (PageID = AAXDirPage.ID) then - begin - Result := True; - Log('Selected 1: ' + WizardSelectedComponents(False)); - - if IsSelected ('aax') then - begin - Log('Not Skipping page'); - Result := False; - end - end - - else if (PageID = Vst3_64DirPage.ID) then - begin - Result := True; - Log('Selected 2: ' + WizardSelectedComponents(False)); - - if IsSelected ('vst3_64') then - begin - Log('Not Skipping'); - Result := False; - end - end - - else if (PageID = Vst3_32DirPage.ID) then - begin - Result := True; - Log('Selected 3: ' + WizardSelectedComponents(False)); - - if IsSelected ('vst3_32') then - begin - Log('Not Skipping'); - Result := False; - end - end - - else if (PageID = Vst_64DirPage.ID) then - begin - Result := True; - Log('Selected 4: ' + WizardSelectedComponents(False)); - - if IsSelected ('vst_64') then - begin - Log('Not Skipping'); - Result := False; - end - end - - else if (PageID = Vst_32DirPage.ID) then - begin - Result := True; - Log('Selected 5: ' + WizardSelectedComponents(False)); - - if IsSelected ('vst_32') then - begin - Log('Not Skipping'); - Result := False; - end - end -end; - -function GetDir(Param: String) : String; -begin - if (Param = 'AAX') then - Result := AAXDirPage.values[0] - else if (Param = 'VST3_64') then - Result := Vst3_64DirPage.values[0] - else if (Param = 'VST3_32') then - Result := Vst3_32DirPage.values[0] - else if (Param = 'VST_64') then - Result := Vst_64DirPage.values[0] - else if (Param = 'VST_32') then - Result := Vst_32DirPage.values[0] - else if (Param = 'CLAP_64') then - Result := ExpandConstant('{commoncf64}\CLAP') -end; - -function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, - MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String; -var - S: String; -begin - { Fill the 'Ready Memo' with the normal settings and the custom settings } - S := ''; - S := S + MemoTypeInfo + NewLine + NewLine; - S := S + MemoComponentsInfo + NewLine + NewLine; - S := S + 'Destination Location:' + NewLine; - - if IsSelected('aax') then - S := S + Space + GetDir('AAX') + ' (AAX)' + NewLine; - - if IsSelected('vst3_64') then - S := S + Space + GetDir('VST3_64') + ' (VST3 64-bit)' + NewLine; - - if IsSelected('vst_64') then - S := S + Space + GetDir('VST_64') + ' (VST 64-bit)' + NewLine; - - if IsSelected('vst3_32') then - S := S + Space + GetDir('VST3_32') + ' (VST3 32-bit)' + NewLine; - - if IsSelected('vst_32') then - S := S + Space + GetDir('VST_32') + ' (VST 32-bit)' + NewLine; - - if IsSelected('clap_64') then - S := S + Space + GetDir('CLAP_64') + ' (CLAP 64-bit)' + NewLine; - - Result := S; -end; diff --git a/installers/windows/build_win_installer.sh b/installers/windows/build_win_installer.sh deleted file mode 100644 index f041cdd..0000000 --- a/installers/windows/build_win_installer.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -script_file=TempPlugin_Install_Script.iss - -app_version=$(cut -f 2 -d '=' <<< "$(grep 'CMAKE_PROJECT_VERSION:STATIC' ../../build/CMakeCache.txt)") -echo "Setting app version: $app_version..." -sed -i "s/##APPVERSION##/${app_version}/g" $script_file - -# build installer -echo Building... -$"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" $script_file - -# reset version number -sed -i "s/${app_version}/##APPVERSION##/g" $script_file - -exec="TempPlugin-Win-$app_version.exe" -direc=$PWD - -# sign -# echo "Signing installer..." -# $"cd" "C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64" -# $"./signtool.exe" sign -tr http://timestamp.digicert.com -td sha256 -fd sha256 -a -debug $direc/$exec -# $"./signtool.exe" verify -pa $direc/$exec - -echo SUCCESS diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index d8cbe36..a7f2368 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -6,11 +6,10 @@ message(STATUS "VERSION for JUCE: ${juce_version}") subproject_version(chowdsp_utils chowdsp_version) message(STATUS "VERSION for chowdsp: ${chowdsp_version}") -include(cmake/WarningFlags.cmake) +include(WarningFlags) add_library(juce_plugin_modules STATIC) target_link_libraries(juce_plugin_modules PRIVATE - BinaryData juce::juce_audio_utils juce::juce_dsp chowdsp::chowdsp_plugin_base diff --git a/modules/cmake/CMakeRC.cmake b/modules/cmake/CMakeRC.cmake new file mode 100644 index 0000000..7bf8756 --- /dev/null +++ b/modules/cmake/CMakeRC.cmake @@ -0,0 +1,644 @@ +# This block is executed when generating an intermediate resource file, not when +# running in CMake configure mode +if(_CMRC_GENERATE_MODE) + # Read in the digits + file(READ "${INPUT_FILE}" bytes HEX) + # Format each pair into a character literal. Heuristics seem to favor doing + # the conversion in groups of five for fastest conversion + string(REGEX REPLACE "(..)(..)(..)(..)(..)" "'\\\\x\\1','\\\\x\\2','\\\\x\\3','\\\\x\\4','\\\\x\\5'," chars "${bytes}") + # Since we did this in groups, we have some leftovers to clean up + string(LENGTH "${bytes}" n_bytes2) + math(EXPR n_bytes "${n_bytes2} / 2") + math(EXPR remainder "${n_bytes} % 5") # <-- '5' is the grouping count from above + set(cleanup_re "$") + set(cleanup_sub ) + while(remainder) + set(cleanup_re "(..)${cleanup_re}") + set(cleanup_sub "'\\\\x\\${remainder}',${cleanup_sub}") + math(EXPR remainder "${remainder} - 1") + endwhile() + if(NOT cleanup_re STREQUAL "$") + string(REGEX REPLACE "${cleanup_re}" "${cleanup_sub}" chars "${chars}") + endif() + string(CONFIGURE [[ + namespace { const char file_array[] = { @chars@ 0 }; } + namespace cmrc { namespace @NAMESPACE@ { namespace res_chars { + extern const char* const @SYMBOL@_begin = file_array; + extern const char* const @SYMBOL@_end = file_array + @n_bytes@; + }}} + ]] code) + file(WRITE "${OUTPUT_FILE}" "${code}") + # Exit from the script. Nothing else needs to be processed + return() +endif() + +set(_version 2.0.0) + +cmake_minimum_required(VERSION 3.5) +include(CMakeParseArguments) + +if(COMMAND cmrc_add_resource_library) + if(NOT DEFINED _CMRC_VERSION OR NOT (_version STREQUAL _CMRC_VERSION)) + message(WARNING "More than one CMakeRC version has been included in this project.") + endif() + # CMakeRC has already been included! Don't do anything + return() +endif() + +set(_CMRC_VERSION "${_version}" CACHE INTERNAL "CMakeRC version. Used for checking for conflicts") + +set(_CMRC_SCRIPT "${CMAKE_CURRENT_LIST_FILE}" CACHE INTERNAL "Path to CMakeRC script") + +function(_cmrc_normalize_path var) + set(path "${${var}}") + file(TO_CMAKE_PATH "${path}" path) + while(path MATCHES "//") + string(REPLACE "//" "/" path "${path}") + endwhile() + string(REGEX REPLACE "/+$" "" path "${path}") + set("${var}" "${path}" PARENT_SCOPE) +endfunction() + +get_filename_component(_inc_dir "${CMAKE_BINARY_DIR}/_cmrc/include" ABSOLUTE) +set(CMRC_INCLUDE_DIR "${_inc_dir}" CACHE INTERNAL "Directory for CMakeRC include files") +# Let's generate the primary include file +file(MAKE_DIRECTORY "${CMRC_INCLUDE_DIR}/cmrc") +set(hpp_content [==[ +#ifndef CMRC_CMRC_HPP_INCLUDED +#define CMRC_CMRC_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !(defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) || defined(CMRC_NO_EXCEPTIONS)) +#define CMRC_NO_EXCEPTIONS 1 +#endif + +namespace cmrc { namespace detail { struct dummy; } } + +#define CMRC_DECLARE(libid) \ + namespace cmrc { namespace detail { \ + struct dummy; \ + static_assert(std::is_same::value, "CMRC_DECLARE() must only appear at the global namespace"); \ + } } \ + namespace cmrc { namespace libid { \ + cmrc::embedded_filesystem get_filesystem(); \ + } } static_assert(true, "") + +namespace cmrc { + +class file { + const char* _begin = nullptr; + const char* _end = nullptr; + +public: + using iterator = const char*; + using const_iterator = iterator; + iterator begin() const noexcept { return _begin; } + iterator cbegin() const noexcept { return _begin; } + iterator end() const noexcept { return _end; } + iterator cend() const noexcept { return _end; } + std::size_t size() const { return static_cast(std::distance(begin(), end())); } + + file() = default; + file(iterator beg, iterator end) noexcept : _begin(beg), _end(end) {} +}; + +class directory_entry; + +namespace detail { + +class directory; +class file_data; + +class file_or_directory { + union _data_t { + class file_data* file_data; + class directory* directory; + } _data; + bool _is_file = true; + +public: + explicit file_or_directory(file_data& f) { + _data.file_data = &f; + } + explicit file_or_directory(directory& d) { + _data.directory = &d; + _is_file = false; + } + bool is_file() const noexcept { + return _is_file; + } + bool is_directory() const noexcept { + return !is_file(); + } + const directory& as_directory() const noexcept { + assert(!is_file()); + return *_data.directory; + } + const file_data& as_file() const noexcept { + assert(is_file()); + return *_data.file_data; + } +}; + +class file_data { +public: + const char* begin_ptr; + const char* end_ptr; + file_data(const file_data&) = delete; + file_data(const char* b, const char* e) : begin_ptr(b), end_ptr(e) {} +}; + +inline std::pair split_path(const std::string& path) { + auto first_sep = path.find("/"); + if (first_sep == path.npos) { + return std::make_pair(path, ""); + } else { + return std::make_pair(path.substr(0, first_sep), path.substr(first_sep + 1)); + } +} + +struct created_subdirectory { + class directory& directory; + class file_or_directory& index_entry; +}; + +class directory { + std::list _files; + std::list _dirs; + std::map _index; + + using base_iterator = std::map::const_iterator; + +public: + + directory() = default; + directory(const directory&) = delete; + + created_subdirectory add_subdir(std::string name) & { + _dirs.emplace_back(); + auto& back = _dirs.back(); + auto& fod = _index.emplace(name, file_or_directory{back}).first->second; + return created_subdirectory{back, fod}; + } + + file_or_directory* add_file(std::string name, const char* begin, const char* end) & { + assert(_index.find(name) == _index.end()); + _files.emplace_back(begin, end); + return &_index.emplace(name, file_or_directory{_files.back()}).first->second; + } + + const file_or_directory* get(const std::string& path) const { + auto pair = split_path(path); + auto child = _index.find(pair.first); + if (child == _index.end()) { + return nullptr; + } + auto& entry = child->second; + if (pair.second.empty()) { + // We're at the end of the path + return &entry; + } + + if (entry.is_file()) { + // We can't traverse into a file. Stop. + return nullptr; + } + // Keep going down + return entry.as_directory().get(pair.second); + } + + class iterator { + base_iterator _base_iter; + base_iterator _end_iter; + public: + using value_type = directory_entry; + using difference_type = std::ptrdiff_t; + using pointer = const value_type*; + using reference = const value_type&; + using iterator_category = std::input_iterator_tag; + + iterator() = default; + explicit iterator(base_iterator iter, base_iterator end) : _base_iter(iter), _end_iter(end) {} + + iterator begin() const noexcept { + return *this; + } + + iterator end() const noexcept { + return iterator(_end_iter, _end_iter); + } + + inline value_type operator*() const noexcept; + + bool operator==(const iterator& rhs) const noexcept { + return _base_iter == rhs._base_iter; + } + + bool operator!=(const iterator& rhs) const noexcept { + return !(*this == rhs); + } + + iterator& operator++() noexcept { + ++_base_iter; + return *this; + } + + iterator operator++(int) noexcept { + auto cp = *this; + ++_base_iter; + return cp; + } + }; + + using const_iterator = iterator; + + iterator begin() const noexcept { + return iterator(_index.begin(), _index.end()); + } + + iterator end() const noexcept { + return iterator(); + } +}; + +inline std::string normalize_path(std::string path) { + while (path.find("/") == 0) { + path.erase(path.begin()); + } + while (!path.empty() && (path.rfind("/") == path.size() - 1)) { + path.pop_back(); + } + auto off = path.npos; + while ((off = path.find("//")) != path.npos) { + path.erase(path.begin() + static_cast(off)); + } + return path; +} + +using index_type = std::map; + +} // detail + +class directory_entry { + std::string _fname; + const detail::file_or_directory* _item; + +public: + directory_entry() = delete; + explicit directory_entry(std::string filename, const detail::file_or_directory& item) + : _fname(filename) + , _item(&item) + {} + + const std::string& filename() const & { + return _fname; + } + std::string filename() const && { + return std::move(_fname); + } + + bool is_file() const { + return _item->is_file(); + } + + bool is_directory() const { + return _item->is_directory(); + } +}; + +directory_entry detail::directory::iterator::operator*() const noexcept { + assert(begin() != end()); + return directory_entry(_base_iter->first, _base_iter->second); +} + +using directory_iterator = detail::directory::iterator; + +class embedded_filesystem { + // Never-null: + const cmrc::detail::index_type* _index; + const detail::file_or_directory* _get(std::string path) const { + path = detail::normalize_path(path); + auto found = _index->find(path); + if (found == _index->end()) { + return nullptr; + } else { + return found->second; + } + } + +public: + explicit embedded_filesystem(const detail::index_type& index) + : _index(&index) + {} + + file open(const std::string& path) const { + auto entry_ptr = _get(path); + if (!entry_ptr || !entry_ptr->is_file()) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error no such file or directory: %s\n", path.c_str()); + abort(); +#else + throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path); +#endif + } + auto& dat = entry_ptr->as_file(); + return file{dat.begin_ptr, dat.end_ptr}; + } + + bool is_file(const std::string& path) const noexcept { + auto entry_ptr = _get(path); + return entry_ptr && entry_ptr->is_file(); + } + + bool is_directory(const std::string& path) const noexcept { + auto entry_ptr = _get(path); + return entry_ptr && entry_ptr->is_directory(); + } + + bool exists(const std::string& path) const noexcept { + return !!_get(path); + } + + directory_iterator iterate_directory(const std::string& path) const { + auto entry_ptr = _get(path); + if (!entry_ptr) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error no such file or directory: %s\n", path.c_str()); + abort(); +#else + throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path); +#endif + } + if (!entry_ptr->is_directory()) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error not a directory: %s\n", path.c_str()); + abort(); +#else + throw std::system_error(make_error_code(std::errc::not_a_directory), path); +#endif + } + return entry_ptr->as_directory().begin(); + } +}; + +} + +#endif // CMRC_CMRC_HPP_INCLUDED +]==]) + +set(cmrc_hpp "${CMRC_INCLUDE_DIR}/cmrc/cmrc.hpp" CACHE INTERNAL "") +set(_generate 1) +if(EXISTS "${cmrc_hpp}") + file(READ "${cmrc_hpp}" _current) + if(_current STREQUAL hpp_content) + set(_generate 0) + endif() +endif() +file(GENERATE OUTPUT "${cmrc_hpp}" CONTENT "${hpp_content}" CONDITION ${_generate}) + +add_library(cmrc-base INTERFACE) +target_include_directories(cmrc-base INTERFACE $) +# Signal a basic C++11 feature to require C++11. +target_compile_features(cmrc-base INTERFACE cxx_nullptr) +set_property(TARGET cmrc-base PROPERTY INTERFACE_CXX_EXTENSIONS OFF) +add_library(cmrc::base ALIAS cmrc-base) + +function(cmrc_add_resource_library name) + set(args ALIAS NAMESPACE TYPE) + cmake_parse_arguments(ARG "" "${args}" "" "${ARGN}") + # Generate the identifier for the resource library's namespace + set(ns_re "[a-zA-Z_][a-zA-Z0-9_]*") + if(NOT DEFINED ARG_NAMESPACE) + # Check that the library name is also a valid namespace + if(NOT name MATCHES "${ns_re}") + message(SEND_ERROR "Library name is not a valid namespace. Specify the NAMESPACE argument") + endif() + set(ARG_NAMESPACE "${name}") + else() + if(NOT ARG_NAMESPACE MATCHES "${ns_re}") + message(SEND_ERROR "NAMESPACE for ${name} is not a valid C++ namespace identifier (${ARG_NAMESPACE})") + endif() + endif() + set(libname "${name}") + # Check that type is either "STATIC" or "OBJECT", or default to "STATIC" if + # not set + if(NOT DEFINED ARG_TYPE) + set(ARG_TYPE STATIC) + elseif(NOT "${ARG_TYPE}" MATCHES "^(STATIC|OBJECT)$") + message(SEND_ERROR "${ARG_TYPE} is not a valid TYPE (STATIC and OBJECT are acceptable)") + set(ARG_TYPE STATIC) + endif() + # Generate a library with the compiled in character arrays. + string(CONFIGURE [=[ + #include + #include + #include + + namespace cmrc { + namespace @ARG_NAMESPACE@ { + + namespace res_chars { + // These are the files which are available in this resource library + $, + > + } + + namespace { + + const cmrc::detail::index_type& + get_root_index() { + static cmrc::detail::directory root_directory_; + static cmrc::detail::file_or_directory root_directory_fod{root_directory_}; + static cmrc::detail::index_type root_index; + root_index.emplace("", &root_directory_fod); + struct dir_inl { + class cmrc::detail::directory& directory; + }; + dir_inl root_directory_dir{root_directory_}; + (void)root_directory_dir; + $, + > + $, + > + return root_index; + } + + } + + cmrc::embedded_filesystem get_filesystem() { + static auto& index = get_root_index(); + return cmrc::embedded_filesystem{index}; + } + + } // @ARG_NAMESPACE@ + } // cmrc + ]=] cpp_content @ONLY) + get_filename_component(libdir "${CMAKE_CURRENT_BINARY_DIR}/__cmrc_${name}" ABSOLUTE) + get_filename_component(lib_tmp_cpp "${libdir}/lib_.cpp" ABSOLUTE) + string(REPLACE "\n " "\n" cpp_content "${cpp_content}") + file(GENERATE OUTPUT "${lib_tmp_cpp}" CONTENT "${cpp_content}") + get_filename_component(libcpp "${libdir}/lib.cpp" ABSOLUTE) + add_custom_command(OUTPUT "${libcpp}" + DEPENDS "${lib_tmp_cpp}" "${cmrc_hpp}" + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${lib_tmp_cpp}" "${libcpp}" + COMMENT "Generating ${name} resource loader" + ) + # Generate the actual static library. Each source file is just a single file + # with a character array compiled in containing the contents of the + # corresponding resource file. + add_library(${name} ${ARG_TYPE} ${libcpp}) + set_property(TARGET ${name} PROPERTY CMRC_LIBDIR "${libdir}") + set_property(TARGET ${name} PROPERTY CMRC_NAMESPACE "${ARG_NAMESPACE}") + target_link_libraries(${name} PUBLIC cmrc::base) + set_property(TARGET ${name} PROPERTY CMRC_IS_RESOURCE_LIBRARY TRUE) + if(ARG_ALIAS) + add_library("${ARG_ALIAS}" ALIAS ${name}) + endif() + cmrc_add_resources(${name} ${ARG_UNPARSED_ARGUMENTS}) +endfunction() + +function(_cmrc_register_dirs name dirpath) + if(dirpath STREQUAL "") + return() + endif() + # Skip this dir if we have already registered it + get_target_property(registered "${name}" _CMRC_REGISTERED_DIRS) + if(dirpath IN_LIST registered) + return() + endif() + # Register the parent directory first + get_filename_component(parent "${dirpath}" DIRECTORY) + if(NOT parent STREQUAL "") + _cmrc_register_dirs("${name}" "${parent}") + endif() + # Now generate the registration + set_property(TARGET "${name}" APPEND PROPERTY _CMRC_REGISTERED_DIRS "${dirpath}") + _cm_encode_fpath(sym "${dirpath}") + if(parent STREQUAL "") + set(parent_sym root_directory) + else() + _cm_encode_fpath(parent_sym "${parent}") + endif() + get_filename_component(leaf "${dirpath}" NAME) + set_property( + TARGET "${name}" + APPEND PROPERTY CMRC_MAKE_DIRS + "static auto ${sym}_dir = ${parent_sym}_dir.directory.add_subdir(\"${leaf}\")\;" + "root_index.emplace(\"${dirpath}\", &${sym}_dir.index_entry)\;" + ) +endfunction() + +function(cmrc_add_resources name) + get_target_property(is_reslib ${name} CMRC_IS_RESOURCE_LIBRARY) + if(NOT TARGET ${name} OR NOT is_reslib) + message(SEND_ERROR "cmrc_add_resources called on target '${name}' which is not an existing resource library") + return() + endif() + + set(options) + set(args WHENCE PREFIX) + set(list_args) + cmake_parse_arguments(ARG "${options}" "${args}" "${list_args}" "${ARGN}") + + if(NOT ARG_WHENCE) + set(ARG_WHENCE ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + _cmrc_normalize_path(ARG_WHENCE) + get_filename_component(ARG_WHENCE "${ARG_WHENCE}" ABSOLUTE) + + # Generate the identifier for the resource library's namespace + get_target_property(lib_ns "${name}" CMRC_NAMESPACE) + + get_target_property(libdir ${name} CMRC_LIBDIR) + get_target_property(target_dir ${name} SOURCE_DIR) + file(RELATIVE_PATH reldir "${target_dir}" "${CMAKE_CURRENT_SOURCE_DIR}") + if(reldir MATCHES "^\\.\\.") + message(SEND_ERROR "Cannot call cmrc_add_resources in a parent directory from the resource library target") + return() + endif() + + foreach(input IN LISTS ARG_UNPARSED_ARGUMENTS) + _cmrc_normalize_path(input) + get_filename_component(abs_in "${input}" ABSOLUTE) + # Generate a filename based on the input filename that we can put in + # the intermediate directory. + file(RELATIVE_PATH relpath "${ARG_WHENCE}" "${abs_in}") + if(relpath MATCHES "^\\.\\.") + # For now we just error on files that exist outside of the soure dir. + message(SEND_ERROR "Cannot add file '${input}': File must be in a subdirectory of ${ARG_WHENCE}") + continue() + endif() + if(DEFINED ARG_PREFIX) + _cmrc_normalize_path(ARG_PREFIX) + endif() + if(ARG_PREFIX AND NOT ARG_PREFIX MATCHES "/$") + set(ARG_PREFIX "${ARG_PREFIX}/") + endif() + get_filename_component(dirpath "${ARG_PREFIX}${relpath}" DIRECTORY) + _cmrc_register_dirs("${name}" "${dirpath}") + get_filename_component(abs_out "${libdir}/intermediate/${ARG_PREFIX}${relpath}.cpp" ABSOLUTE) + # Generate a symbol name relpath the file's character array + _cm_encode_fpath(sym "${relpath}") + # Get the symbol name for the parent directory + if(dirpath STREQUAL "") + set(parent_sym root_directory) + else() + _cm_encode_fpath(parent_sym "${dirpath}") + endif() + # Generate the rule for the intermediate source file + _cmrc_generate_intermediate_cpp(${lib_ns} ${sym} "${abs_out}" "${abs_in}") + target_sources(${name} PRIVATE "${abs_out}") + set_property(TARGET ${name} APPEND PROPERTY CMRC_EXTERN_DECLS + "// Pointers to ${input}" + "extern const char* const ${sym}_begin\;" + "extern const char* const ${sym}_end\;" + ) + get_filename_component(leaf "${relpath}" NAME) + set_property( + TARGET ${name} + APPEND PROPERTY CMRC_MAKE_FILES + "root_index.emplace(" + " \"${ARG_PREFIX}${relpath}\"," + " ${parent_sym}_dir.directory.add_file(" + " \"${leaf}\"," + " res_chars::${sym}_begin," + " res_chars::${sym}_end" + " )" + ")\;" + ) + endforeach() +endfunction() + +function(_cmrc_generate_intermediate_cpp lib_ns symbol outfile infile) + add_custom_command( + # This is the file we will generate + OUTPUT "${outfile}" + # These are the primary files that affect the output + DEPENDS "${infile}" "${_CMRC_SCRIPT}" + COMMAND + "${CMAKE_COMMAND}" + -D_CMRC_GENERATE_MODE=TRUE + -DNAMESPACE=${lib_ns} + -DSYMBOL=${symbol} + "-DINPUT_FILE=${infile}" + "-DOUTPUT_FILE=${outfile}" + -P "${_CMRC_SCRIPT}" + COMMENT "Generating intermediate file for ${infile}" + ) +endfunction() + +function(_cm_encode_fpath var fpath) + string(MAKE_C_IDENTIFIER "${fpath}" ident) + string(MD5 hash "${fpath}") + string(SUBSTRING "${hash}" 0 4 hash) + set(${var} f_${hash}_${ident} PARENT_SCOPE) +endfunction() diff --git a/modules/cmake/SourceFileGroup.cmake b/modules/cmake/SourceFileGroup.cmake new file mode 100644 index 0000000..b8609c9 --- /dev/null +++ b/modules/cmake/SourceFileGroup.cmake @@ -0,0 +1,12 @@ +function(setup_source_group target src_group_name) + set(multiValueArgs SOURCES) + cmake_parse_arguments(ARG "" "" "${multiValueArgs}" ${ARGN}) + + message(STATUS "Setting up source group ${src_group_name}, from SOURCES: ${ARG_SOURCES}") + target_sources(${target} PRIVATE ${ARG_SOURCES}) + set_source_files_properties( + ${ARG_SOURCES} + TARGET_DIRECTORY ${target} + PROPERTIES UNITY_GROUP "${src_group_name}" + ) +endfunction(setup_source_group) diff --git a/modules/cmake/WarningFlags.cmake b/modules/cmake/WarningFlags.cmake index 0018563..d22c801 100644 --- a/modules/cmake/WarningFlags.cmake +++ b/modules/cmake/WarningFlags.cmake @@ -1,11 +1,65 @@ add_library(warning_flags INTERFACE) -if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")) - target_compile_options(warning_flags INTERFACE - /W4 # base warning level - /wd4458 # declaration hides class member (from Foley's GUI Magic) - /wd4505 # since VS2019 doesn't handle [[ maybe_unused ]] for static functions - ) +if(WIN32) + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + message(STATUS "Setting ClangCL compiler flags") + target_compile_options(warning_flags INTERFACE + -Wall + -Wno-pessimizing-move + -Wno-missing-field-initializers + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-exit-time-destructors + -Wno-old-style-cast + -Wno-undef + -Wno-unused-macros + -Wno-nonportable-system-include-path + -Wno-reserved-macro-identifier + -Wno-documentation + -Wno-documentation-unknown-command + -Wno-double-promotion + -Wno-global-constructors + -Wno-suggest-override + -Wno-suggest-destructor-override + -Wno-non-virtual-dtor + -Wno-extra-semi-stmt + -Wno-cast-qual + -Wno-float-equal + -Wno-covered-switch-default + -Wno-unused-template + -Wno-undefined-func-template + -Wno-missing-variable-declarations + -Wno-ctad-maybe-unsupported + -Wno-missing-noreturn + -Wno-reserved-identifier + -Wno-undefined-reinterpret-cast + -Wno-disabled-macro-expansion + -Wno-deprecated + -Wno-newline-eof + -Wno-date-time + -Wno-cast-function-type + -Wno-range-loop-bind-reference + -Wno-sign-conversion + -Wno-implicit-int-float-conversion + -Wno-implicit-const-int-float-conversion + -Wno-unsafe-buffer-usage + -Wno-unqualified-std-cast-call + -Wno-unknown-warning-option + -Wno-header-hygiene + ) + elseif((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")) + message(STATUS "Setting MSVC compiler flags") + target_compile_options(warning_flags INTERFACE + /W4 # base warning level + /wd4458 # declaration hides class member (from Foley's GUI Magic) + /wd4505 # since VS2019 doesn't handle [[ maybe_unused ]] for static functions + /wd4244 # for XSIMD + /wd5051 # for [[maybe-unused]] in RTNeural + /wd5054 # for Eigen + /wd4127 # RTNeural is C++14, but C++17+ prefers if constexpr + /wd4324 # structure padded due to alignment specifier + ) + endif() elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) target_compile_options(warning_flags INTERFACE -Wall -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized @@ -17,6 +71,7 @@ elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQU -Wno-inconsistent-missing-destructor-override -Wshift-sign-overflow -Wnullable-to-nonnull-conversion -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wpedantic -Wno-pessimizing-move + -Wno-unqualified-std-cast-call -Wno-nullable-to-nonnull-conversion # These lines suppress some custom warnings. # Comment them out to be more strict. -Wno-shadow-field-in-constructor diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt index b33fa71..05cc9f9 100644 --- a/res/CMakeLists.txt +++ b/res/CMakeLists.txt @@ -1,7 +1 @@ -juce_add_binary_data(BinaryData SOURCES - temp.png - ) - -# Need to build BinaryData with -fPIC flag on Linux -set_target_properties(BinaryData PROPERTIES - POSITION_INDEPENDENT_CODE TRUE) +include(CMakeRC) diff --git a/res/temp.png b/res/temp.png deleted file mode 100644 index 3e69a22..0000000 Binary files a/res/temp.png and /dev/null differ diff --git a/setup.sh b/setup.sh index 427dd5c..465d112 100644 --- a/setup.sh +++ b/setup.sh @@ -33,12 +33,6 @@ declare -a source_files=("scripts/validate.sh" "src/CMakeLists.txt" "src/${plugin_name}.h" "src/${plugin_name}.cpp" - ".github/FUNDING.yml" - "installers/mac/build_mac_installer.sh" - "installers/mac/Intro.txt" - "installers/mac/${plugin_name}.pkgproj" - "installers/windows/build_win_installer.sh" - "installers/windows/${plugin_name}_Install_Script.iss" ) for file in "${source_files[@]}"; do sed -i.bak -e "s/TempPlugin/${plugin_name}/g" $file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1a12d30..cc2244c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,6 @@ -target_sources(TempPlugin PRIVATE +include(SourceFileGroup) + +setup_source_group(TempPlugin PLUGIN_SRCS SOURCES TempPlugin.cpp ) @@ -11,5 +13,9 @@ set_source_files_properties(${juce_module_sources} TARGET_DIRECTORY TempPlugin PROPERTIES SKIP_PRECOMPILE_HEADERS TRUE SKIP_UNITY_BUILD_INCLUSION TRUE ) +set_target_properties(TempPlugin PROPERTIES + UNITY_BUILD ON + UNITY_BUILD_MODE GROUP + UNITY_BUILD_BATCH_SIZE 8 +) target_precompile_headers(TempPlugin PRIVATE pch.h) - diff --git a/src/TempPlugin.cpp b/src/TempPlugin.cpp index c037547..d7ccde9 100644 --- a/src/TempPlugin.cpp +++ b/src/TempPlugin.cpp @@ -2,7 +2,7 @@ TempPlugin::TempPlugin() = default; -void TempPlugin::prepareToPlay ([[maybe_unused]] double sampleRate, [[maybe_unused]] int samplesPerBlock) +void TempPlugin::prepareToPlay ([[maybe_unused]] double sample_rate, [[maybe_unused]] int samples_per_block) { } diff --git a/src/TempPlugin.h b/src/TempPlugin.h index 5b2c50e..c997708 100644 --- a/src/TempPlugin.h +++ b/src/TempPlugin.h @@ -13,7 +13,7 @@ class TempPlugin : public chowdsp::PluginBase public: TempPlugin(); - void prepareToPlay (double sampleRate, int samplesPerBlock) override; + void prepareToPlay (double sample_rate, int samples_per_block) override; void releaseResources() override {} void processAudioBlock (juce::AudioBuffer& buffer) override; diff --git a/src/pch.h b/src/pch.h index 65f96c6..5c58df1 100644 --- a/src/pch.h +++ b/src/pch.h @@ -7,7 +7,7 @@ // C++/STL headers here... // JUCE modules -#include #include +#include // Any other widely used headers that don't change...