◐ Shell
clean mode source ↗

fix for #1507 - mac signing issues for release builds by kjhollen · Pull Request #1510 · processing/processing4

fixes issue #1507 with Mac app notarization failure by signing the whole app again after fileAssocations are made. Adds an extra step called 'signApp' to the build process for ./gradlew -m packageDistributionForCurrentOS which depends on createDistributable and setExecutablePermissions.

Previously, release builds were failing because the .icns files for .pde, .pdex, and .pdez were added to the .app file after signing, when fileAssocation was called in nativeDistributions.

Most of this code was generated with Copilot, then I edited it for legibility. I asked Copilot a lot of questions about the order of operations for the build system and where the fileAssociations occurred, and feel confident that this is the right place in the process to re-sign the app. I also prodded Copilot to see if there were any other simpler options that didn't involve signing things a second time (outside of when jpackage does this automatically), but wasn't able to produce any other successful solutions.

I have only tested this on Mac, but the file type associations work and the app notarization completed successfully (though it took nearly 30 minutes to run the notarization).

pinging @catilac for review!