From f315ba5e290fe283b5b9254cfe075055953debbb Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 5 Mar 2020 13:59:37 +0100 Subject: [PATCH] Add the macOS VST bundle --- vst/CMakeLists.txt | 11 ++++++++++- vst/mac/Info.plist | 24 ++++++++++++++++++++++++ vst/mac/PkgInfo | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 vst/mac/Info.plist create mode 100644 vst/mac/PkgInfo diff --git a/vst/CMakeLists.txt b/vst/CMakeLists.txt index 4cafc961..7eaa90f7 100644 --- a/vst/CMakeLists.txt +++ b/vst/CMakeLists.txt @@ -58,14 +58,23 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") endif() # Create the bundle (see "VST 3 Locations / Format") +execute_process ( + COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents") if(WIN32) set_target_properties(${VSTPLUGIN_PRJ_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/${VST3_PACKAGE_ARCHITECTURE}-win") # TODO: make desktop.ini, Plugin.ico elseif(APPLE) set_target_properties(${VSTPLUGIN_PRJ_NAME} PROPERTIES + SUFFIX "" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/MacOS") - # TODO: make Info.plist, PkgInfo + file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/mac/PkgInfo" + DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents") + set(SFIZZ_VST3_BUNDLE_EXECUTABLE "${PROJECT_NAME}") + set(SFIZZ_VST3_BUNDLE_VERSION "${PROJECT_VERSION}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist" + "${CMAKE_CURRENT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/Info.plist" @ONLY) + # TODO: create icons as sfizz.icns, and fill it in as CFBundleIconFile else() set_target_properties(${VSTPLUGIN_PRJ_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/${VST3_PACKAGE_ARCHITECTURE}-linux") diff --git a/vst/mac/Info.plist b/vst/mac/Info.plist new file mode 100644 index 00000000..00c2b750 --- /dev/null +++ b/vst/mac/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + @SFIZZ_VST3_BUNDLE_EXECUTABLE@ + CFBundleIconFile + + CFBundleIdentifier + tools.sfz.sfizz + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleVersion + @SFIZZ_VST3_BUNDLE_VERSION@ + CSResourcesFileMapped + + + diff --git a/vst/mac/PkgInfo b/vst/mac/PkgInfo new file mode 100644 index 00000000..19a9cf67 --- /dev/null +++ b/vst/mac/PkgInfo @@ -0,0 +1 @@ +BNDL???? \ No newline at end of file