Files
UnrealEngine/Engine/Build/BatchFiles/Mac/AddEULAToDMG.sh
2025-05-18 13:04:45 +08:00

17 lines
391 B
Bash

#/bin/sh
DMG_PATH=$1
DMG_TEMP_PATH="${DMG_PATH}.temp.dmg"
EULA_PATH=$2
# Unflatten the image
hdiutil unflatten "$DMG_PATH"
# Append the rez file containing the EULA
xcrun Rez -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk Carbon.r "$EULA_PATH" -a -o "$DMG_PATH"
# Flatten the image again
hdiutil flatten "$DMG_PATH"
exit $?