macOS: Make the dmg_package target fail noisily.

Change-Id: I479c9f13b9695d78d47b698a14cda0989724c639
Reviewed-on: https://code.wireshark.org/review/36270
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2020-03-03 08:28:39 -08:00
parent 9f3a335f45
commit 290ddeeed4
2 changed files with 31 additions and 26 deletions

View File

@ -2916,34 +2916,32 @@ if(ENABLE_APPLICATION_BUNDLE)
)
add_dependencies(app_bundle ${PROGLIST} chmodbpf path_helper)
if( DMGBUILD_EXECUTABLE AND ASCIIDOCTOR_FOUND)
add_custom_target(dmg_package_prep DEPENDS app_bundle)
add_custom_target(dmg_package_prep DEPENDS app_bundle)
set(_read_me_first "packaging/macosx/Read me first.html")
ADD_CUSTOM_COMMAND(
OUTPUT
${_read_me_first}
COMMAND ${ASCIIDOCTOR_EXECUTABLE}
--backend html
--out-file ${_read_me_first}
--attribute include-dir=${CMAKE_SOURCE_DIR}/docbook
--attribute min-macos-version=${MIN_MACOS_VERSION}
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Read_me_first.adoc
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Read_me_first.adoc
)
add_custom_target(read_me_first_html DEPENDS ${_read_me_first} )
add_dependencies(dmg_package_prep read_me_first_html)
set(_read_me_first "packaging/macosx/Read me first.html")
ADD_CUSTOM_COMMAND(
OUTPUT
${_read_me_first}
COMMAND ${ASCIIDOCTOR_EXECUTABLE}
--backend html
--out-file ${_read_me_first}
--attribute include-dir=${CMAKE_SOURCE_DIR}/docbook
--attribute min-macos-version=${MIN_MACOS_VERSION}
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Read_me_first.adoc
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Read_me_first.adoc
)
add_custom_target(read_me_first_html DEPENDS ${_read_me_first} )
add_dependencies(dmg_package_prep read_me_first_html)
ADD_CUSTOM_TARGET( dmg_package
COMMAND bash -x ${CMAKE_BINARY_DIR}/packaging/macosx/osx-dmg.sh
# Unlike nsis_package_prep + nsis_package, we can add a direct
# dependency here.
DEPENDS dmg_package_prep
# We create Wireshark.app in "run". Do our work there.
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/run
)
endif()
ADD_CUSTOM_TARGET( dmg_package
COMMAND bash -x ${CMAKE_BINARY_DIR}/packaging/macosx/osx-dmg.sh
# Unlike nsis_package_prep + nsis_package, we can add a direct
# dependency here.
DEPENDS dmg_package_prep
# We create Wireshark.app in "run". Do our work there.
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/run
)
endif()

View File

@ -2,6 +2,8 @@
#
# The script creates a disk image using the dmgbuild utility and signs it.
set -e
# Defaults
dmgbuild="@DMGBUILD_EXECUTABLE@"
version="@VERSION@"
@ -27,6 +29,11 @@ dmgbuild-settings.py.in.
"
}
if [ ! -x "$dmgbuild" ] ; then
echo "Error: \"$dmgbuild\" not found."
exit 1
fi
# Parse command line arguments
while [ "$1" != "" ]
do