3 # The script creates a disk image using the dmgbuild utility and signs it.
9 dmgbuild
="@DMGBUILD_EXECUTABLE@"
10 version
="@PROJECT_VERSION@"
11 log_version
="@LOG_PROJECT_VERSION@"
12 app_settings_file
="@CMAKE_BINARY_DIR@/packaging/macosx/wireshark-app.dmgbuild"
13 dsym_settings_file
="@CMAKE_BINARY_DIR@/packaging/macosx/wireshark-dsym.dmgbuild"
17 #----------------------------------------------------------
21 Create a custom dmg file to distribute Wireshark
28 Display this help message.
30 Icons are positioned and the background image is set in wireshark-app.dmgbuild.in
31 and wireshark-dsym.dmgbuild.in.
35 if [ ! -x "$dmgbuild" ] ; then
36 echo "Error: \"$dmgbuild\" not found."
40 # Parse command line arguments
52 echo "Invalid command line option"
58 if lipo
"$app_name.app/Contents/MacOS/$app_name" -verify_arch arm64
; then
60 elif lipo
"$app_name.app/Contents/MacOS/$app_name" -verify_arch x86_64
; then
61 architecture
="Intel 64"
63 echo "Error: $app_name.app missing or has unknown architecture."
64 lipo
"$app_name.app/Contents/MacOS/$app_name" -detailed_info
68 if [[ $app_name = Strato
* ]] ; then
70 app_settings_file
="@CMAKE_BINARY_DIR@/packaging/macosx/stratoshark-app.dmgbuild"
71 dsym_settings_file
="@CMAKE_BINARY_DIR@/packaging/macosx/stratoshark-dsym.dmgbuild"
74 app_vol_name
="$app_name ${version}"
75 app_img_name
="$app_vol_name $architecture.dmg"
77 printf "\nCreating application disk image %s\n" "$app_img_name"
81 -s "$app_settings_file" \
83 "$app_img_name" ||
exit 1
85 dsym_vol_name
="$app_name dSYM ${version}"
86 dsym_img_name
="$dsym_vol_name $architecture.dmg"
88 printf "\nCreating debugging symbols disk image %s\n" "$dsym_img_name"
92 -s "$dsym_settings_file" \
94 "$dsym_img_name" ||
exit 1
96 printf "\nSigning disk images\n"
98 # TN2206, "Signing Disk Images"
99 if [ -n "$CODE_SIGN_IDENTITY" ] ; then
100 echo -e "Signing $app_img_name and $dsym_img_name"
102 --sign "Developer ID Application: $CODE_SIGN_IDENTITY" \
105 "$app_img_name" "$dsym_img_name"