diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-10-23 10:57:45 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-10-01 16:26:25 +0000 |
commit | 7199fc7cabc0e88cf8113c26a6b685ff5df6cf2a (patch) | |
tree | 6166180f6ca5c33186a9b56f25e38c311d9763c4 /packaging/macosx/osx-dmg.sh.in | |
parent | ba50bf97acdd353745c9f10ec1d68e96ea3d745f (diff) | |
download | wireshark-7199fc7cabc0e88cf8113c26a6b685ff5df6cf2a.tar.gz |
OS X: Integrate CMake and osx-dmg.sh
Change-Id: Ide608f5e73ecd40c67a6b1c0e16f11233cd49c9d
Reviewed-on: https://code.wireshark.org/review/10694
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'packaging/macosx/osx-dmg.sh.in')
-rwxr-xr-x | packaging/macosx/osx-dmg.sh.in | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/packaging/macosx/osx-dmg.sh.in b/packaging/macosx/osx-dmg.sh.in index d49b655bdd..e14179f6fb 100755 --- a/packaging/macosx/osx-dmg.sh.in +++ b/packaging/macosx/osx-dmg.sh.in @@ -40,10 +40,13 @@ ds_store_root="root.ds_store" app_bundle="Wireshark.app" rw_name="RWwireshark.dmg" volume_name="Wireshark" +src_dir="." tmp_dir="/tmp/dmg-$$" auto_open_opt= -ws_bin="$app_bundle/Contents/MacOS/Wireshark" + +# Qt defaults readme_name="Read_me_first_qt.rtf" +bundle_bin_name="Wireshark" if [ -f /Applications/Xcode.app/Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker ] then @@ -70,6 +73,9 @@ then elif [ -f /usr/bin/packagemaker ] then packagemaker=/usr/bin/packagemaker +elif [ -f /usr/local/bin/packagemaker ] +then + packagemaker=/usr/local/bin/packagemaker fi if [ -z "$packagemaker" ] then @@ -99,6 +105,9 @@ OPTIONS Use the Qt flavor. This is the default. -gtk,--gtk-flavor Use the GTK+ flavor. + -S,--source-directory + If this is an out-of-tree build, set this to the path + to the packaging/macosx source directory. " } @@ -115,13 +124,14 @@ do app_bundle="$2" shift 1 ;; -qt|--qt-flavor) - readme_name="Read_me_first_qt.rtf" - ws_bin="$app_bundle/Contents/MacOS/Wireshark" ;; -gtk|--gtk-flavor) readme_name="Read_me_first_gtk.rtf" - ws_bin="$app_bundle/Contents/MacOS/wireshark-bin" + bundle_bin_name="wireshark-bin" ;; + -S|--source-directory) + src_dir="$2" + shift 1 ;; *) echo "Invalid command line option" exit 2 ;; @@ -129,6 +139,7 @@ do shift 1 done + # Safety checks if [ ! -e "$app_bundle" ]; then echo "Cannot find application bundle: $app_bundle" @@ -136,6 +147,7 @@ if [ ! -e "$app_bundle" ]; then fi # Get the architecture +ws_bin="$app_bundle/Contents/MacOS/$bundle_bin_name" case `file $ws_bin` in *Mach-O*64-bit*x86_64*) architecture="Intel 64" @@ -199,7 +211,7 @@ echo -e "Copying files to temp directory" # Copy the installer package cp "$pkg_file" "$tmp_dir"/ || exit 1 # Copy the readme -cp "$readme_name" "$tmp_dir"/"Read me first.rtf" || exit 1 +cp "$src_dir/$readme_name" "$tmp_dir"/"Read me first.rtf" || exit 1 # If the appearance settings are not to be modified we just copy them if [ ${set_ds_store} = "false" ]; then @@ -207,7 +219,7 @@ if [ ${set_ds_store} = "false" ]; then # window size, appearance, etc. Most of this can be set # with Apple script but involves user intervention so we # just keep a copy of the correct settings and use that instead. - cp $ds_store_root "$tmp_dir/.DS_Store" || exit 1 + cp $src_dir/$ds_store_root "$tmp_dir/.DS_Store" || exit 1 auto_open_opt=-noautoopen fi |