diff options
Diffstat (limited to 'util/scripts/mac-binary/install/debuglibraries')
6 files changed, 209 insertions, 0 deletions
diff --git a/util/scripts/mac-binary/install/debuglibraries/Info.plist b/util/scripts/mac-binary/install/debuglibraries/Info.plist new file mode 100644 index 0000000..b421879 --- /dev/null +++ b/util/scripts/mac-binary/install/debuglibraries/Info.plist @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleGetInfoString</key> + <string>Trolltech Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Debug Libraries</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.debuglibs</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Debug Libraries</string> + <key>CFBundleShortVersionString</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> + <key>IFMajorVersion</key> + <integer>$VERSION_MAJOR$</integer> + <key>IFMinorVersion</key> + <integer>$VERSION_MINOR$</integer> + <key>IFPkgFlagAllowBackRev</key> + <false/> + <key>IFPkgFlagAuthorizationAction</key> + <string>AdminAuthorization</string> + <key>IFPkgFlagDefaultLocation</key> + <string>/</string> + <key>IFPkgFlagFollowLinks</key> + <true/> + <key>IFPkgFlagInstallFat</key> + <false/> + <key>IFPkgFlagIsRequired</key> + <false/> + <key>IFPkgFlagRelocatable</key> + <false/> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/debuglibraries/Resources/Description.plist b/util/scripts/mac-binary/install/debuglibraries/Resources/Description.plist new file mode 100644 index 0000000..d12abfd --- /dev/null +++ b/util/scripts/mac-binary/install/debuglibraries/Resources/Description.plist @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IFPkgDescriptionDeleteWarning</key> + <string></string> + <key>IFPkgDescriptionDescription</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Debug Libraries</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Debug Libraries</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/debuglibraries/Resources/Readme.rtf b/util/scripts/mac-binary/install/debuglibraries/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/debuglibraries/Resources/Readme.rtf @@ -0,0 +1,7 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww9000\viewh9000\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\fs24 \cf0 Thanks for reading me}
\ No newline at end of file diff --git a/util/scripts/mac-binary/install/debuglibraries/Resources/debuglibraries.info b/util/scripts/mac-binary/install/debuglibraries/Resources/debuglibraries.info new file mode 100644 index 0000000..7acd621 --- /dev/null +++ b/util/scripts/mac-binary/install/debuglibraries/Resources/debuglibraries.info @@ -0,0 +1,17 @@ +Title Qt Libraries +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Debug Libraries +DefaultLocation (null) +DeleteWarning + +### Package Flags + +NeedsAuthorization YES +Required NO +Relocatable YES +RequiresReboot NO +UseUserMask YES +OverwritePermissions NO +InstallFat NO +RootVolumeOnly NO + diff --git a/util/scripts/mac-binary/install/debuglibraries/Resources/postflight b/util/scripts/mac-binary/install/debuglibraries/Resources/postflight new file mode 100755 index 0000000..be34b81 --- /dev/null +++ b/util/scripts/mac-binary/install/debuglibraries/Resources/postflight @@ -0,0 +1,58 @@ +#!/bin/sh +#fix the doc path +#PACK_LOCATION="$1" +#INST_LOCATION="$3" +#"$PACK_LOCATION/Contents/Resources/qtconf.pl" -version $VERSION_MAJOR$.$VERSION_MINOR$ -value "$INST_LOCATION/System/Library" Libraries + +t() +{ + o="$1" + i="$INSTALLER_TEMP/`basename $o`_t" + rm -f "$i" + mv "$o" "$i" + perl -e "open(SIN, \"<\" . \"$i\"); + open(SOUT, \">\" . \"$o\"); + local $/; + binmode SIN; + binmode SOUT; + \$ulen = length(\"$2\")+1; + \$plen = length(\"$3\")+1; + \$klen = length(\"$4\")+1; + while(\$C = <SIN>) { + \$C =~ s,(qt_lcnsuser=).{\$ulen},\\1$2\\0,; + \$C =~ s,(qt_lcnsprod=).{\$plen},\1$3\0,; + \$C =~ s,(qt_qevalkey=).{\$klen},\1$4\0,; + print SOUT \$C; + } + close SIN; + close SOUT" +} + +for lib in QtCore QtGui QtNetwork QtXml QtOpenGL QtSql Qt3Support QtSvg QtScript; do + [ -d "${3}/Library/Frameworks/${lib}.framework" ] || continue + cd "${3}/Library/Frameworks/${lib}.framework/Versions/$VERSION_MAJOR$.0" + Products="bad product" + (Licensee="not-licensed"; LicenseKeyExt="bad-license"; . $HOME/.qt-license >/dev/null 2>&1 + if [ "$LicenseKeyExt" != "bad-license" ]; then + productTest=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1` + case $productTest in + F) + # Universal + Products="Universal" + ;; + B) + # Desktop + Products="Desktop" + ;; + L) + # Desktop Lite + Products="Desktop Light" + ;; + *) + Products="bad product" + esac + fi + t "${lib}_debug" "$Licensee" "$Products" "$LicenseKeyExt") +done + +exit 0 diff --git a/util/scripts/mac-binary/install/debuglibraries/create_package.sh b/util/scripts/mac-binary/install/debuglibraries/create_package.sh new file mode 100755 index 0000000..ed3a85d --- /dev/null +++ b/util/scripts/mac-binary/install/debuglibraries/create_package.sh @@ -0,0 +1,73 @@ +#!/bin/sh + +#options parsing +BINDIR= +SRCDIR= +OUTDIR= +DO_DEBUG=yes +while [ -n "$1" ]; do + echo "$1" | grep '^--*=*' >/dev/null 2>&1 || break + OPTION=`echo $1 | sed 's,^--\([^=]*\)=\(.*\),\1,'` + ARG=`echo $1 | sed 's,^--\([^=]*\)=\(.*\),\2,'` + shift + case "$OPTION" in + debug) DO_DEBUG="$ARG" ;; + qtsrc) SRCDIR="$ARG" ;; + qtbin) BINDIR="$ARG" ;; + outdir) OUTDIR="$ARG" ;; + *) ;; + esac +done +[ -z "$OUTDIR" ] && exit 1 + +#setup +FRAMEWORK_DIR="$OUTDIR/Library/Frameworks" +mkdir -p "$FRAMEWORK_DIR" + +for lib in QtCore QtGui QtNetwork QtXml QtOpenGL QtSql Qt3Support QtSvg QtAssistant QtDesigner QtDesignerComponents QtTest QtScript QtScriptTools QtHelp QtXmlPatterns QtWebKit QtDBus phonon; do + if [ ! -d "$BINDIR/lib/${lib}.framework" ]; then + echo "No framework for $lib!" + continue + fi + cp -R "$BINDIR/lib/${lib}.framework" "$FRAMEWORK_DIR/" >/dev/null 2>&1 + ../libraries/fix_config_paths.pl "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}_debug" "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}_debug.fixed" + mv "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}_debug.fixed" "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}_debug" + ../libraries/fix_prl_paths.pl "$FRAMEWORK_DIR/${lib}.framework/${lib}_debug.prl" "$FRAMEWORK_DIR/${lib}.framework/${lib}_debug.prl.fixed" + mv "$FRAMEWORK_DIR/${lib}.framework/${lib}_debug.prl.fixed" "$FRAMEWORK_DIR/${lib}.framework/${lib}_debug.prl" + # Remove the normal libraries and headers (they are part of another package) + # some find command here. + find "$FRAMEWORK_DIR/${lib}.framework" -name ${lib} -o -name ${lib}'.*' -a ! -name ${lib}.framework | xargs rm >/dev/null 2>&1 + find "$FRAMEWORK_DIR/${lib}.framework/" -name Headers -exec rm -rf {} \; >/dev/null 2>&1 + # Since we are using dwarf-2 for debugging, we need to store the dSYM bundles as well. + /usr/bin/dsymutil -o "$FRAMEWORK_DIR/${lib}.framework/${lib}_debug.dSYM" "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}_debug" +done + +#Handle the libraries in tools as well +mkdir -p "$OUTDIR/usr/lib" + +#first QtAssistantClient, and QtUiTools since they are static +for lib in libQtUiTools_debug.a; do + [ -e "$BINDIR/lib/${lib}" ] && cp "$BINDIR/lib/${lib}" "$OUTDIR/usr/lib/${lib}" +done + +if [ -e "${BINDIR}/lib/libQtCLucene_debug.${VERSION_MAJOR}.dylib" ]; then + mkdir -p "$OUTDIR/usr/lib" + for lib in libQtCLucene_debug.dylib libQtCLucene_debug.${VERSION_MAJOR}.dylib libQtCLucene_debug.${VERSION_MAJOR}.${VERSION_MINOR}.dylib libQtCLucene_debug.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.dylib; do + cp -R "${BINDIR}/lib/$lib" "$OUTDIR/usr/lib/" + /usr/bin/dsymutil "$OUTDIR/usr/lib/$lib" + done +fi + + +# Now for the plugins +for plugin in `find $BINDIR/plugins/ -name 'lib*.dylib'`; do + if echo `basename $plugin` | grep "_debug" >/dev/null 2>&1; then + out_plugin=`echo $plugin | sed "s,^$BINDIR,$OUTDIR/Developer/Applications/Qt,g"` + pluginDirName= `dirname $out_plugin` + mkdir -p $pluginDirName + [ -e "$plugin" ] && ../libraries/fix_config_paths.pl "$plugin" "$out_plugin" + /usr/bin/dsymutil -o "$pluginDirName/$out_plugin.dSYM" "$out_plugin" + fi +done + +exit 0 |