Mac: codesign app and dmg
Gets the cached CODESIGNID value via cmake and signs the app and dmg with it.
This commit is contained in:
@@ -199,8 +199,11 @@ s|@arch@|${arch}|" \
|
|||||||
"${CONTENTS}/Info.plist"
|
"${CONTENTS}/Info.plist"
|
||||||
plutil -convert binary1 "${CONTENTS}/Info.plist"
|
plutil -convert binary1 "${CONTENTS}/Info.plist"
|
||||||
|
|
||||||
|
# Sign the app
|
||||||
|
CODESIGNID="$(cmake .. -LA -N | grep "CODESIGNID" | cut -d "=" -f2)"
|
||||||
|
codesign --deep --force -v -s "${CODESIGNID}" "${APP}"
|
||||||
|
spctl -a -vvvv "${APP}"
|
||||||
|
|
||||||
function CreateDmg {
|
function CreateDmg {
|
||||||
local srcDir="$(mktemp -dt $$)"
|
local srcDir="$(mktemp -dt $$)"
|
||||||
|
|
||||||
@@ -227,6 +230,9 @@ function CreateDmg {
|
|||||||
msg "Creating disk image:"
|
msg "Creating disk image:"
|
||||||
hdiutil create -format UDBZ -srcdir "${srcDir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}.dmg"
|
hdiutil create -format UDBZ -srcdir "${srcDir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}.dmg"
|
||||||
|
|
||||||
|
# Sign disk image
|
||||||
|
codesign --deep --force -v -s "${CODESIGNID}" "${dmg_name}.dmg"
|
||||||
|
|
||||||
# Zip disk image for redistribution
|
# Zip disk image for redistribution
|
||||||
zip "${dmg_name}.zip" "${dmg_name}.dmg" AboutThisBuild.txt
|
zip "${dmg_name}.zip" "${dmg_name}.dmg" AboutThisBuild.txt
|
||||||
rm "${dmg_name}.dmg"
|
rm "${dmg_name}.dmg"
|
||||||
|
Reference in New Issue
Block a user