Make osx-app.sh a configured file and remove Autotools targets.

Rename osx-app.sh to osx-app.sh.in and add the version to the plugin
path at configure time.

Instead up updating Autotools accordingly just remove the macOS
packaging targets. gf61c381b5a removed support for Autotools in
osx-app.sh and if anyone wants to build macOS packages I'd prefer that
they use the same toolchain as the buildbot.

Change-Id: Ide5205265bf8859a85b1afab68fa8f8285952bd3
Reviewed-on: https://code.wireshark.org/review/23839
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Gerald Combs 2017-10-04 16:27:08 -07:00 committed by Anders Broman
parent ae794fc5f2
commit 6172627534
8 changed files with 9 additions and 76 deletions

View File

@ -1492,6 +1492,7 @@ set( IN_FILES
image/wiretap.rc.in
image/wireshark.exe.manifest.in
packaging/macosx/Info.plist.in
packaging/macosx/osx-app.sh.in
packaging/macosx/osx-dmg.sh.in
packaging/macosx/Wireshark_package.pmdoc/index.xml.in
randpkt_core/doxygen.cfg.in
@ -2935,7 +2936,7 @@ if(ENABLE_APPLICATION_BUNDLE)
set_target_properties(app_bundle PROPERTIES FOLDER "Copy Tasks")
add_custom_command(TARGET app_bundle
POST_BUILD
COMMAND "${CMAKE_SOURCE_DIR}/packaging/macosx/osx-app.sh"
COMMAND "${CMAKE_BINARY_DIR}/packaging/macosx/osx-app.sh"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/run"
)
add_dependencies(app_bundle ${PROGLIST})

View File

@ -215,11 +215,9 @@ README.windows for those instructions.
working. You must have root privileges in order to capture live data.
10./a. Run 'make install'. If you're running a system that supports
the RPM, OSX, or System V Release 4 packaging systems, you can
run one of
the RPM packaging systems you can run
make rpm-package # Builds a binary package using rpm
make osx-package # Builds a binary package for OSX
make rpm-package
to make an installable package for your system.

View File

@ -1061,11 +1061,6 @@ update-databases-and-caches-install: update-databases-and-caches-common
update-databases-and-caches-uninstall: update-databases-and-caches-common
# Used by osx-package
# We load top_stagedir with an absolute path so that libtool doesn't freak.
top_stagedir=$(abs_top_builddir)/packaging/staging
stagedir=$(top_stagedir)/$(PACKAGE).inst
host_cpu=@host_cpu@
host_os=@host_os@
@ -1087,46 +1082,9 @@ rpm-package:
false
endif
# XXX - This assumes we're building from the source directory.
osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
@if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
rm -rf $(stagedir) ; \
$(MAKE) DESTDIR=$(stagedir) install; \
cd $(srcdir)/packaging/macosx ; \
./osx-app.sh @OSX_APP_FLAGS@ \
--create-bundle \
--binary-path ../staging/$(PACKAGE).inst$(bindir) \
--plugin-path ../staging/$(PACKAGE).inst$(plugindir) \
--extcap-path ../staging/$(PACKAGE).inst$(extcapdir) \
--library-path ../staging/$(PACKAGE).inst$(libdir) ; \
else \
echo "Error: macOS packaging tools not found." ; \
echo "Package build abandoned." ; \
fi
packaging/macosx/COPYING.txt: COPYING
(cd packaging/macosx ; \
$(MAKE) COPYING.txt ;)
osx-package: osx-app packaging/macosx/COPYING.txt
@if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
cd $(srcdir)/packaging/macosx ; \
chmod +x ./osx-dmg.sh ; \
./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
fi
osx-install: osx-app
@if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
echo "Copying Wireshark.app to /Applications" ; \
cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ; \
fi
test-programs:
cd epan && $(MAKE) $@
clean-local:
rm -rf $(top_stagedir)
dumpabi:
$(MAKE) -C wiretap dumpabi-libwiretap
$(MAKE) -C epan dumpabi-libwireshark

View File

@ -489,19 +489,6 @@ AM_CONDITIONAL(HAVE_RPM, [test "x$have_rpm" = xyes])
# Debian
AC_CHECK_PROG(HAVE_DPKG_BUILDPACKAGE, dpkg-buildpackage, "yes", "no")
# macOS
AC_CHECK_PROG(HAVE_XCODEBUILD, xcodebuild, "yes", "no")
AC_CHECK_PROG(HAVE_HDIUTIL, hdiutil, "yes", "no")
AC_CHECK_PROG(HAVE_BLESS, bless, "yes", "no")
if test x$HAVE_XCODEBUILD = xyes -a x$HAVE_HDIUTIL = xyes \
-a x$HAVE_BLESS = xyes ; then
HAVE_OSX_PACKAGING=yes
else
HAVE_OSX_PACKAGING=no
fi
AC_SUBST(HAVE_OSX_PACKAGING)
#
# Use this as a proxy for "is this macOS" (just in case somebody actually
# built and installed Darwin as an OS, perhaps with some X11-based GUI,
@ -1442,8 +1429,6 @@ elif test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
wireshark_bin="wireshark-gtk\$(EXEEXT)"
wireshark_man="wireshark.1"
wireshark_SUBDIRS="ui/gtk"
OSX_APP_FLAGS="$OSX_APP_FLAGS -gtk"
OSX_DMG_FLAGS="-gtk"
elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
# We have neither GTK+ nor Qt.
#
@ -1607,8 +1592,6 @@ AC_SUBST(wireshark_man)
AC_SUBST(wireshark_SUBDIRS)
AM_CONDITIONAL(HAVE_Qt, test "$have_qt" = "yes")
AM_CONDITIONAL(HAVE_GTK, test "$have_gtk" = "yes")
AC_SUBST(OSX_APP_FLAGS)
AC_SUBST(OSX_DMG_FLAGS)
# Enable/disable tshark
AC_ARG_ENABLE(tshark,
@ -3006,7 +2989,6 @@ AC_CONFIG_FILES(
packaging/Makefile
packaging/macosx/Info.plist
packaging/macosx/Makefile
packaging/macosx/osx-dmg.sh
packaging/macosx/Wireshark_package.pmdoc/index.xml
packaging/nsis/Makefile
packaging/rpm/Makefile

View File

@ -1059,12 +1059,11 @@ installing the _qt-devel_ package.
==== macOS: .dmg packages
The macOS Package is built using macOS packaging tools, based on information
found in the source tree under 'packaging/macosx'.
In the wireshark directory, type:
found in the source tree under 'packaging/macosx'. It must be built using
CMake. In your build directory, type:
----
$ make osx-package
$ make dmg_package
----
to build the macOS Package.

View File

@ -232,11 +232,6 @@ then
WS_CXXFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_CXXFLAGS"
WS_LDFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_LDFLAGS"
#
# Add a -sdkroot flag to use with osx-app.sh.
#
OSX_APP_FLAGS="-sdkroot $SDKPATH"
#
# XXX - do we need this to build the Wireshark wrapper?
# XXX - is this still necessary with the -mmacosx-version-min

View File

@ -21,7 +21,7 @@ EXTRA_DIST = \
dmg_set_style.scpt \
Info.plist \
Info.plist.in \
osx-app.sh \
osx-app.sh.in \
osx-dmg.sh.in \
Read_me_first.rtf \
Scripts/chmodbpf-postinstall.sh \

View File

@ -232,7 +232,7 @@ pkgexec="$bundle/Contents/MacOS"
pkgres="$bundle/Contents/Resources"
pkgbin="$pkgres/bin"
pkglib="$bundle/Contents/Frameworks"
pkgplugin=$( find "$bundle/Contents/PlugIns/wireshark" -type d -maxdepth 1 -name '[1-9]*' | head -1 )
pkgplugin="$bundle/Contents/PlugIns/wireshark/@VERSION_MAJOR@.@VERSION_MINOR@"
# Set the 'macosx' directory, usually the current directory.
resdir=`pwd`