Don't assume developer tools are under /Developer - look for
authorGuy Harris <guy@alum.mit.edu>
Sat, 5 Jan 2013 23:31:08 +0000 (23:31 -0000)
committerGuy Harris <guy@alum.mit.edu>
Sat, 5 Jan 2013 23:31:08 +0000 (23:31 -0000)
/Applications/Xcode.app/Developer first (for Xcode 4 and later) and, if
we don't find that, look for /Developer.

Don't assume packagemaker is under $developer_path/usr/bin - with Xcode
4, you need to install Auxiliary Tools for Xcode to get PackageMaker,
and even that doesn't directly install the packagemaker command, so we
currently advise people to copy the PackageMaker binary to
/usr/bin/packagemaker.

svn path=/trunk/; revision=46957

packaging/macosx/osx-dmg.sh.in

index 07ecf30a032552730d823d520046d3933780589f..8d2abbe1816fdc45caffdb9ba39ff96cff85816a 100755 (executable)
@@ -47,7 +47,17 @@ auto_open_opt=
 utilities="Utilities"
 ws_bin="$app_bundle/Contents/Resources/bin/wireshark-bin"
 
-PATH=$PATH:/Developer/Tools
+if [ -d /Applications/Xcode.app/Developer ]
+then
+       developer_path=/Applications/Xcode.app/Developer
+elif [ -d /Developer ]
+then
+       developer_path=/Developer
+fi
+if [ ! -z $developer_path ]
+then
+       PATH=$PATH:$developer_path/Tools:$developer_path/usr/bin
+fi
 
 # Help message
 #----------------------------------------------------------
@@ -132,7 +142,7 @@ echo -e "\nCREATE WIRESHARK PACKAGE\n"
 pkg_title="$volume_name $version $architecture"
 pkg_file="$pkg_title.pkg"
 rm -rf "$pkg_file"
-/Developer/usr/bin/packagemaker --doc "Wireshark_package.pmdoc" \
+packagemaker --doc "Wireshark_package.pmdoc" \
     --title "$pkg_title" \
     --version "$version" \
     --verbose || exit 1