Merge pull request #576 from jpcima/apple-dmg

Apple DMG
This commit is contained in:
JP Cimalando 2020-12-13 10:21:53 +01:00 committed by GitHub
commit 7b9b7c226e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 23 deletions

View file

@ -50,8 +50,8 @@ for:
- ${APPVEYOR_BUILD_FOLDER}/scripts/appveyor/after_build.sh
test: off
artifacts:
- name: macOS Tarball
path: "sfizz-*.tar.gz"
- name: macOS DMG
path: "sfizz-*.dmg"
- matrix:
only:
@ -81,7 +81,7 @@ deploy:
- provider: GitHub
auth_token:
secure: xOugGAynvnZdc0DXaL3rlgMf4CICFLkdO8JxoRfLQMKJhkj/kZ4d8h7NCFneDzXG
artifact: macOS Tarball,x86 Setup,x64 Setup
artifact: macOS DMG,x86 Setup,x64 Setup
draft: false
prerelease: false
force_update: true

View file

@ -3,6 +3,12 @@ set -ex
make DESTDIR=${PWD}/${INSTALL_DIR} install
# Set bundle icons
bundle_icns=/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/KEXT.icns
for bundle in sfizz.vst3 sfizz.component sfizz.lv2; do
fileicon set "${INSTALL_DIR}"/"$bundle" "$bundle_icns"
done
# Perform code-signing
if test -z "${CODESIGN_PASSWORD}"; then
echo "! Secrets not available, skip code-signing"
@ -11,16 +17,16 @@ else
security unlock-keychain -p dummypasswd build.keychain
# code-sign VST3 and dylibs
codesign --sign "${CODESIGN_IDENTITY}" --deep --keychain build.keychain --force --verbose \
"${INSTALL_DIR}"/Library/Audio/Plug-Ins/VST3/sfizz.vst3
"${INSTALL_DIR}"/sfizz.vst3
# code-sign AudioUnit and dylibs
codesign --sign "${CODESIGN_IDENTITY}" --deep --keychain build.keychain --force --verbose \
"${INSTALL_DIR}"/Library/Audio/Plug-Ins/Components/sfizz.component
"${INSTALL_DIR}"/sfizz.component
# code-sign LV2 and dylibs (note: manual, LV2 are not real bundles)
codesign --sign "${CODESIGN_IDENTITY}" --keychain build.keychain --force --verbose \
"${INSTALL_DIR}"/Library/Audio/Plug-Ins/LV2/sfizz.lv2/Contents/Binary/*.so
if ls "${INSTALL_DIR}"/Library/Audio/Plug-Ins/LV2/sfizz.lv2/Contents/Frameworks/*.dylib &> /dev/null; then
"${INSTALL_DIR}"/sfizz.lv2/Contents/Binary/*.so
if ls "${INSTALL_DIR}"/sfizz.lv2/Contents/Frameworks/*.dylib &> /dev/null; then
codesign --sign "${CODESIGN_IDENTITY}" --keychain build.keychain --force --verbose \
"${INSTALL_DIR}"/Library/Audio/Plug-Ins/LV2/sfizz.lv2/Contents/Frameworks/*.dylib
"${INSTALL_DIR}"/sfizz.lv2/Contents/Frameworks/*.dylib
fi
if ls "${INSTALL_DIR}"/usr/local/bin/* &> /dev/null; then
codesign --sign "${CODESIGN_IDENTITY}" --keychain build.keychain --force --verbose \
@ -32,11 +38,13 @@ else
fi
fi
tar -zcvf "${INSTALL_DIR}.tar.gz" ${INSTALL_DIR}
# Need the flag --skip-jenkins to prevent CI hanging
# https://github.com/create-dmg/create-dmg/issues/72
create-dmg --skip-jenkins "${INSTALL_DIR}.dmg" ${INSTALL_DIR}
# Only release a tarball if there is a tag
if [[ ${APPVEYOR_REPO_TAG} ]]; then
mv "${INSTALL_DIR}.tar.gz" ${APPVEYOR_BUILD_FOLDER}
mv "${INSTALL_DIR}.dmg" ${APPVEYOR_BUILD_FOLDER}
fi
cd ${APPVEYOR_BUILD_FOLDER}

View file

@ -6,9 +6,12 @@ mkdir -p build/${INSTALL_DIR} && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DSFIZZ_VST=ON \
-DSFIZZ_AU=ON \
-DSFIZZ_JACK=OFF \
-DSFIZZ_RENDER=OFF \
-DSFIZZ_SHARED=OFF \
-DSFIZZ_TESTS=ON \
-DCMAKE_CXX_STANDARD=14 \
-DLV2PLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins/LV2 \
-DVSTPLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins/VST3 \
-DAUPLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins/Components \
-DLV2PLUGIN_INSTALL_DIR=/ \
-DVSTPLUGIN_INSTALL_DIR=/ \
-DAUPLUGIN_INSTALL_DIR=/ \
..

View file

@ -40,5 +40,4 @@ fi
set -x
brew install jack
brew install dylibbundler
brew install libsndfile dylibbundler fileicon create-dmg

View file

@ -125,8 +125,6 @@ elseif(APPLE)
set(SFIZZ_VST3_BUNDLE_VERSION "${PROJECT_VERSION}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.vst3.plist"
"${PROJECT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/Info.plist" @ONLY)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/mac/Plugin.icns"
DESTINATION "${PROJECT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/Resources")
else()
set_target_properties(${VSTPLUGIN_PRJ_NAME} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/${VST3_PACKAGE_ARCHITECTURE}-linux/$<0:>")
@ -290,8 +288,6 @@ elseif(SFIZZ_AU)
OUTPUT_STRIP_TRAILING_WHITESPACE)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.au.plist"
"${PROJECT_BINARY_DIR}/${AUPLUGIN_BUNDLE_NAME}/Contents/Info.plist" @ONLY)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/mac/Plugin.icns"
DESTINATION "${PROJECT_BINARY_DIR}/${AUPLUGIN_BUNDLE_NAME}/Contents/Resources")
file(COPY "gpl-3.0.txt"
DESTINATION "${PROJECT_BINARY_DIR}/${AUPLUGIN_BUNDLE_NAME}/Contents/SharedSupport/License")

View file

@ -6,8 +6,6 @@
<string>English</string>
<key>CFBundleExecutable</key>
<string>@SFIZZ_AU_BUNDLE_EXECUTABLE@</string>
<key>CFBundleIconFile</key>
<string>Plugin.icns</string>
<key>CFBundleIdentifier</key>
<string>@SFIZZ_AU_BUNDLE_IDENTIFIER@</string>
<key>CFBundleName</key>

View file

@ -6,8 +6,6 @@
<string>English</string>
<key>CFBundleExecutable</key>
<string>@SFIZZ_VST3_BUNDLE_EXECUTABLE@</string>
<key>CFBundleIconFile</key>
<string>Plugin.icns</string>
<key>CFBundleIdentifier</key>
<string>tools.sfz.sfizz.vst</string>
<key>CFBundleName</key>

Binary file not shown.