mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-13 08:05:52 +01:00
Sign the DMG with the correct cert
It must be signed with a "Developer ID Application" certificate and not the "Developer ID Installer" certificate. And make sure to sign the app before copying it to the temporary DMG folder.
This commit is contained in:
@@ -89,7 +89,6 @@ IDENT=$(plist "${INSTALL_ROOT}/Audacity.app/Contents/Info.plist" "CFBundleIdenti
|
|||||||
# and unnotarized.
|
# and unnotarized.
|
||||||
#
|
#
|
||||||
# CODESIGN_APP_IDENTITY="Developer ID Application:"
|
# CODESIGN_APP_IDENTITY="Developer ID Application:"
|
||||||
# CODESIGN_DMG_IDENTITY="Developer ID Installer:"
|
|
||||||
# NOTARIZE_USERNAME="specify your Apple developer email address"
|
# NOTARIZE_USERNAME="specify your Apple developer email address"
|
||||||
# NOTARIZE_PASSWORD="@keychain:APP_PASSWORD"
|
# NOTARIZE_PASSWORD="@keychain:APP_PASSWORD"
|
||||||
#
|
#
|
||||||
@@ -104,7 +103,7 @@ SIGNING=
|
|||||||
if [ -r ~/.audacity_signing ]
|
if [ -r ~/.audacity_signing ]
|
||||||
then
|
then
|
||||||
source ~/.audacity_signing
|
source ~/.audacity_signing
|
||||||
if [ -n "${CODESIGN_APP_IDENTITY}" -a -n "${CODESIGN_DMG_IDENTITY}" -a -n "${NOTARIZE_USERNAME}" -a -n "${NOTARIZE_PASSWORD}" ]
|
if [ -n "${CODESIGN_APP_IDENTITY}" -a -n "${NOTARIZE_USERNAME}" -a -n "${NOTARIZE_PASSWORD}" ]
|
||||||
then
|
then
|
||||||
SIGNING="y"
|
SIGNING="y"
|
||||||
fi
|
fi
|
||||||
@@ -123,10 +122,6 @@ chown -RH "${INSTALL_OWNER}:${INSTALL_GROUP}" "${TARGET_BUILD_DIR}"
|
|||||||
# Preclean
|
# Preclean
|
||||||
rm -rf "$DMG" "$DMG.dmg" TMP.dmg
|
rm -rf "$DMG" "$DMG.dmg" TMP.dmg
|
||||||
|
|
||||||
# Create structure
|
|
||||||
mkdir "$DMG"
|
|
||||||
cp -pR "${DSTROOT}/" "${DMG}"
|
|
||||||
|
|
||||||
# Sign and notarize the app
|
# Sign and notarize the app
|
||||||
if [ -n "${SIGNING}" ]
|
if [ -n "${SIGNING}" ]
|
||||||
then
|
then
|
||||||
@@ -138,22 +133,24 @@ then
|
|||||||
--options runtime \
|
--options runtime \
|
||||||
--entitlements "${SRCROOT}/${CODE_SIGN_ENTITLEMENTS}" \
|
--entitlements "${SRCROOT}/${CODE_SIGN_ENTITLEMENTS}" \
|
||||||
--sign "${CODESIGN_APP_IDENTITY}" \
|
--sign "${CODESIGN_APP_IDENTITY}" \
|
||||||
"${DMG}/Audacity.app"
|
"${DSTROOT}/Audacity.app"
|
||||||
|
|
||||||
# Create the ZIP archive for notarization
|
# Create the ZIP archive for notarization
|
||||||
xcrun ditto -c -k --keepParent "${DMG}" "${DMG}.zip"
|
xcrun ditto -c -k --keepParent "${DSTROOT}" "${DSTROOT}.zip"
|
||||||
|
|
||||||
# Send it off for notarization
|
# Send it off for notarization
|
||||||
notarize "${DMG}.zip"
|
notarize "${DSTROOT}.zip"
|
||||||
|
|
||||||
# Remove the zip file
|
# Remove the zip file
|
||||||
rm "${DMG}.zip"
|
rm "${DSTROOT}.zip"
|
||||||
|
|
||||||
# Staple the app
|
# Staple the app
|
||||||
stapler staple "${DMG}/Audacity.app"
|
stapler staple "${DSTROOT}/Audacity.app"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create structure
|
||||||
|
mkdir "$DMG"
|
||||||
|
cp -pR "${DSTROOT}/" "${DMG}"
|
||||||
|
|
||||||
#Add a custom icon for the DMG
|
#Add a custom icon for the DMG
|
||||||
#cp -p mac/Resources/Audacity.icns "${DMG}"/.VolumeIcon.icns
|
#cp -p mac/Resources/Audacity.icns "${DMG}"/.VolumeIcon.icns
|
||||||
@@ -194,6 +191,7 @@ EOF
|
|||||||
# Make our DMG look pretty and install the custom background image
|
# Make our DMG look pretty and install the custom background image
|
||||||
echo '
|
echo '
|
||||||
tell application "Finder"
|
tell application "Finder"
|
||||||
|
with timeout of 300 seconds
|
||||||
tell disk "'$TITLE'"
|
tell disk "'$TITLE'"
|
||||||
open
|
open
|
||||||
set current view of container window to icon view
|
set current view of container window to icon view
|
||||||
@@ -213,6 +211,7 @@ echo '
|
|||||||
delay 5
|
delay 5
|
||||||
eject
|
eject
|
||||||
end tell
|
end tell
|
||||||
|
end timeout
|
||||||
end tell
|
end tell
|
||||||
' | osascript
|
' | osascript
|
||||||
|
|
||||||
@@ -225,7 +224,7 @@ then
|
|||||||
xcrun codesign --verbose \
|
xcrun codesign --verbose \
|
||||||
--timestamp \
|
--timestamp \
|
||||||
--identifier "${IDENT}" \
|
--identifier "${IDENT}" \
|
||||||
--sign "${CODESIGN_DMG_IDENTITY}" \
|
--sign "${CODESIGN_APP_IDENTITY}" \
|
||||||
"${DMG}.dmg"
|
"${DMG}.dmg"
|
||||||
notarize "${DMG}.dmg"
|
notarize "${DMG}.dmg"
|
||||||
stapler staple "${DMG}.dmg"
|
stapler staple "${DMG}.dmg"
|
||||||
@@ -233,7 +232,7 @@ fi
|
|||||||
|
|
||||||
# Create zip version
|
# Create zip version
|
||||||
rm -rf "${DMG}/.background"
|
rm -rf "${DMG}/.background"
|
||||||
rm -rf "${DMG}/Audacity.app/help/"
|
rm -rf "${DMG}/Audacity.app/Contents/help"
|
||||||
zip -r9 "${DMG}.zip" "${DMG}"
|
zip -r9 "${DMG}.zip" "${DMG}"
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
|||||||
Reference in New Issue
Block a user