diff options
Diffstat (limited to 'util/scripts/mac-binary/install')
89 files changed, 3182 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 diff --git a/util/scripts/mac-binary/install/docs/Info.plist b/util/scripts/mac-binary/install/docs/Info.plist new file mode 100644 index 0000000..f67feed --- /dev/null +++ b/util/scripts/mac-binary/install/docs/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$ Documentation</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.docs</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Documentation</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>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/docs/Resources/Description.plist b/util/scripts/mac-binary/install/docs/Resources/Description.plist new file mode 100644 index 0000000..b89be7b --- /dev/null +++ b/util/scripts/mac-binary/install/docs/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$ Documentation</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Documentation</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/docs/Resources/Readme.rtf b/util/scripts/mac-binary/install/docs/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/docs/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/docs/Resources/docs.info b/util/scripts/mac-binary/install/docs/Resources/docs.info new file mode 100644 index 0000000..6be46f2 --- /dev/null +++ b/util/scripts/mac-binary/install/docs/Resources/docs.info @@ -0,0 +1,17 @@ +Title Qt Documentation +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Documentation +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/docs/Resources/postflight b/util/scripts/mac-binary/install/docs/Resources/postflight new file mode 100755 index 0000000..ecd77da --- /dev/null +++ b/util/scripts/mac-binary/install/docs/Resources/postflight @@ -0,0 +1,16 @@ +#!/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/Developer/Documentation/Qt" Documentation + +#get the documentation into the index +DOC_INDEX="/Developer/Documentation/Help/Developer Help Viewer/MacOSXDeveloper.pbHelpIndexerList" +if [ -e "$DOC_INDEX" ]; then + if grep "$3/Developer/Documentation/Qt" "$DOC_INDEX" >/dev/null 2>&1; then + true + else + echo "$3/Developer/Documentation/Qt" >>"$$DOC_INDEX" + /Developer/Tools/pbhelpindexer & + fi +fi
\ No newline at end of file diff --git a/util/scripts/mac-binary/install/docs/create_package.sh b/util/scripts/mac-binary/install/docs/create_package.sh new file mode 100755 index 0000000..fccd6fc --- /dev/null +++ b/util/scripts/mac-binary/install/docs/create_package.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +#options parsing +BINDIR= +SRCDIR= +OUTDIR= +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 + qtsrc) SRCDIR="$ARG" ;; + qtbin) BINDIR="$ARG" ;; + outdir) OUTDIR="$ARG" ;; + *) ;; + esac +done +[ -z "$OUTDIR" ] && exit 1 + +mkdir -p "$OUTDIR/Developer/Documentation/Qt" +for dir in `find "$SRCDIR/doc" -name 'html*' -type d`; do + cp -R "$dir" "$OUTDIR/Developer/Documentation/Qt" +done + +for dir in `find "$SRCDIR/doc" -name 'qch' -type d`; do + cp -R "$dir" "$OUTDIR/Developer/Documentation/Qt" +done + +# The old code. +#cp -R "$SRCDIR/doc/html/" "$OUTDIR/Developer/Documentation/Qt" +#[ "$SRCDIR" != "$BINDIR" ] && cp -R "$BINDIR/doc/html/" "$OUTDIR/Developer/Documentation/Qt" +#ln -s . "$OUTDIR/Developer/Documentation/Qt/html" + +exit 0 diff --git a/util/scripts/mac-binary/install/examples/Info.plist b/util/scripts/mac-binary/install/examples/Info.plist new file mode 100644 index 0000000..1799025 --- /dev/null +++ b/util/scripts/mac-binary/install/examples/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$ Examples</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.examples</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Examples</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> + <true/> + <key>IFPkgFlagIsRequired</key> + <false/> + <key>IFPkgFlagRelocatable</key> + <false/> + <key>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/examples/Resources/Description.plist b/util/scripts/mac-binary/install/examples/Resources/Description.plist new file mode 100644 index 0000000..ad798e3 --- /dev/null +++ b/util/scripts/mac-binary/install/examples/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$ Examples</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Examples</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/examples/Resources/Readme.rtf b/util/scripts/mac-binary/install/examples/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/examples/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/examples/Resources/examples.info b/util/scripts/mac-binary/install/examples/Resources/examples.info new file mode 100644 index 0000000..f94a510 --- /dev/null +++ b/util/scripts/mac-binary/install/examples/Resources/examples.info @@ -0,0 +1,17 @@ +Title Qt Examples +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Examples +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/examples/Resources/postflight b/util/scripts/mac-binary/install/examples/Resources/postflight new file mode 100644 index 0000000..e7c10e7 --- /dev/null +++ b/util/scripts/mac-binary/install/examples/Resources/postflight @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import os, sys, grp + +startPath = os.path.join(sys.argv[2], "Developer/Examples/Qt") +qmakeCache = open(os.path.join(startPath, ".qmake.cache"), "w") +qmakeCache.write("#nothing anymore...") +qmakeCache.close() +adminGid = grp.getgrnam('admin')[2] + +# Generate Xcode projects for everything and make things +# writeable to the admin users +for root, dirs, files in os.walk(startPath, topdown = False): + for name in files: + fullName = os.path.join(root, name) + currUid = os.stat(fullName).st_uid + if name.endswith(".pro"): + os.chdir(os.path.dirname(fullName)) + print "/usr/bin/qmake -spec macx-xcode %s [%s]" % (name, fullName) + sys.stdout.flush() # To make the logger update in a timely fashion + os.system('/usr/bin/qmake -spec macx-xcode "%s"' % (name)) + os.chown(fullName, currUid, adminGid) + if os.access(fullName, os.X_OK): + os.chmod(fullName, 0775) + elif os.access(fullName, os.W_OK): + os.chmod(fullName, 0664) + for name in dirs: + fullName = os.path.join(root, name) + currUid = os.stat(fullName).st_uid + os.chown(fullName, currUid, adminGid) + os.chmod(fullName, 0775) diff --git a/util/scripts/mac-binary/install/examples/create_package.sh b/util/scripts/mac-binary/install/examples/create_package.sh new file mode 100755 index 0000000..f2a82f2 --- /dev/null +++ b/util/scripts/mac-binary/install/examples/create_package.sh @@ -0,0 +1,148 @@ +#!/bin/sh + +#options parsing +BINDIR= +SRCDIR= +OUTDIR= +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 + qtsrc) SRCDIR="$ARG" ;; + qtbin) BINDIR="$ARG" ;; + outdir) OUTDIR="$ARG" ;; + *) ;; + esac +done +[ -z "$OUTDIR" ] && exit 1 + +mkdir -p "$OUTDIR/Developer/Examples/Qt" + +get_sources() +{ + DIR="$1" + IN="$2" + for file in `find $DIR -type f`; do + case $file in #only need sources + */ui_*.h|*/moc_*.cpp|*/qrc_*.cpp|*.app|*.app/*|*/.obj/*|*/.ui/*|*/.rcc/*|*/.moc/*|*/Makefile|*.build*|*.xcode*|*/build|*/build/*|*.doc|*~|*.gch|*.gch/*|*/.DS_Store|*/.gdb_history) continue ;; + *) ;; + esac + [ -x "$file" ] && continue + FILE=`echo "$file" | sed "s,^$DIR,,"` + mkdir -p "$OUTDIR/Developer/Examples/Qt/$IN/`dirname $FILE`" + cp "$file" "$OUTDIR/Developer/Examples/Qt/$IN/$FILE" + done +} + +#examples +get_sources "$SRCDIR/examples/" +rm -rf "$OUTDIR/Developer/Examples/Qt/activeqt" #we don't need it +for category_dir in $BINDIR/examples/*; do + for example_dir in $category_dir/*; do + [ -d "$example_dir" ] || continue + example_cat=`echo $example_dir | sed "s,^$BINDIR/examples/,,"` + [ -d "${OUTDIR}/Developer/Examples/Qt/${example_cat}" ] || continue + example=`basename $example_dir` + EXE= + if [ -x "${example_dir}/${example}" ]; then + mkdir -p "${OUTDIR}/Developer/Examples/Qt/${example_cat}/" + EXE="${OUTDIR}/Developer/Examples/Qt/${example_cat}/${example}" + cp "${example_dir}/${example}" "$EXE" + elif [ -d "${example_dir}/${example}.app" ]; then #in a bundle + mkdir -p "${OUTDIR}/Developer/Examples/Qt/${example_cat}/" + cp -R "${example_dir}/${example}.app" "${OUTDIR}/Developer/Examples/Qt/${example_cat}/" + EXE="${OUTDIR}/Developer/Examples/Qt/${example_cat}/${example}.app/Contents/MacOS/${example}" + else + FOUND=no + for f in ${example_dir}/*; do + if [ '!' -d "$f" ] && [ -x "$f" ]; then + FOUND=yes + mkdir -p "${OUTDIR}/Developer/Examples/Qt/${example_cat}/" + EXE="${OUTDIR}/Developer/Examples/Qt/${example_cat}/`basename $f`" + cp "$f" "$EXE" + elif echo "$f" | grep ".dylib$" >/dev/null 2>&1; then + FOUND=yes + mkdir -p "${OUTDIR}/Developer/Examples/Qt/${example_cat}/" + EXE="${OUTDIR}/Developer/Examples/Qt/${example_cat}/`basename $f`" + cp "$f" "$EXE" + elif [ -d "$f" ] && echo "$f" | grep ".app$" >/dev/null 2>&1; then + FOUND=yes + mkdir -p "${OUTDIR}/Developer/Examples/Qt/${example_cat}/" + cp -R "$f" "${OUTDIR}/Developer/Examples/Qt/${example_cat}/" + APP_NAME=`basename $f | sed "s,\.app$,,"` + EXE="${OUTDIR}/Developer/Examples/Qt/${example_cat}/${APP_NAME}.app/Contents/MacOS/$APP_NAME" + fi + done + #[ "$FOUND" = "no" ] && echo "Unable to find binary for Example [$example]" + fi + if [ "$example" = "plugandpaint" ]; then + PLG="${OUTDIR}/Developer/Examples/Qt/${example_cat}/plugins/" + mkdir -p "$PLG" + for plugin in ${example_dir}/plugins/*.dylib; do + ../libraries/fix_config_paths.pl "$plugin" "/tmp/tmp.plg" + cp "/tmp/tmp.plg" "$PLG/`basename $plugin`" + rm -f "/tmp/tmp.plg" + done + fi + if [ -x "$EXE" ]; then + ../libraries/fix_config_paths.pl "$EXE" "/tmp/tmp.exe" + strip "/tmp/tmp.exe" + cp "/tmp/tmp.exe" "$EXE" + rm -f "/tmp/tmp.exe" + chmod a+x "$EXE" + fi + done +done + +#demos +get_sources "$SRCDIR/demos" "Demos" +for demo_dir in $BINDIR/demos/*; do + [ -d "$demo_dir" ] || continue + demo=`basename $demo_dir` + EXE= + if [ "$demo" = "qtdemo" ]; then + mkdir -p "${OUTDIR}/Developer/Applications/Qt/" + cp -R "$BINDIR/bin/${demo}.app" "${OUTDIR}/Developer/Applications/Qt/" + EXE="${OUTDIR}/Developer/Applications/Qt/${demo}.app/Contents/MacOS/${demo}" + elif [ -x "${demo_dir}/${demo}" ]; then + mkdir -p "${OUTDIR}/Developer/Examples/Qt/Demos/${demo}" + EXE="${OUTDIR}/Developer/Examples/Qt/Demos/${demo_dir}/${demo}" + cp "${demo}/${demo}" "$EXE" + elif [ -d "${demo_dir}/${demo}.app" ]; then #in a bundle + mkdir -p "${OUTDIR}/Developer/Examples/Qt/Demos/${demo}" + cp -R "${demo_dir}/${demo}.app" "${OUTDIR}/Developer/Examples/Qt/Demos/${demo}" + EXE="${OUTDIR}/Developer/Examples/Qt/Demos/${demo}/${demo}.app/Contents/MacOS/$demo" + else + FOUND=no + for f in ${demo_dir}/*; do + if [ '!' -d "$f" ] && [ -x "$f" ]; then + FOUND=yes + mkdir -p "${OUTDIR}/Developer/Examples/Qt/Demos/${demo}/" + EXE="${OUTDIR}/Developer/Examples/Qt/Demos/${demo_dir}/`basename $f`" + cp "$f" "$EXE" + elif echo "$f" | grep ".dylib$" >/dev/null 2>&1; then + FOUND=yes + mkdir -p "${OUTDIR}/Developer/Examples/Qt/Demos/${demo}/" + EXE="${OUTDIR}/Developer/Examples/Qt/Demos/${demo_dir}/`basename $f`" + cp "$f" "$EXE" + elif [ -d "$f" ] && echo "$f" | grep ".app$" >/dev/null 2>&1; then + FOUND=yes + mkdir -p "${OUTDIR}/Developer/Examples/Qt/Demos/${demo}/" + cp -R "$f" "${OUTDIR}/Developer/Examples/Qt/Demos/${demo}/" + APP_NAME=`basename $f | sed "s,\.app$,,"` + EXE="${OUTDIR}/Developer/Examples/Qt/Demos/${demo}/${APP_NAME}.app/Contents/MacOS/$APP_NAME}" + fi + done + fi + if [ -x "$EXE" ]; then + ../libraries/fix_config_paths.pl "$EXE" "/tmp/tmp.exe" + strip "/tmp/tmp.exe" + cp "/tmp/tmp.exe" "$EXE" + rm -f "/tmp/tmp.exe" + chmod a+x "$EXE" + fi +done + +exit 0 diff --git a/util/scripts/mac-binary/install/headers/Info.plist b/util/scripts/mac-binary/install/headers/Info.plist new file mode 100644 index 0000000..3cf7064 --- /dev/null +++ b/util/scripts/mac-binary/install/headers/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$ Headers</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.headers</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Headers</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/headers/Resources/Description.plist b/util/scripts/mac-binary/install/headers/Resources/Description.plist new file mode 100644 index 0000000..ddfe8a9 --- /dev/null +++ b/util/scripts/mac-binary/install/headers/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$ Headers</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Headers</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/headers/Resources/Readme.rtf b/util/scripts/mac-binary/install/headers/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/headers/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/headers/Resources/headers.info b/util/scripts/mac-binary/install/headers/Resources/headers.info new file mode 100644 index 0000000..a241de8e --- /dev/null +++ b/util/scripts/mac-binary/install/headers/Resources/headers.info @@ -0,0 +1,17 @@ +Title Qt Headers +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Headers +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/headers/Resources/postflight b/util/scripts/mac-binary/install/headers/Resources/postflight new file mode 100755 index 0000000..aefec7b --- /dev/null +++ b/util/scripts/mac-binary/install/headers/Resources/postflight @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +import os, re + +def getEditionDefine(licenseKey): + ProductMap = { 'F': 'QT_EDITION_UNIVERSAL', 'B': 'QT_EDITION_DESKTOP', + 'L': 'QT_EDITION_DESKTOPLIGHT', 'R': 'QT_EDITION_CONSOLE', + 'OPEN': 'QT_EDITION_OPENSOURCE' } + + LicenseTypeMap = { 'Z4M': "QT_EDITION_EVALUATION", 'R4M': "QT_EDITION_EVALUATION", + 'Q4M': "QT_EDITION_EVALUATION", '34M': "QT_EDITION_ACADEMIC", + 'TBM': "QT_EDITION_EDUCATIONAL" } + + if len(licenseKey) == 0: + return 'QT_EDITION_UNKNOWN' + licenseParts = licenseKey.split('-') + productDefine = LicenseTypeMap.get(licenseParts[2], "") + if len(productDefine) == 0: + productDefine = ProductMap.get(licenseParts[0][0], 'QT_EDITION_UNKNOWN') + + return productDefine + +def alterQConfig(qconfigPath, licenseKey): + qconfigFile = open(qconfigPath, 'r') + qconfigLines = qconfigFile.readlines() + qconfigFile.close() + finalContents = [] + editionRE = re.compile(r"(^#\s*define QT_EDITION) (.*)$") + licenseKeyRE = re.compile(r'(^#define QT_PRODUCT_LICENSEKEY).*$') + + for line in qconfigLines: + tmpStr = line + matchObj = editionRE.search(line) + if matchObj: + tmpStr = matchObj.group(1) + " " + getEditionDefine(licenseKey) + "\n" + else: + matchObj = licenseKeyRE.search(line) + if matchObj: + tmpStr = matchObj.group(1) + ' "' + licenseKey + '"\n' + finalContents.append(tmpStr) + qconfigFile = open(qconfigPath, 'w') + qconfigFile.writelines(finalContents) + qconfigFile.close() + +def getLicenseKey(): + licensePath = os.path.join(os.environ["HOME"], ".qt-license") + if not os.path.exists(licensePath): + return "" + + licenseKeyRE = re.compile(r"^LicenseKeyExt=(.+)$") + file = open(licensePath, 'r') + for line in file: + matchObj = licenseKeyRE.search(line) + if matchObj: + return matchObj.group(1) + +if __name__ == "__main__": + import sys + qconfigPath = os.path.join(sys.argv[3], + "Library/Frameworks/QtCore.framework/Versions/4.0/Headers/qconfig.h") + alterQConfig(qconfigPath, getLicenseKey()) diff --git a/util/scripts/mac-binary/install/headers/create_package.sh b/util/scripts/mac-binary/install/headers/create_package.sh new file mode 100755 index 0000000..02ff489 --- /dev/null +++ b/util/scripts/mac-binary/install/headers/create_package.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +#options parsing +BINDIR= +SRCDIR= +OUTDIR= +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 + 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 QtScript QtScriptTools QtXmlPatterns QtWebKit QtDBus phonon; do + if [ ! -d "$BINDIR/lib/${lib}.framework/Headers" ]; then + echo "No headers for $lib" + continue + fi + (cd "$BINDIR/lib/${lib}.framework/" + for header in `find . -name Headers`; do + mkdir -p "$FRAMEWORK_DIR/${lib}.framework/`dirname $header`" + if [ -L "$header" ]; then + cp -RP "$header" "$FRAMEWORK_DIR/${lib}.framework/`dirname $header`" + else + cp -R "$header" "$FRAMEWORK_DIR/${lib}.framework/`dirname $header`" + fi + done) +done + +exit 0 diff --git a/util/scripts/mac-binary/install/libraries/Info.plist b/util/scripts/mac-binary/install/libraries/Info.plist new file mode 100644 index 0000000..6c70d73 --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/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$ Libraries</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.libs</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ 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> + <true/> + <key>IFPkgFlagIsRequired</key> + <true/> + <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/libraries/Resources/Description.plist b/util/scripts/mac-binary/install/libraries/Resources/Description.plist new file mode 100644 index 0000000..ffba86f --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/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$ Libraries</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Libraries</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/libraries/Resources/Readme.rtf b/util/scripts/mac-binary/install/libraries/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/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/libraries/Resources/libraries.info b/util/scripts/mac-binary/install/libraries/Resources/libraries.info new file mode 100644 index 0000000..aaad93f --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/Resources/libraries.info @@ -0,0 +1,17 @@ +Title Qt Libraries +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ 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/libraries/Resources/postflight b/util/scripts/mac-binary/install/libraries/Resources/postflight new file mode 100755 index 0000000..4bcaa6c --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/Resources/postflight @@ -0,0 +1,76 @@ +#!/usr/bin/env python + +import os, sys, shutil, re +def replaceStrings(library, licensee, product, licenseKey): + tmpLib = os.path.join(os.environ["INSTALLER_TEMP"], os.path.basename(library) + "_t") + if os.path.exists(tmpLib): + os.remove(tmpLib) + shutil.move(library, tmpLib) + tmpLibFile = open(tmpLib, 'r') + libraryFile = open(library, 'w') + namRe = re.compile(r'(qt_lcnsuser=).{' + str(len(licensee) + 1) + r'}') + prdRe = re.compile(r'(qt_lcnsprod=).{' + str(len(product) + 1) + r'}') + keyRe = re.compile(r'(qt_qevalkey=).{' + str(len(licenseKey) + 1) + r'}') + + for line in tmpLibFile.readlines(): + line = namRe.sub('\\1' + licensee + '\0', line) + line = prdRe.sub('\\1' + product + '\0', line) + line = keyRe.sub('\\1' + licenseKey + '\0', line) + libraryFile.write(line) + libraryFile.close() + tmpLibFile.close() + os.remove(tmpLib) + +def getEditionDefine(licenseKey): + ProductMap = { 'F': 'Universal', 'B': 'Desktop', + 'L': 'Desktop Light', 'R': 'Console', + 'OPEN': 'Opensource' } + + LicenseTypeMap = { 'Z4M': "Evaluation", 'R4M': "Evaluation", + 'Q4M': "Evaluation", '34M': "Academic", + 'TBM': "Educational" } + + if len(licenseKey) == 0: + return 'QT_EDITION_UNKNOWN' + licenseParts = licenseKey.split('-') + productDefine = LicenseTypeMap.get(licenseParts[2], "") + if len(productDefine) == 0: + productDefine = ProductMap.get(licenseParts[0][0], 'QT_EDITION_UNKNOWN') + + return productDefine + +def readLicenseFile(): + licenseKeyPath = os.path.join(os.environ['HOME'], '.qt-license'); + + licenseKeyRE = re.compile(r"^LicenseKeyExt=(.+)$") + licenseeRE = re.compile(r"^Licensee=(.+)$") + license = open(licenseKeyPath, 'r') + licensee = "Bad Licensee" + product = "Bad Product" + licensekey = "Bad Key" + for line in license: + matchObj = licenseeRE.match(line) + if matchObj: + licensee = matchObj.group(1) + else: + matchObj = licenseKeyRE.match(line) + if matchObj: + licensekey = matchObj.group(1) + product = getEditionDefine(licensekey) + return (licensee, product, licensekey) + +def fixLibraries(): + licensee, product, licensekey = readLicenseFile() + + frameworks = [ "QtCore", "QtGui", "QtNetwork", "QtXml", "QtOpenGL", "QtSql", "Qt3Support", "QtSvg", "QtScript" ] + for framework in frameworks: + frameworkPath = os.path.join(sys.argv[3], 'Library', 'Frameworks', framework + '.framework') + if not os.path.exists(frameworkPath): + continue + os.chdir(os.path.join(frameworkPath, 'Versions', '4.0')) + replaceStrings(framework, licensee, product, licensekey) + +if __name__ == "__main__": + fixLibraries() + sys.exit(0) + diff --git a/util/scripts/mac-binary/install/libraries/create_package.sh b/util/scripts/mac-binary/install/libraries/create_package.sh new file mode 100755 index 0000000..781f092 --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/create_package.sh @@ -0,0 +1,48 @@ +#!/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 QtScript QtScriptTools 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 + ./fix_prl_paths.pl "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl" "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl.fixed" + mv "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl.fixed" "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl" + ./fix_config_paths.pl "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/$lib" "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}.fixed" + mv "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}.fixed" "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/$lib" + + # Make a sym-link to make things compatible with what we had in version before 4.2 + OLDDIR="$PWD" + cd "$FRAMEWORK_DIR/${lib}.framework/Versions" + ln -s "${VERSION_MAJOR}" "4.0" + cd "$OLDDIR" + # Remove the debug libraries and headers (they are part of another package) + find "$FRAMEWORK_DIR/${lib}.framework/" -name '*_debug*' -exec rm -f {} \; >/dev/null 2>&1 + find "$FRAMEWORK_DIR/${lib}.framework/" -name Headers -exec rm -rf {} \; >/dev/null 2>&1 +done + +exit 0 diff --git a/util/scripts/mac-binary/install/libraries/fix_config_paths.pl b/util/scripts/mac-binary/install/libraries/fix_config_paths.pl new file mode 100755 index 0000000..6b9d777 --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/fix_config_paths.pl @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +#globals +my %VARS = ( + "docs" => "/Developer/Documentation/Qt", + "libs" => "/Library/Frameworks", + "plug" => "/Developer/Applications/Qt/plugins", + "trns" => "/Developer/Applications/Qt/translations", + "data" => "/usr/local/Qt" . $ENV{"VERSION_MAJOR"} . "." . $ENV{"VERSION_MINOR"}, + "bins" => "/Developer/Tools/Qt", + "demo" => "/Developer/Examples/Qt/Demos", + "xmpl" => "/Developer/Examples/Qt/", + "hdrs" => "/usr/include", + "prfx" => "/" +); +my $file_in = 0; +my $file_out = 0; + +#parse args +while ( @ARGV ) { + my $arg = shift @ARGV; + if($arg =~ /^-/) { + my $val = shift @ARGV; + my $var = $arg; + $var =~ s,^-,,; + $VARS{$var} = $val; + } elsif(!$file_in) { + $file_in = $arg; + } elsif(!$file_out) { + $file_out = $arg; + } else { + die "$0 <file_in> <file_out>"; + } +} +die "$0 <file_in> <file_out>" if(!$file_in || !$file_out); + +#open + +open(FIN , "<" . $file_in ) || die "Could not open $file_in for reading"; +open(FOUT, ">" . $file_out) || die "Could not open $file_out for writing"; +local $/; +binmode FIN; +binmode FOUT; + +#do stuff +while(my $CONTENT = <FIN>) { + foreach (keys(%VARS)) { + my $var = "qt_" . $_ . "path="; + my $val = $VARS{$_}; + my $val_length = length($val)+1; + $CONTENT =~ s,${var}.{$val_length},${var}${val}\0,g; + } + print FOUT $CONTENT; +} + +#close +close FIN; +close FOUT; diff --git a/util/scripts/mac-binary/install/libraries/fix_prl_paths.pl b/util/scripts/mac-binary/install/libraries/fix_prl_paths.pl new file mode 100755 index 0000000..62c8f7a --- /dev/null +++ b/util/scripts/mac-binary/install/libraries/fix_prl_paths.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl + +use strict; + +open(OLDFILE, "<" . "$ARGV[0]") || die "Couldn't open input file: $ARGV[0]"; +open(NEWFILE, ">" . "$ARGV[1]") || die "Couldn't open output file: $ARGV[1]"; + +while (my $line = <OLDFILE>) { + $line =~ s,-L/(\w+(\w|\s|/)*)/pgsql/lib,,g; + $line =~ s,-L/(\w+(\w|\s|/)*)/mysql/lib/mysql,,g; + $line =~ s,-F(/private)?/tmp/qt-stuff/source/qt-mac-\w+-src-4\.\d\.\d(-rc\d)?/lib,,g; + $line =~ s,-L(/private)?/tmp/qt-stuff/source/qt-mac-\w+-src-4\.\d\.\d(-rc\d)?/lib,,g; + print NEWFILE $line; +} + +close OLDFILE; +close NEWFILE; diff --git a/util/scripts/mac-binary/install/plugins/Info.plist b/util/scripts/mac-binary/install/plugins/Info.plist new file mode 100644 index 0000000..4d2ae28 --- /dev/null +++ b/util/scripts/mac-binary/install/plugins/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$ Plugins</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.plugins</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Plugins</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> + <true/> + <key>IFPkgFlagIsRequired</key> + <true/> + <key>IFPkgFlagRelocatable</key> + <false/> + <key>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/plugins/Resources/Description.plist b/util/scripts/mac-binary/install/plugins/Resources/Description.plist new file mode 100644 index 0000000..9e94d9e --- /dev/null +++ b/util/scripts/mac-binary/install/plugins/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$ Plugins</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Plugins</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/plugins/Resources/Readme.rtf b/util/scripts/mac-binary/install/plugins/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/plugins/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/plugins/Resources/plugins.info b/util/scripts/mac-binary/install/plugins/Resources/plugins.info new file mode 100644 index 0000000..24fd13f --- /dev/null +++ b/util/scripts/mac-binary/install/plugins/Resources/plugins.info @@ -0,0 +1,17 @@ +Title Qt Tools +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Plugins +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/plugins/Resources/postflight b/util/scripts/mac-binary/install/plugins/Resources/postflight new file mode 100755 index 0000000..a8af8dd --- /dev/null +++ b/util/scripts/mac-binary/install/plugins/Resources/postflight @@ -0,0 +1,5 @@ +#!/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/Developer/Applications/Qt/plugins" Plugins diff --git a/util/scripts/mac-binary/install/plugins/create_package.sh b/util/scripts/mac-binary/install/plugins/create_package.sh new file mode 100755 index 0000000..b722f68 --- /dev/null +++ b/util/scripts/mac-binary/install/plugins/create_package.sh @@ -0,0 +1,31 @@ +#!/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 + +#copy plugins +for plugin in `find $BINDIR/plugins/ -name 'lib*.dylib'`; do + echo `basename $plugin` | grep "_debug" >/dev/null 2>&1 && continue + out_plugin=`echo $plugin | sed "s,^$BINDIR,$OUTDIR/Developer/Applications/Qt,g"` + mkdir -p `dirname $out_plugin` + [ -e "$plugin" ] && ../libraries/fix_config_paths.pl "$plugin" "$out_plugin" +done + +exit 0 diff --git a/util/scripts/mac-binary/install/tools/Info.plist b/util/scripts/mac-binary/install/tools/Info.plist new file mode 100644 index 0000000..f30ba03 --- /dev/null +++ b/util/scripts/mac-binary/install/tools/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$ Tools</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.tools</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Tools</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> + <true/> + <key>IFPkgFlagIsRequired</key> + <true/> + <key>IFPkgFlagRelocatable</key> + <false/> + <key>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/tools/Resources/Description.plist b/util/scripts/mac-binary/install/tools/Resources/Description.plist new file mode 100644 index 0000000..5a88747 --- /dev/null +++ b/util/scripts/mac-binary/install/tools/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$ Tools</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Tools</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/tools/Resources/Readme.rtf b/util/scripts/mac-binary/install/tools/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/tools/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/tools/Resources/postflight b/util/scripts/mac-binary/install/tools/Resources/postflight new file mode 100755 index 0000000..d9c4a57 --- /dev/null +++ b/util/scripts/mac-binary/install/tools/Resources/postflight @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +import os, sys, shutil, re + +def readLicenseFile(): + licenseKeyPath = os.path.join(os.environ['HOME'], '.qt-license'); + + licenseKeyRE = re.compile(r"^LicenseKeyExt=(.+)$") + license = open(licenseKeyPath, 'r') + licensekey = "Bad Key" + for line in license: + matchObj = licenseKeyRE.match(line) + if matchObj: + licensekey = matchObj.group(1) + return licensekey + +def getEditionDefine(): + licenseKey = readLicenseFile() + + MeteredMap = { '5': True, 'L': True } + + if len(licenseKey) == 0: + return false + + licenseParts = licenseKey.split('-') + return MeteredMap.get(licenseParts[3][0], False) + + +if __name__ == "__main__": + if getEditionDefine() == False: + usageReporterPath = os.path.join(os.path.sep, 'usr', 'bin', 'qtusagereporter') + reporterInDevToolsPath = os.path.join(os.path.sep, 'Developer', 'Tools', 'qtusagereporter') + if os.path.exists(usageReporterPath): + finalPath = os.path.realpath(usageReporterPath); + os.remove(finalPath) + if os.path.exists(reporterInDevToolsPath): + os.remove(reporterInDevToolsPath) + if os.path.exists(usageReporterPath): + os.remove(usageReporterPath) + sys.exit(0) diff --git a/util/scripts/mac-binary/install/tools/Resources/tools.info b/util/scripts/mac-binary/install/tools/Resources/tools.info new file mode 100644 index 0000000..54f8d04 --- /dev/null +++ b/util/scripts/mac-binary/install/tools/Resources/tools.info @@ -0,0 +1,17 @@ +Title Qt Tools +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Tools +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/tools/create_package.sh b/util/scripts/mac-binary/install/tools/create_package.sh new file mode 100755 index 0000000..6ed1e15 --- /dev/null +++ b/util/scripts/mac-binary/install/tools/create_package.sh @@ -0,0 +1,142 @@ +#!/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 + +copyHeader() +{ + HEADER_FILE=$1 + HEADER_DIR=$2 + mkdir -p $HEADER_DIR + if [ `wc -l $HEADER_FILE | awk '{print $1;}'` = "1" ]; then + LINE=`head -1 $HEADER_FILE` + if echo "$LINE" | grep '^#include "../../' >/dev/null 2>&1; then + HEADER_FILE=`dirname $HEADER_FILE`/`echo $LINE | sed "s,^#include \"\([^\"]*\)\"\$,\1,"` + fi + fi + cp "$HEADER_FILE" "$HEADER_DIR" +} + +copyHeaderDir() +{ + BASEDIR=$1 + DESTDIR=$2 + mkdir -p "$DESTDIR" + for header in `find "$BASEDIR" -type f`; do + case $header in + *_pch.h|*_p.h|*headers.pri) + continue + ;; + *) + copyHeader "$header" "$DESTDIR" + ;; + esac + done +} + +[ -z "$OUTDIR" ] && exit 1 + +#copy tools +for a in qmake uic uic3 rcc moc Assistant Assistant_adp pixeltool Linguist Designer qt3to4 rccdump lrelease lupdate lconvert findtr qtusagereporter qdoc qcollectiongenerator qhelpconverter qhelpgenerator xmlpatterns qdbus qdbusviewer qdbusxml2cpp qdbuscpp2xml evalextender macdeployqt; do + EXE= + if [ -d "${BINDIR}/bin/${a}.app" ]; then + mkdir -p "$OUTDIR/Developer/Applications/Qt/" + cp -R "${BINDIR}/bin/${a}.app" "$OUTDIR/Developer/Applications/Qt" + EXE="$OUTDIR/Developer/Applications/Qt/${a}.app/Contents/MacOS/$a" #in the bundle + #place it into the tools dir + mkdir -p "$OUTDIR/Developer/Tools/Qt/" + ln -s "/Developer/Applications/Qt/${a}.app" "$OUTDIR/Developer/Tools/Qt/${a}.app" + elif [ -x "${BINDIR}/bin/${a}" -o -x "${BINDIR}/tools/qdoc3/${a}" ]; then + EXE="$OUTDIR/usr/bin/$a-${VERSION_MAJOR}.${VERSION_MINOR}" + mkdir -p `dirname $EXE` + cp "${BINDIR}/bin/$a" "$EXE" + ln -s "$a-${VERSION_MAJOR}.${VERSION_MINOR}" "$OUTDIR/usr/bin/$a" + #place it into the tools dir + mkdir -p "$OUTDIR/Developer/Tools/Qt/" + ln -s "/usr/bin/$a-${VERSION_MAJOR}.${VERSION_MINOR}" "$OUTDIR/Developer/Tools/Qt/$a" + fi + [ -z "$EXE" ] && continue + + #configs + if [ "$a" = "qmake" ]; then + mkdir -p "$OUTDIR/usr/local/Qt${VERSION_MAJOR}.${VERSION_MINOR}/mkspecs" + cp -PR $SRCDIR/mkspecs/* "$OUTDIR/usr/local/Qt${VERSION_MAJOR}.${VERSION_MINOR}/mkspecs" + sed "s,qt_no_framework,,g" "$BINDIR/mkspecs/qconfig.pri" >"$OUTDIR/usr/local/Qt${VERSION_MAJOR}.${VERSION_MINOR}/mkspecs/qconfig.pri" + cat >>"$OUTDIR/usr/local/Qt${VERSION_MAJOR}.${VERSION_MINOR}/mkspecs/qconfig.pri" <<EOF +CONFIG += no_mocdepend +EOF + (cd "$OUTDIR/usr/local/Qt${VERSION_MAJOR}.${VERSION_MINOR}/mkspecs"; rm -f default; ln -s macx-xcode default) + ../libraries/fix_config_paths.pl -data "/usr/local/Qt${VERSION_MAJOR}.${VERSION_MINOR}" "$EXE" "/tmp/tmp.exe" + cp "/tmp/tmp.exe" "$EXE" + rm -f "/tmp/tmp.exe" + else + ../libraries/fix_config_paths.pl "$EXE" "/tmp/tmp.exe" + cp "/tmp/tmp.exe" "$EXE" + rm -f /tmp/tmp.exe + fi + #perms + strip "$EXE" >/dev/null 2>&1 + chmod a+x "$EXE" +done + +# Do the tool frameworks (Gah, this is copy-past from the libraries create_package.sh). +FRAMEWORK_DIR="$OUTDIR/Library/Frameworks" +mkdir -p "$FRAMEWORK_DIR" +for lib in QtDesigner QtDesignerComponents QtTest QtAssistant QtHelp; 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_prl_paths.pl "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl" "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl.fixed" + mv "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl.fixed" "$FRAMEWORK_DIR/${lib}.framework/${lib}.prl" + ../libraries/fix_config_paths.pl "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/$lib" "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}.fixed" + mv "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/${lib}.fixed" "$FRAMEWORK_DIR/${lib}.framework/Versions/${VERSION_MAJOR}/$lib" + + # Remove the debug libraries (they are part of another package) + find "$FRAMEWORK_DIR/${lib}.framework/" -name '*_debug*' -exec rm -f {} \; >/dev/null 2>&1 +done + +#copy q3porting.xml. qt3to4 looks for it in QLibraryInfo::DataPath and QLibraryInfo::PrefixPath +cp $BINDIR/tools/porting/src/q3porting.xml $OUTDIR/usr/local/Qt${VERSION_MAJOR}.${VERSION_MINOR}/q3porting.xml + +# Finally handle QtUiTools +if [ -e "${BINDIR}/lib/libQtUiTools.a" ]; then + mkdir -p "$OUTDIR/usr/lib" + cp "${BINDIR}/lib/libQtUiTools.a" "$OUTDIR/usr/lib/libQtUiTools.a" + # Copy its headers as well + copyHeaderDir "${BINDIR}/include/QtUiTools" "$OUTDIR/usr/include/QtUiTools" +fi + +if [ -e "${BINDIR}/lib/libQtCLucene.${VERSION_MAJOR}.dylib" ]; then + mkdir -p "$OUTDIR/usr/lib" + for lib in libQtCLucene.dylib libQtCLucene.${VERSION_MAJOR}.dylib libQtCLucene.${VERSION_MAJOR}.${VERSION_MINOR}.dylib libQtCLucene.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.dylib; do + cp -R "${BINDIR}/lib/$lib" "$OUTDIR/usr/lib/" + done +fi + +# finally phrase books for Linguist +PHRASEDEST="$OUTDIR/Developer/Applications/Qt/phrasebooks" +mkdir -p "$PHRASEDEST" +for phrasebook in `find $BINDIR/tools/linguist/phrasebooks/ -name '*.qph'`; do + cp "$phrasebook" "$PHRASEDEST" +done + + diff --git a/util/scripts/mac-binary/install/translations/Info.plist b/util/scripts/mac-binary/install/translations/Info.plist new file mode 100644 index 0000000..73eb840 --- /dev/null +++ b/util/scripts/mac-binary/install/translations/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$ Translations</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.translations</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Translations</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> + <true/> + <key>IFPkgFlagIsRequired</key> + <true/> + <key>IFPkgFlagRelocatable</key> + <false/> + <key>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/translations/Resources/Description.plist b/util/scripts/mac-binary/install/translations/Resources/Description.plist new file mode 100644 index 0000000..c1b27b2 --- /dev/null +++ b/util/scripts/mac-binary/install/translations/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$ Translations</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt Translations</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/translations/Resources/Readme.rtf b/util/scripts/mac-binary/install/translations/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/translations/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/translations/Resources/postflight b/util/scripts/mac-binary/install/translations/Resources/postflight new file mode 100755 index 0000000..a8af8dd --- /dev/null +++ b/util/scripts/mac-binary/install/translations/Resources/postflight @@ -0,0 +1,5 @@ +#!/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/Developer/Applications/Qt/plugins" Plugins diff --git a/util/scripts/mac-binary/install/translations/Resources/translations.info b/util/scripts/mac-binary/install/translations/Resources/translations.info new file mode 100644 index 0000000..cc0d5b3 --- /dev/null +++ b/util/scripts/mac-binary/install/translations/Resources/translations.info @@ -0,0 +1,17 @@ +Title Qt Translations +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ Translations +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/translations/create_package.sh b/util/scripts/mac-binary/install/translations/create_package.sh new file mode 100644 index 0000000..b8b2b78 --- /dev/null +++ b/util/scripts/mac-binary/install/translations/create_package.sh @@ -0,0 +1,35 @@ +#!/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 + +#copy translation +TRANSLATIONDEST="$OUTDIR/Developer/Applications/Qt/translations" +mkdir -p "$TRANSLATIONDEST" +for translation in `find $BINDIR/translations/ -name '*.qm'`; do + cp "$translation" "$TRANSLATIONDEST" +done + +# Copy the untranslated, so there's a starting point for them as well. +for translation in `find $BINDIR/translations/ -name '*_untranslated.ts'`; do + cp "$translation" "$TRANSLATIONDEST" +done + +exit 0 diff --git a/util/scripts/mac-binary/install/xcode/.build_separate b/util/scripts/mac-binary/install/xcode/.build_separate new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/.build_separate diff --git a/util/scripts/mac-binary/install/xcode/.gitattributes b/util/scripts/mac-binary/install/xcode/.gitattributes new file mode 100644 index 0000000..5a2a8ee --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/.gitattributes @@ -0,0 +1 @@ +integration/templates/*/Application/*/main.cpp -crlf diff --git a/util/scripts/mac-binary/install/xcode/Info.plist b/util/scripts/mac-binary/install/xcode/Info.plist new file mode 100644 index 0000000..4410b63 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/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$ XCode Integration</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt$VERSION_MAJOR$.xcode</string> + <key>CFBundleName</key> + <string>Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ XCode Integration</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> + <true/> + <key>IFPkgFlagIsRequired</key> + <true/> + <key>IFPkgFlagRelocatable</key> + <false/> + <key>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/xcode/Resources/Description.plist b/util/scripts/mac-binary/install/xcode/Resources/Description.plist new file mode 100644 index 0000000..386e200 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/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$ XCode Integration</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt XCode Integration</string> + <key>IFPkgDescriptionVersion</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/xcode/Resources/Readme.rtf b/util/scripts/mac-binary/install/xcode/Resources/Readme.rtf new file mode 100644 index 0000000..f5636ca --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/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/xcode/Resources/xcode.info b/util/scripts/mac-binary/install/xcode/Resources/xcode.info new file mode 100644 index 0000000..0f3e8a4 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/Resources/xcode.info @@ -0,0 +1,17 @@ +Title Qt Tools +Version $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt $VERSION_MAJOR$.$VERSION_MINOR$.$VERSION_PATCH$ XCode Integration +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/xcode/create_package.sh b/util/scripts/mac-binary/install/xcode/create_package.sh new file mode 100755 index 0000000..f86932b --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/create_package.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +#options parsing +BINDIR= +OUTDIR= +while [ -n "$1" ]; do + OPTION=`echo $1 | sed 's,^--\([^=]*\)=\(.*\),\1,'` + ARG=`echo $1 | sed 's,^--\([^=]*\)=\(.*\),\2,'` + shift + case "$OPTION" in + qtbin) BINDIR="$ARG" ;; + outdir) OUTDIR="$ARG" ;; + *) ;; + esac +done +[ -z "$OUTDIR" ] && exit 1 + +translate_cp() +{ + DO_TRANSLATE="$PWD/do_translate.sh" + if [ -d "$1" ]; then + (cd "$1" && find . -type f -exec "$DO_TRANSLATE" {} "$2" \;) + else + "$DO_TRANSLATE" "$1" "$2" + fi +} + +#copy the scripts +SCRPT_DIR="$OUTDIR/Library/Frameworks/QtCore.framework/Versions/${VERSION_MAJOR}.${VERSION_MINOR}/Resources/xcode" +mkdir -p "$SCRPT_DIR" +translate_cp integration/scripts "$SCRPT_DIR" +for a in $SCRPT_DIR/*.sh; do + chmod a+x "$a" +done +ln -sf "Versions/${VERSION_MAJOR}.${VERSION_MINOR}/Resources" "$OUTDIR/Library/Frameworks/QtCore.framework/Resources" + +#copy the templates +mkdir -p "$OUTDIR/Library/Application Support/Apple/Developer Tools/" +translate_cp integration/templates "$OUTDIR/Library/Application Support/Apple/Developer Tools/" + +#build the bundle +(cd "$OUTDIR/Library/Application Support/Apple/Developer Tools/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS" +chmod 755 ./build_bundle.sh +QTDIR="$BINDIR" ./build_bundle.sh) + +exit 0 diff --git a/util/scripts/mac-binary/install/xcode/do_translate.sh b/util/scripts/mac-binary/install/xcode/do_translate.sh new file mode 100755 index 0000000..b1b00e49 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/do_translate.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +dir=`dirname "$2/$1"` +mkdir -p "$dir" +sed -e "s,\\\$VERSION_MAJOR\\\$,$VERSION_MAJOR,g" \ + -e "s,\\\$VERSION_MINOR\\\$,$VERSION_MINOR,g" \ + -e "s,\\\$VERSION_PATCH\\\$,$VERSION_PATCH,g" "$1" >"$2/$1" + + diff --git a/util/scripts/mac-binary/install/xcode/fake_package.sh b/util/scripts/mac-binary/install/xcode/fake_package.sh new file mode 100755 index 0000000..74175c5 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/fake_package.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +#for now +VERSION_MAJOR=4 +VERSION_MINOR=0 +BINDIR="$QTDIR" + +translate_cp() +{ + DO_TRANSLATE="$PWD/do_translate.sh" + if [ -d "$1" ]; then + (cd "$1" && find . -type f -exec "$DO_TRANSLATE" {} "$2" \;) + else + "$DO_TRANSLATE" "$1" "$2" + fi +} + +make_link() +{ + base=`basename "$1"` + rm -rf "$2/$base" + mkdir -p "$2" + ln -sf "$1" "$2" +} + +#copy the templates +rm -rf "$PWD/.faked_integration" +mkdir -p "$PWD/.faked_integration" +translate_cp integration/templates "$PWD/.faked_integration" +(cd "$PWD/.faked_integration/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS" +chmod 755 ./build_bundle.sh +QTDIR="$BINDIR" ./build_bundle.sh) +#links +templ_dir="/Library/Application Support/Apple/Developer Tools/" +make_link "$PWD/.faked_integration/CustomDataViews/QtDataFormatters.bundle" "$templ_dir/CustomDataViews" +make_link "$PWD/.faked_integration/Project Templates/Application/Qt Application" "$templ_dir/Project Templates/Application" +make_link "$PWD/.faked_integration/File Templates/Qt" "$templ_dir/File Templates" +make_link "$PWD/.faked_integration/Scripts/999-Qt" "$templ_dir/Scripts" +for a in `find "$PWD/.faked_integration/Specifications/" -name *.pb*spec`; do + make_link "$a" "$templ_dir/Specifications" +done + +#copy the scripts +SCRPT_DIR="/Library/Frameworks/QtCore.framework/Versions/${VERSION_MAJOR}.${VERSION_MINOR}/Resources/xcode" +mkdir -p "$SCRPT_DIR" +for script in integration/scripts/*; do + make_link "$PWD/$script" "$SCRPT_DIR" +done +ln -sf "Versions/${VERSION_MAJOR}.${VERSION_MINOR}/Resources" "/Library/Frameworks/QtCore.framework/Resources" diff --git a/util/scripts/mac-binary/install/xcode/integration/scripts/get_file_list.applescript b/util/scripts/mac-binary/install/xcode/integration/scripts/get_file_list.applescript new file mode 100644 index 0000000..6f110ca --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/scripts/get_file_list.applescript @@ -0,0 +1,31 @@ +set all_files to {} +tell application "Xcode" + tell project 1 + repeat with f in file references + tell f + set fn to absolute path + set end of all_files to fn & " +" + end tell + end repeat + set all_groups to {} + repeat with grp in groups + set end of all_groups to grp + end repeat + repeat with grp in all_groups + tell grp + repeat with grp in groups + set end of all_groups to grp + end repeat + repeat with f in file references + tell f + set fn to absolute path + set end of all_files to fn & " +" + end tell + end repeat + end tell + end repeat + end tell +end tell +all_files
\ No newline at end of file diff --git a/util/scripts/mac-binary/install/xcode/integration/scripts/get_mocs.sh b/util/scripts/mac-binary/install/xcode/integration/scripts/get_mocs.sh new file mode 100755 index 0000000..c3107fc --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/scripts/get_mocs.sh @@ -0,0 +1,144 @@ +#!/bin/sh + +[ -z "$TEMP_FILE_DIR" ] && TEMP_FILE_DIR="/tmp" +CFG_MODE=overwrite +CFG_PREPROCESS_FLAGS= +CFG_INPUT= +CFG_OUTPUT= +CFG_MOC="/usr/bin/moc" +CFG_FILE_LIST="/Library/Frameworks/QtCore.framework/Resources/xcode/get_file_list.applescript" + +mocable() +{ + if grep '\bQ_OBJECT\b' "$1" >/dev/null 2>&1; then + return 0 + fi + return 1 +} + +while [ -n "$1" ]; do + CACHE_1="$1" + OPTION= + ARG= + case $1 in + -*=*) #gnu style + OPTION=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\1,'` + ARG=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\2,'` + ;; + -output|-moc|-file-list|-input) #second arg style + OPTION=`echo $1 | sed 's,-\([^=]*\),\1,'` + shift + ARG=$1 + ;; + esac + shift + case "$OPTION" in + file-list) CFG_FILE_LIST="$ARG" ;; + moc) CFG_MOC="$ARG" ;; + input) CFG_INPUT="$ARG" ;; + output) CFG_OUTPUT="$ARG" ;; + help|*) + [ "$OPTION" = "help" ] || echo "Unknown option $CACHE_1!" + echo "Help!!" + exit 888; + ;; + esac +done + +cd "${SOURCE_ROOT}" +for a in $OTHER_CPLUSPLUSFLAGS; do + case "$a" in + -D*|-I*) + CFG_PREPROCESS_FLAGS="$CFG_PREPROCESS_FLAGS ${a}" ;; + *) ;; + esac +done +for a in $GCC_PREPROCESSOR_DEFINITIONS; do + CFG_PREPROCESS_FLAGS="$CFG_PREPROCESS_FLAGS -D${a}" +done +CFG_PREPROCESS_FLAGS="$CFG_PREPROCESS_FLAGS -I${SOURCE_ROOT}" + +MOC_LIST="${TEMP_FILE_DIR}/mocable.list" +echo >"$MOC_LIST" + +if [ ! -z "$CFG_INPUT" ] && [ ! -z "$CFG_OUTPUT" ]; then + FILE_TYPE=unknown + case "$CFG_INPUT" in + *.cpp|*.C|*.cc|*.CPP|*.CC) FILE_TYPE=c++-source ;; + *.h|*.H|*.hpp|*.HPP) FILE_TYPE=c++-header ;; + esac + [ "$FILE_TYPE" = "unknown" ] && exit 0 + + if mocable "$CFG_INPUT"; then + if [ "$FILE_TYPE" = "c++-source" ]; then + MOC_FILE=`echo $CFG_INPUT | sed "s,\.[^.]*$,.moc,"` + if [ ! -e "$MOC_FILE" ] || [ "$CFG_INPUT" -nt "$MOC_FILE" ]; then + $CFG_MOC "$CFG_PREPROCESS_FLAGS" "$CFG_INPUT" -o "$MOC_FILE" + fi + elif [ "$FILE_TYPE" = "c++-header" ]; then + [ -f "$CFG_OUTPUT" ] && cp "$CFG_OUTPUT" "$MOC_LIST" + echo "#include \"$CFG_INPUT\"" >>"$MOC_LIST" + fi + elif [ -f "$CFG_OUTPUT" ]; then + grep -v "$CFG_INPUT" "$CFG_OUTPUT" >"$MOC_LIST" + fi +else + FILE_LIST="${TEMP_FILE_DIR}/file.list" + osascript "$CFG_FILE_LIST" | sed "s,^[, ]*,,g" >"$FILE_LIST" + + LINE=0 + LINES=`wc -l "$FILE_LIST" | awk '{ print $1; }'` + while [ "$LINE" -lt "$LINES" ]; do + LINE=$((LINE+1)) + FILE=`head -$LINE ${FILE_LIST} | tail -1` + FILE_TYPE=unknown + case "$FILE" in + *.cpp|*.C|*.cc|*.CPP|*.CC) FILE_TYPE=c++-source ;; + *.h|*.H|*.hpp|*.HPP) FILE_TYPE=c++-header ;; + *.mocs) [ -z "$CFG_OUTPUT" ] && CFG_OUTPUT="$FILE" ;; + esac + [ "$FILE_TYPE" = "unknown" ] && continue + + if mocable "$FILE"; then + if [ "$FILE_TYPE" = "c++-source" ]; then + MOC_FILE=`echo $FILE | sed "s,\.[^.]*$,.moc,"` + if [ ! -e "$MOC_FILE" ] || [ "$FILE" -nt "$MOC_FILE" ]; then + $CFG_MOC "$CFG_PREPROCESS_FLAGS" "$FILE" -o "$MOC_FILE" + fi + elif [ "$FILE_TYPE" = "c++-header" ]; then + echo "#include \"$FILE\"" >>"$MOC_LIST" + fi + fi + done + rm -f "$FILE_LIST" + + if [ -z "$CFG_OUTPUT" ]; then + echo "No output file specified!" + exit 1 + fi +# CFG_MODE=remove +fi + +#sort it +sort "$MOC_LIST" | uniq | grep -v '^$' >"${MOC_LIST}.sorted" +mv "${MOC_LIST}.sorted" "${MOC_LIST}" + +#replace it +if cmp -s "$MOC_LIST" "$CFG_OUTPUT"; then + rm -f "$MOC_LIST" +else + if [ "$CFG_MODE" = "overwrite" ]; then + mv "$MOC_LIST" "$CFG_OUTPUT" + else + if [ -z `cat "$MOC_LIST"` ]; then + if [ ! -e "$CFG_OUTPUT" ] || [ ! -z `cat "$CFG_OUTPUT"` ]; then + echo >"$CFG_OUTPUT" + fi + else + rm -f "$CFG_OUTPUT" + fi + rm -f "$MOC_LIST" + fi +fi + +exit 0 diff --git a/util/scripts/mac-binary/install/xcode/integration/scripts/make_moc.sh b/util/scripts/mac-binary/install/xcode/integration/scripts/make_moc.sh new file mode 100755 index 0000000..c7f0179 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/scripts/make_moc.sh @@ -0,0 +1,98 @@ +#!/bin/sh + +CFG_PREPROCESS_FLAGS= +CFG_MOC="/usr/bin/moc" +CFG_INPUT= +CFG_OUTPUT= + +while [ -n "$1" ]; do + CACHE_1="$1" + OPTION= + ARG= + case $1 in + -*=*) #gnu style + OPTION=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\1,'` + ARG=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\2,'` + ;; + -output|-input|-moc) #second arg style + OPTION=`echo $1 | sed 's,-\([^=]*\),\1,'` + shift + ARG=$1 + ;; + esac + shift + case "$OPTION" in + moc) CFG_MOC="$ARG" ;; + output) CFG_OUTPUT="$ARG" ;; + input) CFG_INPUT="$ARG" ;; + help|*) + [ "$OPTION" = "help" ] || echo "Unknown option $CACHE_1!" + echo "Help!!" + exit 888; + ;; + esac +done + +if [ -z "$CFG_INPUT" ] || [ -z "$CFG_OUTPUT" ]; then + echo "No input/output file specified." + exit 1 +fi + +cd "${SOURCE_ROOT}" +for a in $OTHER_CPLUSPLUSFLAGS; do + case "$a" in + -D*|-I*) + CFG_PREPROCESS_FLAGS="$CFG_PREPROCESS_FLAGS ${a}" ;; + *) ;; + esac +done +for a in $GCC_PREPROCESSOR_DEFINITIONS; do + CFG_PREPROCESS_FLAGS="$CFG_PREPROCESS_FLAGS -D${a}" +done +CFG_PREPROCESS_FLAGS="$CFG_PREPROCESS_FLAGS -I${SOURCE_ROOT}" + +NO_CHANGE=yes +MOC_OUTPUT="${TEMP_FILE_DIR}/moc.out" +echo >"$MOC_OUTPUT" + +#do the moc +if [ -e "$CFG_INPUT" ]; then + if [ '!' -e "$CFG_OUTPUT" ] || [ "$CFG_INPUT" -nt "$CFG_OUTPUT" ]; then + NO_CHANGE=no + else + LINE=0 + LINES=`wc -l "$CFG_INPUT" | awk '{ print $1; }'` + while [ "$LINE" -lt "$LINES" ]; do + LINE=$((LINE+1)) + SOURCE=`head -$LINE ${CFG_INPUT} | tail -1` + + FILE=`echo $SOURCE | sed "s,^#include \"\([^\"]*\)\"$,\1,"` + if [ '!' -f "$FILE" ] || [ "$FILE" -nt "$CFG_OUTPUT" ]; then + NO_CHANGE=no + break + fi + done + fi + + if [ "$NO_CHANGE" = "no" ]; then + LINE=0 + LINES=`wc -l "$CFG_INPUT" | awk '{ print $1; }'` + while [ "$LINE" -lt "$LINES" ]; do + LINE=$((LINE+1)) + SOURCE=`head -$LINE ${CFG_INPUT} | tail -1` + + FILE=`echo $SOURCE | sed "s,^#include \"\([^\"]*\)\"$,\1,"` + if [ -f "$FILE" ]; then + $CFG_MOC $CFG_PREPROCESS_FLAGS "$FILE" >>"$MOC_OUTPUT" + fi + done + fi +fi + +#replace it +if [ "$NO_CHANGE" = "yes" ] || cmp -s "$MOC_OUTPUT" "$CFG_OUTPUT"; then + rm -f "$MOC_OUTPUT" +else + mv "$MOC_OUTPUT" "$CFG_OUTPUT" +fi + diff --git a/util/scripts/mac-binary/install/xcode/integration/scripts/make_rcc.sh b/util/scripts/mac-binary/install/xcode/integration/scripts/make_rcc.sh new file mode 100755 index 0000000..2165bec --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/scripts/make_rcc.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +CFG_RCC="/usr/bin/rcc" +CFG_INPUT= +CFG_OUTPUT= + +while [ -n "$1" ]; do + CACHE_1="$1" + OPTION= + ARG= + case $1 in + -*=*) #gnu style + OPTION=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\1,'` + ARG=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\2,'` + ;; + -output|-input|-rcc) #second arg style + OPTION=`echo $1 | sed 's,-\([^=]*\),\1,'` + shift + ARG=$1 + ;; + esac + shift + case "$OPTION" in + rcc) CFG_UIC="$ARG" ;; + output) CFG_OUTPUT="$ARG" ;; + input) CFG_INPUT="$ARG" ;; + help|*) + [ "$OPTION" = "help" ] || echo "Unknown option $CACHE_1!" + echo "Help!!" + exit 888; + ;; + esac +done + +if [ -z "$CFG_INPUT" ] || [ -z "$CFG_OUTPUT" ]; then + echo "No input/output file specified." + exit 1 +fi +[ "$CFG_OUTPUT" -nt "$CFG_INPUT" ] && exit 0 +cd "${SOURCE_ROOT}" + +#do the rcc +RCC_OPTIONS= +[ -z "$PRODUCT_NAME" ] || RCC_OPTIONS="$RCC_OPTIONS -name \"$PRODUCT_NAME\"" +$CFG_RCC $RCC_OPTIONS -o "$CFG_OUTPUT" "$CFG_INPUT" diff --git a/util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh b/util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh new file mode 100755 index 0000000..e5fd5c1 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +CFG_UIC="/usr/bin/uic" +CFG_INPUT= +CFG_OUTPUT= + +while [ -n "$1" ]; do + CACHE_1="$1" + OPTION= + ARG= + case $1 in + -*=*) #gnu style + OPTION=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\1,'` + ARG=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\2,'` + ;; + -output|-input|-uic) #second arg style + OPTION=`echo $1 | sed 's,-\([^=]*\),\1,'` + shift + ARG=$1 + ;; + esac + shift + case "$OPTION" in + uic) CFG_UIC="$ARG" ;; + output) CFG_OUTPUT="$ARG" ;; + input) CFG_INPUT="$ARG" ;; + help|*) + [ "$OPTION" = "help" ] || echo "Unknown option $CACHE_1!" + echo "Help!!" + exit 888; + ;; + esac +done + +if [ -z "$CFG_INPUT" ] || [ -z "$CFG_OUTPUT" ]; then + echo "No input/output file specified." + exit 1 +fi +[ "$CFG_OUTPUT" -nt "$CFG_INPUT" ] && exit 0 +cd "${SOURCE_ROOT}" + +#do the uic +$CFG_UIC -o "$CFG_OUTPUT" "$CFG_INPUT" diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/Info.plist b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/Info.plist new file mode 100644 index 0000000..b775dcd --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/Info.plist @@ -0,0 +1,26 @@ +<?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>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>QtDataFormatters</string> + <key>CFBundleGetInfoString</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$, Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)</string> + <key>CFBundleIdentifier</key> + <string>com.apple.Xcode.QtDataFormatters</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>Xcode Qt Data Formatters Plugin</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.2</string> + <key>CFBundleSignature</key> + <string>xccf</string> + <key>CFBundleVersion</key> + <string>308</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS/build_bundle.sh b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS/build_bundle.sh new file mode 100755 index 0000000..df1e225 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS/build_bundle.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +DO_DEBUG=yes +[ "$1" = "-debug" ] && DO_DEBUG=yes + +#figure out compiler flags +CFLAGS="-F${QTDIR}/lib" +LFLAGS= +for a in QtCore; do + LFLAGS="$LFLAGS -framework ${a}" +done +[ "$DO_DEBUG" = "yes" ] && CFLAGS="$CFLAGS -g" +if [ -d "/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Headers/" ]; then + CFLAGS="$CFLAGS -I/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Headers/" +elif [ -d "/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.pbplugin/Contents/Headers/" ]; then + CFLAGS="$CFLAGS -I/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.pbplugin/Contents/Headers/" +fi + +#link +/usr/bin/c++ -bundle bundle.cpp $CFLAGS -o QtDataFormatters $LFLAGS diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS/bundle.cpp b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS/bundle.cpp new file mode 100644 index 0000000..2c28c6f --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/MacOS/bundle.cpp @@ -0,0 +1,129 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************///xcode +extern "C" { +#include "DataFormatterPlugin.h" + _pbxgdb_plugin_function_list *_pbxgdb_plugin_functions = 0; +} + +//qt stuff +#include <QtCore/QtCore> + +static int serialId(int id) +{ +#if 0 + static int serialRet = 0xF00F00F0; + return serialRet--; +#else + return id; +#endif +} + +static void *doAllocate(int id, int size) +{ + if(_pbxgdb_plugin_functions && _pbxgdb_plugin_functions->allocate) + return (*_pbxgdb_plugin_functions->allocate)(id, size); + return malloc(size); +} + +static char *doSprintf(int id, const char *format, va_list ap) +{ + if(_pbxgdb_plugin_functions && _pbxgdb_plugin_functions->vmessage) + return (*_pbxgdb_plugin_functions->vmessage)(id, format, ap); + return "Unable to sprintf!"; +} + +static char *doSprintf(int id, const char *format, ...) +{ + va_list ap; + va_start(ap, format); + char *ret = doSprintf(id, format, ap); + va_end(ap); + return ret; +} + +char * +Qt_QPointSummary(QPoint &point, int id) +{ + return doSprintf(serialId(id), "(%d,%d)", point.x(), point.y()); +} + +char * +Qt_QSizeSummary(QSize &size, int id) +{ + return doSprintf(serialId(id), "[%dx%d]", size.width(), size.height()); +} + +char * +Qt_QStringSummary(QString &string, int id) +{ + return doSprintf(serialId(id), "%s", string.toLatin1().constData()); +} + +char * +Qt_QDateSummary(QDate &v, int id) +{ + return doSprintf(serialId(id), "%s", v.toString().toLatin1().constData()); +} + +char * +Qt_QTimeSummary(QTime &v, int id) +{ + return doSprintf(serialId(id), "%s", v.toString().toLatin1().constData()); +} + +char * +Qt_QDateTimeSummary(QDateTime &v, int id) +{ + return doSprintf(serialId(id), "%s", v.toString().toLatin1().constData()); +} + +char * +Qt_QVariantSummary(QVariant &v, int id) +{ + return doSprintf(serialId(id), "%s", v.toString().toLatin1().constData()); +} + +char * +Qt_QRectSummary(QRect &rect, int id) +{ + return doSprintf(serialId(id), "(%d,%d)[%dx%d]", rect.x(), rect.y(), + rect.width(), rect.height()); +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/Resources/CustomDataViews.plist b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/Resources/CustomDataViews.plist new file mode 100644 index 0000000..cebb3c7 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/Resources/CustomDataViews.plist @@ -0,0 +1,48 @@ +<?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>QRect</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QRectSummary($VAR, $ID)}:s</string> + </dict> + <key>QPoint</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QPointSummary($VAR, $ID)}:s</string> + </dict> + <key>QSize</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QSizeSummary($VAR, $ID)}:s</string> + </dict> + <key>QString</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QStringSummary($VAR, $ID)}:s</string> + </dict> + <key>QDate</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QDateSummary($VAR, $ID)}:s</string> + </dict> + <key>QTime</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QTimeSummary($VAR, $ID)}:s</string> + </dict> + <key>QDateTime</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QDateTimeSummary($VAR, $ID)}:s</string> + </dict> + <key>QCoreVariant</key> + <dict> + <key>SummaryString</key> + <string>{(char *)Qt_QCoreVariantSummary($VAR, $ID)}:s</string> + </dict> + <key>File Version</key> + <string>1</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/version.plist b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/version.plist new file mode 100644 index 0000000..7cc21e5 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/CustomDataViews/QtDataFormatters.bundle/Contents/version.plist @@ -0,0 +1,16 @@ +<?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>BuildVersion</key> + <string>1</string> + <key>CFBundleShortVersionString</key> + <string>$VERSION_MAJOR$.$VERSION_MINOR$</string> + <key>CFBundleVersion</key> + <string>308</string> + <key>ProjectName</key> + <string>pbxdataformatters</string> + <key>SourceVersion</key> + <string>3080000</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/TemplateInfo.plist b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/TemplateInfo.plist new file mode 100644 index 0000000..2cb6259 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/TemplateInfo.plist @@ -0,0 +1,5 @@ +{ + MainTemplateFile = "class.cpp"; + CounterpartTemplateFile = "class.h"; + Description = "A C++ class, with an optional header file which includes the <QtGui/QtGui> header."; +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/class.cpp b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/class.cpp new file mode 100644 index 0000000..d790000 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/class.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the utils of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ +/* + * «FILENAME» + * «PROJECTNAME» + * + * Created by «FULLUSERNAME» on «DATE». + * Copyright (c) «YEAR» «ORGANIZATIONNAME». All rights reserved. + * + */ + +#include "«FILEBASENAME».h" + +«FILEBASENAME»::«FILEBASENAME»(QWidget *parent) : QWidget(parent) +{ + + +} + +«FILEBASENAME»::~«FILEBASENAME»() +{ + +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/class.h b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/class.h new file mode 100644 index 0000000..c48011d4 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/C++ Class.pbfiletemplate/class.h @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the utils of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ +/* + * «FILENAME» + * «PROJECTNAME» + * + * Created by «FULLUSERNAME» on «DATE». + * Copyright (c) «YEAR» «ORGANIZATIONNAME». All rights reserved. + * + */ + +#ifndef «FILEBASENAME»__HEADER + +#include <QtGui/QtGui> + +class «FILEBASENAME» : public QWidget +{ + Q_OBJECT +public: + «FILEBASENAME»(QWidget *parent=0); + ~«FILEBASENAME»(); +}; + +#endif //«FILEBASENAME»__HEADER diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/Header File.pbfiletemplate/TemplateInfo.plist b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/Header File.pbfiletemplate/TemplateInfo.plist new file mode 100644 index 0000000..7f20a37 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/Header File.pbfiletemplate/TemplateInfo.plist @@ -0,0 +1,4 @@ +{ + MainTemplateFile = "header.h"; + Description = "A header file which includes the <QtGui/QtGui> header."; +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/Header File.pbfiletemplate/header.h b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/Header File.pbfiletemplate/header.h new file mode 100644 index 0000000..dd1cdd9 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/Header File.pbfiletemplate/header.h @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the utils of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ +/* + * «FILENAME» + * «PROJECTNAME» + * + * Created by «FULLUSERNAME» on «DATE». + * Copyright (c) «YEAR» «ORGANIZATIONNAME». All rights reserved. + * + */ + +#include <QtGui/QtGui> + diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/QRC File.pbfiletemplate/TemplateInfo.plist b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/QRC File.pbfiletemplate/TemplateInfo.plist new file mode 100644 index 0000000..8f896d4 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/QRC File.pbfiletemplate/TemplateInfo.plist @@ -0,0 +1,4 @@ +{ + MainTemplateFile = "resource.qrc"; + Description = "A base Qt resource file"; +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/QRC File.pbfiletemplate/resource.qrc b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/QRC File.pbfiletemplate/resource.qrc new file mode 100644 index 0000000..bf4f322 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/QRC File.pbfiletemplate/resource.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource prefix="/"> + <file>YOUR_FILE</file> +</qresource> +</RCC> diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/UI File.pbfiletemplate/TemplateInfo.plist b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/UI File.pbfiletemplate/TemplateInfo.plist new file mode 100644 index 0000000..c6e3e8c --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/UI File.pbfiletemplate/TemplateInfo.plist @@ -0,0 +1,4 @@ +{ + MainTemplateFile = "class.ui"; + Description = "A base UI file to edit with the designer"; +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/UI File.pbfiletemplate/class.ui b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/UI File.pbfiletemplate/class.ui new file mode 100644 index 0000000..95db9ca --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/File Templates/Qt/UI File.pbfiletemplate/class.ui @@ -0,0 +1,16 @@ +<UI version="4.0" stdsetdef="1" > + <class>«FILEBASENAME»</class> + <widget class="QDialog" name="«FILEBASENAME»" > + <property name="objectName" > + <string notr="true">«FILEBASENAME»</string> + </property> + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>391</width> + <height>223</height> + </rect> + </property> + </widget> +</UI> diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/Info.plist b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/Info.plist new file mode 100644 index 0000000..f554bea --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/Info.plist @@ -0,0 +1,24 @@ +<?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>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>«PROJECTNAMEASXML»</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.apple.myQtApp</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>0.1</string> + <key>CSResourcesFileMapped</key> + <true/> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.mocs b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.mocs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.mocs @@ -0,0 +1 @@ + diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.pbproj/TemplateInfo.plist b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.pbproj/TemplateInfo.plist new file mode 100644 index 0000000..8003b8d --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.pbproj/TemplateInfo.plist @@ -0,0 +1,11 @@ +{ + FilesToRename = { + "QtApp.mocs" = "ÇPROJECTNAMEÈ.mocs"; + }; + FilesToMacroExpand = ( + "ÇPROJECTNAMEÈ.mocs", + "Info.plist", + "main.cpp", + ); + Description = "This project builds a Qt application that uses .ui files for interfaces."; +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.pbproj/project.pbxproj b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.pbproj/project.pbxproj new file mode 100644 index 0000000..c2522e2 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/QtApp.pbproj/project.pbxproj @@ -0,0 +1,377 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 0249A66BFF388E3F11CA2CEA = { + expectedFileType = archive.ar; + isa = PBXFileReference; + name = "libstdc++.a"; + path = "/usr/lib/libstdc++.a"; + refType = 0; + sourceTree = "<absolute>"; + }; +//020 +//021 +//022 +//023 +//024 +//080 +//081 +//082 +//083 +//084 + 195DF8CFFE9D517E11CA2CBB = { + children = ( + 8D0C4E970486CD37000505A6, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = "<group>"; + }; +//190 +//191 +//192 +//193 +//194 +//200 +//201 +//202 +//203 +//204 + 20286C28FDCF999611CA2CEA = { + buildStyles = ( + 4A9504C5FFE6A39111CA0CBA, + 4A9504C6FFE6A39111CA0CBA, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 20286C29FDCF999611CA2CEA; + projectDirPath = ""; + targets = ( + 8D0C4E890486CD37000505A6, + ); + }; + 20286C29FDCF999611CA2CEA = { + children = ( + 20286C2AFDCF999611CA2CEA, + 20286C32FDCF999611CA2CEA, + 195DF8CFFE9D517E11CA2CBB, + ); + isa = PBXGroup; + name = "«PROJECTNAMEASXML»"; + path = ""; + refType = 4; + sourceTree = "<group>"; + }; + 20286C2AFDCF999611CA2CEA = { + children = ( + 32DBCF6D0370B57F00C91783, + 20286C2BFDCF999611CA2CEA, + ); + isa = PBXGroup; + name = Sources; + path = ""; + refType = 4; + sourceTree = "<group>"; + }; + 20286C2BFDCF999611CA2CEA = { + expectedFileType = sourcecode.qt.cpp; + fileEncoding = 30; + isa = PBXFileReference; + path = main.cpp; + refType = 4; + sourceTree = "<group>"; + }; + 20286C32FDCF999611CA2CEA = { + children = ( + 20286C33FDCF999611CA2CEA, + 20286CA3FDCF999611CA2CEA, + 4A9504CAFFE6A41611CA0CBA, + 4A9504C8FFE6A3BC11CA0CBA, + 0249A66BFF388E3F11CA2CEA, + ); + isa = PBXGroup; + name = "External Frameworks and Libraries"; + path = ""; + refType = 4; + sourceTree = "<group>"; + }; + 20286CA3FDCF999611CA2CEA = { + expectedFileType = wrapper.framework; + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + name = QtGui.framework; + path = /Library/Frameworks/QtGui.framework; + refType = 0; + sourceTree = "<absolute>"; + }; + + 20286C33FDCF999611CA2CEA = { + expectedFileType = wrapper.framework; + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + name = QtCore.framework; + path = /Library/Frameworks/QtCore.framework; + refType = 0; + sourceTree = "<absolute>"; + }; +//200 +//201 +//202 +//203 +//204 +//320 +//321 +//322 +//323 +//324 + 32DBCF6D0370B57F00C91783 = { + fileEncoding = 4; + isa = PBXFileReference; + path = "«PROJECTNAME».mocs"; + refType = 4; + sourceTree = "<group>"; + }; +//320 +//321 +//322 +//323 +//324 +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 + 4A9504C5FFE6A39111CA0CBA = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 4A9504C6FFE6A39111CA0CBA = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; + 4A9504C8FFE6A3BC11CA0CBA = { + expectedFileType = wrapper.framework; + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + name = ApplicationServices.framework; + path = /System/Library/Frameworks/ApplicationServices.framework; + refType = 0; + sourceTree = "<absolute>"; + }; + 4A9504CAFFE6A41611CA0CBA = { + expectedFileType = wrapper.framework; + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + name = CoreServices.framework; + path = /System/Library/Frameworks/CoreServices.framework; + refType = 0; + sourceTree = "<absolute>"; + }; +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 +//8D0 +//8D1 +//8D2 +//8D3 +//8D4 + 8D0C4E890486CD37000505A6 = { + buildPhases = ( + 22D275D307D515930050A600, //get_mocs phase + 8D0C4E8F0486CD37000505A6, + 8D0C4E910486CD37000505A6, + 8D0C4E940486CD37000505A6, + ); + buildRules = ( + //22E554940732E0C3002CE4A0, //get_mocs rule + 2241F8060731C52400C1F590, //make_moc rule + 2241F8060731C52430C1F590, //make_uic rule + 2241F8060731C59400C1F590, //make_rcc rule + ); + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ""; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ""; + LIBRARY_STYLE = Static; + OTHER_CPLUSPLUSFLAGS = "-I/Library/Frameworks/QtCore.framework/Headers -I/Library/Frameworks/QtGui.framework/Headers"; + OTHER_CLAGS = "-I/Library/Frameworks/QtCore.framework/Headers -I/Library/Frameworks/QtGui.framework/Headers"; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "«PROJECTNAME»"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = app; + }; + dependencies = ( + ); + isa = PBXNativeTarget; + name = "«PROJECTNAME»"; + productInstallPath = "$(HOME)/Applications"; + productName = "«PROJECTNAME»"; + productReference = 8D0C4E970486CD37000505A6; + productType = "com.apple.product-type.application"; + }; + 8D0C4E8B0486CD37000505A6 = { + fileRef = 32DBCF6D0370B57F00C91783; + isa = PBXBuildFile; + settings = { + }; + }; + 22D275D307D515930050A600 = { //get_mocs phase + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + //"*.h", + ); + name = "Qt Auto-Retrieve Mocables"; + isa = PBXShellScriptBuildPhase; + outputPaths = ( + //"«PROJECTNAME».mocs", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/Library/Frameworks/QtCore.framework/Resources/xcode/get_mocs.sh -output \"«PROJECTNAME».mocs\""; + }; + 22E554940732E0C3002CE4A0 = { //get_mocs rule + compilerSpec = com.apple.compilers.proxy.script; + filePatterns = "*.h"; + fileType = pattern.proxy; + isEditable = 1; + isa = PBXBuildRule; + outputFiles = ( + "«PROJECTNAME».mocs", + ); + script = "/Library/Frameworks/QtCore.framework/Resources/xcode/get_mocs.sh -input \"${INPUT_FILE_PATH}\" -output \"«PROJECTNAME».mocs\""; + }; + 2241F8060731C59400C1F590 = { //make_rcc rule + compilerSpec = com.apple.compilers.proxy.script; + filePatterns = "*.qrc"; + fileType = pattern.proxy; + isEditable = 1; + isa = PBXBuildRule; + outputFiles = ( + "${DERIVED_FILES_DIR}/qrc_${INPUT_FILE_BASE}.cpp", + ); + script = "/Library/Frameworks/QtCore.framework/Resources/xcode/make_rcc.sh -input \"${INPUT_FILE_PATH}\" -output \"${DERIVED_FILES_DIR}/qrc_${INPUT_FILE_BASE}.cpp\""; + }; + 2241F8060731C52430C1F590 = { //make_uic rule + compilerSpec = com.apple.compilers.proxy.script; + filePatterns = "*.ui"; + fileType = pattern.proxy; + isEditable = 1; + isa = PBXBuildRule; + outputFiles = ( + "${DERIVED_FILES_DIR}/ui_${INPUT_FILE_BASE}.h", + ); + script = "/Library/Frameworks/QtCore.framework/Resources/xcode/make_uic.sh -input \"${INPUT_FILE_PATH}\" -output \"${DERIVED_FILES_DIR}/ui_${INPUT_FILE_BASE}.h\""; + }; + 2241F8060731C52400C1F590 = { //make_moc rule + compilerSpec = com.apple.compilers.proxy.script; + filePatterns = "*.mocs"; + fileType = pattern.proxy; + isEditable = 1; + isa = PBXBuildRule; + outputFiles = ( + "${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}_mocs.cpp", + ); + script = "/Library/Frameworks/QtCore.framework/Resources/xcode/make_moc.sh -input \"${INPUT_FILE_PATH}\" -output \"${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}_mocs.cpp\""; + }; + 8D0C4E8F0486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + 8D0C4E8B0486CD37000505A6, + 8D0C4E900486CD37000505A6, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E900486CD37000505A6 = { + fileRef = 20286C2BFDCF999611CA2CEA; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + ); + }; + }; + 8D0C4E910486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + 8D0C4E920486CD37000505A6, + 8D0C4E92048CCD37000505A6, + 8D0C4E930486CD37000505A6, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E92048CCD37000505A6 = { + fileRef = 20286CA3FDCF999611CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 8D0C4E920486CD37000505A6 = { + fileRef = 20286C33FDCF999611CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 8D0C4E930486CD37000505A6 = { + fileRef = 0249A66BFF388E3F11CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 8D0C4E940486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E970486CD37000505A6 = { + expectedFileType = wrapper.application; + includeInIndex = 0; + isa = PBXFileReference; + path = "«PROJECTNAME».app"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + }; + rootObject = 20286C28FDCF999611CA2CEA; +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/main.cpp b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/main.cpp new file mode 100644 index 0000000..f67c971 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/main.cpp @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the utils of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include <QtGui/QtGui> + +int main(int argc, char **argv) +{ + QApplication a(argc, argv); + + QLabel label; + label.setText("Hello world!"); + label.show(); + + return a.exec(); +} diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/version.plist b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/version.plist new file mode 100644 index 0000000..6f3c68c --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Project Templates/Application/Qt Application/version.plist @@ -0,0 +1,16 @@ +<?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>BuildVersion</key> + <string>1</string> + <key>CFBundleShortVersionString</key> + <string>0.1</string> + <key>CFBundleVersion</key> + <string>0.1</string> + <key>ProjectName</key> + <string>NibPBTemplates</string> + <key>SourceVersion</key> + <string>1160200</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/10-aboutQt.sh b/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/10-aboutQt.sh new file mode 100755 index 0000000..343181e --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/10-aboutQt.sh @@ -0,0 +1,23 @@ +#! /bin/sh +# +# aboutQt.sh - Will display about Qt. +# +# -- PB User Script Info -- +# %%%{PBXName=About Qt}%%% +# %%%{PBXInput=None}%%% +# %%%{PBXOutput=SeparateWindow}%%% +# %%%{PBXKeyEquivalent=}%%% +# + +echo "This program uses Qt version $VERSION_MAJOR$." +echo "Qt is a C++ toolkit for cross-platform GUI " +echo "application development." +echo +echo "Qt provides single-source " +echo "portability across MS Windows, Mac OS X, " +echo "Linux, and all major commercial Unix variants." +echo +echo "Qt is also available for embedded devices." +echo +echo "Qt is a Trolltech product. " +echo "See http://qtsoftware.com/qt/ for more information." diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/20-getMocs.sh b/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/20-getMocs.sh new file mode 100755 index 0000000..3fea677 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/20-getMocs.sh @@ -0,0 +1,12 @@ +#! /bin/sh +# +# getMocs.sh - Will update meta object information for your current project +# +# -- PB User Script Info -- +# %%%{PBXName=Check for mocables}%%% +# %%%{PBXInput=None}%%% +# %%%{PBXOutput=AppendToAllText}%%% +# %%%{PBXKeyEquivalent=}%%% +# + +/Library/Frameworks/QtCore.framework/Resources/xcode/get_mocs.sh diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/menuIcon.tiff b/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/menuIcon.tiff Binary files differnew file mode 100644 index 0000000..466b976 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Scripts/999-Qt/menuIcon.tiff diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Specifications/qt.pbfilespec b/util/scripts/mac-binary/install/xcode/integration/templates/Specifications/qt.pbfilespec new file mode 100644 index 0000000..62b205d --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Specifications/qt.pbfilespec @@ -0,0 +1,41 @@ +/** Qt file formats +*/ +( + { + Identifier = sourcecode.qt.h; + BasedOn = sourcecode.cpp.h; + Name = "Qt header file"; + ComputerLanguage = qt.c.cpp; + AppliesToBuildRules = no; + Extensions = (h); + IncludeInIndex = NO; + CanSetIncludeInIndex = YES; + }, + { + Identifier = sourcecode.qt.cpp; + BasedOn = sourcecode.cpp.cpp; + Name = "Qt source file"; + ComputerLanguage = qt.c.cpp; + AppliesToBuildRules = yes; + Extensions = (cpp); + IncludeInIndex = YES; + CanSetIncludeInIndex = YES; + }, + { + Identifier = sourcecode.qt.qrc; + Name = "Qt resource file"; + ComputerLanguage = qt.qrc; + AppliesToBuildRules = yes; + Extensions = (qrc); + IncludeInIndex = NO; + }, + { + Identifier = sourcecode.qt.ui; + Name = "Qt UI file"; + ComputerLanguage = qt.ui; + AppliesToBuildRules = yes; + Extensions = (ui); + IncludeInIndex = NO; + } +) + diff --git a/util/scripts/mac-binary/install/xcode/integration/templates/Specifications/qt.pblangspec b/util/scripts/mac-binary/install/xcode/integration/templates/Specifications/qt.pblangspec new file mode 100644 index 0000000..6500020 --- /dev/null +++ b/util/scripts/mac-binary/install/xcode/integration/templates/Specifications/qt.pblangspec @@ -0,0 +1,84 @@ +( + { + Identifier = qt.c.cpp; + BasedOn = c.cpp; + Name = "Qt C++"; + SourceScannerClassName = PBXCPPSourceScanner; + SupportsIndentation = YES; + Description = "Qt C++"; + SyntaxColoring = { + CaseSensitive = YES; + Keywords = ( + "slots", + "signals", + "Q_OBJECT", + "Q_PROPERTY", + "Q_CLASSINFO", + "Q_INTERFACES", + "Q_PROPERTY", + "Q_OVERRIDE", + "Q_ENUMS", + "Q_FLAGS", + "Q_GADGET", + "foreach" + ); + AltKeywords = ( + "SLOT", + "SIGNAL", + "Q_SCRIPTABLE", + "Q_INVOKABLE", + "emit" + ); + }; + }, + { + Identifier = qt.xml; + Name = "Qt XML"; + Description = "Qt XML"; + BasedOn = "pbx_root_language"; + SupportsIndentation = NO; + Indentation = { + }; + SyntaxColoring = { + CaseSensitive = NO; + UnicodeSymbols = YES; + MultiLineComment = ( + ( "<!--", "-->" ) + ); + /*KeywordDelimeters = ( // not supported yet + ( "<", ">" ) + );*/ + String = ( + ( "<", ">" ) + ); + Character = ( + ( "&", ";", "=" ) + ); + }; + }, + { + Identifier = qt.qrc; + Name = "Qt Resource"; + Description = "Qt Resource"; + BasedOn = "qt.xml"; + SyntaxColoring = { + CaseSensitive = NO; + String = ( + "RCC", + "qresource", + "file", + ); + AltKeywords = ( + "version", + "prefix", + "alias" + ); + }; + }, + { + Identifier = qt.ui; + Name = "Qt UI"; + Description = "Qt UI"; + BasedOn = "qt.xml"; + } +) |