sudara / pamplejuce

A JUCE audio plugin template. JUCE 7, Catch2, Pluginval, macOS notarization, Azure Trusted Signing, Github Actions
https://melatonin.dev/blog/
MIT License
394 stars 37 forks source link

Add Icons, Create DMG, Codesign, Notarize #10

Closed sudara closed 2 years ago

sudara commented 2 years ago

This PR actually does a handful of things:

Finder - 2022-07-10 09@2x


Note, I first thought we just needed to specify the icons in the Info.plist, so was adding the icns file and editing the xml.

However, icons on macOS are handled as extended attributes, thereby bypassing quarantine and codesigning checksums.

For reference (fun ruby one liner that scans for the correct xml key):

mkdir -p ${{ env.VST3_PATH }}/Contents/Resources && cp ../appdmg/pamplejuce.icns ${{ env.VST3_PATH }}/Contents/Resources/Icons.icns
cp ../appdmg/pamplejuce.icns ${{ env.AU_PATH }}/Contents/Resources/Icons.icns        
ruby -i -pe 'sub(/\<string\>/, "<string>Icons.icns") if $p=~/CFBundleIconFile/;$p=$_' ${{ env.VST3_PATH }}/Contents/Info.plist 
ruby -i -pe 'sub(/\<string\>/, "<string>Icons.icns") if $p=~/CFBundleIconFile/;$p=$_' ${{ env.AU_PATH }}/Contents/Info.plist 

refs: https://apple.stackexchange.com/questions/350405/unlike-other-folders-dragging-apps-out-of-applications-create-an-alias-what-c https://stackoverflow.com/questions/41964074/gatekeeper-path-randomization-for-developer-signed-dmg