diff options
Diffstat (limited to 'util/scripts')
276 files changed, 28118 insertions, 0 deletions
diff --git a/util/scripts/mac-binary/doit.sh b/util/scripts/mac-binary/doit.sh new file mode 100755 index 0000000..109f014 --- /dev/null +++ b/util/scripts/mac-binary/doit.sh @@ -0,0 +1,24 @@ +#!/bin/bash -e +[ -r $HOME/.bashrc ] && . $HOME/.bashrc +VERSION=$1 + +PACKAGE=qt-mac-commercial-src-${VERSION}.tar.gz +OSPACKAGE=qt-mac-opensource-src-${VERSION}.tar.gz +EVALPACKAGE=qt-mac-evalpatches-src-${VERSION}.tar.gz + +echo Downloading source packages... +curl -O http://tirion.troll.no/~qt/packages/$VERSION/$PACKAGE +curl -O http://tirion.troll.no/~qt/packages/$VERSION/$OSPACKAGE +curl -O http://tirion.troll.no/~qt/packages/$VERSION/$EVALPACKAGE + +echo Building commercial package... +./package/mkpackage -packages $HOME/tmp/mac-binary/install -qtpackage $PWD/$PACKAGE >log 2>&1 + +echo Building opensource package... +./package/mkpackage -packages $HOME/tmp/mac-binary/install -qtpackage $PWD/$OSPACKAGE >>log 2>&1 + +echo Building eval package... +./package/mkpackage -packages $HOME/tmp/mac-binary/install -qtpackage $PWD/$PACKAGE -licensetype eval >>log 2>&1 + +echo -n Uploading results... +scp -B outputs/*.dmg qt@tirion:public_html/packages/$VERSION 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"; + } +) diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/InfoPlist.strings b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InfoPlist.strings Binary files differnew file mode 100644 index 0000000..ea97bd3 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InfoPlist.strings diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/classes.nib b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/classes.nib new file mode 100644 index 0000000..73d69c9 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/classes.nib @@ -0,0 +1,43 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + CLASS = InstallerPane; + LANGUAGE = ObjC; + OUTLETS = { + contentView = NSView; + firstKeyView = NSView; + initialKeyView = NSView; + lastKeyView = NSView; + nextPane = InstallerPane; + parentSection = id; + }; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {checkLicense = id; checkName = id; }; + CLASS = InstallerPanePane; + LANGUAGE = ObjC; + OUTLETS = { + LicenseField1 = NSTextField; + LicenseField2 = NSTextField; + LicenseField3 = NSTextField; + LicenseField4 = NSTextField; + LicenseField5 = NSTextField; + LicenseField6 = NSTextField; + LicenseField7 = NSTextField; + errorField = NSTextField; + myOutlet = id; + nameField = NSTextField; + }; + SUPERCLASS = InstallerPane; + }, + { + CLASS = InstallerSection; + LANGUAGE = ObjC; + OUTLETS = {firstPane = InstallerPane; }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +}
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/info.nib b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/info.nib new file mode 100644 index 0000000..0ec3501 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/info.nib @@ -0,0 +1,23 @@ +<?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>IBDocumentLocation</key> + <string>283 121 356 240 0 0 1600 1178 </string> + <key>IBEditorPositions</key> + <dict> + <key>8</key> + <string>162 556 438 372 0 0 1600 1178 </string> + </dict> + <key>IBFramework Version</key> + <string>446.1</string> + <key>IBOpenObjects</key> + <array> + <integer>8</integer> + </array> + <key>IBSystem Version</key> + <string>8I127</string> + <key>IBUsesTextArchiving</key> + <true/> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/keyedobjects.nib b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/keyedobjects.nib new file mode 100644 index 0000000..d15482e --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane.nib/keyedobjects.nib @@ -0,0 +1,3688 @@ +<?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>$archiver</key> + <string>NSKeyedArchiver</string> + <key>$objects</key> + <array> + <string>$null</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>241</integer> + </dict> + <key>NSAccessibilityConnectors</key> + <dict> + <key>CF$UID</key> + <integer>238</integer> + </dict> + <key>NSAccessibilityOidsKeys</key> + <dict> + <key>CF$UID</key> + <integer>239</integer> + </dict> + <key>NSAccessibilityOidsValues</key> + <dict> + <key>CF$UID</key> + <integer>240</integer> + </dict> + <key>NSClassesKeys</key> + <dict> + <key>CF$UID</key> + <integer>182</integer> + </dict> + <key>NSClassesValues</key> + <dict> + <key>CF$UID</key> + <integer>183</integer> + </dict> + <key>NSConnections</key> + <dict> + <key>CF$UID</key> + <integer>8</integer> + </dict> + <key>NSFontManager</key> + <dict> + <key>CF$UID</key> + <integer>0</integer> + </dict> + <key>NSFramework</key> + <dict> + <key>CF$UID</key> + <integer>5</integer> + </dict> + <key>NSNamesKeys</key> + <dict> + <key>CF$UID</key> + <integer>159</integer> + </dict> + <key>NSNamesValues</key> + <dict> + <key>CF$UID</key> + <integer>160</integer> + </dict> + <key>NSNextOid</key> + <integer>130</integer> + <key>NSObjectsKeys</key> + <dict> + <key>CF$UID</key> + <integer>156</integer> + </dict> + <key>NSObjectsValues</key> + <dict> + <key>CF$UID</key> + <integer>158</integer> + </dict> + <key>NSOidsKeys</key> + <dict> + <key>CF$UID</key> + <integer>184</integer> + </dict> + <key>NSOidsValues</key> + <dict> + <key>CF$UID</key> + <integer>185</integer> + </dict> + <key>NSRoot</key> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <key>NSVisibleWindows</key> + <dict> + <key>CF$UID</key> + <integer>6</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>4</integer> + </dict> + <key>NSClassName</key> + <dict> + <key>CF$UID</key> + <integer>3</integer> + </dict> + </dict> + <string>InstallerSection</string> + <dict> + <key>$classes</key> + <array> + <string>NSCustomObject</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSCustomObject</string> + </dict> + <string>IBCocoaFramework</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>7</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSMutableSet</string> + <string>NSSet</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSMutableSet</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>9</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>14</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>16</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>119</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>121</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>122</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>123</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>124</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>125</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>127</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>129</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>131</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>133</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>135</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>137</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>139</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>141</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>143</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>144</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>145</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>146</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>147</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>148</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>149</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>150</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>151</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>152</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>153</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>154</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>12</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>4</integer> + </dict> + <key>NSClassName</key> + <dict> + <key>CF$UID</key> + <integer>11</integer> + </dict> + </dict> + <string>InstallerPanePane</string> + <string>firstPane</string> + <dict> + <key>$classes</key> + <array> + <string>NSNibOutletConnector</string> + <string>NSNibConnector</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSNibOutletConnector</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>15</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>parentSection</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>118</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>117</integer> + </dict> + <key>NSClassName</key> + <dict> + <key>CF$UID</key> + <integer>115</integer> + </dict> + <key>NSExtension</key> + <dict> + <key>CF$UID</key> + <integer>116</integer> + </dict> + <key>NSFrameSize</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>0</integer> + </dict> + <key>NSSubviews</key> + <dict> + <key>CF$UID</key> + <integer>18</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>86</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>90</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>94</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>98</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>102</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>106</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>110</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>39</integer> + </dict> + <key>NSBorderType</key> + <integer>3</integer> + <key>NSBoxType</key> + <integer>2</integer> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>25</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSOffsets</key> + <dict> + <key>CF$UID</key> + <integer>26</integer> + </dict> + <key>NSSubviews</key> + <dict> + <key>CF$UID</key> + <integer>20</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSTitleCell</key> + <dict> + <key>CF$UID</key> + <integer>27</integer> + </dict> + <key>NSTitlePosition</key> + <integer>0</integer> + <key>NSTransparent</key> + <false/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>23</integer> + </dict> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>22</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + </dict> + <string>{{2, 2}, {125, 1}}</string> + <dict> + <key>$classes</key> + <array> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSView</string> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSMutableArray</string> + <string>NSArray</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSMutableArray</string> + </dict> + <string>{{12, 154}, {394, 5}}</string> + <string>{0, 0}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>0</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>28</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>37</integer> + </dict> + </dict> + <string>Box</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>31</integer> + </dict> + <key>NSName</key> + <dict> + <key>CF$UID</key> + <integer>30</integer> + </dict> + <key>NSSize</key> + <real>13</real> + <key>NSfFlags</key> + <integer>1044</integer> + </dict> + <string>LucidaGrande</string> + <dict> + <key>$classes</key> + <array> + <string>NSFont</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSFont</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>35</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>34</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>System</string> + <string>textBackgroundColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MQA= + </data> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSColor</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSColor</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MCAwLjgwMDAwMDAxAA== + </data> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSTextFieldCell</string> + <string>NSActionCell</string> + <string>NSCell</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSTextFieldCell</string> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSBox</string> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSBox</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>42</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>41</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{240, 126}, {43, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <string></string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>46</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>45</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>textColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MAA= + </data> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSTextField</string> + <string>%NSTextField</string> + <string>NSControl</string> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSTextField</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>50</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>49</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{187, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>53</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>52</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{134, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>56</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>55</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{83, 126}, {43, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>59</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>58</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{291, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>62</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>61</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{9, 183}, {45, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>71303168</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>63</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>Name: +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>66</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>65</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>controlColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MC42NjY2NjY2OQA= + </data> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>46</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>68</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>controlTextColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>71</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>70</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{159, 156}, {82, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>72</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>License Key:</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>75</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>74</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{59, 181}, {347, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>78</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>77</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{30, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>81</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>80</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{344, 126}, {44, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>84</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>83</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{78, 211}, {263, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>85</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>Please Enter Your Name and License Key +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>88</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>87</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{27, 101}, {364, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>138412032</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>86</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>89</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>1</integer> + <key>NSRGB</key> + <data> + MCAwIDAA + </data> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>92</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>91</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{73, 128}, {12, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>93</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>90</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>- +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>96</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>95</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{177, 128}, {12, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>97</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>94</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>- +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>100</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>99</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{124, 128}, {12, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>101</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>98</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>- +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>104</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>103</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{230, 128}, {12, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>105</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>102</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>- +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>108</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>107</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{281, 128}, {12, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>109</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>106</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>- +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>112</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>111</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{334, 128}, {11, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>113</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>110</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>- +</string> + <string>{418, 330}</string> + <string>NSView</string> + <string>NSResponder</string> + <dict> + <key>$classes</key> + <array> + <string>NSCustomView</string> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSCustomView</string> + </dict> + <string>contentView</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + </dict> + <string>nextKeyView</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>126</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>nameField</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField1</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>130</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField2</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>132</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField3</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>134</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField4</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>136</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField5</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>138</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField6</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>140</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField7</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + </dict> + <string>delegate</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>86</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>155</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>errorField</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>86</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>106</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>94</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>98</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>110</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>102</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>90</integer> + </dict> + </array> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSArray</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSArray</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>86</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>106</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>94</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>98</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>110</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>102</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>90</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>161</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>162</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>163</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>164</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>165</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>166</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>167</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>168</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>169</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>170</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>171</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>11</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>115</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>172</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>173</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>174</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>175</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>176</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>177</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>178</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>179</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>180</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>181</integer> + </dict> + </array> + </dict> + <string>NSTextField</string> + <string>File's Owner</string> + <string>NSTextField11326</string> + <string>NSTextField22</string> + <string>NSTextField11321</string> + <string>NSTextField11322</string> + <string>NSTextField11325</string> + <string>NSTextField211</string> + <string>NSTextField2331</string> + <string>NSTextField11324</string> + <string>NSTextField21</string> + <string>NSTextField231</string> + <string>NSBox1</string> + <string>NSTextField232</string> + <string>NSTextField1132</string> + <string>NSTextField2332</string> + <string>NSTextField2</string> + <string>View</string> + <string>NSTextField11323</string> + <string>NSTextField233</string> + <string>NSTextField23</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>127</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>149</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>141</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>94</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>122</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>98</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>129</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>150</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>143</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>123</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>16</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>131</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>151</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>144</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>86</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>124</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>121</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>153</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>133</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>152</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>145</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>154</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>119</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>135</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>146</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>14</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>90</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>9</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>102</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>147</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>137</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>106</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>110</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>125</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>148</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>139</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>186</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>187</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>188</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>189</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>190</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>191</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>192</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>193</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>194</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>195</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>196</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>197</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>198</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>199</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>200</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>201</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>202</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>203</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>204</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>205</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>206</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>207</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>208</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>209</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>210</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>211</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>212</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>213</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>214</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>215</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>216</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>217</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>218</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>219</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>220</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>221</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>222</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>223</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>224</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>225</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>226</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>227</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>228</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>229</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>230</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>231</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>232</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>233</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>234</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>235</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>236</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>237</integer> + </dict> + </array> + </dict> + <integer>62</integer> + <integer>94</integer> + <integer>116</integer> + <integer>109</integer> + <integer>125</integer> + <integer>73</integer> + <integer>89</integer> + <integer>5</integer> + <integer>126</integer> + <integer>95</integer> + <integer>117</integer> + <integer>110</integer> + <integer>80</integer> + <integer>90</integer> + <integer>9</integer> + <integer>69</integer> + <integer>72</integer> + <integer>96</integer> + <integer>118</integer> + <integer>111</integer> + <integer>122</integer> + <integer>1</integer> + <integer>91</integer> + <integer>88</integer> + <integer>79</integer> + <integer>68</integer> + <integer>120</integer> + <integer>97</integer> + <integer>119</integer> + <integer>112</integer> + <integer>121</integer> + <integer>77</integer> + <integer>123</integer> + <integer>87</integer> + <integer>98</integer> + <integer>113</integer> + <integer>7</integer> + <integer>124</integer> + <integer>8</integer> + <integer>76</integer> + <integer>6</integer> + <integer>127</integer> + <integer>114</integer> + <integer>99</integer> + <integer>128</integer> + <integer>75</integer> + <integer>129</integer> + <integer>71</integer> + <integer>92</integer> + <integer>115</integer> + <integer>74</integer> + <integer>100</integer> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSIBObjectData</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSIBObjectData</string> + </dict> + </array> + <key>$top</key> + <dict> + <key>IB.objectdata</key> + <dict> + <key>CF$UID</key> + <integer>1</integer> + </dict> + </dict> + <key>$version</key> + <integer>100000</integer> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/classes.nib b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/classes.nib new file mode 100644 index 0000000..ac5d9ad --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/classes.nib @@ -0,0 +1,42 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + CLASS = InstallerPane; + LANGUAGE = ObjC; + OUTLETS = { + contentView = NSView; + firstKeyView = NSView; + initialKeyView = NSView; + lastKeyView = NSView; + nextPane = InstallerPane; + parentSection = id; + }; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {checkLicense = id; checkName = id; }; + CLASS = InstallerPanePane; + LANGUAGE = ObjC; + OUTLETS = { + LicenseField1 = NSTextField; + LicenseField2 = NSTextField; + LicenseField3 = NSTextField; + LicenseField4 = NSTextField; + LicenseField5 = NSTextField; + LicenseField6 = NSTextField; + LicenseField7 = NSTextField; + companyField = NSTextField; + nameField = NSTextField; + }; + SUPERCLASS = InstallerPane; + }, + { + CLASS = InstallerSection; + LANGUAGE = ObjC; + OUTLETS = {firstPane = InstallerPane; }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +}
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/info.nib b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/info.nib new file mode 100644 index 0000000..b06383f --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/info.nib @@ -0,0 +1,23 @@ +<?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>IBDocumentLocation</key> + <string>283 121 356 240 0 0 1600 1178 </string> + <key>IBEditorPositions</key> + <dict> + <key>8</key> + <string>303 597 438 372 0 0 1600 1178 </string> + </dict> + <key>IBFramework Version</key> + <string>439.0</string> + <key>IBOpenObjects</key> + <array> + <integer>8</integer> + </array> + <key>IBSystem Version</key> + <string>8C46</string> + <key>IBUsesTextArchiving</key> + <true/> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/keyedobjects.nib b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/keyedobjects.nib new file mode 100644 index 0000000..81ba051 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/InstallerPane~.nib/keyedobjects.nib @@ -0,0 +1,2942 @@ +<?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>$archiver</key> + <string>NSKeyedArchiver</string> + <key>$objects</key> + <array> + <string>$null</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>197</integer> + </dict> + <key>NSAccessibilityConnectors</key> + <dict> + <key>CF$UID</key> + <integer>194</integer> + </dict> + <key>NSAccessibilityOidsKeys</key> + <dict> + <key>CF$UID</key> + <integer>195</integer> + </dict> + <key>NSAccessibilityOidsValues</key> + <dict> + <key>CF$UID</key> + <integer>196</integer> + </dict> + <key>NSClassesKeys</key> + <dict> + <key>CF$UID</key> + <integer>146</integer> + </dict> + <key>NSClassesValues</key> + <dict> + <key>CF$UID</key> + <integer>147</integer> + </dict> + <key>NSConnections</key> + <dict> + <key>CF$UID</key> + <integer>8</integer> + </dict> + <key>NSFontManager</key> + <dict> + <key>CF$UID</key> + <integer>0</integer> + </dict> + <key>NSFramework</key> + <dict> + <key>CF$UID</key> + <integer>5</integer> + </dict> + <key>NSNamesKeys</key> + <dict> + <key>CF$UID</key> + <integer>130</integer> + </dict> + <key>NSNamesValues</key> + <dict> + <key>CF$UID</key> + <integer>131</integer> + </dict> + <key>NSNextOid</key> + <integer>122</integer> + <key>NSObjectsKeys</key> + <dict> + <key>CF$UID</key> + <integer>127</integer> + </dict> + <key>NSObjectsValues</key> + <dict> + <key>CF$UID</key> + <integer>129</integer> + </dict> + <key>NSOidsKeys</key> + <dict> + <key>CF$UID</key> + <integer>148</integer> + </dict> + <key>NSOidsValues</key> + <dict> + <key>CF$UID</key> + <integer>149</integer> + </dict> + <key>NSRoot</key> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <key>NSVisibleWindows</key> + <dict> + <key>CF$UID</key> + <integer>6</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>4</integer> + </dict> + <key>NSClassName</key> + <dict> + <key>CF$UID</key> + <integer>3</integer> + </dict> + </dict> + <string>InstallerSection</string> + <dict> + <key>$classes</key> + <array> + <string>NSCustomObject</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSCustomObject</string> + </dict> + <string>IBCocoaFramework</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>7</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSMutableSet</string> + <string>NSSet</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSMutableSet</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>9</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>14</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>16</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>91</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>93</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>94</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>95</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>96</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>97</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>99</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>101</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>103</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>105</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>107</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>109</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>111</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>113</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>115</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>116</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>117</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>118</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>119</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>121</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>122</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>124</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>125</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>126</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>12</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>4</integer> + </dict> + <key>NSClassName</key> + <dict> + <key>CF$UID</key> + <integer>11</integer> + </dict> + </dict> + <string>InstallerPanePane</string> + <string>firstPane</string> + <dict> + <key>$classes</key> + <array> + <string>NSNibOutletConnector</string> + <string>NSNibConnector</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSNibOutletConnector</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>15</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>parentSection</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>90</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>89</integer> + </dict> + <key>NSClassName</key> + <dict> + <key>CF$UID</key> + <integer>87</integer> + </dict> + <key>NSExtension</key> + <dict> + <key>CF$UID</key> + <integer>88</integer> + </dict> + <key>NSFrameSize</key> + <dict> + <key>CF$UID</key> + <integer>86</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>0</integer> + </dict> + <key>NSSubviews</key> + <dict> + <key>CF$UID</key> + <integer>18</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>39</integer> + </dict> + <key>NSBorderType</key> + <integer>3</integer> + <key>NSBoxType</key> + <integer>2</integer> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>25</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSOffsets</key> + <dict> + <key>CF$UID</key> + <integer>26</integer> + </dict> + <key>NSSubviews</key> + <dict> + <key>CF$UID</key> + <integer>20</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSTitleCell</key> + <dict> + <key>CF$UID</key> + <integer>27</integer> + </dict> + <key>NSTitlePosition</key> + <integer>0</integer> + <key>NSTransparent</key> + <false/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>23</integer> + </dict> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>22</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + </dict> + <string>{{2, 2}, {125, 1}}</string> + <dict> + <key>$classes</key> + <array> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSView</string> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSMutableArray</string> + <string>NSArray</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSMutableArray</string> + </dict> + <string>{{12, 154}, {394, 5}}</string> + <string>{0, 0}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>0</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>28</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>37</integer> + </dict> + </dict> + <string>Box</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>31</integer> + </dict> + <key>NSName</key> + <dict> + <key>CF$UID</key> + <integer>30</integer> + </dict> + <key>NSSize</key> + <real>13</real> + <key>NSfFlags</key> + <integer>1044</integer> + </dict> + <string>LucidaGrande</string> + <dict> + <key>$classes</key> + <array> + <string>NSFont</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSFont</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>35</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>34</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>System</string> + <string>textBackgroundColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MQA= + </data> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSColor</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSColor</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MCAwLjgwMDAwMDAxAA== + </data> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSTextFieldCell</string> + <string>NSActionCell</string> + <string>NSCell</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSTextFieldCell</string> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSBox</string> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSBox</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>42</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>41</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{240, 126}, {43, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <string></string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>46</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>45</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>textColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MAA= + </data> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSTextField</string> + <string>%NSTextField</string> + <string>NSControl</string> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSTextField</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>50</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>49</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{187, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>53</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>52</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{134, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>56</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>55</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{83, 126}, {43, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>59</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>58</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{291, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>62</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>61</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{9, 183}, {45, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>71303168</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>63</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>Name: +</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>66</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>65</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>controlColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSColorSpace</key> + <integer>3</integer> + <key>NSWhite</key> + <data> + MC42NjY2NjY2OQA= + </data> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>36</integer> + </dict> + <key>NSCatalogName</key> + <dict> + <key>CF$UID</key> + <integer>33</integer> + </dict> + <key>NSColor</key> + <dict> + <key>CF$UID</key> + <integer>46</integer> + </dict> + <key>NSColorName</key> + <dict> + <key>CF$UID</key> + <integer>68</integer> + </dict> + <key>NSColorSpace</key> + <integer>6</integer> + </dict> + <string>controlTextColor</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>71</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>70</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{159, 156}, {82, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>72</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>License Key:</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>75</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>74</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{59, 181}, {347, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>78</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>77</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{30, 126}, {45, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>81</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>80</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{344, 126}, {44, 22}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>32</integer> + </dict> + <key>NSCellFlags</key> + <integer>-1804468671</integer> + <key>NSCellFlags2</key> + <integer>272630784</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>43</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <key>NSDrawsBackground</key> + <true/> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>44</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>47</integer> + </dict> + <key>NSCell</key> + <dict> + <key>CF$UID</key> + <integer>84</integer> + </dict> + <key>NSEnabled</key> + <true/> + <key>NSFrame</key> + <dict> + <key>CF$UID</key> + <integer>83</integer> + </dict> + <key>NSNextResponder</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSSuperview</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <key>NSvFlags</key> + <integer>256</integer> + </dict> + <string>{{78, 211}, {263, 17}}</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>38</integer> + </dict> + <key>NSBackgroundColor</key> + <dict> + <key>CF$UID</key> + <integer>64</integer> + </dict> + <key>NSCellFlags</key> + <integer>67239424</integer> + <key>NSCellFlags2</key> + <integer>272629760</integer> + <key>NSContents</key> + <dict> + <key>CF$UID</key> + <integer>85</integer> + </dict> + <key>NSControlView</key> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <key>NSSupport</key> + <dict> + <key>CF$UID</key> + <integer>29</integer> + </dict> + <key>NSTextColor</key> + <dict> + <key>CF$UID</key> + <integer>67</integer> + </dict> + </dict> + <string>Please Enter Your Name and License Key +</string> + <string>{418, 330}</string> + <string>NSView</string> + <string>NSResponder</string> + <dict> + <key>$classes</key> + <array> + <string>NSCustomView</string> + <string>NSView</string> + <string>NSResponder</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSCustomView</string> + </dict> + <string>contentView</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>92</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + </dict> + <string>nextKeyView</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>92</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>92</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>92</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>92</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>98</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>nameField</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>100</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField1</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>102</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField2</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>104</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField3</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>106</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField4</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>108</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField5</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>110</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField6</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>112</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </dict> + <string>LicenseField7</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + </dict> + <string>delegate</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>114</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>123</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + </dict> + <string>nextKeyView</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>123</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>123</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>13</integer> + </dict> + <key>NSDestination</key> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <key>NSLabel</key> + <dict> + <key>CF$UID</key> + <integer>123</integer> + </dict> + <key>NSSource</key> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + </array> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSArray</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSArray</string> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>132</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>133</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>87</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>134</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>135</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>136</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>137</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>138</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>139</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>140</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>141</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>142</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>11</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>143</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>144</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>145</integer> + </dict> + </array> + </dict> + <string>NSTextField11325</string> + <string>NSTextField211</string> + <string>NSTextField11324</string> + <string>NSTextField11321</string> + <string>NSBox1</string> + <string>NSTextField1132</string> + <string>NSTextField2</string> + <string>NSTextField21</string> + <string>NSTextField11323</string> + <string>File's Owner</string> + <string>NSTextField</string> + <string>NSTextField11326</string> + <string>View</string> + <string>NSTextField11322</string> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>125</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>117</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>60</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>121</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>82</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>2</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>9</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>93</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>17</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>126</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>57</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>101</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>19</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>94</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>116</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>10</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>79</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>14</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>103</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>54</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>91</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>95</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>16</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>105</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>76</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>122</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>51</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>96</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>120</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>124</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>119</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>107</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>73</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>97</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>48</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>118</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>113</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>109</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>115</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>21</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>99</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>69</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>40</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>111</integer> + </dict> + </array> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array> + <dict> + <key>CF$UID</key> + <integer>150</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>151</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>152</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>153</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>154</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>155</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>156</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>157</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>158</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>159</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>160</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>161</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>162</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>163</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>164</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>165</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>166</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>167</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>168</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>169</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>170</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>171</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>172</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>173</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>174</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>175</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>176</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>177</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>178</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>179</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>180</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>181</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>182</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>183</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>184</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>185</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>186</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>187</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>188</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>189</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>190</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>191</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>192</integer> + </dict> + <dict> + <key>CF$UID</key> + <integer>193</integer> + </dict> + </array> + </dict> + <integer>119</integer> + <integer>112</integer> + <integer>77</integer> + <integer>116</integer> + <integer>121</integer> + <integer>1</integer> + <integer>6</integer> + <integer>88</integer> + <integer>8</integer> + <integer>120</integer> + <integer>76</integer> + <integer>95</integer> + <integer>68</integer> + <integer>89</integer> + <integer>111</integer> + <integer>5</integer> + <integer>75</integer> + <integer>7</integer> + <integer>96</integer> + <integer>74</integer> + <integer>87</integer> + <integer>90</integer> + <integer>9</integer> + <integer>97</integer> + <integer>62</integer> + <integer>117</integer> + <integer>73</integer> + <integer>91</integer> + <integer>115</integer> + <integer>118</integer> + <integer>114</integer> + <integer>98</integer> + <integer>80</integer> + <integer>92</integer> + <integer>72</integer> + <integer>113</integer> + <integer>109</integer> + <integer>99</integer> + <integer>110</integer> + <integer>69</integer> + <integer>94</integer> + <integer>79</integer> + <integer>71</integer> + <integer>100</integer> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>24</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$class</key> + <dict> + <key>CF$UID</key> + <integer>128</integer> + </dict> + <key>NS.objects</key> + <array/> + </dict> + <dict> + <key>$classes</key> + <array> + <string>NSIBObjectData</string> + <string>NSObject</string> + </array> + <key>$classname</key> + <string>NSIBObjectData</string> + </dict> + </array> + <key>$top</key> + <dict> + <key>IB.objectdata</key> + <dict> + <key>CF$UID</key> + <integer>1</integer> + </dict> + </dict> + <key>$version</key> + <integer>100000</integer> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/InstallerPane/English.lproj/Localizable.strings b/util/scripts/mac-binary/package/InstallerPane/English.lproj/Localizable.strings Binary files differnew file mode 100644 index 0000000..13b56d9 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/English.lproj/Localizable.strings diff --git a/util/scripts/mac-binary/package/InstallerPane/Info.plist b/util/scripts/mac-binary/package/InstallerPane/Info.plist new file mode 100644 index 0000000..b255851 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/Info.plist @@ -0,0 +1,30 @@ +<?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>InstallerPane</string> + <key>CFBundleIdentifier</key> + <string>com.trolltech.qt.installerPlugin</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>Installer</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>InstallerSectionTitle</key> + <string>InstallerPane</string> + <key>NSMainNibFile</key> + <string>InstallerPane</string> + <key>NSPrincipalClass</key> + <string>InstallerSection</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerPane.xcodeproj/default.pbxuser b/util/scripts/mac-binary/package/InstallerPane/InstallerPane.xcodeproj/default.pbxuser new file mode 100644 index 0000000..8c4de76 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerPane.xcodeproj/default.pbxuser @@ -0,0 +1,238 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 = { + activeBuildStyle = 014CEA420018CDE011CA2923; + activeTarget = 8D5B49AC048680CD000E48DA; + codeSenseManager = B4ED4491067AA67F00C170C8; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 206, + 20, + 206, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 108701307; + PBXPrepackagedSmartGroups_v2 = ( + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + activationKey = OldTargetSmartGroup; + clz = PBXTargetSmartGroup; + description = "Displays all targets of the project."; + globalID = 1C37FABC04509CD000000102; + name = Targets; + preferences = { + image = Targets; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXTargetSmartGroup2; + description = "Displays all targets of the project as well as nested build phases."; + globalID = 1C37FBAC04509CD000000102; + name = Targets; + preferences = { + image = Targets; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXExecutablesSmartGroup; + description = "Displays all executables of the project."; + globalID = 1C37FAAC04509CD000000102; + name = Executables; + preferences = { + image = Executable; + }; + }, + { + " PBXTransientLocationAtTop " = bottom; + absolutePathToBundle = ""; + clz = PBXErrorsWarningsSmartGroup; + description = "Displays files with errors or warnings."; + globalID = 1C08E77C0454961000C914BD; + name = "Errors and Warnings"; + preferences = { + fnmatch = ""; + image = WarningsErrors; + recursive = 1; + regex = ""; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = 1CC0EA4004350EF90044410B; + name = "Implementation Files"; + preferences = { + canSave = 1; + fnmatch = ""; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = "?*\\.[mcMC]"; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "This group displays Interface Builder NIB Files."; + globalID = 1CC0EA4004350EF90041110B; + name = "NIB Files"; + preferences = { + canSave = 1; + fnmatch = "*.nib"; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = ""; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = no; + absolutePathToBundle = ""; + clz = PBXFindSmartGroup; + description = "Displays Find Results."; + globalID = 1C37FABC05509CD000000102; + name = "Find Results"; + preferences = { + image = spyglass; + }; + }, + { + PBXTransientLocationAtTop = no; + absolutePathToBundle = ""; + clz = PBXBookmarksSmartGroup; + description = "Displays Project Bookmarks."; + globalID = 1C37FABC05539CD112110102; + name = Bookmarks; + preferences = { + image = Bookmarks; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = XCSCMSmartGroup; + description = "Displays files with interesting SCM status."; + globalID = E2644B35053B69B200211256; + name = SCM; + preferences = { + image = PBXRepository; + isLeaf = 0; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXSymbolsSmartGroup; + description = "Displays all symbols for the project."; + globalID = 1C37FABC04509CD000100104; + name = "Project Symbols"; + preferences = { + image = ProjectSymbols; + isLeaf = 1; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = PBXTemplateMarker; + name = "Simple Filter SmartGroup"; + preferences = { + canSave = 1; + fnmatch = "*.nib"; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = ""; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = PBXTemplateMarker; + name = "Simple Regular Expression SmartGroup"; + preferences = { + canSave = 1; + fnmatch = ""; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = "?*\\.[mcMC]"; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = bottom; + clz = XDDesignSmartGroup; + description = "Displays Xdesign models"; + globalID = 2E4A936305E6979E00701470; + name = Design; + preferences = { + image = Design; + isLeaf = 0; + }; + }, + ); + PBXWorkspaceStateSaveDate = 108701307; + }; + sourceControlManager = B4ED4490067AA67F00C170C8; + userBuildSettings = { + }; + }; + 8D5B49AC048680CD000E48DA = { + activeExec = 0; + }; + B4ED4490067AA67F00C170C8 = { + fallbackIsa = XCSourceControlManager; + isa = PBXSourceControlManager; + scmConfiguration = { + }; + scmType = ""; + }; + B4ED4491067AA67F00C170C8 = { + indexTemplatePath = ""; + isa = PBXCodeSenseManager; + usesDefaults = 1; + wantsCodeCompletion = 1; + wantsCodeCompletionAutoPopup = 1; + wantsCodeCompletionAutoSuggestions = 0; + wantsCodeCompletionCaseSensitivity = 1; + wantsCodeCompletionListAlways = 1; + wantsCodeCompletionOnlyMatchingItems = 1; + wantsCodeCompletionParametersIncluded = 1; + wantsCodeCompletionPlaceholdersInserted = 1; + wantsCodeCompletionTabCompletes = 1; + wantsIndex = 1; + }; +} diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerPane.xcodeproj/project.pbxproj b/util/scripts/mac-binary/package/InstallerPane/InstallerPane.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4445b5d --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerPane.xcodeproj/project.pbxproj @@ -0,0 +1,381 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; + 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; + B40F7FFC06739E1B0053A16B /* InstallerPlugins.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B40F7FFB06739E1B0053A16B /* InstallerPlugins.framework */; }; + B40F802906739F480053A16B /* InstallerPane.nib in Resources */ = {isa = PBXBuildFile; fileRef = B40F802706739F480053A16B /* InstallerPane.nib */; }; + B47CF355067B4E030066DBF6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B47CF353067B4E030066DBF6 /* Localizable.strings */; }; + CA21468F0897D41100C0167A /* InstallerSecionSection.mm in Sources */ = {isa = PBXBuildFile; fileRef = CA21468E0897D41100C0167A /* InstallerSecionSection.mm */; }; + CA72AA6A089640B3001196EE /* InstallerPanePane.mm in Sources */ = {isa = PBXBuildFile; fileRef = CA72AA69089640B3001196EE /* InstallerPanePane.mm */; }; + CADBCF9F08F55066009B9612 /* helpfulfunc.mm in Sources */ = {isa = PBXBuildFile; fileRef = CADBCF9E08F55066009B9612 /* helpfulfunc.mm */; }; + CADBD0A108F58F9C009B9612 /* keydec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CADBD0A008F58F9B009B9612 /* keydec.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; + 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + 32DBCF630370AF2F00C91783 /* InstallerPane_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstallerPane_Prefix.pch; sourceTree = "<group>"; }; + 8D5B49B6048680CD000E48DA /* InstallerPane.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstallerPane.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + B40F7FFB06739E1B0053A16B /* InstallerPlugins.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InstallerPlugins.framework; path = /System/Library/Frameworks/InstallerPlugins.framework; sourceTree = "<absolute>"; }; + B40F802806739F480053A16B /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/InstallerPane.nib; sourceTree = "<group>"; }; + B44C200806739AE500D31AA1 /* InstallerPanePane.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = InstallerPanePane.h; sourceTree = "<group>"; }; + B47CF354067B4E030066DBF6 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; }; + B4A6B2A60673D523003CD9B2 /* InstallerSections.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = InstallerSections.plist; sourceTree = "<group>"; }; + CA21468D0897D41100C0167A /* InstallerSecionSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstallerSecionSection.h; sourceTree = "<group>"; }; + CA21468E0897D41100C0167A /* InstallerSecionSection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InstallerSecionSection.mm; sourceTree = "<group>"; }; + CA2146C00897D69E00C0167A /* helpfulfunc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = helpfulfunc.h; sourceTree = "<group>"; }; + CA72A9A40896304E001196EE /* keydec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = keydec.h; sourceTree = "<group>"; }; + CA72AA69089640B3001196EE /* InstallerPanePane.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InstallerPanePane.mm; sourceTree = "<group>"; }; + CADBCF9E08F55066009B9612 /* helpfulfunc.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = helpfulfunc.mm; sourceTree = "<group>"; }; + CADBD0A008F58F9B009B9612 /* keydec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = keydec.cpp; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D5B49B3048680CD000E48DA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */, + B40F7FFC06739E1B0053A16B /* InstallerPlugins.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* InstallerPlugin */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Classes */, + 32C88E010371C26100C91783 /* Other Sources */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + 19C28FB8FE9D52D311CA2CBB /* Products */, + ); + name = InstallerPlugin; + sourceTree = "<group>"; + }; + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, + 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, + ); + name = "Frameworks and Libraries"; + sourceTree = "<group>"; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + B47CF353067B4E030066DBF6 /* Localizable.strings */, + B4A6B2A60673D523003CD9B2 /* InstallerSections.plist */, + 8D5B49B7048680CD000E48DA /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + B40F802706739F480053A16B /* InstallerPane.nib */, + ); + name = Resources; + sourceTree = "<group>"; + }; + 08FB77AFFE84173DC02AAC07 /* Classes */ = { + isa = PBXGroup; + children = ( + CADBD0A008F58F9B009B9612 /* keydec.cpp */, + CADBCF9E08F55066009B9612 /* helpfulfunc.mm */, + CA72A9A40896304E001196EE /* keydec.h */, + B44C200806739AE500D31AA1 /* InstallerPanePane.h */, + CA72AA69089640B3001196EE /* InstallerPanePane.mm */, + CA21468D0897D41100C0167A /* InstallerSecionSection.h */, + CA21468E0897D41100C0167A /* InstallerSecionSection.mm */, + CA2146C00897D69E00C0167A /* helpfulfunc.h */, + ); + name = Classes; + sourceTree = "<group>"; + }; + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, + B40F7FFB06739E1B0053A16B /* InstallerPlugins.framework */, + ); + name = "Linked Frameworks"; + sourceTree = "<group>"; + }; + 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 089C1672FE841209C02AAC07 /* Foundation.framework */, + 089C167FFE841241C02AAC07 /* AppKit.framework */, + ); + name = "Other Frameworks"; + sourceTree = "<group>"; + }; + 19C28FB8FE9D52D311CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D5B49B6048680CD000E48DA /* InstallerPane.bundle */, + ); + name = Products; + sourceTree = "<group>"; + }; + 32C88E010371C26100C91783 /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32DBCF630370AF2F00C91783 /* InstallerPane_Prefix.pch */, + ); + name = "Other Sources"; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D5B49AC048680CD000E48DA /* InstallerPane */ = { + isa = PBXNativeTarget; + buildConfigurationList = CA72A7AF0894D77F001196EE /* Build configuration list for PBXNativeTarget "InstallerPane" */; + buildPhases = ( + 8D5B49AF048680CD000E48DA /* Resources */, + 8D5B49B1048680CD000E48DA /* Sources */, + 8D5B49B3048680CD000E48DA /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = InstallerPane; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = InstallerPlugin; + productReference = 8D5B49B6048680CD000E48DA /* InstallerPane.bundle */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = CA72A7B30894D77F001196EE /* Build configuration list for PBXProject "InstallerPane" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 089C166AFE841209C02AAC07 /* InstallerPlugin */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D5B49AC048680CD000E48DA /* InstallerPane */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D5B49AF048680CD000E48DA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, + B40F802906739F480053A16B /* InstallerPane.nib in Resources */, + B47CF355067B4E030066DBF6 /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D5B49B1048680CD000E48DA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CA72AA6A089640B3001196EE /* InstallerPanePane.mm in Sources */, + CA21468F0897D41100C0167A /* InstallerSecionSection.mm in Sources */, + CADBCF9F08F55066009B9612 /* helpfulfunc.mm in Sources */, + CADBD0A108F58F9C009B9612 /* keydec.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = "<group>"; + }; + B40F802706739F480053A16B /* InstallerPane.nib */ = { + isa = PBXVariantGroup; + children = ( + B40F802806739F480053A16B /* English */, + ); + name = InstallerPane.nib; + sourceTree = "<group>"; + }; + B47CF353067B4E030066DBF6 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + B47CF354067B4E030066DBF6 /* English */, + ); + name = Localizable.strings; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + CA1E6BC90897938F0079C491 /* Debug-eval */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = InstallerPane_Prefix.pch; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PREBINDING = NO; + PRODUCT_NAME = InstallerPane; + WRAPPER_EXTENSION = bundle; + ZERO_LINK = YES; + }; + name = "Debug-eval"; + }; + CA1E6BCA0897938F0079C491 /* Debug-eval */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_ENABLE_FIX_AND_CONTINUE = YES; + OTHER_CFLAGS = "-DQT_EVAL"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + ZERO_LINK = YES; + }; + name = "Debug-eval"; + }; + CA72A7B00894D77F001196EE /* Debug-commercial */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = InstallerPane_Prefix.pch; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PREBINDING = NO; + PRODUCT_NAME = InstallerPane; + WRAPPER_EXTENSION = bundle; + ZERO_LINK = YES; + }; + name = "Debug-commercial"; + }; + CA72A7B10894D77F001196EE /* Release-commercial */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = InstallerPane_Prefix.pch; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PREBINDING = NO; + PRODUCT_NAME = InstallerPane; + WRAPPER_EXTENSION = bundle; + ZERO_LINK = NO; + }; + name = "Release-commercial"; + }; + CA72A7B40894D77F001196EE /* Debug-commercial */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_ENABLE_FIX_AND_CONTINUE = YES; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + ZERO_LINK = YES; + }; + name = "Debug-commercial"; + }; + CA72A7B50894D77F001196EE /* Release-commercial */ = { + isa = XCBuildConfiguration; + buildSettings = { + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = "Release-commercial"; + }; + CAEBD75C0896974E0003461D /* Release-eval */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = InstallerPane_Prefix.pch; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PREBINDING = NO; + PRODUCT_NAME = InstallerPane; + WRAPPER_EXTENSION = bundle; + ZERO_LINK = NO; + }; + name = "Release-eval"; + }; + CAEBD75D0896974E0003461D /* Release-eval */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_CFLAGS = "-DQT_EVAL"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = "Release-eval"; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + CA72A7AF0894D77F001196EE /* Build configuration list for PBXNativeTarget "InstallerPane" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CA72A7B00894D77F001196EE /* Debug-commercial */, + CA1E6BC90897938F0079C491 /* Debug-eval */, + CA72A7B10894D77F001196EE /* Release-commercial */, + CAEBD75C0896974E0003461D /* Release-eval */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Debug-commercial"; + }; + CA72A7B30894D77F001196EE /* Build configuration list for PBXProject "InstallerPane" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CA72A7B40894D77F001196EE /* Debug-commercial */, + CA1E6BCA0897938F0079C491 /* Debug-eval */, + CA72A7B50894D77F001196EE /* Release-commercial */, + CAEBD75D0896974E0003461D /* Release-eval */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Debug-commercial"; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerPanePane.h b/util/scripts/mac-binary/package/InstallerPane/InstallerPanePane.h new file mode 100644 index 0000000..e7ff301 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerPanePane.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ +/* InstallerPanePane */ + +#import <InstallerPlugins/InstallerPane.h> +#import <Cocoa/Cocoa.h> + +@interface InstallerPanePane : InstallerPane +{ + int licenseStatus; + BOOL nameCheckOK; + NSMutableString *fullLicenseKey; + IBOutlet NSTextField *LicenseField1; + IBOutlet NSTextField *LicenseField2; + IBOutlet NSTextField *LicenseField3; + IBOutlet NSTextField *LicenseField4; + IBOutlet NSTextField *LicenseField5; + IBOutlet NSTextField *LicenseField6; + IBOutlet NSTextField *LicenseField7; + IBOutlet NSTextField *nameField; + IBOutlet NSTextField *errorField; + NSString *initialLicensee; + NSString *initialLicenseKey; +} +- (void)checkLicense; +- (void)checkName; +- (void)tryEnable; +- (void)manipulateEditorString:(NSTextField *)TextField; +- (void)fillInForm; +@end diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerPanePane.mm b/util/scripts/mac-binary/package/InstallerPane/InstallerPanePane.mm new file mode 100644 index 0000000..268d594 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerPanePane.mm @@ -0,0 +1,250 @@ +#import "InstallerPanePane.h" +#import "helpfulfunc.h" + +static BOOL checkForLicenseFile() +{ + static const int LICENSESIZE = 42; + int value = -1; + static NSString *qtLicense = [NSHomeDirectory() stringByAppendingPathComponent: @".qt-license"]; + NSData *fileContents = [[NSFileManager defaultManager] contentsAtPath: qtLicense]; + if (fileContents != nil) { + const char *charBuffer = (const char *)[fileContents bytes]; + int length = [fileContents length]; + char *location = strnstr(charBuffer, LicenseKeyExtString, length); + if (location) { + location += strlen(LicenseKeyExtString); + char licenseString[LICENSESIZE]; + strncpy(licenseString, location, LICENSESIZE); + licenseString[LICENSESIZE - 1] = '\0'; + while (location = strstr(licenseString, "\n")) + *location = '\0'; + value = validateLicense(licenseString); + } + } + return value == LicenseOK; +} + +@implementation InstallerPanePane +- (NSString *)title +{ + return [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"PaneTitle" + value:nil table:nil]; +} + +- (id)init +{ + self = [super init]; + if (self) { + licenseStatus = InvalidLicense; + nameCheckOK = NO; + fullLicenseKey = [[NSMutableString alloc] initWithCapacity:35]; + [self fillInForm]; + } + return self; +} + +- (void)fillInForm +{ + static NSString *qtLicense = [NSHomeDirectory() stringByAppendingPathComponent: @".qt-license"]; + NSData *fileData = [[NSFileManager defaultManager] contentsAtPath: qtLicense]; + NSString *fileContents = [[[NSString alloc] initWithData:fileData + encoding:NSUTF8StringEncoding] autorelease]; + if (fileContents == nil) + return; + NSArray *array = [fileContents componentsSeparatedByString:@"\n"]; + uint totalCount = [array count]; + initialLicensee = nil; + initialLicenseKey = nil; + for (uint i = 0; i < totalCount; ++i) { + if (initialLicensee != nil && initialLicenseKey != nil) + break; + NSString *string = [array objectAtIndex:i]; + if (initialLicenseKey == nil) { + NSRange range = [string rangeOfString:[NSString stringWithUTF8String:LicenseKeyExtString]]; + if (range.location != NSNotFound && range.length != 0) { + initialLicenseKey = [string substringFromIndex:range.location + range.length]; + [initialLicenseKey retain]; + continue; + } + } + if (initialLicensee == nil) { + NSRange range = [string rangeOfString:[NSString stringWithUTF8String:LicenseeString]]; + if (range.location != NSNotFound && range.length != 0) { + initialLicensee = [[string substringFromIndex:range.location + range.length] + stringByTrimmingCharactersInSet: + [NSCharacterSet characterSetWithCharactersInString:@"\""]]; + [initialLicensee retain]; + continue; + } + } + } +} + +- (void)willEnterPane:(InstallerSectionDirection)dir +{ + NSString *string = [nameField stringValue]; + + if ((string == nil || [string length] == 0) && (initialLicensee != nil)) + [nameField setStringValue:initialLicensee]; + string = [LicenseField1 stringValue]; + if ((string == nil || [string length] == 0 && (initialLicenseKey != nil))) { + NSArray *array = [initialLicenseKey componentsSeparatedByString:@"-"]; + NSArray *licenseFieldArray = [NSArray arrayWithObjects:LicenseField1, LicenseField2, + LicenseField3, LicenseField4, + LicenseField5, LicenseField6, LicenseField7, nil]; + uint count = [array count]; + count = (count > 7) ? 7 : count; + for (uint i = 0; i < count; ++i) + [[licenseFieldArray objectAtIndex:i] setStringValue:[array objectAtIndex:i]]; + } + [self checkLicense]; +} + +- (BOOL)shouldExitPane:(InstallerSectionDirection)dir +{ + if ((dir == InstallerDirectionForward)) { + if ((licenseStatus != LicenseOK) && !nameCheckOK) + return NO; + + // Copy the file first + NSFileManager *fm = [NSFileManager defaultManager]; + NSString *qtLicense = [NSHomeDirectory() stringByAppendingPathComponent: @".qt-license"]; +#if 0 + if ([fm fileExistsAtPath:qtLicense]) { + NSMutableString *alternatePlace = [NSMutableString stringWithCapacity: 256]; + [alternatePlace setString : [NSHomeDirectory() stringByAppendingPathComponent: @".qt-license.bak"]]; + NSNumber *backNumber = [NSNumber numberWithInt:1]; + int index = [alternatePlace length] - 1; + + while ([fm fileExistsAtPath:alternatePlace]) { + [alternatePlace insertString:[backNumber stringValue] atIndex:index]; + int foo = [backNumber intValue]; + ++foo; + backNumber = [NSNumber numberWithInt:foo]; + } + [fm copyPath:qtLicense toPath:alternatePlace handler:nil]; + } +#endif + + NSMutableString *finalString = [NSMutableString stringWithCapacity:256]; + NSMutableString *nameString = [NSMutableString stringWithCapacity:128]; + [nameString appendString: [nameField stringValue]]; + [nameString replaceOccurrencesOfString:@"\"" withString:@"'" + options:NSLiteralSearch range:NSMakeRange(0, [nameString length])]; + + [finalString appendString:[NSString stringWithUTF8String: LicenseeString]]; + [finalString appendString:@"\""]; + [finalString appendString:nameString]; + [finalString appendString:@"\""]; + [finalString appendString:@"\n"]; + [finalString appendString:[NSString stringWithUTF8String: LicenseKeyExtString]]; + [finalString appendString:fullLicenseKey]; + [finalString appendString:@"\n"]; + + const char *finalFinalString = [finalString UTF8String]; + + NSData *data = [NSData dataWithBytes:finalFinalString length:strlen(finalFinalString)]; + [fm createFileAtPath:qtLicense contents:data attributes:nil]; + } + return YES; +} + +- (void)didEnterPane:(InstallerSectionDirection)dir +{ + [self checkName]; + [self checkLicense]; + [nameField selectText:self]; +} + +- (void)manipulateEditorString:(NSTextField *) textField +{ + NSString *string = [[textField currentEditor] string]; + NSRange range = [string rangeOfString:@"-"]; + if (range.location == NSNotFound) { + return; + } else { + NSString *theBeginning = [string substringToIndex:range.location]; + NSString *theRest = [string substringFromIndex:range.location + 1]; + NSText *ed = [textField currentEditor]; + [ed setString:theBeginning]; + NSView *nextView = [textField nextValidKeyView]; + if (nextView != nil && [nextView class] == [textField class]) { + NSTextField *nextTextField = (NSTextField *)nextView; + [[nextTextField window] makeFirstResponder: nextTextField]; + ed = [nextTextField currentEditor]; + [ed setString:theRest]; + // Bubble this along to catch extra dashes + [self manipulateEditorString:nextTextField]; + } + } +} + +- (void)controlTextDidChange:(NSNotification *)aNotification +{ + NSTextField *itemThatChanged = [aNotification object]; + if (itemThatChanged == nameField) { + [self checkName]; + } else if (itemThatChanged != nil) { + [self manipulateEditorString: itemThatChanged]; + [self checkLicense]; + } +} + + +- (void)checkLicense +{ + int i; + [fullLicenseKey setString:@""]; + NSTextField *theLicenseFields[] = { LicenseField1, LicenseField2, LicenseField3, LicenseField4, + LicenseField5, LicenseField6, LicenseField7 }; + + for (i = 0; i < sizeof(theLicenseFields) / sizeof(NSTextField*); ++i) { + NSString *part = [[theLicenseFields[i] stringValue] + stringByTrimmingCharactersInSet:[NSCharacterSet + whitespaceAndNewlineCharacterSet]]; + if ([part length] <= 0) { + licenseStatus = InvalidLicense; + [self tryEnable]; + return; + } + if (i != 0) + [fullLicenseKey appendString:@"-"]; + [fullLicenseKey appendString:[part uppercaseString]]; + } + + licenseStatus = validateLicense([fullLicenseKey UTF8String]); + [self tryEnable]; +} + +- (void)checkName +{ + NSString *name = [nameField stringValue]; + nameCheckOK = [name length] > 0; + [self tryEnable]; +} + + +- (void)tryEnable +{ + [self setNextEnabled:(licenseStatus == LicenseOK) && nameCheckOK]; + switch (licenseStatus) { + case LicenseOK: + case InvalidLicense: + [errorField setStringValue:@""]; + break; + case InvalidType: + [errorField setStringValue:@"This license cannot be used with this version of Qt"]; + break; + case InvalidPlatform: + [errorField setStringValue:@"This license cannot be used for this Qt Platform"]; + break; + case LicenseExpired: + [errorField setStringValue:@"This license has expired for this product,\n contact sales@trolltech.com for an upgrade"]; + break; + } +} + + +@end + + diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerPane_Prefix.pch b/util/scripts/mac-binary/package/InstallerPane/InstallerPane_Prefix.pch new file mode 100644 index 0000000..c0a0b78 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerPane_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'InstallerPlugin' target in the 'InstallerPlugin' project. +// + +#ifdef __OBJC__ + #import <Cocoa/Cocoa.h> + #import <InstallerPlugins/InstallerPlugins.h> +#endif diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerSecionSection.h b/util/scripts/mac-binary/package/InstallerPane/InstallerSecionSection.h new file mode 100644 index 0000000..6b3abbe --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerSecionSection.h @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ +// +// InstallerSecionSection.h +// InstallerPane +// +// Created by Trenton Schulz on 7/27/05. +// Copyright 2005 __MyCompanyName__. All rights reserved. +// + +#import <Cocoa/Cocoa.h> +#include <InstallerPlugins/InstallerSection.h> + +@interface InstallerSecionSection : InstallerSection { + +} + +@end diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerSecionSection.mm b/util/scripts/mac-binary/package/InstallerPane/InstallerSecionSection.mm new file mode 100644 index 0000000..5d04a5e --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerSecionSection.mm @@ -0,0 +1,46 @@ +// +// InstallerSecionSection.mm +// InstallerPane +// +// Created by Trenton Schulz on 7/27/05. +// Copyright 2005 __MyCompanyName__. All rights reserved. +// + +#import "InstallerSecionSection.h" +#import "helpfulfunc.h" +#import <stdio.h> +#import <string.h> + + +static BOOL checkForLicenseFile() +{ + static const int LICENSESIZE = 42; + int value = -1; + static NSString *qtLicense = [NSHomeDirectory() stringByAppendingPathComponent: @".qt-license"]; + NSData *fileContents = [[NSFileManager defaultManager] contentsAtPath: qtLicense]; + if (fileContents != nil) { + const char *charBuffer = (const char *)[fileContents bytes]; + int length = [fileContents length]; + char *location = strnstr(charBuffer, LicenseKeyExtString, length); + if (location) { + location += strlen(LicenseKeyExtString); + char licenseString[LICENSESIZE]; + strncpy(licenseString, location, LICENSESIZE); + licenseString[LICENSESIZE - 1] = '\0'; + while (location = strstr(licenseString, "\n")) + *location = '\0'; + value = validateLicense(licenseString); + } + } + return value == LicenseOK; +} + + +@implementation InstallerSecionSection + +- (BOOL)shouldLoad +{ + return !checkForLicenseFile(); +} + +@end diff --git a/util/scripts/mac-binary/package/InstallerPane/InstallerSections.plist b/util/scripts/mac-binary/package/InstallerPane/InstallerSections.plist new file mode 100644 index 0000000..0a82f56 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/InstallerSections.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>SectionOrder</key> + <array> + <string>Introduction</string> + <string>ReadMe</string> + <string>License</string> + <string>InstallerPane.bundle</string> + <string>Target</string> + <string>PackageSelection</string> + <string>Install</string> + </array> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/InstallerPane/helpfulfunc.h b/util/scripts/mac-binary/package/InstallerPane/helpfulfunc.h new file mode 100644 index 0000000..b774f60 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/helpfulfunc.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$ +** +****************************************************************************/ +/* + * helpfulfunc.h + * InstallerPane + * + * Created by Trenton Schulz on 7/27/05. + * Copyright 2005 __MyCompanyName__. All rights reserved. + * + */ + +#ifndef HELPFULFUNC_H +#define HELPFULFUNC_H + +#import <stdio.h> + +extern const char LicenseeString[]; +extern const char LicenseKeyExtString[]; + +enum LicenseValues { LicenseOK = 0, InvalidLicense, InvalidProduct, InvalidPlatform, InvalidType, LicenseExpired }; + +int validateLicense(const char *string); + +#endif // HELPFULFUNC_H
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/InstallerPane/helpfulfunc.mm b/util/scripts/mac-binary/package/InstallerPane/helpfulfunc.mm new file mode 100644 index 0000000..35b877a --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/helpfulfunc.mm @@ -0,0 +1,88 @@ +/* + * helpfulfunc.c + * InstallerPane + * + * Created by Trenton Schulz on 7/27/05. + * Copyright 2005 __MyCompanyName__. All rights reserved. + * + */ + +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include "helpfulfunc.h" +#include "keydec.h" + +#include <Cocoa/Cocoa.h> + +const char LicenseKeyExtString[] = "LicenseKeyExt="; +const char LicenseeString[] = "Licensee="; + +int validateLicense(const char *string) +{ + KeyDecoder key(string); + int ret = InvalidLicense; + int validSchema = +#ifdef QT_EVAL + (KeyDecoder::SupportedEvaluation + | KeyDecoder::UnsupportedEvaluation | KeyDecoder::FullSourceEvaluation); +#else + (KeyDecoder::FullSourceEvaluation | KeyDecoder::Academic + | KeyDecoder::Educational | KeyDecoder::FullCommercial); +#endif + if (key.IsValid()) { + if (!(key.getProducts() & (KeyDecoder::QtUniversal | KeyDecoder::QtDesktop + | KeyDecoder::QtDesktopLight | KeyDecoder::QtConsole))) { + ret = InvalidProduct; + } else { + if (!(key.getPlatforms() + & (KeyDecoder::Mac | KeyDecoder::Embedded | KeyDecoder::WinCE))) { + ret = InvalidPlatform; + } else { + + if (!(key.getLicenseSchema() & validSchema)) { + ret = InvalidType; + } else { + ret = LicenseOK; + } + } + } + } + + if (ret == LicenseOK) { + // We need to check ourselves against the build date + // First read in the build date and then use it to compare with the + // Expiry Date if it's commercial or the current date if it's an eval. + CDate date = key.getExpiryDate(); + NSCalendarDate *expiryDate = [NSCalendarDate dateWithYear:date.year() + month:date.month() day:date.day() + hour:23 minute:59 second:59 + timeZone:[NSTimeZone systemTimeZone]]; + NSCalendarDate *compareDay = 0; +#ifdef QT_EVAL + compareDay = [NSCalendarDate calendarDate]; +#else + // There's a lot of bundles here, so we have to make sure we get the correct one + NSBundle *bundle = nil; + NSArray *bundles = [NSBundle allBundles]; + for (uint i = 0; i < [bundles count]; ++i) { + NSBundle *bun = [bundles objectAtIndex: i]; + NSRange location = [[bun bundleIdentifier] rangeOfString:@"com.trolltech.qt4."]; + if (location.length == 0) + location = [[bun bundleIdentifier] rangeOfString:@"Trolltech Qt Packages"]; + + if (location.length != 0) { + bundle = bun; + break; + } + + } + NSString *contents = [NSString stringWithContentsOfFile:[bundle pathForResource:@".package_date" ofType:nil] + encoding:NSUTF8StringEncoding error:0]; + compareDay = [NSCalendarDate dateWithString: contents calendarFormat:@"%Y-%m-%d"]; +#endif + if ([expiryDate laterDate: compareDay] != expiryDate) + ret = LicenseExpired; + } + return ret; +} diff --git a/util/scripts/mac-binary/package/InstallerPane/keydec.cpp b/util/scripts/mac-binary/package/InstallerPane/keydec.cpp new file mode 100644 index 0000000..e672187 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/keydec.cpp @@ -0,0 +1,323 @@ +/**************************************************************************** +** +** 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 <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "keydec.h" + +#define MAX_STRSIZE 256 +#define NUMBER_OF_PARTS 7 + +const ushort KeyDecoder::crc_tbl[] = { + 0x0000, 0x1081, 0x2102, 0x3183, + 0x4204, 0x5285, 0x6306, 0x7387, + 0x8408, 0x9489, 0xa50a, 0xb58b, + 0xc60c, 0xd68d, 0xe70e, 0xf78f +}; + +const char KeyDecoder::Xalphabet[] = "WX9MUEC7AJH3KS6DB4YFG2L5PQRT8VNZ"; +const int KeyDecoder::XAlphabetSize = sizeof(Xalphabet) - 1; +const CDate KeyDecoder::StartDate = CDate(2001, 1, 1); +const uint KeyDecoder::MaxDays = 4000; + +const char *KeyDecoder::Products[] = { + "Qt Universal", + "Qt Desktop", + "Qt Desktop Light", + "Qt Console", + "Qt Designer Only", + 0, + 0, + 0, + 0, + 0, + + "Qtopia PDA", + "Qtopia Phone", + "Qtopia Reference Board", + 0, + 0, + 0, + 0, + 0, + 0, + 0, + + "Teambuilder", + "Solutions", + "QSA", + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; + +const char *KeyDecoder::Platforms[] = { + "X11", + "Embedded", + "Windows", + "Mac", + "Windows CE" +}; + +const char *KeyDecoder::LicenseSchemas[] = { + "Supported Evaluation", + "Unsupported Evaluation", + "Full Source Evaluation", + "Full Commercial", + "Academic", + "Educational" +}; + +const char *KeyDecoder::LicenseFeatures[] = { + "US Customer", + "Floating License", + 0, + 0 +}; + +const int KeyDecoder::NumberOfProducts = sizeof(Products) / sizeof(char *); +const int KeyDecoder::NumberOfPlatforms = sizeof(Platforms) / sizeof(char *); +const int KeyDecoder::NumberOfLicenseSchemas = sizeof(LicenseSchemas) / sizeof(char *); +const int KeyDecoder::NumberOfLicenseFeatures = sizeof(LicenseFeatures) / sizeof(char *); + +CDate::CDate() : m_jd(0) +{ +} + +CDate::CDate(int y, int m, int d) +{ + m_jd = gregorianToJulian(y, m, d); +} + +CDate::CDate(CDate *d) +{ + m_jd = d->m_jd; +} + +CDate::CDate(uint julianDays) +{ + m_jd = julianDays; +} + +int CDate::year() const +{ + int y, m, d; + julianToGregorian(m_jd, y, m, d); + return y; +} + +int CDate::month() const +{ + int y, m, d; + julianToGregorian(m_jd, y, m, d); + return m; +} + +int CDate::day() const +{ + int y, m, d; + julianToGregorian(m_jd, y, m, d); + return d; +} + +uint CDate::gregorianToJulian(int y, int m, int d) const +{ + uint c, ya; + if (y <= 99) + y += 1900; + if (m > 2) { + m -= 3; + } else { + m += 9; + y--; + } + c = y; // NOTE: Sym C++ 6.0 bug + c /= 100; + ya = y - 100*c; + return 1721119 + d + (146097*c)/4 + (1461*ya)/4 + (153*m+2)/5; +} + +void CDate::julianToGregorian(uint jd, int &y, int &m, int &d) const +{ + uint x; + uint j = jd - 1721119; + y = (j*4 - 1)/146097; + j = j*4 - 146097*y - 1; + x = j/4; + j = (x*4 + 3) / 1461; + y = 100*y + j; + x = (x*4) + 3 - 1461*j; + x = (x + 4)/4; + m = (5*x - 3)/153; + x = 5*x - 3 - 153*m; + d = (x + 5)/5; + if (m < 10) { + m += 3; + } else { + m -= 9; + y++; + } +} + +void KeyDecoder::encodeBaseX(uint k, char *str) +{ + memset(str, 0, MAX_STRSIZE); + + do { + str[strlen(str)] = Xalphabet[ k % XAlphabetSize ]; + k /= XAlphabetSize; + } while (k > 0u); +} + +uint KeyDecoder::decodeBaseX(const char *str) +{ + uint k = 0; + int i = (int)strlen(str); + while (i > 0) { + i--; + const char *p = strchr(Xalphabet, str[i]); + if (p == 0) { + return 0; + } else { + k = (k * XAlphabetSize) + (p - Xalphabet); + } + } + return k; +} + +void KeyDecoder::encodedExpiryDate(const CDate &date, char *str) +{ + encodeBaseX(date.julianDate() ^ ExpiryDateMagic, str); +} + +CDate KeyDecoder::decodedExpiryDate(const char *encodedDate) +{ + uint y = decodeBaseX(encodedDate); + uint x = y ^ ExpiryDateMagic; + + CDate date(x); + + char str[MAX_STRSIZE]; + encodedExpiryDate(date, str); + + if (strcmp(encodedDate, str) != 0) + return CDate(); + return date; +} + +ushort KeyDecoder::qChecksum(const char *data, uint len) +{ + ushort crc = 0xffff; + uchar c; + const uchar *p = reinterpret_cast<const uchar *>(data); + while (len--) { + c = *p++; + crc = ((crc >> 4) & 0x0fff) ^ crc_tbl[((crc ^ c) & 15)]; + c >>= 4; + crc = ((crc >> 4) & 0x0fff) ^ crc_tbl[((crc ^ c) & 15)]; + } + return ~crc & 0xffff; +} + +KeyDecoder::KeyDecoder(const char *clicenseKey) + : products(0), platforms(0), licenseSchema(0), licenseFeatures(0), licenseID(0), m_valid(false) +{ + static const int MAXCHARS = 7; + static const char * const SEP = "-"; + +#ifndef _WIN32_WCE + char *buffer = strdup(clicenseKey); +#else + char *buffer = (char*) malloc(strlen(clicenseKey) + 1); + strcpy(buffer, clicenseKey); +#endif + char *licenseParts[NUMBER_OF_PARTS]; + int partNumber = 0; + + for (char *part = strtok(buffer, SEP); part != 0; part = strtok(0, SEP)) + licenseParts[partNumber++] = part; + + if (partNumber < (NUMBER_OF_PARTS-1)) { + free(buffer); + return; //invalid key + } + + int crcPeices = NUMBER_OF_PARTS - 1; + char *crcCheckKey = (char*)calloc(crcPeices * MAXCHARS + crcPeices, sizeof(char)); + for (int i = 0; i < crcPeices; ++i) { + if (i != 0) + strncat(crcCheckKey, SEP, 1); + strncat(crcCheckKey, licenseParts[i], MAXCHARS); + } + + int crc = qChecksum(crcCheckKey, (uint)strlen(crcCheckKey)); + + char checksumVerification[5]; +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) + _snprintf(checksumVerification, 5, "%.2X%.2X", (crc & 0xff), (crc >> 8 & 0xff)); +#else + snprintf(checksumVerification, 5, "%.2X%.2X", (crc & 0xff), (crc >> 8 & 0xff)); +#endif + + if (strncmp(checksumVerification, licenseParts[6], 5) != 0) { + free(buffer); + free(crcCheckKey); + return; //invalid checksum + } + + products = decodeBaseX(licenseParts[0]) ^ ProductMagic; + platforms = decodeBaseX(licenseParts[1]) ^ PlatformMagic; + licenseSchema = decodeBaseX(licenseParts[2]) ^ LicenseSchemaMagic; + licenseFeatures = decodeBaseX(licenseParts[3]) ^ FeatureMagic; + licenseID = decodeBaseX(licenseParts[4]) ^ LicenseIDMagic; + expiryDate = decodedExpiryDate(licenseParts[5]); + + m_valid = true; + free(buffer); + free(crcCheckKey); +} diff --git a/util/scripts/mac-binary/package/InstallerPane/keydec.h b/util/scripts/mac-binary/package/InstallerPane/keydec.h new file mode 100644 index 0000000..ef1db96 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/keydec.h @@ -0,0 +1,197 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ +#ifndef KEYDEC_H +#define KEYDEC_H + +typedef unsigned int uint; +typedef unsigned short ushort; +typedef unsigned char uchar; + +class CDate +{ +public: + CDate(); + CDate(int y, int m, int d); + CDate(CDate *d); + CDate(uint julianDays); + + int year() const; + int month() const; + int day() const; + uint julianDate() const { return m_jd; } + +private: + uint gregorianToJulian(int y, int m, int d) const; + void julianToGregorian(uint jd, int &y, int &m, int &d) const; + uint m_jd; +}; + +class KeyDecoder +{ +private: + static const ushort crc_tbl[16]; + static const CDate StartDate; + static const uint MaxDays; + + void encodeBaseX(uint k, char *str); + uint decodeBaseX(const char *str); + + void encodedExpiryDate(const CDate &date, char *str); + CDate decodedExpiryDate(const char *encodedDate); + + ushort qChecksum(const char *data, uint len); + + uint products; + uint platforms; + uint licenseSchema; + uint licenseFeatures; + uint licenseID; + CDate expiryDate; + bool m_valid; + +public: + // Magic values + enum { + ProductMagic = 0xB292, + PlatformMagic = 0x5C7E, + LicenseSchemaMagic = 0xE3B, + LicenseIDMagic = 0xCE57, + FeatureMagic = 0x4D5, + ExpiryDateMagic = 0x5B7EC4 + }; + static const char Xalphabet[]; + static const int XAlphabetSize; + + // Products + enum { + // the first 10 bits are reserved for Qt editions + QtUniversal = 0x00000001, + QtDesktop = 0x00000002, + QtDesktopLight = 0x00000004, + QtConsole = 0x00000008, + QtDesignerOnly = 0x00000010, + QtReserved1 = 0x00000020, + QtReserved2 = 0x00000040, + QtReserved3 = 0x00000080, + QtReserved4 = 0x00000100, + QtReserved5 = 0x00000200, + + // the next 10 bits are reserved for Qtopia editions + QtopiaPDA = 0x00000400, + QtopiaPhone = 0x00000800, + QtopiaRefboard = 0x00001000, + QtopiaReserved1 = 0x00002000, + QtopiaReserved2 = 0x00004000, + QtopiaReserved3 = 0x00008000, + QtopiaReserved4 = 0x00010000, + QtopiaReserved5 = 0x00020000, + QtopiaReserved6 = 0x00040000, + QtopiaReserved7 = 0x00080000, + + // other products get the upper 12 bits + Teambuilder = 0x00100000, + Solutions = 0x00200000, + QSA = 0x00400000, + OtherReserved1 = 0x00800000, + OtherReserved2 = 0x01000000, + OtherReserved3 = 0x02000000, + OtherReserved4 = 0x04000000, + OtherReserved5 = 0x08000000, + OtherReserved6 = 0x10000000, + OtherReserved7 = 0x20000000, + OtherReserved8 = 0x40000000, + OtherReserved9 = 0x80000000 + }; + + static const char *Products[]; + + // Platforms + enum { + X11 = 0x0001, + Embedded = 0x0002, + Windows = 0x0004, + Mac = 0x0008, + WinCE = 0x0010, + // Symbian = 0x0020, + + // Everything + AllOS = X11 | Embedded | Windows | Mac | WinCE // | Symbian + }; + static const char *Platforms[]; + + // License Schema + enum { + SupportedEvaluation = 0x0001, + UnsupportedEvaluation = 0x0002, + FullSourceEvaluation = 0x0004, + AnyEvaluation = SupportedEvaluation | UnsupportedEvaluation | FullSourceEvaluation, + + FullCommercial = 0x0008, + Academic = 0x0010, + Educational = 0x0020 + }; + static const char *LicenseSchemas[]; + + // License Feature + enum { + USCustomer = 0x0001, + FloatingLicense = 0x0002 + }; + static const char *LicenseFeatures[]; + + static const int NumberOfProducts; + static const int NumberOfPlatforms; + static const int NumberOfLicenseSchemas; + static const int NumberOfLicenseFeatures; + + KeyDecoder(const char *licenseKey); + + uint getProducts() {return products;} + uint getPlatforms() {return platforms;} + uint getLicenseSchema() {return licenseSchema;} + uint getLicenseFeatures() {return licenseFeatures;} + uint getLicenseID() {return licenseID;} + CDate getExpiryDate() {return expiryDate;} + + bool IsValid() { return m_valid; } +}; + +#endif //KEYDEC_H diff --git a/util/scripts/mac-binary/package/InstallerPane/version.plist b/util/scripts/mac-binary/package/InstallerPane/version.plist new file mode 100644 index 0000000..bab2922 --- /dev/null +++ b/util/scripts/mac-binary/package/InstallerPane/version.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>BuildVersion</key> + <string>43</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>ProjectName</key> + <string>DevToolsWizardTemplates</string> + <key>SourceVersion</key> + <string>3670000</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/MetaPackage/Info.plist b/util/scripts/mac-binary/package/MetaPackage/Info.plist new file mode 100644 index 0000000..a348db5 --- /dev/null +++ b/util/scripts/mac-binary/package/MetaPackage/Info.plist @@ -0,0 +1,30 @@ +<?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$</string> + <key>CFBundleIdentifier</key> + <string>Trolltech Qt Packages</string> + <key>CFBundleName</key> + <string>Qt by Trolltech</string> + <key>CFBundleShortVersionString</key> + <string>Qt$VERSION_MAJOR$.$VERSION_MINOR$</string> + <key>IFMajorVersion</key> + <integer>$VERSION_MAJOR$</integer> + <key>IFPkgFlagAuthorizationAction</key> + <string>AdminAuthorization</string> + <key>IFPkgFlagFollowLinks</key> + <true/> + <key>IFMinorVersion</key> + <integer>$VERSION_MINOR$</integer> + <key>IFPkgFlagComponentDirectory</key> + <string>../packages</string> + <key>IFPkgFlagPackageList</key> + <array> + <!-- PACKAGE_DICT --> + </array> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/MetaPackage/PkgInfo b/util/scripts/mac-binary/package/MetaPackage/PkgInfo new file mode 100644 index 0000000..4cd3119 --- /dev/null +++ b/util/scripts/mac-binary/package/MetaPackage/PkgInfo @@ -0,0 +1 @@ +pmkrpkg1
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/MetaPackage/Resources/Description.plist b/util/scripts/mac-binary/package/MetaPackage/Resources/Description.plist new file mode 100644 index 0000000..efcf4ce --- /dev/null +++ b/util/scripts/mac-binary/package/MetaPackage/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 by Trolltech</string> + <key>IFPkgDescriptionTitle</key> + <string>Qt</string> + <key>IFPkgDescriptionVersion</key> + <string>Trolltech Qt$VERSION_MAJOR$.$VERSION_MINOR$</string> +</dict> +</plist> diff --git a/util/scripts/mac-binary/package/MetaPackage/Resources/Qt.info b/util/scripts/mac-binary/package/MetaPackage/Resources/Qt.info new file mode 100644 index 0000000..d294490 --- /dev/null +++ b/util/scripts/mac-binary/package/MetaPackage/Resources/Qt.info @@ -0,0 +1,16 @@ +Title Qt +Version Trolltech Qt $VERSION_MAJOR$.$VERSION_MINOR$ +Description Qt by Trolltech +DefaultLocation (null) +DeleteWarning + +### Package Flags + +NeedsAuthorization NO +Required NO +Relocatable NO +RequiresReboot NO +UseUserMask YES +OverwritePermissions NO +InstallFat NO +RootVolumeOnly NO diff --git a/util/scripts/mac-binary/package/Resources/InstallationCheck b/util/scripts/mac-binary/package/Resources/InstallationCheck new file mode 100755 index 0000000..d0df5cd --- /dev/null +++ b/util/scripts/mac-binary/package/Resources/InstallationCheck @@ -0,0 +1,96 @@ +#!/bin/sh + +# We need to do things differently on different platforms +# <10.3.9 Can't install +# =10.3.9 Can install, but must check license manually +# >=10.4 Just jump out + +os_version=`sysctl kern.osrelease | awk '{ print $3 }'` +os_major=`echo $os_version | cut -d . -f 1` +os_minor=`echo $os_version | cut -d . -f 2` + +if [ $os_major -lt 7 -o $os_major -eq 7 -a $os_minor -lt 9 ]; then + exit $((96+19)) +elif [ $os_major -eq 7 -a $os_minor -eq 9 ]; then + [ -f $HOME/.qt-license ] || exit $((96+16)); + + . $HOME/.qt-license >/dev/null 2>&1 + [ -z "$LicenseKeyExt" -o -z "$Licensee" ] && exit $((96+17)) + + grep "Evaluation" "$1/Contents/Resources/Welcome.rtf" 2>&1 >/dev/null && LicenseType="Evaluation" || LicenseType="Commercial" + + # License key format is incorrect. + echo $LicenseKeyExt | grep ".....*-....*-....*-....*-.....*-.....*-...." 2>&1 >/dev/null || exit $((96+17)) + + #Test the key is correct. + productTest=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1` + platformTest=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1` + licenseFeatureTest=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1` + licenseTypeTest=`echo $LicenseKeyExt | cut -f 3 -d - | cut -b 1` + + case $productTest in + F) + # Universal + ProductType="Universal" + ;; + B) + # Desktop + ProductType="Desktop" + ;; + L) + # Desktop Lite + ProductType="Desktop Light" + ;; + R) + # Console + ProductType="Console" + ;; + *) + exit $((96+18)) ;; + esac + + #check the palatform. + case $platformTest in + 4|L|5|G|Y|2|F|B) + # Qt/Mac + ;; + *) + exit $((96+18)) ;; + esac + + case $licenseTypeTest in + F|T|3) + licenseTest=Commercial + ;; + Z|R|Q) + licenseTest=Evaluation + ;; + *) + ;; + esac + + [ "$licenseTest" != "$LicenseType" ] && exit $((96+18)) + + expiryDate=`"$1/Contents/Resources/keydecoder" $LicenseKeyExt | sed -e s,-,,g` + if [ -z "$expiryDate" ]; then + exit $((96+18)) + fi + + packageDate=`cat "$1/Contents/Resources/.package_date" | sed -e s,-,,g` + today=`date +%Y%m%d` + + case $licenseTest in + Commercial) + if [ $packageDate -gt $expiryDate ]; then + exit $((96+20)) + fi + ;; + Evaluation) + if [ $today -gt $expiryDate ]; then + exit $((96+21)) + fi + ;; + esac +fi + +exit 0 diff --git a/util/scripts/mac-binary/package/Resources/InstallationCheck.strings b/util/scripts/mac-binary/package/Resources/InstallationCheck.strings Binary files differnew file mode 100644 index 0000000..0ddbcd2 --- /dev/null +++ b/util/scripts/mac-binary/package/Resources/InstallationCheck.strings diff --git a/util/scripts/mac-binary/package/Resources/background.jpg b/util/scripts/mac-binary/package/Resources/background.jpg Binary files differnew file mode 100644 index 0000000..0b0840f --- /dev/null +++ b/util/scripts/mac-binary/package/Resources/background.jpg diff --git a/util/scripts/mac-binary/package/Welcome-commercial.rtf b/util/scripts/mac-binary/package/Welcome-commercial.rtf new file mode 100644 index 0000000..c217aa6 --- /dev/null +++ b/util/scripts/mac-binary/package/Welcome-commercial.rtf @@ -0,0 +1,25 @@ +{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;} +{\colortbl;\red255\green255\blue255;} +{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} +\margl1440\margr1440\vieww7840\viewh7700\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\fs24 \cf0 Welcome to the Qt installer! This will guide you through the steps to getting \ul Qt $VERSION_MAJOR$.$VERSION_MINOR$\ulnone Commercial Edition installed on your machine! \ +\ +After a successful install, you can find most new things in /Developer. Specifically things will be located in the following places:\ +\ +\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\ql\qnatural +\ls1\ilvl0\cf0 {\listtext \'a5 }Qt Designer, Qt Linguist: /Developer/Applications/Qt\ +{\listtext \'a5 }Qt Documentation: /Developer/Documentation/Qt\ +{\listtext \'a5 }Qt Examples: /Developer/Examples/Qt\ +{\listtext \'a5 }Qt Plugins: /Developer/Applications/Plugins\ +{\listtext \'a5 }Qt Frameworks: /Library/Frameworks\ +{\listtext \'a5 }Qt Libraries: /usr/lib\ +{\listtext \'a5 }qmake, moc, uic, etc.: /Developer/Tools (symlink to /usr/bin)\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural +\cf0 \ +Please contact +\f1\b support@trolltech.com +\f0\b0 for any issues you have with this release of Qt/Mac.}
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/Welcome-eval.rtf b/util/scripts/mac-binary/package/Welcome-eval.rtf new file mode 100644 index 0000000..e720beb --- /dev/null +++ b/util/scripts/mac-binary/package/Welcome-eval.rtf @@ -0,0 +1,28 @@ +{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;} +{\colortbl;\red255\green255\blue255;} +{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} +\margl1440\margr1440\vieww7820\viewh6620\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\fs24 \cf0 Welcome to the Qt installer! This will guide you through the steps to getting \ul Qt $VERSION_MAJOR$.$VERSION_MINOR$\ulnone Evaluation Edition installed on your machine! \ +\ +After a successful install, you can find most new things in /Developer. Specifically things will be located in the following places:\ +\ +\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\ql\qnatural +\ls1\ilvl0\cf0 {\listtext \'a5 }Qt Designer, Qt Linguist: /Developer/Applications/Qt\ +{\listtext \'a5 }Qt Documentation: /Developer/Documentation/Qt\ +{\listtext \'a5 }Qt Examples: /Developer/Examples/Qt\ +{\listtext \'a5 }Qt Plugins: /Developer/Applications/Plugins\ +{\listtext \'a5 }Qt Frameworks: /Library/Frameworks\ +{\listtext \'a5 }Qt Libraries: /usr/lib\ +{\listtext \'a5 }qmake, moc, uic, etc.: /Developer/Tools (symlink to /usr/bin)\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural +\cf0 \ +Please use the bug report form located at\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f1\b \cf0 http://qtsoftware.com/bugreport-form +\f0\b0 \ +if you have any issues.}
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/Welcome-opensource.rtf b/util/scripts/mac-binary/package/Welcome-opensource.rtf new file mode 100644 index 0000000..27b0617 --- /dev/null +++ b/util/scripts/mac-binary/package/Welcome-opensource.rtf @@ -0,0 +1,28 @@ +{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;} +{\colortbl;\red255\green255\blue255;} +{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} +\margl1440\margr1440\vieww7840\viewh7700\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\fs24 \cf0 Welcome to the Qt installer! This will guide you through the steps to getting \ul Qt $VERSION_MAJOR$.$VERSION_MINOR$\ulnone Opensource Edition installed on your machine! \ +\ +After a successful install, you can find most new things in /Developer. Specifically things will be located in the following places:\ +\ +\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\ql\qnatural +\ls1\ilvl0\cf0 {\listtext \'a5 }Qt Designer, Qt Linguist: /Developer/Applications/Qt\ +{\listtext \'a5 }Qt Documentation: /Developer/Documentation/Qt\ +{\listtext \'a5 }Qt Examples: /Developer/Examples/Qt\ +{\listtext \'a5 }Qt Plugins: /Developer/Applications/Plugins\ +{\listtext \'a5 }Qt Frameworks: /Library/Frameworks\ +{\listtext \'a5 }Qt Libraries: /usr/lib\ +{\listtext \'a5 }qmake, moc, uic, etc.: /Developer/Tools (symlink to /usr/bin)\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural +\cf0 \ +Please use the bug report form located at\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f1\b \cf0 http://qtsoftware.com/bugreport-form +\f0\b0 \ +if you have any issues.}
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/backgrounds/DiskImage-Commercial.png b/util/scripts/mac-binary/package/backgrounds/DiskImage-Commercial.png Binary files differnew file mode 100644 index 0000000..8174ff4 --- /dev/null +++ b/util/scripts/mac-binary/package/backgrounds/DiskImage-Commercial.png diff --git a/util/scripts/mac-binary/package/backgrounds/DiskImage-Eval.png b/util/scripts/mac-binary/package/backgrounds/DiskImage-Eval.png Binary files differnew file mode 100644 index 0000000..0abcd3d --- /dev/null +++ b/util/scripts/mac-binary/package/backgrounds/DiskImage-Eval.png diff --git a/util/scripts/mac-binary/package/backgrounds/DiskImage-Opensource.png b/util/scripts/mac-binary/package/backgrounds/DiskImage-Opensource.png Binary files differnew file mode 100644 index 0000000..4a60a81 --- /dev/null +++ b/util/scripts/mac-binary/package/backgrounds/DiskImage-Opensource.png diff --git a/util/scripts/mac-binary/package/backgrounds/DriveIcon.icns b/util/scripts/mac-binary/package/backgrounds/DriveIcon.icns Binary files differnew file mode 100644 index 0000000..72fbe63 --- /dev/null +++ b/util/scripts/mac-binary/package/backgrounds/DriveIcon.icns diff --git a/util/scripts/mac-binary/package/keydecoder/main.cpp b/util/scripts/mac-binary/package/keydecoder/main.cpp new file mode 100644 index 0000000..3aa37f9 --- /dev/null +++ b/util/scripts/mac-binary/package/keydecoder/main.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** 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 <cstdio> +#include "../InstallerPane/keydec.h" + +int main(int argc, char **argv) +{ + if (argc != 2) + return 1; + KeyDecoder key(argv[1]); + if (!key.IsValid()) + return 2; + CDate date = key.getExpiryDate(); + fprintf(stdout, "%04d-%02d-%02d\n", date.year(), date.month(), date.day()); + return 0; +} diff --git a/util/scripts/mac-binary/package/make-model-ds_store.applescript b/util/scripts/mac-binary/package/make-model-ds_store.applescript new file mode 100644 index 0000000..757a3fd --- /dev/null +++ b/util/scripts/mac-binary/package/make-model-ds_store.applescript @@ -0,0 +1,41 @@ +(* This script works by using FileStorm to create a disk image that you can then use as a model .DS_Store file in + the disk image. Here's what you need to do: + + Run this script, adjusting the path to the items and versions as necessary. If all items don't exist, + then it won't finish correctly. + + Afterwords, mount the final disk image and make sure that it looks OK, sometimes FileStorm + messes this up. + + If it's OK, copy /Volumes/Qt-x.y.z/.DS_Store to safe location (call it model-DS_Store.x.y.z) + + Edit this file and replace all occurences of backgroundXXXXXXXXXXXX (21 chars) with + findersbackground.png. + + Save the file and you should be ready to go. + + I believe this is as automated as I can get it. + + FileStorm 1.9.1 has some new issues: + * The file is invisible as well, you can use '/Developer/Tools/SetFile -a v' to make + it visible if you need to use a GUI app to edit it. +*) + +tell application "FileStorm" + activate + make new document at before first document with properties {name:"diskimage"} + + tell first document + set disk image name to "/Users/twschulz/Desktop/qt-mac-commercial-4.4.5.dmg" + set {volume name} to {"Qt 4.4.5"} + set icon path to "/Users/twschulz/troll/qt/4.4/util/scripts/mac-binary/package/backgrounds/DriveIcon.icns" + set background image path to "/Users/twschulz/troll/qt/4.4/util/scripts/mac-binary/package/backgrounds/DiskImage-Commercial.png" + set height to 660 + make new file at before first file with properties {file path:"/Users/twschulz/Desktop/foo/Qt.mpkg", left position:85, top position:117} + make new file at before first file with properties {file path:"//Users/twschulz/Desktop/foo/ReadMe.txt", left position:85, top position:297} + make new file at before first file with properties {file path:"/Users/twschulz/Desktop/foo/packages", left position:150, top position:640} + tell application "FileStorm" to set bounds of window "diskimage" to {100, 100, 640, 660} + finalize image with rebuilding + end tell + +end tell diff --git a/util/scripts/mac-binary/package/mkcommercialpackage b/util/scripts/mac-binary/package/mkcommercialpackage new file mode 100755 index 0000000..ca8747f --- /dev/null +++ b/util/scripts/mac-binary/package/mkcommercialpackage @@ -0,0 +1,24 @@ +#!/bin/sh +# This is a simple press-one-button-to-build-a-binary-package script. +# You specify your version number, and it will download the source package +# from the web and build a binary from it. +# +# Usage: mkcommersialpackage [version] +# Where version is for example 4.1.0 +# + +BASE_URL=http://releases.dev.troll.no/~espenr/packages/ +PACKAGE_NAME=qt-mac-commercial-src- +SUFFIX=.tar.gz + +PACKAGE_FILE_NAME=${PACKAGE_NAME}${1}${SUFFIX} +COMPLETE_URL=${BASE_URL}${PACKAGE_FILE_NAME} + +DOWNLOAD_COMMAND="curl -O "${COMPLETE_URL} +echo Running ${DOWNLOAD_COMMAND} +$DOWNLOAD_COMMAND + +MKPACKAGE_LOCATION=${PWD}/`dirname $0`/mkpackage +MKPACKAGE_COMMAND=${MKPACKAGE_LOCATION}" -qtpackage "${PWD}/${PACKAGE_FILE_NAME} +echo Running $MKPACKAGE_COMMAND +$MKPACKAGE_COMMAND
\ No newline at end of file diff --git a/util/scripts/mac-binary/package/mkpackage b/util/scripts/mac-binary/package/mkpackage new file mode 100755 index 0000000..21a2eaa --- /dev/null +++ b/util/scripts/mac-binary/package/mkpackage @@ -0,0 +1,842 @@ +#!/bin/sh + +#options +export MACOSX_DEPLOYMENT_TARGET=10.3 +OUTPUT_DIR=`pwd`/outputs +cd `dirname $0` #now we live in the mkpackage location +USE_SEPARATE=no +TMP_DIR=/tmp/qt-stuff +PACKAGE_DIR=`(cd ../install && pwd)` +PACKAGE_OPTIONS= +PACKAGES= +COMMAND_PAX="/System/Library/PrivateFrameworks/Installation.framework/Resources/pax" #yes that pax, don't ask! +README= +LICENSE_EMBEDDED= +LICENSE_EMBEDDED_US= +LICENSE_ALLOS= +LICENSE_ALLOS_US= +LICENSE= # This is now the Desktop License (or Open Source) +LICENSE_US= # Also abused for GPL3 +LICENSETYPE= +MAKE_META= +MAKE_IMAGE= +DO_CLEANUP=yes + +#versioning +QT_SET_VERSION=no +QT_MAJOR_VERSION=4 +QT_MINOR_VERSION=0 +QT_PATCH_VERSION=0 +QT_VERSION_STRING=${QT_MAJOR_VERSION}.${QT_MINOR_VERSION}.${QT_PATCH_VERSION} + +# Build Date +QT_PACKAGEDATE_STRING=`date +%F` + +#QTDIR stuff +BINARY_DIR= +SOURCE_DIR= +SOURCE_PACKAGE= +EVAL_PATCHES= +CONFIGURE_ARGS="-qt-libpng -qt-libjpeg -plugin-sql-sqlite -plugin-sql-odbc -plugin-sql-psql -framework -confirm-license -no-rpath -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk -optimized-qmake" + +doStringReplace() +{ + sed -e "s,\\\$VERSION_MAJOR\\\$,$QT_MAJOR_VERSION,g" -e "s,\\\$VERSION_MINOR\\\$,$QT_MINOR_VERSION,g" \ + -e "s,\\\$VERSION_PATCH\\\$,$QT_PATCH_VERSION,g" "$1" >tmp.out + + mv -f tmp.out "$2" +} + +createLicenseRTF() +{ + rm -f "$2" + cat >>"$2" <<EOF +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Oblique;\f2\fswiss\fcharset77 Helvetica-Bold; +} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww9000\viewh9000\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural +EOF + sed -e 's,\(^[A-Z][A-Z :-]*$\),\\f2\\b \1 \\f0\\b0,g' \ + -e 's,^\(Qt COMMERCIAL\) \(LICENSE AGREEMENT\)$,\\f0\\fs24 \\cf0 \\ul \\ulc0 \1 \\ulnone \2 \\f0\\i0,g' \ + -e 's,^\([0-9]*\)\. ,\\f2\\b \1 \\f0\\b0. ,g' \ + -e 's,\(^Agreement version [0-9].[0-9]$\),\\f1\\i \1 \\f0\\i0,g' \ + -e 's,^\(.*\)$,\1\\,g' \ + "$1" >>"$2" + echo "}" >>"$2" + +} + +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|-packages|-qtbins|-qtsrcs|-qtdir|-qtpackage|-version|-license|-licensetype|-license_us|-license_allos_us|-license_allos|license_embedded_us|license_embedded|-readme|-evalpatches) #second arg style + OPTION=`echo $1 | sed 's,-\([^=]*\),\1,'` + shift + ARG=$1 + ;; + -no-*) #no style + OPTION=`echo $1 | sed 's,-no-\([^=]*\),\1,'` + ARG=no + ;; + -*) #yes style + OPTION=`echo $1 | sed 's,-\([^=]*\),\1,'` + ARG=yes + ;; + *) #other + OPTION=package + ARG="$1" + ;; + esac + shift + case "$OPTION" in + help) + if [ "$ARG" = "yes" ]; then + echo "$0 <options> <packages>" + echo + echo " -output <directory> Where to write the generated files to" + echo " -packages <directory> Where to find packages to create" + echo " -qtbins <directory> Where your Qt binaries live" + echo " -qtsrcs <directory> Where to find our Qt sources (if -qtbins not set defaults to same)" + echo " -qtpackage <package> Given a package it will be untar'd configured and built and used." + echo " -version <version> What version the package is creating for (falls back to qglobal.h)" + echo " -license <license> Where your desktop license (or opensource) file lives" + echo " -license_us <license> Where your U.S. desktop (or GPLv3) license file lives" + echo " -license_allos <license> Where your All-OS license file lives" + echo " -license_allos_us <license> Where your U.S. All-OS license file lives" + echo " -license_embedded <license> Where your Embedded license file lives" + echo " -license_embedded_us <license> Where your U.S. Embedded license file lives" + echo " -licensetype <commercial|eval|opensource|preview-commercial|preview-opensource> The license for the package you are building" + echo " -readme <readme> Where your readme file lives" + echo " -image Create a disk image of the outputs" + echo " -meta Create a meta package for all the outputs" + echo " -evalpatches <evalpatches> Eval patches can be found here" + echo " -no-cleanup Don't remove files (can be used to restart a previous run)" + exit 0 + fi + ;; + readme) README="$ARG" ;; + license) LICENSE="$ARG" ;; + licensetype) LICENSETYPE="$ARG" ;; + all) USE_SEPARATE="$ARG" ;; + qtpackage) SOURCE_PACKAGE="$ARG" ;; + qtsrcs) SOURCE_DIR="$ARG" ;; + qtbins|qtdir) BINARY_DIR="$ARG" ;; + output) OUTPUT_DIR="$ARG" ;; + packages) PACKAGE_DIR="$ARG" ;; + meta) MAKE_META="$ARG" ;; + package) PACKAGES="$PACKAGES $ARG" ;; + image) MAKE_IMAGE="$ARG" ;; + evalpatches) EVAL_PATCHES="$ARG" ;; + cleanup) DO_CLEANUP="$ARG" ;; + version) + VERSION="$ARG" + MAJOR=`echo $VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'` + if [ -n "$MAJOR" ]; then + MINOR=`echo $VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'` + [ -z "$MINOR" ] && MINOR=0 + PATCH=`echo $VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'` + [ -z "$PATCH" ] && PATCH=0 + QT_SET_VERSION=yes + QT_VERSION_STRING="$VERSION" + QT_MAJOR_VERSION="$MAJOR" + QT_MINOR_VERSION="$MINOR" + QT_PATCH_VERSION="$PATCH" + else + echo "Invalid version: $VERSION" + fi + ;; + help|*) + [ "$OPTION" = "help" ] || echo "Unknown option $CACHE_1!" + echo "Help!!" + exit 888; + ;; + esac +done + +# No license type specified, so try to get it from the package. If we don't have a package, +# default to commercial +if [ -z "$LICENSETYPE" ]; then + if [ ! -z "$SOURCE_PACKAGE" ]; then + LICENSETYPE=`basename "$SOURCE_PACKAGE" | cut -d - -f 3` + else + LICENSETYPE="commercial" + fi +fi + +# If it's a preview license strip the preview out because there are some things +# that are exactly the same to what we do in the non-preview case, since the +# "preview" variant can be a "child" of the main license, we'll call it the +# parent license. +PARENTLICENSE=$LICENSETYPE +if [ "$LICENSETYPE" = "preview-commercial" ]; then + PARENTLICENSE="commercial" +elif [ "$LICENSETYPE" = "preview-opensource" ]; then + PARENTLICENSE="opensource" +fi + +#get the QTDIR setup +[ -z "$BINARY_DIR" ] && [ -z "$SOURCE_PACKAGE" ] && BINARY_DIR="$QTDIR" +if [ ! -z "$BINARY_DIR" ] && [ -z "$SOURCE_PACKAGE" ]; then + if [ -z "$SOURCE_DIR" ]; then + if [ -e "$BINARY_DIR/.qmake.cache" ]; then + SOURCE_DIR=`perl -n -e 'next unless /^QT_SOURCE_TREE *= *(.*)/; + s/\$\$quote\((.*)\)/\1/; + print "$1\n"; exit' "$BINARY_DIR/.qmake.cache"` + else + SOURCE_DIR="$BINARY_DIR" + fi + fi +elif [ ! -z "$SOURCE_PACKAGE" ]; then + if [ "$DO_CLEANUP" = "yes" ]; then + rm -rf "$TMP_DIR/source" + mkdir -p "$TMP_DIR/source" + fi + PACKAGE_NAME=`basename "$SOURCE_PACKAGE"` + CHECKLICENSETYPE=$PARENTLICENSE + if [ "$LICENSETYPE" = "eval" ]; then + CHECKLICENSETYPE="commercial" + fi + + if [ -z `echo $PACKAGE_NAME | grep $CHECKLICENSETYPE` ]; then + echo "I must have the $CHECKLICENSETYPE package, you gave me $SOURCE_PACKAGE" + rm -rf "$TMP_DIR" + exit 7 + fi + EXTENSION=`echo "$PACKAGE_NAME" | sed -e 's,.*\.tar\.\(.*\),\1,'` + PACKAGE_DEST=`echo "$PACKAGE_NAME" | sed -e 's,\(.*\)\.tar.*,\1,'` + if [ "$LICENSETYPE" = "eval" ]; then + CONFIGURE_ARGS="$CONFIGURE_ARGS -DQT_EVAL -release" + # If you didn't set the eval patches, I'll try in the same place as the package + if [ -z "$EVAL_PATCHES" ]; then + PACKAGE_VERSION=`echo $PACKAGE_DEST | sed -e 's,.*src-\(.*\),\1,'` + EVAL_PATCHES=`dirname "$SOURCE_PACKAGE"`/qt-mac-evalpatches-src-$PACKAGE_VERSION.tar.$EXTENSION + fi + # unzip the eval patches first since it _shouldn't_ matter. + (cd "$TMP_DIR/source" && gunzip -c "$EVAL_PATCHES" | tar xf -); + fi + + export QTDIR=$TMP_DIR/source/$PACKAGE_DEST + export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH + export DYLD_FRAMEWORK_PATH=$QTDIR/lib:$DYLD_FRAMEWORK_PATH + export PATH=$QTDIR/bin:$PATH + if [ "$DO_CLEANUP" = "yes" ]; then + if (cd "$TMP_DIR/source" && gunzip -c "$SOURCE_PACKAGE" | tar xf -); then + realUsageReporter="$QTDIR/bin/qtusagereporter" + tmpUsageReporter="$TMP_DIR/qtusagereporter" + if [ -e "$realUsageReporter" ]; then + cp "$realUsageReporter" "$tmpUsageReporter" + fi + if (cd "$QTDIR" && ./configure $CONFIGURE_ARGS); then + if [ -e "$tmpUsageReporter" ]; then + mv "$tmpUsageReporter" "$realUsageReporter" + fi + else + echo "Configure error" + exit 1 + fi + if !(cd "$QTDIR" && make); then + echo "Build error" + exit 2 + fi + fi + fi + SOURCE_DIR="$QTDIR" + BINARY_DIR="$SOURCE_DIR" +else + echo "Only a source package or a source/binary directory can be specified!" + exit 3 +fi + + +#License Stuff. + +if [ "$LICENSETYPE" = "eval" ]; then + if [ -z "$LICENSE" ]; then + DEPOT_LICENSE="$SOURCE_DIR/dist/eval/LICENSE-EVALUATION" + PACKAGE_LICENSE="$SOURCE_DIR/.LICENSE-EVALUATION" + if [ -e "$DEPOT_LICENSE" ]; then + LICENSE=$DEPOT_LICENSE + elif [ -e "$PACKAGE_LICENSE" ]; then + LICENSE="$PACKAGE_LICENSE" + fi + fi + + if [ -z "$LICENSE_US" ]; then + DEPOT_LICENSE_US="$SOURCE_DIR/dist/eval/LICENSE-EVALUATION-US" + PACKAGE_LICENSE_US="$SOURCE_DIR/.LICENSE-EVALUATION-US" + if [ -e "$DEPOT_LICENSE_US" ]; then + LICENSE_US=$DEPOT_LICENSE_US + elif [ -e "$PACKAGE_LICENSE_US" ]; then + LICENSE_US="$PACKAGE_LICENSE_US" + fi + fi +elif [ "$LICENSETYPE" = "opensource" ]; then + DEPOT_LICENSE="$SOURCE_DIR/dist/opensource/LICENSE.GPL2" + PACKAGE_LICENSE="$SOURCE_DIR/LICENSE.GPL2" + if [ -e "$DEPOT_LICENSE" ]; then + LICENSE=$DEPOT_LICENSE + elif [ -e "$PACKAGE_LICENSE" ]; then + LICENSE="$PACKAGE_LICENSE" + fi + + if [ -z "$LICENSE_US" ]; then + DEPOT_LICENSE_US="$SOURCE_DIR/dist/opensource/LICENSE.GPL3" + PACKAGE_LICENSE_US="$SOURCE_DIR/LICENSE.GPL3" + if [ -e "$DEPOT_LICENSE_US" ]; then + LICENSE_US=$DEPOT_LICENSE_US + elif [ -e "$PACKAGE_LICENSE_US" ]; then + LICENSE_US="$PACKAGE_LICENSE_US" + elif [ -e "../../../../dist/opensource/LICENSE.GPL3" ]; then + LICENSE_US="../../../../dist/opensource/LICENSE.GPL3" + fi + fi +elif [ "$LICENSETYPE" = "commercial" ]; then +#Find the All-OS and Embedded License for commercial + LICENSE="$SOURCE_DIR/.LICENSE" + if [ -e "$LICENSE" ]; then + # Generic license + LICENSE_US="${LICENSE}-US" + LICENSE_ALLOS= + LICENSE_ALLOS_US= + LICENSE_EMBEDDED= + LICENSE_EMBEDDED_US= + else + DEPOT_LICENSE="$SOURCE_DIR/dist/commercial/LICENSE-DESKTOP" + PACKAGE_LICENSE="$SOURCE_DIR/.LICENSE-DESKTOP" + if [ -e "$DEPOT_LICENSE" ]; then + LICENSE=$DEPOT_LICENSE + elif [ -e "$PACKAGE_LICENSE" ]; then + LICENSE="$PACKAGE_LICENSE" + fi + + if [ -z "$LICENSE_US" ]; then + DEPOT_LICENSE_US="$SOURCE_DIR/dist/commercial/LICENSE-DESKTOP-US" + PACKAGE_LICENSE_US="$SOURCE_DIR/.LICENSE-DESKTOP-US" + if [ -e "$DEPOT_LICENSE_US" ]; then + LICENSE_US=$DEPOT_LICENSE_US + elif [ -e "$PACKAGE_LICENSE_US" ]; then + LICENSE_US="$PACKAGE_LICENSE_US" + elif [ -e "../../../../dist/commercial/LICENSE-US" ]; then + LICENSE_US="../../../../dist/commercial/LICENSE-US" + fi + fi + if [ -z "$LICENSE_ALLOS" ]; then + DEPOT_LICENSE_ALLOS="$SOURCE_DIR/dist/commercial/LICENSE-ALLOS" + PACKAGE_LICENSE_ALLOS="$SOURCE_DIR/.LICENSE-ALLOS" + if [ -e "$DEPOT_LICENSE_ALLOS" ]; then + LICENSE_ALLOS=$DEPOT_LICENSE_ALLOS + elif [ -e "$PACKAGE_LICENSE_ALLOS" ]; then + LICENSE_ALLOS="$PACKAGE_LICENSE_ALLOS" + fi + fi + if [ -z "$LICENSE_ALLOS_US" ]; then + DEPOT_LICENSE_ALLOS_US="$SOURCE_DIR/dist/commercial/LICENSE-ALLOS-US" + PACKAGE_LICENSE_ALLOS_US="$SOURCE_DIR/.LICENSE-ALLOS-US" + if [ -e "$DEPOT_LICENSE_ALLOS_US" ]; then + LICENSE_ALLOS_US=$DEPOT_LICENSE_ALLOS_US + elif [ -e "$PACKAGE_LICENSE_ALLOS_US" ]; then + LICENSE_ALLOS_US="$PACKAGE_LICENSE_ALLOS_US" + fi + fi + if [ -z "$LICENSE_EMBEDDED" ]; then + DEPOT_LICENSE_EMBEDDED="$SOURCE_DIR/dist/commercial/LICENSE-EMBEDDED" + PACKAGE_LICENSE_EMBEDDED="$SOURCE_DIR/.LICENSE-EMBEDDED" + if [ -e "$DEPOT_LICENSE_EMBEDDED" ]; then + LICENSE_EMBEDDED=$DEPOT_LICENSE_EMBEDDED + elif [ -e "$PACKAGE_LICENSE_EMBEDDED" ]; then + LICENSE_EMBEDDED="$PACKAGE_LICENSE_EMBEDDED" + fi + fi + if [ -z "$LICENSE_EMBEDDED_US" ]; then + DEPOT_LICENSE_EMBEDDED_US="$SOURCE_DIR/dist/commercial/LICENSE-EMBEDDED-US" + PACKAGE_LICENSE_EMBEDDED_US="$SOURCE_DIR/.LICENSE-EMBEDDED-US" + if [ -e "$DEPOT_LICENSE_EMBEDDED_US" ]; then + LICENSE_EMBEDDED_US=$DEPOT_LICENSE_EMBEDDED_US + elif [ -e "$PACKAGE_LICENSE_EMBEDDED_US" ]; then + LICENSE_EMBEDDED_US="$PACKAGE_LICENSE_EMBEDDED_US" + fi + fi + fi +fi + +#find the README +if [ -z "$README" ]; then + DEPOT_README="$SOURCE_DIR/dist/README" + PACKAGE_README="$SOURCE_DIR/README" + if [ -e "$DEPOT_README" ]; then + README="$DEPOT_README" + elif [ -e "$PACKAGE_README" ]; then + README="$PACKAGE_README" + elif [ -e "../../../../dist/README" ]; then + README="../../../../dist/README" + fi +fi + +#find the version from the source package +if [ "$QT_SET_VERSION" = "no" ] && [ ! -z "$SOURCE_DIR" ]; then + VERSION=`grep '^# *define *QT_VERSION_STR' $SOURCE_DIR/src/corelib/global/qglobal.h` + if [ -n "$VERSION" ]; then + VERSION=`echo $VERSION | sed 's,^# *define *QT_VERSION_STR "*\([^ ]*\)"$,\1,'` + MAJOR=`echo $VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'` + if [ -n "$MAJOR" ]; then + MINOR=`echo $VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'` + [ -z "$MINOR" ] && MINOR=0 + PATCH=`echo $VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'` + [ -z "$PATCH" ] && PATCH=0 + QT_VERSION_STRING="$VERSION" + QT_MAJOR_VERSION="$MAJOR" + QT_MINOR_VERSION="$MINOR" + QT_PATCH_VERSION="$PATCH" + else + echo "Cannot process version from qglobal.h: $VERSION" + fi + fi +fi + +if [ "$LICENSETYPE" != "opensource" ]; then + if [ ! -z "$SOURCE_DIR" ]; then + PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' $SOURCE_DIR/src/corelib/global/qglobal.h` + if [ -n "$PACKAGEDATE" ]; then + PACKAGEDATE=`echo $PACKAGEDATE | sed 's,^# *define *QT_PACKAGEDATE_STR "*\([^ ]*\)"$,\1,'` + QT_PACKAGEDATE_STRING=$PACKAGEDATE + else + echo "Cannot process date information from qglobal.h: $PACKAGEDATE" + fi + fi +fi + +# Put the date in a little file so we can access in later +PACKAGEDATE_FILE="Resources/.package_date" +if [ -e "$PACKAGEDATE_FILE" ]; then + rm -rf "$PACKAGEDATE_FILE" +fi + +echo $QT_PACKAGEDATE_STRING > $PACKAGEDATE_FILE + +#just do all the packages +if [ -z "$PACKAGES" ]; then + [ -z "$MAKE_META" ] && MAKE_META=yes + [ -z "$MAKE_IMAGE" ] && MAKE_IMAGE=yes + for a in $PACKAGE_DIR/*; do + if [ -d "$a" ]; then + package=`basename $a` + [ "$USE_SEPARATE" = "no" ] && [ -e "$a/.build_separate" ] && continue + PACKAGES="$PACKAGES $package" + fi + done +fi + +#setup some default package options +[ -z "$SOURCE_PACKAGE" ] || PACKAGE_OPTIONS="$PACKAGE_OPTIONS --qtpackage=${SOURCE_PACKAGE}" +[ -z "$SOURCE_DIR" ] || PACKAGE_OPTIONS="$PACKAGE_OPTIONS --qtsrc=${SOURCE_DIR}" +[ -z "$BINARY_DIR" ] || PACKAGE_OPTIONS="$PACKAGE_OPTIONS --qtbin=${BINARY_DIR}" +PACKAGE_OPTIONS="$PACKAGE_OPTIONS --debug=yes" + +mkdir -p "$TMP_DIR" +find .. -name '*~' -exec rm {} \; #just get rid of these before they end up in my package + +#create the license information +if [ -e "$LICENSE" ]; then + mkdir -p "$TMP_DIR/licenses" + + echo "Creating desktop license richtext for rest of the world" + createLicenseRTF "$LICENSE" "$TMP_DIR/licenses/License.rtf" +else + echo "No license file found!" + exit 4 +fi + +if [ -e "$LICENSE_US" ]; then + echo "Creating desktop license richtext for U.S. (GPL3 for opensource)" + createLicenseRTF "$LICENSE_US" "$TMP_DIR/licenses/License-US.rtf" +else + echo "No U.S. (GPL3 for opensource) license file found!" + exit 5 +fi + +if [ "$LICENSETYPE" = "commercial" ] && [ -n "$LICENSE_ALLOS" ]; then + if [ -e "$LICENSE_ALLOS" ]; then + mkdir -p "$TMP_DIR/licenses" + + echo "Creating all OS license richtext for rest of the world" + createLicenseRTF "$LICENSE_ALLOS" "$TMP_DIR/licenses/License-AllOS.rtf" + else + echo "No all OS license file found!" + exit 6 + fi + + if [ -e "$LICENSE_ALLOS_US" ]; then + echo "Creating desktop license richtext for U.S. (GPL3 for opensource)" + createLicenseRTF "$LICENSE_ALLOS_US" "$TMP_DIR/licenses/License-AllOS-US.rtf" + else + echo "No U.S. all OS license file found!" + exit 7 + fi + + if [ -e "$LICENSE_EMBEDDED" ]; then + mkdir -p "$TMP_DIR/licenses" + + echo "Creating embedded license richtext for rest of the world" + createLicenseRTF "$LICENSE_EMBEDDED" "$TMP_DIR/licenses/License-Embedded.rtf" + else + echo "No embedded license file found!" + exit 8 + fi + + if [ -e "$LICENSE_EMBEDDED_US" ]; then + echo "Creating embedded license richtext for U.S. (GPL3 for opensource)" + createLicenseRTF "$LICENSE_EMBEDDED_US" "$TMP_DIR/licenses/License-Embedded-US.rtf" + else + echo "No U.S. embedded license file found!" + exit 9 + fi +fi + +# Build our license checking plugin! +if [ "$PARENTLICENSE" = "commercial" ] || [ "$PARENTLICENSE" = "eval" ]; then + # build the InstallerPane plugin + INSTALLERPANE_PATH=InstallerPane + INSTALLERPANE_CONFIGURATION="Release-$PARENTLICENSE" + INSTALLERPANE_BUILDPARAMS="-project ""$INSTALLERPANE_PATH/InstallerPane.xcodeproj"" -configuration ""$INSTALLERPANE_CONFIGURATION" + + echo "/usr/bin/xcodebuild $INSTALLERPANE_BUILDPARAMS" + if !(/usr/bin/xcodebuild $INSTALLERPANE_BUILDPARAMS || grep '** BUILD SUCCEEDED **'); then + echo "Could not build installer pane plugin" + exit 100; + fi + + # Create the key decoder for the script version + BUILD_LINE="keydecoder/main.cpp $INSTALLERPANE_PATH/keydec.cpp -o Resources/keydecoder -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + /usr/bin/g++-4.0 $BUILD_LINE +fi + +#create the packages +PKG_CREATED= +for package in $PACKAGES; do + if [ "$LICENSETYPE" = "eval" ] && [ "$package" = "debuglibraries" ]; then + continue + fi + + [ "$package" = "none" ] && continue + if [ ! -e "$PACKAGE_DIR/$package/Info.plist" ]; then + echo "$package is not a valid package!!" + continue + fi + rm -rf "$TMP_DIR/package" #cleanup + + #create files + echo "Creating package [$package]..." + mkdir -p "$TMP_DIR/package" + if [ -x "$PACKAGE_DIR/$package/create_package.sh" ]; then + if (cd $PACKAGE_DIR/$package/ && VERSION_MAJOR="$QT_MAJOR_VERSION" VERSION_MINOR="$QT_MINOR_VERSION" VERSION_STRING="$QT_VERSION_STRING" VERSION_PATCH="$QT_PATCH_VERSION" "$PACKAGE_DIR/$package/create_package.sh" $PACKAGE_OPTIONS --outdir="$TMP_DIR/package"); then + true + # Copy the uninstall script in for all of the packages + mkdir -p "$TMP_DIR/package/Developer/Tools" + cp "uninstall-qt.py" "$TMP_DIR/package/Developer/Tools" + else + echo " Package failed" + continue + fi + fi + + #create .pkg + package_dir="$OUTPUT_DIR/packages/Qt_${package}.pkg" + rm -rf "$package_dir" + mkdir -p "$package_dir" + echo " Creating installation.. ($package_dir)" + doStringReplace "$PACKAGE_DIR/$package/Info.plist" "$TMP_DIR/Info.plist" + if !(/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker --root "$TMP_DIR/package" --out "$package_dir" --info "$TMP_DIR/Info.plist" --filter '\.DS_Store' -v); then + echo " Error creating package ($package_dir)" + continue + fi + + sed '/IFPkgPathMappings/,${/[[:space:]]/d;}' $package_dir/Contents/Info.plist > cleaned + mv cleaned $package_dir/Contents/Info.plist + + rm -rf "$TMP_DIR/Info.plist" + rm -rf $package_dir/Contents/Resources/*.lproj + #merge resources + cp -R Resources/* "$package_dir/Contents/Resources" + cp -R "$PACKAGEDATE_FILE" "$package_dir/Contents/Resources" + cp -R $PACKAGE_DIR/$package/Resources/* "$package_dir/Contents/Resources" + cp "Welcome-$PARENTLICENSE.rtf" "$package_dir/Contents/Resources/Welcome.rtf" + cp "$README" "$package_dir/Contents/Resources/ReadMe.txt" + if [ -n "$LICENSE_ALLOS" ] && [ "$PARENTLICENSE" = "commercial" ] || [ "$PARENTLICENSE" = "eval" ]; then + # Release licenses + for lang in "Desktop North and South America" "Desktop rest of the world" "All OS North and South America" "All OS rest of the World" "Embedded North and South America" "Embedded rest of the world"; do + LOCALDIR="$package_dir/Contents/Resources/${lang}.lproj" + if [ "$lang" = "Desktop North and South America" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-US.rtf" + elif [ "$lang" = "All OS North and South America" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-AllOS.rtf" + elif [ "$lang" = "Embedded North and South America" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-Embedded.rtf" + elif [ "$lang" = "All OS rest of the world" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-AllOS.rtf" + elif [ "$lang" = "Embedded rest of the world" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-Embedded.rtf" + else + LOCALLICENSE="$TMP_DIR/licenses/License.rtf" + fi + + if [ -e "$LOCALLICENSE" ]; then + mkdir -p "$LOCALDIR" + cp "$LOCALLICENSE" "$LOCALDIR/License.rtf" + fi + done + elif [ "$PARENTLICENSE" = "commercial" ]; then + # Non-release license + for lang in "North and South America" "Rest of the world"; do + LOCALDIR="$package_dir/Contents/Resources/${lang}.lproj" + mkdir -p "$LOCALDIR" + if [ "$lang" = "North and South America" ]; then + cp "$TMP_DIR/licenses/License-US.rtf" "$LOCALDIR/License.rtf" + else + cp "$TMP_DIR/licenses/License.rtf" "$LOCALDIR" + fi + done + elif [ "$PARENTLICENSE" = "opensource" ]; then + for lang in "GNU Lesser General Public License Version 2.1" "GNU General Public License Version 3"; do + LOCALDIR="$package_dir/Contents/Resources/${lang}.lproj" + mkdir -p "$LOCALDIR" + if [ "$lang" = "GNU General Public License Version 3" ]; then + cp "$TMP_DIR/licenses/License-US.rtf" "$LOCALDIR/License.rtf" + else + cp "$TMP_DIR/licenses/License.rtf" "$LOCALDIR" + fi + done + rm -f "$package_dir/Contents/Resources/InstallationCheck" + rm -f "$package_dir/Contents/Resources/InstallationCheck.strings" + cp opensourceStuff/InstallationCheck "$package_dir/Contents/Resources" + cp opensourceStuff/InstallationCheck.strings "$package_dir/Contents/Resources" + if [ "$package" = "libraries" ] || [ "$package" = "tools" ] || [ "$package" = "headers" ] || [ "$package" = "debuglibraries" ]; then + rm -f "$package_dir/Contents/Resources/postflight" + fi + + fi + for a in $package_dir/Contents/Resources/*.plist $package_dir/Contents/Resources/*.info $package_dir/Contents/Resources/*flight $package_dir/Contents/Resources/*.rtf; do + [ -e "$a" ] && doStringReplace "$a" "$a" + done + if [ -e "$package_dir/Contents/Resources/$package.info" ]; then + cp "$package_dir/Contents/Resources/$package.info" "$package_dir/Contents/Resources/Qt_${package}.info" + fi + for a in $package_dir/Contents/Resources/*flight; do + [ -e "$a" ] && chmod a+x $a #exe + done + for a in $package_dir/Contents/Resources/*Check; do + if [ -e "$a" ]; then + chmod a+x "$a" + if false && [ -e "${a}.strings" ]; then + for lang in English Norwegian French German Spanish; do + LOCALDIR="$package_dir/Contents/Resources/${lang}.lproj" + mkdir -p "$LOCALDIR" + cp "${a}.strings" "$LOCALDIR" + done + #rm -f "${a}.strings" + fi + fi + done + if [ "$PARENTLICENSE" = "commercial" ] || [ "$PARENTLICENSE" = "eval" ]; then + # Copy over the plugin + plugin_dir="$package_dir/Contents/Plugins" + mkdir "$plugin_dir" + cp -r "$INSTALLERPANE_PATH/build/$INSTALLERPANE_CONFIGURATION/InstallerPane.bundle" "$plugin_dir" + cp "$INSTALLERPANE_PATH/InstallerSections.plist" "$plugin_dir" + + fi + + if [ "$package" != "debuglibraries" ]; then + PKG_CREATED="$PKG_CREATED $package_dir" + fi +done +if [ -z "$PKG_CREATED" ] && [ "$PACKAGES" = " none" ]; then + if [ "$MAKE_META" = "yes" ] || [ "$MAKE_IMAGE" = "yes" ]; then + PKG_CREATED=$OUTPUT_DIR/packages/*.pkg + [ -z "$MAKE_META" ] && MAKE_META=yes + fi +fi + +#create meta package +if [ "$MAKE_META" = "yes" ]; then + echo "Creating meta package.." + rm -rf "$OUTPUT_DIR/Qt.mpkg/" + mkdir -p "$OUTPUT_DIR/Qt.mpkg/" + cp -R "MetaPackage" "$OUTPUT_DIR/Qt.mpkg/Contents" + + if [ "$PARENTLICENSE" = "commercial" ] || [ "$PARENTLICENSE" = "eval" ]; then + # Copy over the plugin + plugin_dir="$OUTPUT_DIR/Qt.mpkg/Contents/Plugins" + mkdir -p "$plugin_dir" + cp -r "$INSTALLERPANE_PATH/build/$INSTALLERPANE_CONFIGURATION/InstallerPane.bundle" "$plugin_dir" + cp "$INSTALLERPANE_PATH/InstallerSections.plist" "$plugin_dir" + fi + + mkdir -p "$OUTPUT_DIR/Qt.mpkg/Contents/Resources" + cp -R Resources/* "$OUTPUT_DIR/Qt.mpkg/Contents/Resources" + cp -R "$PACKAGEDATE_FILE" "$OUTPUT_DIR/Qt.mpkg/Contents/Resources" + cp "Welcome-${PARENTLICENSE}.rtf" "$OUTPUT_DIR/Qt.mpkg/Contents/Resources/Welcome.rtf" + cp "$README" "$OUTPUT_DIR/Qt.mpkg/Contents/Resources/ReadMe.txt" + if [ -n "$LICENSE_ALLOS" ] && [ "$PARENTLICENSE" = "commercial" ] || [ "$PARENTLICENSE" = "eval" ]; then + # Release licenses + for lang in "Desktop North and South America" "Desktop rest of the world" "All OS North and South America" "All OS rest of the World" "Embedded North and South America" "Embedded rest of the world"; do + LOCALDIR="$OUTPUT_DIR/Qt.mpkg/Contents/Resources/${lang}.lproj" + if [ "$lang" = "Desktop North and South America" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-US.rtf" + elif [ "$lang" = "All OS North and South America" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-AllOS.rtf" + elif [ "$lang" = "Embedded North and South America" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-Embedded.rtf" + elif [ "$lang" = "All OS rest of the world" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-AllOS.rtf" + elif [ "$lang" = "Embedded rest of the world" ]; then + LOCALLICENSE="$TMP_DIR/licenses/License-Embedded.rtf" + else + LOCALLICENSE="$TMP_DIR/licenses/License.rtf" + fi + + if [ -e "$LOCALLICENSE" ]; then + mkdir -p "$LOCALDIR" + cp "$LOCALLICENSE" "$LOCALDIR/License.rtf" + fi + done + elif [ "$PARENTLICENSE" = "commercial" ]; then + # Non-release license + for lang in "North and South America" "Rest of the world"; do + LOCALDIR="$OUTPUT_DIR/Qt.mpkg/Contents/Resources/${lang}.lproj" + mkdir -p "$LOCALDIR" + if [ "$lang" = "North and South America" ]; then + cp "$TMP_DIR/licenses/License-US.rtf" "$LOCALDIR/License.rtf" + else + cp "$TMP_DIR/licenses/License.rtf" "$LOCALDIR" + fi + done + elif [ "$PARENTLICENSE" = "opensource" ]; then + for lang in "GNU General Public License Version 2" "GNU General Public License Version 3"; do + LOCALDIR="$OUTPUT_DIR/Qt.mpkg/Contents/Resources/${lang}.lproj" + mkdir -p "$LOCALDIR" + if [ "$lang" = "GNU General Public License Version 3" ]; then + cp "$TMP_DIR/licenses/License-US.rtf" "$LOCALDIR/License.rtf" + else + cp "$TMP_DIR/licenses/License.rtf" "$LOCALDIR" + fi + done + rm -f "$OUTPUT_DIR/Qt.mpkg/Contents/Resources/InstallationCheck" + rm -f "$OUTPUT_DIR/Qt.mpkg/Contents/Resources/InstallationCheck.strings" + cp opensourceStuff/InstallationCheck "$OUTPUT_DIR/Qt.mpkg/Contents/Resources" + cp opensourceStuff/InstallationCheck.strings "$OUTPUT_DIR/Qt.mpkg/Contents/Resources" + fi + for a in $OUTPUT_DIR/Qt.mpkg/Contents/*.plist $OUTPUT_DIR/Qt.mpkg/Contents/Resources/*.info $OUTPUT_DIR/Qt.mpkg/Contents/Resources/*.plist $OUTPUT_DIR/Qt.mpkg/Contents/Resources/*.rtf; do + doStringReplace "$a" "$a" + done + for a in $OUTPUT_DIR/Qt.mpkg/Contents/Resources/*Check; do + if [ -e "$a" ]; then + chmod a+x "$a" + if false && [ -e "${a}.strings" ]; then + for lang in English Norwegian French German Spanish; do + LOCALDIR="$OUTPUT_DIR/Qt.mpkg/Contents/Resources/${lang}.lproj" + mkdir -p "$LOCALDIR" + cp "${a}.strings" "$LOCALDIR" + done + #rm -f "${a}.strings" + fi + fi + done + + PACKAGE_DICT="$TMP_DIR/pkg.dict" + >"$PACKAGE_DICT" + for package in $PKG_CREATED; do + package_name=`basename $package` + package_type=selected + if [ "$package_name" = "Qt_libraries.pkg" ] || [ "$package_name" = "Qt_tools.pkg" ]; then + package_type=required + fi + cat >"${PACKAGE_DICT}.tmp" <<EOF + <dict> + <key>IFPkgFlagPackageLocation</key> + <string>${package_name}</string> + <key>IFPkgFlagPackageSelection</key> + <string>${package_type}</string> + </dict> +EOF + if [ "$package_type" = "required" ]; then + cat "${PACKAGE_DICT}.tmp" "$PACKAGE_DICT" >"$TMP_DIR/dict.combined" + mv "$TMP_DIR/dict.combined" "$PACKAGE_DICT" + else + cat "${PACKAGE_DICT}.tmp" >>"$PACKAGE_DICT" + fi + rm -f "${PACKAGE_DICT}.tmp" + done + sed "/PACKAGE_DICT/r $PACKAGE_DICT" "$OUTPUT_DIR/Qt.mpkg/Contents/Info.plist" >"${TMP_DIR}/Info.plist" + chflags nouchg "$OUTPUT_DIR/Qt.mpkg/Contents/Info.plist" + rm -f "$OUTPUT_DIR/Qt.mpkg/Contents/Info.plist" + cp "${TMP_DIR}/Info.plist" "$OUTPUT_DIR/Qt.mpkg/Contents/Info.plist" + rm -f "${TMP_DIR}/Info.plist" + + PKG_CREATED="$PKG_CREATED $OUTPUT_DIR/Qt.mpkg" +fi + +#create disk image +if [ "$MAKE_IMAGE" = "yes" ] && [ ! -z "$PKG_CREATED" ]; then + echo "Creating disk image..." + IMAGE_NAME="Qt ${QT_VERSION_STRING}" + IMAGE="$OUTPUT_DIR/qt-mac-${PARENTLICENSE}-${QT_VERSION_STRING}.dmg" + TMPIMAGE="$OUTPUT_DIR/qt-mac-${PARENTLICENSE}-${QT_VERSION_STRING}-RW.dmg" + rm -f "$IMAGE" #remove old + + #copy + echo " Copying..." + DISKIMAGE="$TMP_DIR/diskimage" + mkdir -p "$DISKIMAGE/.background" + cp "backgrounds/DiskImage-${PARENTLICENSE}.png" "$DISKIMAGE/.background/findersbackground.png" + cp model-DS_Store-${QT_VERSION_STRING} "$DISKIMAGE/.DS_Store" + chmod 755 "$DISKIMAGE/.DS_Store" + cp "backgrounds/DriveIcon.icns" "$DISKIMAGE/.VolumeIcon.icns" + + for package in $PKG_CREATED; do + [ -z "$package" ] && continue + OUT_PACKAGE=`echo $package | sed "s,^$OUTPUT_DIR,$DISKIMAGE/,"` + mkdir -p "`dirname "$OUT_PACKAGE"`" + cp -R "$package" "$OUT_PACKAGE" + done + [ -e "$README" ] && cp "$README" "$DISKIMAGE/ReadMe.txt" + + echo -n " Creating Image..." + hdiutil create -format UDRW -volname "$IMAGE_NAME" -srcfolder "$DISKIMAGE" "$TMPIMAGE" | grep -v ^created: + mountpoint=`hdiutil attach "$TMPIMAGE" | grep '/Volumes' | cut -f 3` + /Developer/Tools/SetFile -a C "$mountpoint" + hdiutil detach "$mountpoint" + hdiutil convert "$TMPIMAGE" -format UDZO -o "$IMAGE" -imagekey zlib-level=9 | grep -v ^created: + rm "$TMPIMAGE" + echo " done!" +fi + +# Create the disk image for the debug libraries too +if [ "$MAKE_IMAGE" = "yes" ] && [ "$PARENTLICENSE" != "eval" ]; then + echo "Creating the debug libraries disk image..." + IMAGE_NAME="Qt ${QT_VERSION_STRING} Debug Libraries" + IMAGE="$OUTPUT_DIR/qt-mac-${PARENTLICENSE}-${QT_VERSION_STRING}-debug-libs.dmg" + DISKIMAGE="$TMP_DIR/diskimage" + + #remove the old stuff + rm -f "$IMAGE" + rm -rf "$DISKIMAGE" + mkdir -p "$DISKIMAGE" + cp -R "$OUTPUT_DIR/packages/Qt_debuglibraries.pkg" "$DISKIMAGE" + hdiutil create -srcfolder "$DISKIMAGE" -o "$IMAGE" -volname "$IMAGE_NAME" -imagekey zlib-level=9 + echo " done!" +fi + + +#cleanup +if [ "$DO_CLEANUP" = "yes" ]; then + rm -rf "$TMP_DIR" +fi +echo "Done!" diff --git a/util/scripts/mac-binary/package/model-DS_Store b/util/scripts/mac-binary/package/model-DS_Store Binary files differnew file mode 100644 index 0000000..c9ffdf2 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.0.0 b/util/scripts/mac-binary/package/model-DS_Store-4.0.0 Binary files differnew file mode 100755 index 0000000..2b78907 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.0.0 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.0.1 b/util/scripts/mac-binary/package/model-DS_Store-4.0.1 Binary files differnew file mode 100644 index 0000000..8d6cf56 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.0.1 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.1.0 b/util/scripts/mac-binary/package/model-DS_Store-4.1.0 Binary files differnew file mode 100644 index 0000000..1ca8894 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.1.0 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.1.1 b/util/scripts/mac-binary/package/model-DS_Store-4.1.1 Binary files differnew file mode 100644 index 0000000..e470afb --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.1.1 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.1.2 b/util/scripts/mac-binary/package/model-DS_Store-4.1.2 Binary files differnew file mode 100644 index 0000000..b40119e --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.1.2 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.1.3 b/util/scripts/mac-binary/package/model-DS_Store-4.1.3 Binary files differnew file mode 100644 index 0000000..baa4439 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.1.3 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.1.4 b/util/scripts/mac-binary/package/model-DS_Store-4.1.4 Binary files differnew file mode 100644 index 0000000..63b76b0 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.1.4 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.1.5 b/util/scripts/mac-binary/package/model-DS_Store-4.1.5 Binary files differnew file mode 100644 index 0000000..bc5d42f --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.1.5 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.1.6 b/util/scripts/mac-binary/package/model-DS_Store-4.1.6 Binary files differnew file mode 100644 index 0000000..7102dfa --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.1.6 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.2.0 b/util/scripts/mac-binary/package/model-DS_Store-4.2.0 Binary files differnew file mode 100644 index 0000000..8cd1ef7 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.2.0 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.2.0-rc1 b/util/scripts/mac-binary/package/model-DS_Store-4.2.0-rc1 Binary files differnew file mode 100644 index 0000000..eb7b463 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.2.0-rc1 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.2.1 b/util/scripts/mac-binary/package/model-DS_Store-4.2.1 Binary files differnew file mode 100644 index 0000000..32ce427 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.2.1 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.2.2 b/util/scripts/mac-binary/package/model-DS_Store-4.2.2 Binary files differnew file mode 100644 index 0000000..711c8a1 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.2.2 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.2.3 b/util/scripts/mac-binary/package/model-DS_Store-4.2.3 Binary files differnew file mode 100644 index 0000000..d7f36f6 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.2.3 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.2.4 b/util/scripts/mac-binary/package/model-DS_Store-4.2.4 Binary files differnew file mode 100644 index 0000000..29bc0da --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.2.4 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.2.5 b/util/scripts/mac-binary/package/model-DS_Store-4.2.5 Binary files differnew file mode 100644 index 0000000..3e261a1 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.2.5 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.3.0 b/util/scripts/mac-binary/package/model-DS_Store-4.3.0 Binary files differnew file mode 100644 index 0000000..9bb3bf2 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.3.0 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.3.1 b/util/scripts/mac-binary/package/model-DS_Store-4.3.1 Binary files differnew file mode 100644 index 0000000..1a9e331 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.3.1 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.3.2 b/util/scripts/mac-binary/package/model-DS_Store-4.3.2 Binary files differnew file mode 100644 index 0000000..17e267c --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.3.2 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.3.3 b/util/scripts/mac-binary/package/model-DS_Store-4.3.3 Binary files differnew file mode 100644 index 0000000..ded1369 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.3.3 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.3.4 b/util/scripts/mac-binary/package/model-DS_Store-4.3.4 Binary files differnew file mode 100644 index 0000000..15e0d99 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.3.4 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.3.5 b/util/scripts/mac-binary/package/model-DS_Store-4.3.5 Binary files differnew file mode 100644 index 0000000..6ac254a --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.3.5 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.4.0 b/util/scripts/mac-binary/package/model-DS_Store-4.4.0 Binary files differnew file mode 100644 index 0000000..fee7663 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.4.0 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.4.0-rc1 b/util/scripts/mac-binary/package/model-DS_Store-4.4.0-rc1 Binary files differnew file mode 100644 index 0000000..367faae --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.4.0-rc1 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.4.1 b/util/scripts/mac-binary/package/model-DS_Store-4.4.1 Binary files differnew file mode 100644 index 0000000..b891927 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.4.1 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.4.2 b/util/scripts/mac-binary/package/model-DS_Store-4.4.2 Binary files differnew file mode 100644 index 0000000..c781394 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.4.2 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.4.3 b/util/scripts/mac-binary/package/model-DS_Store-4.4.3 Binary files differnew file mode 100644 index 0000000..c326d4a --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.4.3 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.4.4 b/util/scripts/mac-binary/package/model-DS_Store-4.4.4 Binary files differnew file mode 100644 index 0000000..5145329 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.4.4 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.4.5 b/util/scripts/mac-binary/package/model-DS_Store-4.4.5 Binary files differnew file mode 100644 index 0000000..22eeb4e --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.4.5 diff --git a/util/scripts/mac-binary/package/model-DS_Store-4.5.0 b/util/scripts/mac-binary/package/model-DS_Store-4.5.0 Binary files differnew file mode 100644 index 0000000..4ac1714 --- /dev/null +++ b/util/scripts/mac-binary/package/model-DS_Store-4.5.0 diff --git a/util/scripts/mac-binary/package/opensourceStuff/InstallationCheck b/util/scripts/mac-binary/package/opensourceStuff/InstallationCheck new file mode 100755 index 0000000..f1cd8ad --- /dev/null +++ b/util/scripts/mac-binary/package/opensourceStuff/InstallationCheck @@ -0,0 +1,15 @@ +#!/bin/sh + +# We need to do things differently on different platforms +# <10.3.9 Can't install +# =10.3.9 Can install, but must check license manually +# >=10.4 Just jump out + +os_version=`sysctl kern.osrelease | awk '{ print $3 }'` +os_major=`echo $os_version | cut -d . -f 1` +os_minor=`echo $os_version | cut -d . -f 2` + +if [ $os_major -lt 7 -o $os_major -eq 7 -a $os_minor -lt 9 ]; then + exit $((96+19)) +fi +exit 0 diff --git a/util/scripts/mac-binary/package/opensourceStuff/InstallationCheck.strings b/util/scripts/mac-binary/package/opensourceStuff/InstallationCheck.strings Binary files differnew file mode 100644 index 0000000..4b82b30 --- /dev/null +++ b/util/scripts/mac-binary/package/opensourceStuff/InstallationCheck.strings diff --git a/util/scripts/mac-binary/package/uninstall-qt.py b/util/scripts/mac-binary/package/uninstall-qt.py new file mode 100755 index 0000000..2e5cfdc --- /dev/null +++ b/util/scripts/mac-binary/package/uninstall-qt.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python + +############################################################################# +## +## 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$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +############################################################################# + +import commands, sys, os, shutil, glob + +trace = False +justTest = False +# Globals +AllPackages = ['docs', 'headers', 'examples', 'plugins', 'tools', 'libraries', 'debuglibraries', 'translations' ] + +packagesToRemove = AllPackages + +# Travese the list and remove values that won't work. +def realPackagesToRemove(packageList): + for package in packageList: + if package not in AllPackages: + print "%s is NOT a valid package, removing it from the list" % (package) + packageList.remove(package) + return packageList + +#Remove the files in the list +def removeFiles(fileList, helperFunc=0): + directories = [] + for file in fileList: + file = file[1:] + if not os.path.islink(file) and os.path.isdir(file): + directories.append(file) + elif len(file) > 0: + if os.path.exists(file) or os.path.islink(file): + if trace: + print "remove file: " + file + if not justTest: + os.remove(file) + else: + print "file: %s does not exist, skipping" % file + + + # Now remove any empty directories + directories.reverse() + for dir in directories: + if helperFunc: + helperFunc(dir) + if (os.path.exists(dir)) and len(os.listdir(dir)) == 0: + if trace: + print "remove dir: " + dir + if not justTest: + os.rmdir(dir) + elif trace and os.path.exists(dir): + print "NOT removing " + dir + +def removeExampleGeneratedFiles(dir): + extraList = [] + extraList.append(os.path.join(dir, "Info.plist")) + extraList.append(os.path.join(dir, ".DS_Store")) + extraList.append(os.path.join(dir, ".qmake.cache")) + extraList.append(os.path.join(dir, "Makefile")) + extraList.append(os.path.join(dir, ".obj")) + extraList.append(os.path.join(dir, ".moc")) + + xcodeprojects = glob.glob(dir + "/*" + os.path.basename(dir) + "*.xcode*") + xcodeprojects += glob.glob(dir + "/.xcode*") # Grab the items from qmake mess-up in 4.0.1 + + for file in xcodeprojects: + if trace: + print " removing the tree in " + file + shutil.rmtree(file) + + for file in extraList: + if os.path.exists(file): + if trace: + print " removing the file in " + file + if os.path.isdir(file): + shutil.rmtree(file) + else: + os.remove(file) + + +# Remove the package +def removePackage(package): + print "removing package " + package + realPackageName = "/Library/Receipts/Qt_" + package + ".pkg" + bomLocation = os.path.join(realPackageName, "Contents/Archive.bom") + if os.path.exists(realPackageName) and os.path.isdir(realPackageName): + fileList = commands.getoutput("/usr/bin/lsbom -f -p f -d -l " + bomLocation).split() + if len(fileList) > 0: + if (package == "examples"): + removeFiles(fileList, removeExampleGeneratedFiles) + else: + removeFiles(fileList) + shutil.rmtree(realPackageName) + else: + print "%s is not installed, skipping." % package + + +################# Here's where the actual script starts ######################################## +if os.getuid() != 0: + print sys.argv[0] + ": This script must be run as root or with sudo, exiting now." + sys.exit(-1) + +# Take the names of packages on the command-line +if len(sys.argv) > 1: + packagesToRemove = sys.argv[1:] + +packagesToRemove = realPackagesToRemove(packagesToRemove) + +if len(packagesToRemove) < 1: + print "\nNo valid packages to uninstall.\nusage: %s [package ...]" % (sys.argv[0]) + sys.exit(1) + +for package in packagesToRemove: + removePackage(package) diff --git a/util/scripts/unix_to_dos b/util/scripts/unix_to_dos new file mode 100755 index 0000000..510037c --- /dev/null +++ b/util/scripts/unix_to_dos @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +undef $/; + +foreach $f ( @ARGV ) { + if ( open( F, "< $f" ) ) { + $i = <F>; + close F; + $i =~ s/\n/\r\n/g; + $i =~ s/\r+/\r/g; + if ( open( F, "> $f" ) ) { + print F $i; + close F; + } + } +} diff --git a/util/scripts/win-binary/batch/build.bat b/util/scripts/win-binary/batch/build.bat new file mode 100755 index 0000000..2d81b6f --- /dev/null +++ b/util/scripts/win-binary/batch/build.bat @@ -0,0 +1,121 @@ +call :%1 %2 +goto END + +:begin +for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_COMPILER=%%~m& set IWMAKE_TMP=%%~n + +if "%IWMAKE_TMP%"=="" set IWMAKE_TMP=build_%IWMAKE_COMPILER% +set IWMAKE_BUILD=%IWMAKE_ROOT%\%IWMAKE_TMP% +if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD% + +set IWMAKE_OLD_PATH=%PATH% +if not "%QMAKESPEC%"=="" set IWMAKE_OLD_QMAKESPEC=%QMAKESPEC% +if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR% +if not "%INCLUDE%"=="" set IWMAKE_OLD_INCLUDE=%INCLUDE% +if not "%LIB%"=="" set IWMAKE_OLD_LIB=%LIB% + +set PATH=%IWMAKE_BUILD%\bin;%PATH% +set QTDIR=%IWMAKE_BUILD% + +if "%IWMAKE_COMPILER%"=="vs2003" goto VS2003Env +if "%IWMAKE_COMPILER%"=="vs2002" goto VS2002Env +if "%IWMAKE_COMPILER%"=="vs2005" goto VS2005Env +if "%IWMAKE_COMPILER%"=="vs2008" goto VS2008Env +if "%IWMAKE_COMPILER%"=="vc60" goto VC60Env +if "%IWMAKE_COMPILER%"=="mingw" goto MinGWEnv +goto :eof + +:VS2003Env +set QMAKESPEC=win32-msvc2003 +set IWMAKE_MAKE=nmake +goto :eof + +:VS2002Env +set QMAKESPEC=win32-msvc2002 +set IWMAKE_MAKE=nmake +goto :eof + +:VS2005Env +set QMAKESPEC=win32-msvc2005 +set IWMAKE_MAKE=nmake +goto :eof + +:VS2008Env +set QMAKESPEC=win32-msvc2008 +set IWMAKE_MAKE=nmake +goto :eof + +:VC60Env +set QMAKESPEC=win32-msvc +set IWMAKE_MAKE=nmake +goto :eof + +:SetVSEnvironment +if not exist %1 echo %1 not found >> %IWMAKE_LOGFILE% & exit /b 1 +call %1 >> %IWMAKE_LOGFILE% +goto :eof + +:MinGWEnv +set QMAKESPEC=win32-g++ +set IWMAKE_MAKE=mingw32-make +goto :eof + +:finish + if not "%IWMAKE_OLD_PATH%"=="" set PATH=%IWMAKE_OLD_PATH%& set IWMAKE_OLD_PATH= + if not "%IWMAKE_OLD_QMAKESPEC%"=="" set QMAKESPEC=%IWMAKE_OLD_QMAKESPEC%& set IWMAKE_OLD_QMAKESPEC= + if not "%IWMAKE_OLD_QTDIR%"=="" set QTDIR=%IWMAKE_OLD_QTDIR%& set IWMAKE_OLD_QTDIR= + if not "%IWMAKE_OLD_INCLUDE%"=="" set INCLUDE=%IWMAKE_OLD_INCLUDE%& set IWMAKE_OLD_INCLUDE= + if not "%IWMAKE_OLD_LIB%"=="" set LIB=%IWMAKE_OLD_LIB%& set IWMAKE_OLD_LIB= +goto :eof + +:configure + pushd %IWMAKE_BUILD% + configure %~1 >> %IWMAKE_LOGFILE% 2>&1 + popd +goto :eof + +:shadowconfigure + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + pushd %IWMAKE_BUILD% + %IWMAKE_ROOT%\%IWMAKE_TMP%\configure %IWMAKE_TMP2% >> %IWMAKE_LOGFILE% 2>&1 + popd +goto :eof + +:setcepaths + call %IWMAKE_BUILD%\bin\setcepaths.bat %~1 >> %IWMAKE_LOGFILE% 2>&1 +goto :eof + +:bin + pushd %IWMAKE_BUILD% + %IWMAKE_MAKE% %~1 >>%IWMAKE_LOGFILE% 2>&1 + popd +goto :eof + +:binInDir + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + pushd %IWMAKE_BUILD%\%IWMAKE_TMP% + %IWMAKE_MAKE% %IWMAKE_TMP2% >> %IWMAKE_LOGFILE% 2>&1 + popd +goto :eof + +:DBPlugins + call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sql + set IWMAKE_SQL_OLD_LIB=%LIB% + + set LIB=%IWMAKE_ROOT%\sql\%IWMAKE_COMPILER%;%IWMAKE_SQL_OLD_LIB% + pushd %IWMAKE_BUILD%\src\plugins\sqldrivers\psql + qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpqd.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1 + %IWMAKE_MAKE% debug >> %IWMAKE_LOGFILE% 2>&1 + qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpq.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1 + %IWMAKE_MAKE% release >> %IWMAKE_LOGFILE% 2>&1 + popd + set LIB=%IWMAKE_SQL_OLD_LIB% + set IWMAKE_SQL_OLD_LIB= +goto :eof + +:root + set IWMAKE_BUILD=%~1 + if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD% +goto :eof + +:END diff --git a/util/scripts/win-binary/batch/copy.bat b/util/scripts/win-binary/batch/copy.bat new file mode 100755 index 0000000..95869ea --- /dev/null +++ b/util/scripts/win-binary/batch/copy.bat @@ -0,0 +1,91 @@ +call :%1 %2 +goto END + +:dest + set IWMAKE_OUTDIR=%IWMAKE_ROOT%\%~1 + if not exist %IWMAKE_OUTDIR% mkdir %IWMAKE_OUTDIR% +goto :eof + +:src + set IWMAKE_SRCDIR=%IWMAKE_ROOT%\%~1 + if not exist %IWMAKE_SRCDIR% mkdir %IWMAKE_SRCDIR% +goto :eof + +:destAbs + set IWMAKE_OUTDIR=%1 + if not exist %IWMAKE_OUTDIR% mkdir %IWMAKE_OUTDIR% +goto :eof + +:srcAbs + set IWMAKE_SRCDIR=%1 + if not exist %IWMAKE_SRCDIR% mkdir %IWMAKE_SRCDIR% +goto :eof + +:extsync + echo Copying %IWMAKE_EXTERNAL%\%~1 to %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE% + if exist %IWMAKE_ROOT%\%~1 rd /S /Q %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE% + xcopy /H /Y /Q /I /R /E %IWMAKE_EXTERNAL%\%~1 %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE% +goto :eof + +:all + xcopy /H /Y /Q /I /R /S %IWMAKE_SRCDIR%\%~1 %IWMAKE_OUTDIR%\ >> %IWMAKE_LOGFILE% +goto :eof + +:filesEx + for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3=%%~o + echo %IWMAKE_TMP3% > %IWMAKE_ROOT%\iwmake_exclude + xcopy /H /Y /Q /I /R /S /EXCLUDE:%IWMAKE_ROOT%\iwmake_exclude %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE% +goto :eof + +:file + set IWMAKE_TMP=%~1 + set IWMAKE_TMP2=%~nx1 + echo set IWMAKE_TMP3=%%IWMAKE_TMP:%IWMAKE_TMP2%=%%>"%IWMAKE_ROOT%\iwmake_tmp.bat" + call %IWMAKE_ROOT%\iwmake_tmp.bat + if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" + xcopy /H /Y /Q /I /R %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP3% >> %IWMAKE_LOGFILE% +goto :eof + +:fileAndRename + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP4=%%~nxn + echo set IWMAKE_TMP3=%%IWMAKE_TMP2:%IWMAKE_TMP4%=%%>"%IWMAKE_ROOT%\iwmake_tmp.bat" + call %IWMAKE_ROOT%\iwmake_tmp.bat + if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" + echo > %IWMAKE_OUTDIR%\%IWMAKE_TMP2% + xcopy /H /Y /Q /R %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE% + set IWMAKE_TMP4= +goto :eof + +:files + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP2%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP2%" + xcopy /H /Y /Q /I /R /S %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE% +goto :eof + +:runtime + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + if "%IWMAKE_TMP2%" == "" set IWMAKE_TMP2=bin + if "%IWMAKE_TMP%" == "mingw" ( + xcopy /H /Y /Q /I /R %IWMAKE_MINGWPATH%\bin\mingwm*.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE% + ) else ( + xcopy /H /Y /Q /I /R %SystemRoot%\system32\msvcr%IWMAKE_TMP%.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE% + xcopy /H /Y /Q /I /R %SystemRoot%\system32\msvcp%IWMAKE_TMP%.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE% + ) +goto :eof + +:external + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + xcopy /H /Y /Q /I /R %IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE% +goto :eof + +:syncqt + pushd %IWMAKE_OUTDIR% + if exist "include" rd /S /Q include + if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR% + set QTDIR=%IWMAKE_OUTDIR% + "%IWMAKE_PERLPATH%\perl" %QTDIR%\bin\syncqt -copy >> %IWMAKE_LOGFILE% 2>&1 + if not "%IWMAKE_OLD_QTDIR%"=="" set QTDIR=%IWMAKE_OLD_QTDIR% + popd +goto :eof + +:END diff --git a/util/scripts/win-binary/batch/delete.bat b/util/scripts/win-binary/batch/delete.bat new file mode 100755 index 0000000..cd751fd --- /dev/null +++ b/util/scripts/win-binary/batch/delete.bat @@ -0,0 +1,41 @@ +call :%1 %2 +goto END + +:destDir + if exist "%IWMAKE_OUTDIR%\%~1" rd /S /Q %IWMAKE_OUTDIR%\%~1 +goto :eof + +:dir + if exist "%IWMAKE_ROOT%\%~1" rd /S /Q %IWMAKE_ROOT%\%~1 +goto :eof + +:dirAbs + if exist "%~1" rd /S /Q %~1 +goto :eof + +:file + del /Q /F %IWMAKE_OUTDIR%\%~1 >> %IWMAKE_LOGFILE% 2>&1 + exit /b 0 +goto :eof + +:files + del /S /Q /F %IWMAKE_OUTDIR%\%~1 >> %IWMAKE_LOGFILE% 2>&1 + exit /b 0 +goto :eof + +:line + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + if exist "%IWMAKE_ROOT%\tmp_line.txt" del /Q /F "%IWMAKE_ROOT%\tmp_line.txt" >> %IWMAKE_LOGFILE% + type "%IWMAKE_ROOT%\%IWMAKE_TMP%" | %WINDIR%\system32\find /V "%IWMAKE_TMP2%" >> "%IWMAKE_ROOT%\tmp_line.txt" + xcopy /Y /Q /R %IWMAKE_ROOT%\tmp_line.txt %IWMAKE_ROOT%\%IWMAKE_TMP% >> %IWMAKE_LOGFILE% +goto :eof + +:dirs + for /R "%IWMAKE_OUTDIR%" %%d in ("%~1") do ( + if exist %%d ( + rd /S /Q %%d >> %IWMAKE_LOGFILE% 2>&1 + ) + ) +goto :eof + +:END diff --git a/util/scripts/win-binary/batch/env.bat b/util/scripts/win-binary/batch/env.bat new file mode 100755 index 0000000..302a855 --- /dev/null +++ b/util/scripts/win-binary/batch/env.bat @@ -0,0 +1,101 @@ +call :%1 %2 +goto END + +:setglobals +set IWMAKE_PARSESECTION=1 +set IWMAKE_MINGWPATH=c:\MinGW\bin +set IWMAKE_STARTDIR=%CD% +set IWMAKE_NSISCONF=%IWMAKE_SCRIPTDIR%\nsis\config.nsh +set IWMAKE_ROOT=c:\package +set IWMAKE_OUTDIR=%IWMAKE_ROOT% +set IWMAKE_SRCDIR=%IWMAKE_ROOT% +set IWMAKE_EXTRACTDEST=%IWMAKE_ROOT% +set IWMAKE_NSISPATH=%PROGRAMFILES%\NSIS +call %IWMAKE_SCRIPTDIR%\batch\log.bat fileAbs "%IWMAKE_STARTDIR%\log.txt" +goto :eof + +:signPath + set IWMAKE_SIGNPATH=%~1 +goto :eof + +:wgetPath + set IWMAKE_WGET=%~1 +goto :eof + +:wgetDir + set IWMAKE_WGET=%IWMAKE_ROOT%\%~1 +goto :eof + +:NSISPath + set IWMAKE_NSISPATH=%~1 +goto :eof + +:PerlPath + set IWMAKE_PERLPATH=%~1 +goto :eof + +:MinGWPath + set IWMAKE_MINGWPATH=%~1 +goto :eof + +:unzipApp + set IWMAKE_UNZIPAPP=%~1 +goto :eof + +:releaseLocation + set IWMAKE_WGETUSER= + set IWMAKE_WGETPASS= + for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& if not "%%~n"=="" set IWMAKE_TMP2=%%~n& if not "%%~o"=="" set IWMAKE_TMP3=%%~o + if not "%IWMAKE_TMP2%"=="" set IWMAKE_WGETUSER=--http-user=%IWMAKE_TMP2% + if not "%IWMAKE_TMP3%"=="" set IWMAKE_WGETPASS=--http-passwd=%IWMAKE_TMP3% + set IWMAKE_RELEASELOCATION=%IWMAKE_TMP% +goto :eof + +:removeglobals +if not "%IWMAKE_OLD_PATH%"=="" call %IWMAKE_SCRIPTDIR%\batch\build.bat finish +set IWMAKE_RELEASELOCATION= +set IWMAKE_NSISPATH= +set IWMAKE_SECTION= +set IWMAKE_WGET= +set IWMAKE_WGETUSER= +set IWMAKE_WGETPASS= +set IWMAKE_UNZIPAPP= +set IWMAKE_MINGWPATH= +set IWMAKE_MAKE= +set IWMAKE_PERLPATH= +set IWMAKE_STARTDIR= +set IWMAKE_SCRIPTDIR= +set IWMAKE_NSISCONF= +set IWMAKE_RESULT= +set IWMAKE_TMP= +set IWMAKE_TMP2= +set IWMAKE_TMP3= +set IWMAKE_STATUS= +set IWMAKE_LOGFILE= +set IWMAKE_BUILD= +set IWMAKE_ROOT= +set IWMAKE_OUTDIR= +set IWMAKE_EXTERNAL= +set IWMAKE_OLD_PATH= +set IWMAKE_OLD_QMAKESPEC= +set IWMAKE_OLD_QTDIR= +set IWMAKE_OLD_INCLUDE= +set IWMAKE_OLD_LIB= +set IWMAKE_COMPILER= +set IWMAKE_SRCDIR= +set IWMAKE_EXTRACTSRC= +set IWMAKE_EXTRACTDEST= +set IWMAKE_PARSESECTION= +set IWMAKE_OUTPUT_FILE= +set IWMAKE_SIGNPATH= +goto :eof + +:root +set IWMAKE_ROOT=%~1 +goto :eof + +:extroot +set IWMAKE_EXTERNAL=%~1 +goto :eof + +:END diff --git a/util/scripts/win-binary/batch/extract.bat b/util/scripts/win-binary/batch/extract.bat new file mode 100755 index 0000000..c5a9a23 --- /dev/null +++ b/util/scripts/win-binary/batch/extract.bat @@ -0,0 +1,47 @@ +call :%1 %2 +goto END + +:dest + set IWMAKE_EXTRACTDEST=%IWMAKE_ROOT%\%~1 +goto :eof + +:src + set IWMAKE_EXTRACTSRC=%~1 +goto :eof + +:extUnpack + set IWMAKE_EXTRACTSRC=%~n1 + pushd %IWMAKE_ROOT% + if exist "%IWMAKE_EXTRACTSRC%.zip" del /Q /F "%IWMAKE_EXTRACTSRC%.zip" + %IWMAKE_WGET%\wget %IWMAKE_WGETUSER% %IWMAKE_WGETPASS% %IWMAKE_RELEASELOCATION%/%IWMAKE_EXTRACTSRC%.zip >> %IWMAKE_LOGFILE% 2>&1 + popd + call :unpack "%~1" +goto :eof + +:unpack + set IWMAKE_EXTRACTSRC=%~n1 + pushd %IWMAKE_ROOT% + if exist "%IWMAKE_EXTRACTDEST%" rd /S /Q %IWMAKE_EXTRACTDEST% >> %IWMAKE_LOGFILE% 2>&1 + if exist "%IWMAKE_EXTRACTSRC%" rd /S /Q %IWMAKE_EXTRACTSRC% >> %IWMAKE_LOGFILE% 2>&1 + %IWMAKE_UNZIPAPP% -q %IWMAKE_EXTRACTSRC%.zip >> %IWMAKE_LOGFILE% + popd + move %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC% %IWMAKE_EXTRACTDEST% >> %IWMAKE_LOGFILE% +goto :eof + +:extPatch + pushd %IWMAKE_ROOT% + if exist "%~1" del /Q /F "%~1" + %IWMAKE_WGET%\wget %IWMAKE_WGETUSER% %IWMAKE_WGETPASS% %IWMAKE_RELEASELOCATION%/%~1 >> %IWMAKE_LOGFILE% 2>&1 + popd + call :patch "%~1" +goto :eof + +:patch + pushd %IWMAKE_ROOT% + %IWMAKE_UNZIPAPP% %~1 >> %IWMAKE_LOGFILE% + popd + xcopy /R /I /S /Q /Y %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC%\*.* %IWMAKE_EXTRACTDEST%\ >> %IWMAKE_LOGFILE% + rd /S /Q %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC% >> %IWMAKE_LOGFILE% +goto :eof + +:END diff --git a/util/scripts/win-binary/batch/installer.bat b/util/scripts/win-binary/batch/installer.bat new file mode 100755 index 0000000..74887ee --- /dev/null +++ b/util/scripts/win-binary/batch/installer.bat @@ -0,0 +1,227 @@ +call :%1 %2 +goto END + +:begin + call :reset + echo !define PRODUCT_NAME "%~1" >> %IWMAKE_NSISCONF% + echo !define INSTALL_ROOT "%IWMAKE_ROOT%" >> %IWMAKE_NSISCONF% +goto :eof + +:output + set IWMAKE_OUTPUT_FILE=%~1 + echo !define OUTPUT_FILE "%~1" >> %IWMAKE_NSISCONF% +goto :eof + +:module + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1 + echo !define MODULE_%IWMAKE_RESULT% >> %IWMAKE_NSISCONF% +goto :eof + +:enable + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1 + echo !define USE_%IWMAKE_RESULT:"=% >> %IWMAKE_NSISCONF% +goto :eof + +:disable + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1 + echo !undef USE_%IWMAKE_RESULT:"=% >> %IWMAKE_NSISCONF% +goto :eof + +:startmenu + echo !define DEFAULT_STARTMENU_STRING "%~1" >> %IWMAKE_NSISCONF% +goto :eof + +:reset + if exist "%IWMAKE_NSISCONF%" del /Q /F "%IWMAKE_NSISCONF%" +goto :eof + +:instdir + for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3="%%~o" + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% + echo !define INSTDIR_%IWMAKE_TMP2% %IWMAKE_RESULT:"=% >> "%IWMAKE_NSISCONF%" + echo !define INSTDIR_%IWMAKE_TMP2%_TEXT %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" +goto :eof + +:version + echo !define PRODUCT_VERSION "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:readme + echo !define README_FILE "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:licenseFile + echo !define LICENSE_FILE "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:runfunction + echo !define RUN_FUNCTION "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:readmefunction + echo !define README_FUNCTION "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:readmestartpage + echo !define README_STARTPAGE "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:welcomenote + echo !define WELCOME_NOTE "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:welcometitle + echo !define WELCOME_TITLE "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:welcomeicon + echo !define WELCOME_ICON "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:finishtitle + echo !define FINISH_TITLE "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:updateplugins + call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync INetLoad + xcopy /Q /Y /R "%IWMAKE_ROOT%\INetLoad\INetLoad.dll" "%IWMAKE_NSISPATH%\Plugins\" >> %IWMAKE_LOGFILE% + xcopy /Q /Y /R "%IWMAKE_SCRIPTDIR%\nsis\qtnsisext\qtnsisext.dll" "%IWMAKE_NSISPATH%\Plugins\" >> %IWMAKE_LOGFILE% +goto :eof + +:defineDir + for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3=%%~o + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% + set IWMAKE_TMP=%IWMAKE_RESULT% + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP2% + set IWMAKE_TMP2=%IWMAKE_RESULT% + echo !define MODULE_%IWMAKE_TMP%_%IWMAKE_TMP2% "%IWMAKE_ROOT%\%IWMAKE_TMP3%" >> "%IWMAKE_NSISCONF%" +goto :eof + +:define + for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3="%%~o" + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% + set IWMAKE_TMP=%IWMAKE_RESULT% + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP2% + set IWMAKE_TMP2=%IWMAKE_RESULT% + if %IWMAKE_TMP3%=="" set IWMAKE_TMP3= + echo !define MODULE_%IWMAKE_TMP%_%IWMAKE_TMP2% %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" +goto :eof + +:src + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% + set IWMAKE_TMP=%IWMAKE_RESULT% + set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%" + echo !define MODULE_%IWMAKE_TMP%_ROOT %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" +goto :eof + +:buildDir + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% + set IWMAKE_TMP=%IWMAKE_RESULT% + set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%" + echo !define MODULE_%IWMAKE_TMP%_BUILDDIR %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%" + for /F "eol=- tokens=1,2,3" %%m in ('%WINDIR%\system32\find "QT_PACKAGEDATE_STR" %IWMAKE_ROOT%\%IWMAKE_TMP2%\src\corelib\global\qglobal.h') do echo !define MODULE_LICENSECHECK_PACKAGEDATE %%o >> "%IWMAKE_NSISCONF%" +goto :eof + +:compile + call :required + pushd %IWMAKE_SCRIPTDIR%\nsis + "%IWMAKE_NSISPATH%\makensis.exe" installer.nsi >> %IWMAKE_LOGFILE% + popd +goto :eof + +:required + call :setrequired PRODUCT_NAME + call :setrequired INSTALL_ROOT + call :setrequired PRODUCT_VERSION + call :setrequired OUTPUT_FILE + call :setrequired INSTDIR_0 + call :setrequired DEFAULT_STARTMENU_STRING +goto :eof + +:setrequired + echo !ifndef %1 >> "%IWMAKE_NSISCONF%" + echo !error "%1 must be in the .conf file..." >> "%IWMAKE_NSISCONF%" + echo !endif >> "%IWMAKE_NSISCONF%" +goto :eof + +:makeFileList + for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n + call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP% + set IWMAKE_TMP=%IWMAKE_RESULT% + set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%" + + + echo !macro MODULE_%IWMAKE_TMP%_INSTALLFILES >> "%IWMAKE_NSISCONF%" + + pushd %IWMAKE_TMP3% + + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$0=$$0%%> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$1=$$1%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$2=$$2%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$3=$$3%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$4=$$4%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$5=$$5%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$6=$$6%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$7=$$7%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$8=$$8%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$9=$$9%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo set IWMAKE_TMP2=%%IWMAKE_TMP2:%CD%\=%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat" + + dir /AD /B /S | sort /R > "%IWMAKE_ROOT%\iwmake_tmp.txt" + for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addInstallDirectory "%%m" + + + dir /A-D /B /S > "%IWMAKE_ROOT%\iwmake_tmp.txt" + for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addInstallFile "%%m" + + popd + echo !macroend >> "%IWMAKE_NSISCONF%" + + + echo !macro MODULE_%IWMAKE_TMP%_REMOVE removepath >> "%IWMAKE_NSISCONF%" + echo strcmp ${removepath} "" MODULE_%IWMAKE_TMP%_REMOVE_SAFETYLABEL >> "%IWMAKE_NSISCONF%" + pushd %IWMAKE_TMP3% + + dir /A-D /B /S > "%IWMAKE_ROOT%\iwmake_tmp.txt" + for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addRemoveFiles "%%m" + + dir /AD /B /S | sort /R > "%IWMAKE_ROOT%\iwmake_tmp.txt" + for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addRemoveDirectory "%%m" + + popd + echo MODULE_%IWMAKE_TMP%_REMOVE_SAFETYLABEL: >> "%IWMAKE_NSISCONF%" + echo !macroend >> "%IWMAKE_NSISCONF%" +goto :eof + +:addInstallFile + set IWMAKE_TMP2=%~1 + call "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo File "/oname=%IWMAKE_TMP2%" "%~1" >> "%IWMAKE_NSISCONF%" +goto :eof + +:addInstallDirectory + set IWMAKE_TMP2=%~1 + call "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo CreateDirectory "$OUTDIR\%IWMAKE_TMP2%" >> "%IWMAKE_NSISCONF%" +goto :eof + +:addRemoveDirectory + set IWMAKE_TMP2=%~1 + call "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo RMDir ${removepath}\%IWMAKE_TMP2% >> "%IWMAKE_NSISCONF%" +goto :eof + +:addRemoveFiles + set IWMAKE_TMP2=%~1 + call "%IWMAKE_ROOT%\iwmake_tmp.bat" + echo Delete ${removepath}\%IWMAKE_TMP2% >> "%IWMAKE_NSISCONF%" +goto :eof + +:sign + echo Signing Installer ... + %IWMAKE_SIGNPATH%\signtool.exe sign /v /t http://timestamp.verisign.com/scripts/timestamp.dll /f "%IWMAKE_SIGNPATH%\keys.pfx" "%IWMAKE_OUTPUT_FILE%" >> %IWMAKE_LOGFILE% +goto :eof + +:END diff --git a/util/scripts/win-binary/batch/log.bat b/util/scripts/win-binary/batch/log.bat new file mode 100755 index 0000000..6186ff1 --- /dev/null +++ b/util/scripts/win-binary/batch/log.bat @@ -0,0 +1,18 @@ +call :%1 %2 +goto END + +:file +set IWMAKE_LOGFILE=%IWMAKE_ROOT%\%~1 +call :reset +goto :eof + +:fileAbs +set IWMAKE_LOGFILE=%1 +call :reset +goto :eof + +:reset +date /T > %IWMAKE_LOGFILE% +goto :eof + +:END diff --git a/util/scripts/win-binary/batch/toupper.bat b/util/scripts/win-binary/batch/toupper.bat new file mode 100755 index 0000000..cc4365a --- /dev/null +++ b/util/scripts/win-binary/batch/toupper.bat @@ -0,0 +1,29 @@ +set IWMAKE_RESULT=%1 +if [%IWMAKE_RESULT%]==[] goto :eof +set IWMAKE_RESULT=%IWMAKE_RESULT:a=A% +set IWMAKE_RESULT=%IWMAKE_RESULT:b=B% +set IWMAKE_RESULT=%IWMAKE_RESULT:c=C% +set IWMAKE_RESULT=%IWMAKE_RESULT:d=D% +set IWMAKE_RESULT=%IWMAKE_RESULT:e=E% +set IWMAKE_RESULT=%IWMAKE_RESULT:f=F% +set IWMAKE_RESULT=%IWMAKE_RESULT:g=G% +set IWMAKE_RESULT=%IWMAKE_RESULT:h=H% +set IWMAKE_RESULT=%IWMAKE_RESULT:i=I% +set IWMAKE_RESULT=%IWMAKE_RESULT:j=J% +set IWMAKE_RESULT=%IWMAKE_RESULT:k=K% +set IWMAKE_RESULT=%IWMAKE_RESULT:l=L% +set IWMAKE_RESULT=%IWMAKE_RESULT:m=M% +set IWMAKE_RESULT=%IWMAKE_RESULT:n=N% +set IWMAKE_RESULT=%IWMAKE_RESULT:o=O% +set IWMAKE_RESULT=%IWMAKE_RESULT:p=P% +set IWMAKE_RESULT=%IWMAKE_RESULT:q=Q% +set IWMAKE_RESULT=%IWMAKE_RESULT:r=R% +set IWMAKE_RESULT=%IWMAKE_RESULT:s=S% +set IWMAKE_RESULT=%IWMAKE_RESULT:t=T% +set IWMAKE_RESULT=%IWMAKE_RESULT:u=U% +set IWMAKE_RESULT=%IWMAKE_RESULT:v=V% +set IWMAKE_RESULT=%IWMAKE_RESULT:w=W% +set IWMAKE_RESULT=%IWMAKE_RESULT:x=X% +set IWMAKE_RESULT=%IWMAKE_RESULT:y=Y% +set IWMAKE_RESULT=%IWMAKE_RESULT:z=Z% + diff --git a/util/scripts/win-binary/config/addin.conf b/util/scripts/win-binary/config/addin.conf new file mode 100644 index 0000000..ad7daa4 --- /dev/null +++ b/util/scripts/win-binary/config/addin.conf @@ -0,0 +1,42 @@ +Section GETFILES +copy extsync addin7x +copy extsync addin60 +copy extsync debugext +copy extsync vsip +SectionEnd + +Section NSIS +# general installer options +installer begin "QMsAddin Collection" +installer version "2.1" +installer output "c:\iwmake\qt-vsaddin-collection-2.1.3.exe" +installer startmenu "QMsAddin Collection v2.1" +installer enable component_page +installer enable directory_page +installer enable admin_check +installer enable uninstall_previous +installer enable warn_no_qt_found +installer enable optional_shortcutcreation +installer instdir addin 0 "Add-ins Installation Directory" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "addin7x" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation|Academic|Educational" + +# addin options +installer module addin7x + +# addin60 options +installer module addin60 + +# debugext options +installer module debugext + +# help options +installer module help + +# compile the package +installer compile +installer sign +SectionEnd
\ No newline at end of file diff --git a/util/scripts/win-binary/config/addin7x.conf b/util/scripts/win-binary/config/addin7x.conf new file mode 100644 index 0000000..34edb7b --- /dev/null +++ b/util/scripts/win-binary/config/addin7x.conf @@ -0,0 +1,48 @@ +Section GETFILES +copy extsync addin7x +#copy extsync addin60 +copy extsync debugext +#copy extsync vsip +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt4 Visual Studio Add-in" +installer version "1.0b2" +installer output "c:\iwmake\qt-vs-addin-1.0.0-beta2.exe" +installer startmenu "Qt4 Visual Studio Add-in v1.0b2" +installer enable component_page +installer enable directory_page +installer enable admin_check +installer enable uninstall_previous +#installer enable warn_no_qt_found +installer enable optional_shortcutcreation +installer instdir addin 0 "Add-ins Installation Directory" + +# license checking +#installer module licensecheck +#installer defineDir licensecheck licenseDir "addin7x" +#installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation|Academic|Educational" +installer licenseFile "%IWMAKE_ROOT%\LICENSE.QT4VSADDIN" + +# addin options +installer module addin7x + +# addin60 options +#installer module addin60 + +# debugext options +installer module debugext +installer define debugext novc60 +installer define debugext novs2002 +installer define debugext novs2003 + +# help options +installer module help +installer define help novs2002 +installer define help novs2003 + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/config.aeryn b/util/scripts/win-binary/config/config.aeryn new file mode 100644 index 0000000..48408a8 --- /dev/null +++ b/util/scripts/win-binary/config/config.aeryn @@ -0,0 +1,2 @@ +env perlPath c:\bin\perl\bin +env NSISPath "c:\program files (x86)\NSIS" diff --git a/util/scripts/win-binary/config/config.alessandro64 b/util/scripts/win-binary/config/config.alessandro64 new file mode 100644 index 0000000..b6233a3 --- /dev/null +++ b/util/scripts/win-binary/config/config.alessandro64 @@ -0,0 +1,11 @@ +#where to find nsis +env NSISPath "%ProgramFiles(x86)%\NSIS" + +#where to find perl +env perlPath "c:\Perl64\bin" + +#where to find all external files +env extroot "c:\temp\eclipse\binaries" + +#where to find packages +env releaseLocation "http://localhost/qtpackagesforinstallertests" diff --git a/util/scripts/win-binary/config/config.chiana b/util/scripts/win-binary/config/config.chiana new file mode 100644 index 0000000..3380376 --- /dev/null +++ b/util/scripts/win-binary/config/config.chiana @@ -0,0 +1 @@ +env extroot \\tirion-nokia.troll.no\binaries
\ No newline at end of file diff --git a/util/scripts/win-binary/config/config.default b/util/scripts/win-binary/config/config.default new file mode 100644 index 0000000..b515c54 --- /dev/null +++ b/util/scripts/win-binary/config/config.default @@ -0,0 +1,17 @@ +#root directory +env root "c:\iwmake" + +#where to find all external files +env extroot "\\tirion\binaries" + +#where to find mingw +env mingwPath "c:\mingw" + +#where to find nsis +env NSISPath "%ProgramFiles%\NSIS" + +#where to find perl +env perlPath "c:\Perl\bin" + +#where to find packages +env releaseLocation "http://tirion.troll.no/~qt/packages/%QT_VERSION%" diff --git a/util/scripts/win-binary/config/config.innsikt b/util/scripts/win-binary/config/config.innsikt new file mode 100644 index 0000000..5290526 --- /dev/null +++ b/util/scripts/win-binary/config/config.innsikt @@ -0,0 +1 @@ +env perlPath "C:\Program Files\activestateperl\bin" diff --git a/util/scripts/win-binary/config/config.kepler b/util/scripts/win-binary/config/config.kepler new file mode 100644 index 0000000..1958c03 --- /dev/null +++ b/util/scripts/win-binary/config/config.kepler @@ -0,0 +1,14 @@ +#root directory +env root "f:\iwmake" + +#where to find mingw +env mingwPath "f:\mingw" + +#where to find nsis +env NSISPath "%ProgramFiles%\NSIS" + +#where to find perl +env perlPath "f:\Perl\bin" + +#where to find packages +env releaseLocation "http://ares.troll.no/~harald/packages" diff --git a/util/scripts/win-binary/config/config.planck b/util/scripts/win-binary/config/config.planck new file mode 100644 index 0000000..cc95a1f --- /dev/null +++ b/util/scripts/win-binary/config/config.planck @@ -0,0 +1,17 @@ +env extroot "c:\lupinella" +#env extroot "\\tirion.nokia.troll.no\binaries" + +#root directory +env root "c:\iwmake" + +#where to find mingw +env mingwPath "c:\mingw" + +#where to find nsis +env NSISPath "%ProgramFiles%\NSIS" + +#where to find perl +env perlPath "c:\Perl\bin" + +#where to find packages +env releaseLocation "http://tirion.troll.no/~qt/packages" diff --git a/util/scripts/win-binary/config/config.radeberger b/util/scripts/win-binary/config/config.radeberger new file mode 100644 index 0000000..e0606c6 --- /dev/null +++ b/util/scripts/win-binary/config/config.radeberger @@ -0,0 +1,17 @@ +#root directory +env root "c:\iwmake" + +#where to find all external files +env extroot "\\lupinella\public\binaries" + +#where to find mingw +env mingwPath "c:\mingw" + +#where to find nsis +env NSISPath "%ProgramFiles%\NSIS" + +#where to find perl +env perlPath "c:\Perl\bin" + +#where to find packages +env releaseLocation "http://becks.troll.no/~espenr/" diff --git a/util/scripts/win-binary/config/config.samarin b/util/scripts/win-binary/config/config.samarin new file mode 100644 index 0000000..512abbd --- /dev/null +++ b/util/scripts/win-binary/config/config.samarin @@ -0,0 +1 @@ +env NSISPath "c:\program files (x86)\NSIS"
\ No newline at end of file diff --git a/util/scripts/win-binary/config/eclipse.conf b/util/scripts/win-binary/config/eclipse.conf new file mode 100644 index 0000000..2969dd4 --- /dev/null +++ b/util/scripts/win-binary/config/eclipse.conf @@ -0,0 +1,20 @@ +Section GETFILES +copy extsync eclipse +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Eclipse Integration" +installer version "1.4.0" +installer output "c:\iwmake\qt-eclipse-integration-win32-${PRODUCT_VERSION}.exe" +installer startmenu "Qt Eclipse Integration v${PRODUCT_VERSION}" +installer licenseFile "%IWMAKE_ROOT%\eclipse\plugins\com.trolltech.qtcpp.feature_${PRODUCT_VERSION}\license.txt" +installer enable directory_page +installer enable uninstall_previous +installer instdir eclipse 0 "Integration Installation Directory" + +installer module eclipse + +# compile the package +installer compile +SectionEnd diff --git a/util/scripts/win-binary/config/mingw-opensource.conf b/util/scripts/win-binary/config/mingw-opensource.conf new file mode 100644 index 0000000..88e8c9e --- /dev/null +++ b/util/scripts/win-binary/config/mingw-opensource.conf @@ -0,0 +1,95 @@ +#extracts the package to buildDir + +extract dest "build_mingw_opensource" +Section EXTRACT +extract extUnpack "qt-win-opensource-src-%QT_VERSION%.zip" +SectionEnd + +#build the binaries +build begin mingw "build_mingw_opensource" + +Section CONFIGURE +build configure "-confirm-license -debug-and-release -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl" +SectionEnd + +Section BUILD +build bin +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_mingw_opensource" + +copy dest "release_mingw_opensource" +copy src "build_mingw_opensource" + +# extract everything once more +extract dest "release_mingw_opensource" +extract unpack "qt-win-opensource-src-%QT_VERSION%.zip" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.a" +copy all "*.exe" +copy all "*.dll" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" + +# copy InetLoad license info +copy files "..\INetLoad\Readme.txt" "src\3rdparty\InetLoad\" + +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt OpenSource" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-opensource-%QT_VERSION%-mingw.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (OpenSource)" +installer enable component_page +installer enable directory_page +installer enable startmenu_page +installer instdir mingw 0 "Qt Installation Directory" +installer licenseFile "%IWMAKE_ROOT%\release_mingw_opensource\.LICENSE-MERGED-GPL2-GPL3" +#installer licenseFile "%IWMAKE_ROOT%\release_mingw_opensource\LICENSE.PREVIEW.OPENSOURCE" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +installer module registeruiext +installer module opensource + +# mingw options +installer module mingw +installer src mingw "release_mingw_opensource" +installer makeFileList mingw "release_mingw_opensource" +installer buildDir mingw "build_mingw_opensource" +installer enable nodirlengthcheck +SectionEnd + +# compile the package +Section NSIS_COMPILE +installer compile +SectionEnd diff --git a/util/scripts/win-binary/config/qsa.conf b/util/scripts/win-binary/config/qsa.conf new file mode 100644 index 0000000..f585515 --- /dev/null +++ b/util/scripts/win-binary/config/qsa.conf @@ -0,0 +1,34 @@ +env releaseLocation "http://anarki.troll.no/~gunnar/packages" "" "" + +Section EXTRACT +extract dest "qsa" +extract extUnpack "qsa-win-commercial-%QSA_VERSION_NUMBER%.zip" +SectionEnd + +Section NSIS +# general installer options +installer begin "QSA" +installer version "%QSA_VERSION_NUMBER%" +installer output "c:\iwmake\qsa-win-commercial-%QSA_VERSION_NUMBER%.exe" +installer startmenu "Trolltech QSA v%QSA_VERSION_NUMBER%" +installer enable directory_page +installer enable admin_check +installer instdir qsa 0 "QSA Installation Directory" + +installer welcomenote "This wizard will guide you through the installation of QSA v%QSA_VERSION_NUMBER%.\r\n\r\nQSA %QSA_VERSION_NUMBER% requires Qt 4.0.1 snapshots or later.\r\n\r\nThe installer will try to determine your development environment. If you experience problems installing QSA %QSA_VERSION_NUMBER%, please make sure the PATH and QMAKESPEC environment variables are set up correctly and try again.\r\n\r\nClick Next to continue." + +#installer licenseFile "%IWMAKE_ROOT%\qsa\LICENSE.PREVIEW" + +# key checker +installer module licensecheck +installer defineDir licensecheck licenseDir "qsa" +installer define licensecheck productlist "Universal|Desktop" +installer define licensecheck checkproduct "QSA" + +# INSERT qsa module (specify root if path to sources is different than qsa) +installer module qsa + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/qsa_eval.conf b/util/scripts/win-binary/config/qsa_eval.conf new file mode 100644 index 0000000..5f595e5 --- /dev/null +++ b/util/scripts/win-binary/config/qsa_eval.conf @@ -0,0 +1,36 @@ +env releaseLocation "http://anarki.troll.no/~gunnar/packages" "" "" + +Section EXTRACT +extract dest "qsa" +extract extUnpack "qsa-win-eval-1.2.2.zip" +SectionEnd + +Section NSIS +# general installer options +installer begin "QSA" +installer version "1.2.2" +installer output "c:\iwmake\qsa-win-eval-1.2.2.exe" +installer startmenu "Trolltech QSA v1.2.2" +installer enable directory_page +# installer enable admin_check +installer instdir qsa 0 "QSA Installation Directory" + +installer welcomenote "This wizard will guide you through the installation of QSA v1.2.2.\r\n\r\nQSA 1.2.2 requires Qt 4.0.1 snapshots or later.\r\n\r\nThe installer will try to determine your development environment. If you experience problems installing QSA 1.2.2, please make sure the PATH and QMAKESPEC environment variables are set up correctly and try again.\r\n\r\nClick Next to continue." + +# installer licenseFile "%IWMAKE_ROOT%\qsa\LICENSE.PREVIEW" + +# key checker +installer module licensecheck +installer defineDir licensecheck licenseDir "qsa" +installer define licensecheck license "LICENSE.EVAL" +installer define licensecheck uslicense "LICENSE.EVAL" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation|Desktop|Universal" +installer define licensecheck checkproduct "QSA" + +# INSERT qsa module (specify root if path to sources is different than qsa) +installer module qsa + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/qsa_gpl.conf b/util/scripts/win-binary/config/qsa_gpl.conf new file mode 100644 index 0000000..e599605 --- /dev/null +++ b/util/scripts/win-binary/config/qsa_gpl.conf @@ -0,0 +1,34 @@ +env releaseLocation "http://anarki.troll.no/~gunnar/packages" "" "" + +Section EXTRACT +extract dest "qsa" +extract extUnpack "qsa-win-opensource-1.2.2.zip" +SectionEnd + +Section NSIS +# general installer options +installer begin "QSA" +installer version "1.2.2" +installer output "c:\iwmake\qsa-win-opensource-1.2.2.exe" +installer startmenu "Trolltech QSA v1.2.2" +installer enable directory_page +installer enable admin_check +installer instdir qsa 0 "QSA Installation Directory" + +installer welcomenote "This wizard will guide you through the installation of QSA v1.2.2.\r\n\r\nQSA 1.2.2 requires Qt 4.0.1 snapshots or later.\r\n\r\nThe installer will try to determine your development environment. If you experience problems installing QSA 1.2.2, please make sure the PATH and QMAKESPEC environment variables are set up correctly and try again.\r\n\r\nClick Next to continue." + +installer licenseFile "%IWMAKE_ROOT%\qsa\LICENSE.GPL" + +# key checker +#installer module licensecheck +#installer defineDir licensecheck license "qsa\.LICENSE" +#installer defineDir licensecheck uslicense "qsa\.LICENSE-US" +#installer define licensecheck productlist "Universal|Desktop" +#installer define licensecheck checkproduct "QSA" + +# INSERT qsa module (specify root if path to sources is different than qsa) +installer module qsa + +# compile the package +installer compile +SectionEnd diff --git a/util/scripts/win-binary/config/qtjambi-commercial.conf b/util/scripts/win-binary/config/qtjambi-commercial.conf new file mode 100644 index 0000000..3ce1e76 --- /dev/null +++ b/util/scripts/win-binary/config/qtjambi-commercial.conf @@ -0,0 +1,33 @@ +env releaseLocation "http://anarki.troll.no/~gunnar/packages/commercial" + +delete dir "qtjambi_commercial" +extract dest "qtjambi_commercial" +extract extUnpack "qtjambi-win32-commercial-%QTJAMBI_VERSION%.zip" + +Section NSIS +# general installer options +installer begin "Qt Jambi" +installer version "%QTJAMBI_VERSION%" +installer output "x:\public_html\packages\commercial\qtjambi-win32-commercial-%QTJAMBI_VERSION%.exe" +installer startmenu "Qt Jambi by Nokia v4.3.3_01" +installer makeFileList qtjambi "qtjambi_commercial" + +installer enable directory_page +installer enable startmenu_page +installer instdir qtjambi 0 "Qt Jambi Installation Directory" + +# license checking +installer module licensecheck +installer define licensecheck license "LICENSE" +installer define licensecheck uslicense "LICENSE" +installer defineDir licensecheck licenseDir "qtjambi_commercial" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module qtjambi + +# compile the package +installer compile +installer sign +SectionEnd + + diff --git a/util/scripts/win-binary/config/qtjambi-eval.conf b/util/scripts/win-binary/config/qtjambi-eval.conf new file mode 100644 index 0000000..4411ca3 --- /dev/null +++ b/util/scripts/win-binary/config/qtjambi-eval.conf @@ -0,0 +1,34 @@ +env releaseLocation "http://anarki.troll.no/~gunnar/packages/eval" + +delete dir "qtjambi_evaluation" +extract dest "qtjambi_evaluation" +extract extUnpack "qtjambi-win32-eval-%QTJAMBI_VERSION%.zip" + +Section NSIS +# general installer options +installer begin "Qt Jambi Evaluation" +installer version "%QTJAMBI_VERSION%" +installer output "x:\public_html\packages\eval\qtjambi-win32-eval-%QTJAMBI_VERSION%.exe" +installer startmenu "Qt Jambi by Nokia v4.3.3_01" +installer makeFileList qtjambi "qtjambi_evaluation" + +installer enable directory_page +installer enable startmenu_page +installer instdir qtjambi 0 "Qt Jambi Installation Directory" + +# license checking +installer module licensecheck +installer define licensecheck license "LICENSE.EVAL" +installer define licensecheck uslicense "LICENSE.EVAL" +installer defineDir licensecheck licenseDir "qtjambi_evaluation" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation" + +installer module qtjambi +installer module evaluation + +# compile the package +installer compile +installer sign +SectionEnd + + diff --git a/util/scripts/win-binary/config/vc60-commercial.conf b/util/scripts/win-binary/config/vc60-commercial.conf new file mode 100644 index 0000000..1c2877d --- /dev/null +++ b/util/scripts/win-binary/config/vc60-commercial.conf @@ -0,0 +1,110 @@ +#extracts the package to buildDir +extract dest "build_vc60_commercial_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vc60_commercial_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +#build the binaries +build begin vc60 "build_vc60_commercial_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -no-phonon -openssl" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vc60_commercial" + +copy dest "release_vc60_commercial" +copy src "build_vc60_commercial_________________PADDING_________________" + +# extract everything once more +extract dest "release_vc60_commercial" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# moc files (exclude release moc files) +copy filesEx "src\moc_*.cpp" "src\" "release_shared" +copy filesEx "src\*.moc" "src\" "release_shared" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Commercial" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-commercial-%QT_VERSION%-vc60.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (VC60)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vc60_commercial" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vc60_commercial" +installer makeFileList msvc "release_vc60_commercial" +installer buildDir msvc "build_vc60_commercial_________________PADDING_________________" +installer define msvc vc60 + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vc60-eval.conf b/util/scripts/win-binary/config/vc60-eval.conf new file mode 100644 index 0000000..f2fc154 --- /dev/null +++ b/util/scripts/win-binary/config/vc60-eval.conf @@ -0,0 +1,133 @@ +#extracts the package to buildDir +extract dest "build_vc60_evaluation_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +extract extPatch "qt-win-evalpatches-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vc60_evaluation_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync addin60 +copy extsync debugext +SectionEnd + +#build the binaries +build begin vc60 "build_vc60_evaluation_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl -no-phonon -D QT_EVAL" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vc60_evaluation" + +copy dest "release_vc60_evaluation" +copy src "build_vc60_evaluation_________________PADDING_________________" + +# extract everything once more +extract dest "release_vc60_evaluation" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# create header files +copy syncqt + +delete destDir "src" +delete destDir "tools" +delete destDir "qmake" + +# phrasebooks & porting .xml file +copy files "tools\linguist\phrasebooks\*.qph" "phrasebooks\" +copy files "tools\porting\src\*.xml" "" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# qconfig.h +copy files "src\corelib\global\qconfig.h" "include\Qt\" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +delete file "configure.exe" + +# copy some activeqt stuff needed to compile examples +copy file "src\activeqt\control\qaxserver.rc" +copy file "src\activeqt\control\qaxserver.ico" +copy file "src\activeqt\control\qaxserver.def" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Evaluation" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-eval-%QT_VERSION%-vc60.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (Eval. VC60)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt v%QT_VERSION%:" +installer instdir addin 1 "Visual Studio Add-In:" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vc60_evaluation" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation" + +installer module evaluation +installer module environment +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vc60_evaluation" +installer makeFileList msvc "release_vc60_evaluation" +installer buildDir msvc "build_vc60_evaluation_________________PADDING_________________" +installer define msvc vc60 + +# help options +installer module addin60 + +# debugext options +installer module debugext + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2003-commercial-vsip.conf b/util/scripts/win-binary/config/vs2003-commercial-vsip.conf new file mode 100644 index 0000000..4f3ba8b --- /dev/null +++ b/util/scripts/win-binary/config/vs2003-commercial-vsip.conf @@ -0,0 +1,131 @@ +#extracts the package to buildDir +extract dest "build_vs2003_commercial_vsip_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2003_commercial_vsip_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync vsip +copy extsync debugext +SectionEnd + +#build the binaries +build begin vs2003 "build_vs2003_commercial_vsip_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2003_commercial_vsip" + +copy dest "release_vs2003_commercial_vsip" +copy src "build_vs2003_commercial_vsip_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2003_commercial_vsip" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# moc files (exclude release moc files) +copy filesEx "src\moc_*.cpp" "src\" "release_shared" +copy filesEx "src\*.moc" "src\" "release_shared" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# copy manifest files (vs2003 stuff) +copy all "*.manifest" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Commercial" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-commercial-vsintegration-%QT_VERSION%-vs2003.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (VS2003)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" +installer instdir vsip 1 "Visual Studio Integration:" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2003_commercial_vsip" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2003_commercial_vsip" +installer makeFileList msvc "release_vs2003_commercial_vsip" +installer buildDir msvc "build_vs2003_commercial_vsip_________________PADDING_________________" +installer define msvc vs2003 + +# vsip options +installer module vsip +installer define vsip version "1.4.0" +installer define vsip no2005 +installer define vsip no2008 + +# help options +installer module help + +# debugext options +installer module debugext + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2003-commercial.conf b/util/scripts/win-binary/config/vs2003-commercial.conf new file mode 100644 index 0000000..2d3a47f --- /dev/null +++ b/util/scripts/win-binary/config/vs2003-commercial.conf @@ -0,0 +1,110 @@ +#extracts the package to buildDir +extract dest "build_vs2003_commercial_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2003_commercial_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +#build the binaries +build begin vs2003 "build_vs2003_commercial_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2003_commercial" + +copy dest "release_vs2003_commercial" +copy src "build_vs2003_commercial_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2003_commercial" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# moc files (exclude release moc files) +copy filesEx "src\moc_*.cpp" "src\" "release_shared" +copy filesEx "src\*.moc" "src\" "release_shared" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Commercial" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-commercial-%QT_VERSION%-vs2003.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (VS2003)" +installer enable component_page +installer enable directory_page +installer enable startmenu_page +installer instdir msvc 0 "Qt Installation Directory" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2003_commercial" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2003_commercial" +installer makeFileList msvc "release_vs2003_commercial" +installer buildDir msvc "build_vs2003_commercial_________________PADDING_________________" +installer define msvc vs2003 +SectionEnd + +# compile the package +Section NSIS_COMPILE +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2003-demo.conf b/util/scripts/win-binary/config/vs2003-demo.conf new file mode 100644 index 0000000..ef2d48d --- /dev/null +++ b/util/scripts/win-binary/config/vs2003-demo.conf @@ -0,0 +1,58 @@ +#extracts the package to buildDir +Section Extract +copy dest "build_vs2003_demo_________________PADDING_________________" +copy package "qt-win-commercial-desktop-4.0.0.zip" +SectionEnd + +#build the binaries +build begin vs2003 "build_vs2003_demo_________________PADDING_________________" + +Section Configure +build configure "-confirm-license -release -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg" +SectionEnd + +Section Build +build bin +SectionEnd + +build finish + +# organize release files +Section Organize +delete dir "release_vs2003_demo" + +copy dest "release_vs2003_demo" +copy src "build_vs2003_demo_________________PADDING_________________" + +copy files "bin\*.dll" "bin\" +copy files "doc\*" "doc\" +copy files "demos\*.exe" "demos\" +copy files "examples\*.exe" "examples\" +copy file "bin\qtdemo.exe" "bin\" +copy file "bin\assistant.exe" "bin\" +copy runtime "71" +SectionEnd + +# update the nsis plugins +installer updateplugins + +# general installer options +installer begin "Qt Demos" +installer version "4.0.0" +installer output "c:\iwmake\qt-demos_4.0.0.exe" +installer startmenu "Qt Demos v4.0.0" +installer enable component_page +installer enable directory_page +installer instdir msvc 0 "Qt Installation Directory" + +installer module environment +installer module registeruiext + +# msvc7x options +installer module msvc +installer define msvc nodefault +installer src msvc "release_vs2003_demo" +installer buildDir msvc "build_vs2003_demo_________________PADDING_________________" + +# compile the package +installer compile
\ No newline at end of file diff --git a/util/scripts/win-binary/config/vs2003-eval.conf b/util/scripts/win-binary/config/vs2003-eval.conf new file mode 100644 index 0000000..d139fc9 --- /dev/null +++ b/util/scripts/win-binary/config/vs2003-eval.conf @@ -0,0 +1,124 @@ +#extracts the package to buildDir +extract dest "build_vs2003_evaluation_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +extract extPatch "qt-win-evalpatches-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2003_evaluation_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync debugext +SectionEnd + +#build the binaries +build begin vs2003 "build_vs2003_evaluation_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl -D QT_EVAL" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2003_evaluation" + +copy dest "release_vs2003_evaluation" +copy src "build_vs2003_evaluation_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2003_evaluation" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# create header files +copy syncqt + +delete destDir "src" +delete destDir "tools" +delete destDir "qmake" + +# phrasebooks & porting .xml file +copy files "tools\linguist\phrasebooks\*.qph" "phrasebooks\" +copy files "tools\porting\src\*.xml" "" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# qconfig.h +copy files "src\corelib\global\qconfig.h" "include\Qt\" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +delete file "configure.exe" + +# copy some activeqt stuff needed to compile examples +copy file "src\activeqt\control\qaxserver.rc" +copy file "src\activeqt\control\qaxserver.ico" +copy file "src\activeqt\control\qaxserver.def" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Evaluation" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-eval-%QT_VERSION%-vs2003.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (Eval. VS2003)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt v%QT_VERSION%:" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2003_evaluation" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation" + +installer module evaluation +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2003_evaluation" +installer makeFileList msvc "release_vs2003_evaluation" +installer buildDir msvc "build_vs2003_evaluation_________________PADDING_________________" +installer define msvc vs2003 + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2005-ce-commercial.conf b/util/scripts/win-binary/config/vs2005-ce-commercial.conf new file mode 100644 index 0000000..dbfaa41 --- /dev/null +++ b/util/scripts/win-binary/config/vs2005-ce-commercial.conf @@ -0,0 +1,165 @@ +# qt-%QT_VERSION% +env releaseLocation "http://tirion.troll.no/~qt/packages/%QT_VERSION%" + +#extracts the package to buildDir +extract dest "qtsources" +Section EXTRACT +# qt-%QT_VERSION% +extract extUnpack "qt-embedded-wince-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "qtsources\examples\examples.pro" "activeqt" + +SectionEnd + +#build the WIN32 binaries +build begin vs2005 "build_vs2005_ce_win32_commercial_________________PADDING_________________" +Section CONFIGUREWIN32 +build shadowconfigure "qtsources" "-confirm-license -no-webkit -no-phonon -qt-libpng -qt-libjpeg -no-openssl -no-incredibuild-xge" +SectionEnd +Section BUILDWIN32 +build bin sub-src +build binInDir "tools" +SectionEnd +build finish + +#build the WM50 binaries +build begin vs2005 "build_vs2005_ce_wm50_commercial_________________PADDING_________________" +Section CONFIGUREWM50 +build shadowconfigure "qtsources" "-confirm-license -xplatform wincewm50pocket-msvc2005 -no-openssl -no-incredibuild-xge" +SectionEnd +Section BUILDWM50 +build setcepaths "wincewm50pocket-msvc2005" +build bin sub-src +SectionEnd +build finish + +#build the ssdk50x86 binaries +build begin vs2005 "build_vs2005_ce_ssdk50x86_commercial_________________PADDING_________________" +Section CONFIGURESSDK50X86 +build shadowconfigure "qtsources" "-confirm-license -xplatform wince50standard-x86-msvc2005 -no-openssl -no-incredibuild-xge" +SectionEnd +Section BUILDSSDK50X86 +build setcepaths "wince50standard-x86-msvc2005" +build bin sub-src +SectionEnd +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2005_ce_commercial" +copy dest "release_vs2005_ce_commercial" + +# copy sources to "qtsources" +copy src "qtsources" +delete dir "release_vs2005_ce_commercial\qtsources" +copy dest "release_vs2005_ce_commercial\qtsources" +copy all "*" + +# copy WIN32 binaries +copy src "build_vs2005_ce_win32_commercial_________________PADDING_________________" +delete dir "release_vs2005_ce_commercial\win32binaries" +copy dest "release_vs2005_ce_commercial\win32binaries" +copy files "bin\*" "bin\" +copy files "lib\*.pdb" "bin\" +copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" + +copy src "release_vs2005_ce_commercial\qtsources\doc\html" +copy dest "release_vs2005_ce_commercial\win32binaries\doc\html" +copy all "*" +copy src "release_vs2005_ce_commercial\qtsources\doc\qch" +copy dest "release_vs2005_ce_commercial\win32binaries\doc\qch" +copy all "*" +delete dir "release_vs2005_ce_commercial\qtsources\doc\html" +#copy all "qch" +delete dir "release_vs2005_ce_commercial\qtsources\doc\qch" + +# copy WM50 binaries +copy src "build_vs2005_ce_wm50_commercial_________________PADDING_________________" +delete dir "release_vs2005_ce_commercial\wm50binaries" +copy dest "release_vs2005_ce_commercial\wm50binaries" +copy files "bin\*" "bin\" +copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "lib\*.pdb" "lib\" +copy files "lib\*.dll" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" + +# copy ssdk50x86 binaries +copy src "build_vs2005_ce_ssdk50x86_commercial_________________PADDING_________________" +delete dir "release_vs2005_ce_commercial\ssdk50x86binaries" +copy dest "release_vs2005_ce_commercial\ssdk50x86binaries" +copy files "bin\*" "bin\" +copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "lib\*.pdb" "lib\" +copy files "lib\*.dll" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" + +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt for Windows CE Commercial" +installer version "%QT_VERSION%" +installer welcometitle "Welcome to Qt for Windows CE" +installer finishtitle "Completing Qt for Windows CE" +installer output "c:\iwmake\qt-embedded-wince-commercial-%QT_VERSION%-vs2005.exe" +installer startmenu "Qt for Windows CE by Nokia v%QT_VERSION% (VS2005)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" + +installer readmefunction "Show Documentation" +# ### FIXME: Use start page as soon as assistant allows you to do so previously to loading documentation. +# installer readmestartpage "qthelp://com.trolltech.qt.440/qdoc/wince-with-qt-introduction.html" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2005_ce_commercial\qtsources" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" +installer define licensecheck wince + +#installer licenseFile "%IWMAKE_ROOT%\LICENSE.PREVIEW.COMMERCIAL" + +installer module registeruiext + +# msvc options +installer module msvc +installer makeFileList msvc "release_vs2005_ce_commercial" +installer buildDir msvc "build_vs2005_ce_win32_commercial_________________PADDING_________________" +installer defineDir msvc qtsourcetree "qtsources" +installer define msvc qtsourceinstalldirname "qtsources" +installer defineDir msvc win32buildtree "build_vs2005_ce_win32_commercial_________________PADDING_________________" +installer define msvc win32buildinstalldirname "win32binaries" +installer defineDir msvc wm50buildtree "build_vs2005_ce_wm50_commercial_________________PADDING_________________" +installer define msvc wm50buildinstalldirname "wm50binaries" +installer define msvc wm50sdk "wincewm50pocket-msvc2005" +installer define msvc wm50versionpretty "Windows Mobile 5 Pocket" +installer defineDir msvc ssdk50x86buildtree "build_vs2005_ce_ssdk50x86_commercial_________________PADDING_________________" +installer define msvc ssdk50x86buildinstalldirname "ssdk50x86binaries" +installer define msvc ssdk50x86sdk "wince50standard-x86-msvc2005" +installer define msvc ssdk50x86versionpretty "WinCE standard SDK 5 x86" +installer define msvc vs2005 +#installer define msvc skippatchlicenseinformation + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2005-ce-eval.conf b/util/scripts/win-binary/config/vs2005-ce-eval.conf new file mode 100644 index 0000000..aadc04a --- /dev/null +++ b/util/scripts/win-binary/config/vs2005-ce-eval.conf @@ -0,0 +1,202 @@ +# qt-%QT_VERSION% +env releaseLocation "http://tirion.troll.no/~qt/packages/%QT_VERSION%" + +#extracts the package to buildDir +extract dest "qtsources" +Section EXTRACT +# qt-%QT_VERSION% +extract extUnpack "qt-embedded-wince-commercial-src-%QT_VERSION%.zip" +# This is a little bit hacky: The eval patches unzip to qt-win... not to qt-wince +# Thus we keep extracting to that directory and copy it over to our target afterwards +extract src "qt-win-commercial-src-%QT_VERSION%" +extract extPatch "qt-win-evalpatches-src-%QT_VERSION%.zip" +extract src "qt-wince-commercial-src-%QT_VERSION%" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "qtsources\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync debugext +SectionEnd + + +#build the WIN32 binaries +build begin vs2005 "build_vs2005_ce_win32_evaluation_________________PADDING_________________" +Section CONFIGUREWIN32 +build shadowconfigure "qtsources" "-confirm-license -no-webkit -no-phonon -qt-libpng -qt-libjpeg -no-openssl -no-incredibuild-xge -D QT_EVAL" +SectionEnd +Section BUILDWIN32 +build bin sub-src +build binInDir "tools" +SectionEnd +build finish + +#build the WM50 binaries +build begin vs2005 "build_vs2005_ce_wm50_evaluation_________________PADDING_________________" +Section CONFIGUREWM50 +build shadowconfigure "qtsources" "-confirm-license -xplatform wincewm50pocket-msvc2005 -no-openssl -no-incredibuild-xge -D QT_EVAL" +SectionEnd +Section BUILDWM50 +build setcepaths "wincewm50pocket-msvc2005" +build bin sub-src +SectionEnd +build finish + +#build the ssdk50x86 binaries +build begin vs2005 "build_vs2005_ce_ssdk50x86_evaluation_________________PADDING_________________" +Section CONFIGURESSDK50X86 +build shadowconfigure "qtsources" "-confirm-license -xplatform wince50standard-x86-msvc2005 -no-openssl -no-incredibuild-xge -D QT_EVAL" +SectionEnd +Section BUILDSSDK50X86 +build setcepaths "wince50standard-x86-msvc2005" +build bin sub-src +SectionEnd +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2005_ce_evaluation" +copy dest "release_vs2005_ce_evaluation" + +# copy sources to "qtsources" +copy src "qtsources" +delete dir "release_vs2005_ce_evaluation\qtsources" +copy dest "release_vs2005_ce_evaluation\qtsources" +copy all "*" +# NOTE: The eval package must not contain sources. Thus we can only provide +# the binary builds we have to potential customers. +delete destdir "src" +delete destdir "tools" +delete destdir "qmake" +delete destdir "utils" +delete file "configure.exe" +copy dest "qtsources" +copy syncqt + +# copy WIN32 binaries +copy src "build_vs2005_ce_win32_evaluation_________________PADDING_________________" +delete dir "release_vs2005_ce_evaluation\win32binaries" +copy dest "release_vs2005_ce_evaluation\win32binaries" +copy files "bin\*" "bin\" +copy files "lib\*.pdb" "bin\" +#copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "include\Qt\qconfig.h" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" +# copy header files +copy src "qtsources\include" +copy dest "release_vs2005_ce_evaluation\win32binaries\include" +copy all "*" + +copy src "release_vs2005_ce_evaluation\qtsources\doc\html" +copy dest "release_vs2005_ce_evaluation\win32binaries\doc\html" +copy all "*" +copy src "release_vs2005_ce_evaluation\qtsources\doc\qch" +copy dest "release_vs2005_ce_evaluation\win32binaries\doc\qch" +copy all "*" +delete dir "release_vs2005_ce_evaluation\qtsources\doc\html" +#copy all "qch" +delete dir "release_vs2005_ce_evaluation\qtsources\doc\qch" + +# copy WM50 binaries +copy src "build_vs2005_ce_wm50_evaluation_________________PADDING_________________" +delete dir "release_vs2005_ce_evaluation\wm50binaries" +copy dest "release_vs2005_ce_evaluation\wm50binaries" +copy files "bin\*" "bin\" +#copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "lib\*.pdb" "lib\" +copy files "lib\*.dll" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "include\Qt\qconfig.h" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" +# copy header files +copy src "qtsources\include" +copy dest "release_vs2005_ce_evaluation\wm50binaries\include" +copy all "*" + +# copy ssdk50x86 binaries +copy src "build_vs2005_ce_ssdk50x86_evaluation_________________PADDING_________________" +delete dir "release_vs2005_ce_evaluation\ssdk50x86binaries" +copy dest "release_vs2005_ce_evaluation\ssdk50x86binaries" +copy files "bin\*" "bin\" +#copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "lib\*.pdb" "lib\" +copy files "lib\*.dll" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "include\Qt\qconfig.h" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" +# copy header files +copy src "qtsources\include" +copy dest "release_vs2005_ce_evaluation\ssdk50x86binaries\include" +copy all "*" + +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Evaluation for Windows CE" +installer version "%QT_VERSION%" +installer welcometitle "Welcome to Qt for Windows CE" +installer finishtitle "Completing Qt for Windows CE" +installer output "c:\iwmake\qt-embedded-wince-eval-%QT_VERSION%-vs2005.exe" +installer startmenu "Qt for Windows CE by Nokia v%QT_VERSION% (Eval. VS2005)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" + +installer readmefunction "Show Documentation" + +# ### FIXME: Use start page as soon as assistant allows you to do so previously to loading documentation. +# installer readmestartpage "qthelp://com.trolltech.qt.440/qdoc/wince-with-qt-introduction.html" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2005_ce_evaluation\qtsources" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation" +installer define licensecheck wince + +# ### FIXME: Remove once we have proper licenses +#installer licenseFile "%IWMAKE_ROOT%\LICENSE.PREVIEW.COMMERCIAL" + +# msvc options +installer module msvc +installer makeFileList msvc "release_vs2005_ce_evaluation" +#installer buildDir msvc "build_vs2005_ce_win32_evaluation_________________PADDING_________________" +installer buildDir msvc "qtsources" +installer defineDir msvc qtsourcetree "qtsources" +installer define msvc qtsourceinstalldirname "qtsources" +installer defineDir msvc win32buildtree "build_vs2005_ce_win32_evaluation_________________PADDING_________________" +installer define msvc win32buildinstalldirname "win32binaries" +installer defineDir msvc wm50buildtree "build_vs2005_ce_wm50_evaluation_________________PADDING_________________" +installer define msvc wm50buildinstalldirname "wm50binaries" +installer define msvc wm50sdk "wincewm50pocket-msvc2005" +installer define msvc wm50versionpretty "Windows Mobile 5 Pocket" +installer defineDir msvc ssdk50x86buildtree "build_vs2005_ce_ssdk50x86_evaluation_________________PADDING_________________" +installer define msvc ssdk50x86buildinstalldirname "ssdk50x86binaries" +installer define msvc ssdk50x86sdk "wince50standard-x86-msvc2005" +installer define msvc ssdk50x86versionpretty "WinCE standard SDK 5 x86" +installer define msvc vs2005 +#installer define msvc skippatchlicenseinformation + +installer module evaluation +installer module registeruiext + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2005-commercial-vsip.conf b/util/scripts/win-binary/config/vs2005-commercial-vsip.conf new file mode 100644 index 0000000..38885e7 --- /dev/null +++ b/util/scripts/win-binary/config/vs2005-commercial-vsip.conf @@ -0,0 +1,131 @@ +#extracts the package to buildDir +extract dest "build_vs2005_commercial_vsip_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2005_commercial_vsip_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync vsip +copy extsync debugext +SectionEnd + +#build the binaries +build begin vs2005 "build_vs2005_commercial_vsip_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2005_commercial_vsip" + +copy dest "release_vs2005_commercial_vsip" +copy src "build_vs2005_commercial_vsip_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2005_commercial_vsip" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# moc files (exclude release moc files) +copy filesEx "src\moc_*.cpp" "src\" "release_shared" +copy filesEx "src\*.moc" "src\" "release_shared" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# copy manifest files (vs2005 stuff) +copy all "*.manifest" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Commercial" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-commercial-vsintegration-%QT_VERSION%-vs2005.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (VS2005)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" +installer instdir vsip 1 "Visual Studio Integration:" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2005_commercial_vsip" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2005_commercial_vsip" +installer makeFileList msvc "release_vs2005_commercial_vsip" +installer buildDir msvc "build_vs2005_commercial_vsip_________________PADDING_________________" +installer define msvc vs2005 + +# vsip options +installer module vsip +installer define vsip version "1.4.0" +installer define vsip no2003 +installer define vsip no2008 + +# help options +installer module help + +# debugext options +installer module debugext + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2005-commercial.conf b/util/scripts/win-binary/config/vs2005-commercial.conf new file mode 100644 index 0000000..1529638 --- /dev/null +++ b/util/scripts/win-binary/config/vs2005-commercial.conf @@ -0,0 +1,113 @@ +#extracts the package to buildDir +extract dest "build_vs2005_commercial_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2005_commercial_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +#build the binaries +build begin vs2005 "build_vs2005_commercial_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2005_commercial" + +copy dest "release_vs2005_commercial" +copy src "build_vs2005_commercial_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2005_commercial" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# moc files (exclude release moc files) +copy filesEx "src\moc_*.cpp" "src\" "release_shared" +copy filesEx "src\*.moc" "src\" "release_shared" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# copy manifest files (vs2005 stuff) +copy all "*.manifest" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Commercial" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-commercial-%QT_VERSION%-vs2005.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (VS2005)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2005_commercial" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2005_commercial" +installer makeFileList msvc "release_vs2005_commercial" +installer buildDir msvc "build_vs2005_commercial_________________PADDING_________________" +installer define msvc vs2005 + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2005-eval.conf b/util/scripts/win-binary/config/vs2005-eval.conf new file mode 100644 index 0000000..e4bdc1d --- /dev/null +++ b/util/scripts/win-binary/config/vs2005-eval.conf @@ -0,0 +1,127 @@ +#extracts the package to buildDir +extract dest "build_vs2005_evaluation_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +extract extPatch "qt-win-evalpatches-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2005_evaluation_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync debugext +SectionEnd + +#build the binaries +build begin vs2005 "build_vs2005_evaluation_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl -D QT_EVAL" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2005_evaluation" + +copy dest "release_vs2005_evaluation" +copy src "build_vs2005_evaluation_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2005_evaluation" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# create header files +copy syncqt + +delete destDir "src" +delete destDir "tools" +delete destDir "qmake" + +# phrasebooks & porting .xml file +copy files "tools\linguist\phrasebooks\*.qph" "phrasebooks\" +copy files "tools\porting\src\*.xml" "" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# qconfig.h +copy files "src\corelib\global\qconfig.h" "include\Qt\" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# copy manifest files (vs2005 stuff) +copy all "*.manifest" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +delete file "configure.exe" + +# copy some activeqt stuff needed to compile examples +copy file "src\activeqt\control\qaxserver.rc" +copy file "src\activeqt\control\qaxserver.ico" +copy file "src\activeqt\control\qaxserver.def" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Evaluation" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-eval-%QT_VERSION%-vs2005.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (Eval. VS2005)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt v%QT_VERSION%:" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2005_evaluation" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation" + +installer module evaluation +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2005_evaluation" +installer makeFileList msvc "release_vs2005_evaluation" +installer buildDir msvc "build_vs2005_evaluation_________________PADDING_________________" +installer define msvc vs2005 + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2005-qtdemo.conf b/util/scripts/win-binary/config/vs2005-qtdemo.conf new file mode 100644 index 0000000..7f4ba09 --- /dev/null +++ b/util/scripts/win-binary/config/vs2005-qtdemo.conf @@ -0,0 +1,115 @@ +# +# Qt-demo consists of the compiled demos + assistant +# +# Required manual steps +# - Download dxwebsetup.exe to C:\iwmake +# - Copy vcredist_x86.exe from VS8 folder to C:\iwmake +# - Set up environment to include ActiveX +# - set INCLUDE=C:\Program Files\Microsoft DirectX SDK (March 2008)\Include;C:\Program Files\Microsoft SDKs\Windows\v6.0\Include;%INCLUDE% +# - set LIB=C:\Program Files\Microsoft DirectX SDK (March 2008)\Lib\x86;C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib;%LIB% +# - Run EXTRACT +# - Patch demo/qtdemo/xml/examples.xml to only display startable demos +# - Copy examples/qtconcurrent/README from 4.4 depot +# + +#extracts the package to buildDir +Section EXTRACT +extract dest "build_msvc_qtdemo_________________PADDING_________________" +extract extUnpack qt-win-opensource-src-%QT_VERSION%.zip +SectionEnd + +#build the binaries +build begin vs2005 "build_msvc_qtdemo_________________PADDING_________________" + +Section CONFIGURE +# sqlite is needed by assistant +build configure "-confirm-license -release -plugin-sql-sqlite -qt-libpng -qt-libjpeg" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools\assistant" release +build binInDir "tools\designer" release +build binInDir "demos" release +build binInDir "examples" release +build finish +SectionEnd + + +# organize release files +Section ORGANIZE +delete dir "release_msvc_qtdemo" + +copy dest "release_msvc_qtdemo" +copy src "build_msvc_qtdemo_________________PADDING_________________" + +# copy all binary files +copy file "bin\qtdemo.exe" +copy file "bin\assistant.exe" +copy files "bin\*.dll" "bin" + +# copy documentation files +copy files "doc\qch\*.qch" "doc\qch" + +# copy plugins +copy files "plugins\accessible\*.dll" "plugins\accessible" +copy files "plugins\codecs\*.dll" "plugins\codecs" +copy files "plugins\iconengines\*.dll" "plugins\iconengines" +copy files "plugins\imageformats\*.dll" "plugins\imageformats" +copy files "plugins\sqldrivers\*.dll" "plugins\sqldrivers" +copy files "plugins\phonon_backend\*.dll" "plugins\phonon_backend" + +# copy demo & example files +copy files "demos" "demos" +copy files "examples" "examples" + +# copy external installers +copy external "%IWMAKE_ROOT%\dxwebsetup.exe" "prerequisites" +copy external "%IWMAKE_ROOT%\vcredist_x86.exe" "prerequisites" + +# delete build artifacts +delete files "ui_*.h" +delete files "Makefile" +delete files "*.Debug" +delete files "*.Release" +delete files "*.a" +delete files "*.lib" +delete files "*.vcproj" +delete dirs "tmp" +delete dirs ".obj" +delete dirs ".moc" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt" +installer version "demo-%QT_VERSION%" +installer output "%IWMAKE_ROOT%\qt-win-demo-%QT_VERSION%.exe" +installer startmenu "Qt Demo by Nokia v%QT_VERSION%" +installer welcomenote "Welcome to the Qt Demos and Examples application. This application illustrates some of the key features included the cross-platform application framework Qt. Many of these examples contain source code.\n\nFor a full, free product evaluation, please visit http://qtsoftware.com/evaluate/" +installer welcomeicon "images\qt-wizard-clean.bmp" + +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Demo Installation Directory" + +installer runfunction "Run Examples and Demos" +# installer readmefunction "Show Documentation" + +# options +installer module msvc +installer src msvc "release_msvc_qtdemo" +installer makeFileList msvc "release_msvc_qtdemo" +installer buildDir msvc "build_msvc_qtdemo_________________PADDING_________________" + +installer module qtdemo +installer define qtdemo vcredist "prerequisites\vcredist_x86.exe" +installer define qtdemo directx "prerequisites\dxwebsetup.exe" + +installer licenseFile "%IWMAKE_ROOT%\build_msvc_qtdemo_________________PADDING_________________\.LICENSE-MERGED-GPL2-GPL3" + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2008-ce-commercial.conf b/util/scripts/win-binary/config/vs2008-ce-commercial.conf new file mode 100644 index 0000000..d730168 --- /dev/null +++ b/util/scripts/win-binary/config/vs2008-ce-commercial.conf @@ -0,0 +1,97 @@ +#extracts the package to buildDir +extract dest "build_vs2008_commercial_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-embedded-wince-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +#delete line "build_vs2008_commercial_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +#build the binaries +build begin vs2008 "build_vs2008_commercial_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -qt-libpng -qt-libjpeg -qt-style-windowsce -qt-style-windowsmobile -no-opengl -no-qt3support -release" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools\assistant" release +build binInDir "tools\designer" release +build binInDir "tools\linguist" release +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2008_commercial" + +copy dest "release_vs2008_commercial" +copy src "build_vs2008_commercial_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2008_commercial" +extract unpack "qt-embedded-wince-commercial-src-%QT_VERSION%.zip" + +# copy all binary files +copy all "*.exe" +copy all "*.dll" + +# copy plugins to appropiate place +copy files "plugins\accessible\*.dll" "bin\accessible" +copy files "plugins\codecs\*.dll" "bin\codecs" +copy files "plugins\designer\*.dll" "bin\designer" +copy files "plugins\iconengines\*.dll" "bin\iconengines" +copy files "plugins\imageformats\*.dll" "bin\imageformats" +# remove unused stuff +delete files "lib\*.*" +delete destDir "plugins" + +# remove host tools being recompiled later +# unfortunately msvc.nsh depends on qmake.exe +# delete file "bin\qmake.exe" +delete file "bin\moc.exe" +delete file "bin\uic.exe" +delete file "bin\rcc.exe" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt for Windows CE Commercial" +installer version "%QT_VERSION%" +installer welcometitle "Welcome to Qt for Windows CE" +installer finishtitle "Completing Qt for Windows CE" +installer output "c:\iwmake\qt-embedded-wince-commercial-%QT_VERSION%-vs2008.exe" +installer startmenu "Qt for Windows CE by Nokia v%QT_VERSION% (VS2008)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" + +installer readmefunction "Show Documentation" +installer readmestartpage "wince-with-qt-introduction.html" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2008_commercial" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" +installer define licensecheck wince + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2008_commercial" +installer makeFileList msvc "release_vs2008_commercial" +installer buildDir msvc "build_vs2008_commercial_________________PADDING_________________" +installer define msvc vs2008ce + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2008-ce-eval.conf b/util/scripts/win-binary/config/vs2008-ce-eval.conf new file mode 100644 index 0000000..deef004 --- /dev/null +++ b/util/scripts/win-binary/config/vs2008-ce-eval.conf @@ -0,0 +1,202 @@ +# qt-%QT_VERSION% +env releaseLocation "http://tirion.troll.no/~qt/packages/%QT_VERSION%" + +#extracts the package to buildDir +extract dest "qtsources" +Section EXTRACT +# qt-%QT_VERSION% +extract extUnpack "qt-embedded-wince-commercial-src-%QT_VERSION%.zip" +# This is a little bit hacky: The eval patches unzip to qt-win... not to qt-wince +# Thus we keep extracting to that directory and copy it over to our target afterwards +extract src "qt-win-commercial-src-%QT_VERSION%" +extract extPatch "qt-win-evalpatches-src-%QT_VERSION%.zip" +extract src "qt-wince-commercial-src-%QT_VERSION%" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "qtsources\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync debugext +SectionEnd + + +#build the WIN32 binaries +build begin vs2008 "build_vs2008_ce_win32_evaluation_________________PADDING_________________" +Section CONFIGUREWIN32 +build shadowconfigure "qtsources" "-confirm-license -no-webkit -no-phonon -qt-libpng -qt-libjpeg -no-openssl -no-incredibuild-xge -D QT_EVAL" +SectionEnd +Section BUILDWIN32 +build bin sub-src +build binInDir "tools" +SectionEnd +build finish + +#build the WM50 binaries +build begin vs2008 "build_vs2008_ce_wm50_evaluation_________________PADDING_________________" +Section CONFIGUREWM50 +build shadowconfigure "qtsources" "-confirm-license -xplatform wincewm50pocket-msvc2008 -no-openssl -no-incredibuild-xge -D QT_EVAL" +SectionEnd +Section BUILDWM50 +build setcepaths "wincewm50pocket-msvc2008" +build bin sub-src +SectionEnd +build finish + +#build the ssdk50x86 binaries +build begin vs2008 "build_vs2008_ce_ssdk50x86_evaluation_________________PADDING_________________" +Section CONFIGURESSDK50X86 +build shadowconfigure "qtsources" "-confirm-license -xplatform wince50standard-x86-msvc2008 -no-openssl -no-incredibuild-xge -D QT_EVAL" +SectionEnd +Section BUILDSSDK50X86 +build setcepaths "wince50standard-x86-msvc2008" +build bin sub-src +SectionEnd +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2008_ce_evaluation" +copy dest "release_vs2008_ce_evaluation" + +# copy sources to "qtsources" +copy src "qtsources" +delete dir "release_vs2008_ce_evaluation\qtsources" +copy dest "release_vs2008_ce_evaluation\qtsources" +copy all "*" +# NOTE: The eval package must not contain sources. Thus we can only provide +# the binary builds we have to potential customers. +delete destdir "src" +delete destdir "tools" +delete destdir "qmake" +delete destdir "utils" +delete file "configure.exe" +copy dest "qtsources" +copy syncqt + +# copy WIN32 binaries +copy src "build_vs2008_ce_win32_evaluation_________________PADDING_________________" +delete dir "release_vs2008_ce_evaluation\win32binaries" +copy dest "release_vs2008_ce_evaluation\win32binaries" +copy files "bin\*" "bin\" +copy files "lib\*.pdb" "bin\" +#copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "include\Qt\qconfig.h" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" +# copy header files +copy src "qtsources\include" +copy dest "release_vs2008_ce_evaluation\win32binaries\include" +copy all "*" + +copy src "release_vs2008_ce_evaluation\qtsources\doc\html" +copy dest "release_vs2008_ce_evaluation\win32binaries\doc\html" +copy all "*" +copy src "release_vs2008_ce_evaluation\qtsources\doc\qch" +copy dest "release_vs2008_ce_evaluation\win32binaries\doc\qch" +copy all "*" +delete dir "release_vs2008_ce_evaluation\qtsources\doc\html" +#copy all "qch" +delete dir "release_vs2008_ce_evaluation\qtsources\doc\qch" + +# copy WM50 binaries +copy src "build_vs2008_ce_wm50_evaluation_________________PADDING_________________" +delete dir "release_vs2008_ce_evaluation\wm50binaries" +copy dest "release_vs2008_ce_evaluation\wm50binaries" +copy files "bin\*" "bin\" +#copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "lib\*.pdb" "lib\" +copy files "lib\*.dll" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "include\Qt\qconfig.h" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" +# copy header files +copy src "qtsources\include" +copy dest "release_vs2008_ce_evaluation\wm50binaries\include" +copy all "*" + +# copy ssdk50x86 binaries +copy src "build_vs2008_ce_ssdk50x86_evaluation_________________PADDING_________________" +delete dir "release_vs2008_ce_evaluation\ssdk50x86binaries" +copy dest "release_vs2008_ce_evaluation\ssdk50x86binaries" +copy files "bin\*" "bin\" +#copy files "include\*" "include\" +copy files "lib\*.prl" "lib\" +copy files "lib\*.lib" "lib\" +copy files "lib\*.pdb" "lib\" +copy files "lib\*.dll" "lib\" +copy files "mkspecs\*" "mkspecs\" +copy files "plugins\*" "plugins\" +copy file "include\Qt\qconfig.h" +copy file "src\corelib\global\qconfig.h" +copy file ".qmake.cache" +# copy header files +copy src "qtsources\include" +copy dest "release_vs2008_ce_evaluation\ssdk50x86binaries\include" +copy all "*" + +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Evaluation for Windows CE" +installer version "%QT_VERSION%" +installer welcometitle "Welcome to Qt for Windows CE" +installer finishtitle "Completing Qt for Windows CE" +installer output "c:\iwmake\qt-embedded-wince-eval-%QT_VERSION%-vs2008.exe" +installer startmenu "Qt for Windows CE by Nokia v%QT_VERSION% (Eval. VS2008)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" + +installer readmefunction "Show Documentation" + +# ### FIXME: Use start page as soon as assistant allows you to do so previously to loading documentation. +# installer readmestartpage "qthelp://com.trolltech.qt.440/qdoc/wince-with-qt-introduction.html" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2008_ce_evaluation\qtsources" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation" +installer define licensecheck wince + +# ### FIXME: Remove once we have proper licenses +#installer licenseFile "%IWMAKE_ROOT%\LICENSE.PREVIEW.COMMERCIAL" + +# msvc options +installer module msvc +installer makeFileList msvc "release_vs2008_ce_evaluation" +#installer buildDir msvc "build_vs2008_ce_win32_evaluation_________________PADDING_________________" +installer buildDir msvc "qtsources" +installer defineDir msvc qtsourcetree "qtsources" +installer define msvc qtsourceinstalldirname "qtsources" +installer defineDir msvc win32buildtree "build_vs2008_ce_win32_evaluation_________________PADDING_________________" +installer define msvc win32buildinstalldirname "win32binaries" +installer defineDir msvc wm50buildtree "build_vs2008_ce_wm50_evaluation_________________PADDING_________________" +installer define msvc wm50buildinstalldirname "wm50binaries" +installer define msvc wm50sdk "wincewm50pocket-msvc2008" +installer define msvc wm50versionpretty "Windows Mobile 5 Pocket" +installer defineDir msvc ssdk50x86buildtree "build_vs2008_ce_ssdk50x86_evaluation_________________PADDING_________________" +installer define msvc ssdk50x86buildinstalldirname "ssdk50x86binaries" +installer define msvc ssdk50x86sdk "wince50standard-x86-msvc2008" +installer define msvc ssdk50x86versionpretty "WinCE standard SDK 5 x86" +installer define msvc vs2008 +#installer define msvc skippatchlicenseinformation + +installer module evaluation +installer module registeruiext + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2008-commercial-vsip.conf b/util/scripts/win-binary/config/vs2008-commercial-vsip.conf new file mode 100644 index 0000000..01eb71e --- /dev/null +++ b/util/scripts/win-binary/config/vs2008-commercial-vsip.conf @@ -0,0 +1,131 @@ +#extracts the package to buildDir +extract dest "build_vs2008_commercial_vsip_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2008_commercial_vsip_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync vsip +copy extsync debugext +SectionEnd + +#build the binaries +build begin vs2008 "build_vs2008_commercial_vsip_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2008_commercial_vsip" + +copy dest "release_vs2008_commercial_vsip" +copy src "build_vs2008_commercial_vsip_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2008_commercial_vsip" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# moc files (exclude release moc files) +copy filesEx "src\moc_*.cpp" "src\" "release_shared" +copy filesEx "src\*.moc" "src\" "release_shared" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# copy manifest files (vs2008 stuff) +copy all "*.manifest" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Commercial" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-commercial-vsintegration-%QT_VERSION%-vs2008.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (VS2008)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" +installer instdir vsip 1 "Visual Studio Integration:" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2008_commercial_vsip" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2008_commercial_vsip" +installer makeFileList msvc "release_vs2008_commercial_vsip" +installer buildDir msvc "build_vs2008_commercial_vsip_________________PADDING_________________" +installer define msvc vs2008 + +# vsip options +installer module vsip +installer define vsip version "1.4.0" +installer define vsip no2003 +installer define vsip no2005 + +# help options +installer module help + +# debugext options +installer module debugext + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2008-commercial.conf b/util/scripts/win-binary/config/vs2008-commercial.conf new file mode 100644 index 0000000..dba456e --- /dev/null +++ b/util/scripts/win-binary/config/vs2008-commercial.conf @@ -0,0 +1,113 @@ +#extracts the package to buildDir +extract dest "build_vs2008_commercial_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2008_commercial_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +#build the binaries +build begin vs2008 "build_vs2008_commercial_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2008_commercial" + +copy dest "release_vs2008_commercial" +copy src "build_vs2008_commercial_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2008_commercial" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# moc files (exclude release moc files) +copy filesEx "src\moc_*.cpp" "src\" "release_shared" +copy filesEx "src\*.moc" "src\" "release_shared" + +# qconfig.h +copy file "src\corelib\global\qconfig.h" +copy file "include\QtCore\qconfig.h" +copy file "include\Qt\qconfig.h" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# copy manifest files (vs2008 stuff) +copy all "*.manifest" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Commercial" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-commercial-%QT_VERSION%-vs2008.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (VS2008)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt Installation Directory" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +#installer define licensecheck license "LICENSE.PREVIEW.COMMERCIAL" +#installer define licensecheck uslicense "LICENSE.PREVIEW.COMMERCIAL" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2008_commercial" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|Console|FullSourceEvaluation|Academic|Educational" + +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2008_commercial" +installer makeFileList msvc "release_vs2008_commercial" +installer buildDir msvc "build_vs2008_commercial_________________PADDING_________________" +installer define msvc vs2008 + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vs2008-eval.conf b/util/scripts/win-binary/config/vs2008-eval.conf new file mode 100644 index 0000000..8f50ad0 --- /dev/null +++ b/util/scripts/win-binary/config/vs2008-eval.conf @@ -0,0 +1,127 @@ +#extracts the package to buildDir +extract dest "build_vs2008_evaluation_________________PADDING_________________" +Section EXTRACT +extract extUnpack "qt-win-commercial-src-%QT_VERSION%.zip" +extract extPatch "qt-win-evalpatches-src-%QT_VERSION%.zip" +#delete line with "activeqt" in examples.pro file (don't build this) +delete line "build_vs2008_evaluation_________________PADDING_________________\examples\examples.pro" "activeqt" +SectionEnd + +Section GETFILES +copy extsync debugext +SectionEnd + +#build the binaries +build begin vs2008 "build_vs2008_evaluation_________________PADDING_________________" + +Section CONFIGURE +build configure "-confirm-license -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -openssl -D QT_EVAL" +SectionEnd + +Section BUILD +build bin sub-src +build binInDir "tools" +build binInDir "demos" release +build binInDir "examples" release +build dbPlugins +SectionEnd + +build finish + +# organize release files +Section ORGANIZE +delete dir "release_vs2008_evaluation" + +copy dest "release_vs2008_evaluation" +copy src "build_vs2008_evaluation_________________PADDING_________________" + +# extract everything once more +extract dest "release_vs2008_evaluation" +extract unpack "qt-win-commercial-src-%QT_VERSION%.zip" + +# create header files +copy syncqt + +delete destDir "src" +delete destDir "tools" +delete destDir "qmake" + +# phrasebooks & porting .xml file +copy files "tools\linguist\phrasebooks\*.qph" "phrasebooks\" +copy files "tools\porting\src\*.xml" "" + +# copying program database files +copy files "lib\*.pdb" "bin\" +copy files "src\winmain\*.pdb" "src\winmain\" + +# qconfig.h +copy files "src\corelib\global\qconfig.h" "include\Qt\" + +# qconfig.pri +copy file "mkspecs\qconfig.pri" + +# .qmake.cache +copy file ".qmake.cache" + +# default mkspec +copy files "mkspecs\default\*" "mkspecs\default\" + +# copy all binary files +copy all "*.lib" +copy all "*.exe" +copy all "*.dll" + +# copy manifest files (vs2008 stuff) +copy all "*.manifest" + +# .prl files +copy files "lib\*.prl" "lib\" + +# assistant help files +copy all "*.qch" + +# remove unused stuff +delete files "lib\*.dll" +delete file "configure.exe" + +# copy some activeqt stuff needed to compile examples +copy file "src\activeqt\control\qaxserver.rc" +copy file "src\activeqt\control\qaxserver.ico" +copy file "src\activeqt\control\qaxserver.def" +SectionEnd + +Section NSIS +# general installer options +installer begin "Qt Evaluation" +installer version "%QT_VERSION%" +installer output "c:\iwmake\qt-win-eval-%QT_VERSION%-vs2008.exe" +installer startmenu "Qt by Nokia v%QT_VERSION% (Eval. VS2008)" + +installer enable component_page +installer enable directory_page +installer enable startmenu_page + +installer instdir msvc 0 "Qt v%QT_VERSION%:" + +installer runfunction "Run Examples and Demos" +installer readmefunction "Show Documentation" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "release_vs2008_evaluation" +installer define licensecheck productlist "UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation" + +installer module evaluation +installer module registeruiext + +# msvc options +installer module msvc +installer src msvc "release_vs2008_evaluation" +installer makeFileList msvc "release_vs2008_evaluation" +installer buildDir msvc "build_vs2008_evaluation_________________PADDING_________________" +installer define msvc vs2008 + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/config/vsip.conf b/util/scripts/win-binary/config/vsip.conf new file mode 100644 index 0000000..6ddb23f --- /dev/null +++ b/util/scripts/win-binary/config/vsip.conf @@ -0,0 +1,41 @@ +Section GETFILES +copy extsync vsip +copy extsync debugext +SectionEnd + +Section NSIS +installer begin "Qt Visual Studio Integration" +installer version "1.5.0" +installer output "c:\iwmake\qt-vsintegration-1.5.0.exe" +installer startmenu "Qt Visual Studio Integration" +installer readme readme.txt +installer enable component_page +installer enable directory_page +installer enable admin_check +installer enable uninstall_previous +installer enable warn_no_qt_found +installer enable optional_shortcutcreation +installer instdir vsip 0 "Integration Installation Directory" + +# license checking +installer module licensecheck +installer defineDir licensecheck licenseDir "vsip" +installer define licensecheck productlist "Universal|Desktop|DesktopLight|UnsupportedEvaluation|SupportedEvaluation|FullSourceEvaluation|Academic|Educational" + +# vsip options +installer module vsip +installer define vsip version "1.5.0" + +# help options +installer module help + +# debugext options +installer module debugext + +# ui extension registration +installer module registeruiext + +# compile the package +installer compile +installer sign +SectionEnd diff --git a/util/scripts/win-binary/doit/doit_2003.bat b/util/scripts/win-binary/doit/doit_2003.bat new file mode 100755 index 0000000..433d8fb --- /dev/null +++ b/util/scripts/win-binary/doit/doit_2003.bat @@ -0,0 +1,13 @@ +@rem The qt_pkg_setup is a .bat file that must be in your PATH +@rem It should set the proper environment for the compiler requested +call qt_pkg_setup msvc2003 + +c: +cd \installer\win-binary +call iwmake.bat vs2003-commercial >out.txt +ren log.txt log-commercial.txt +call iwmake.bat vs2003-eval >>out.txt +ren log.txt log-eval.txt +pscp -batch -i c:\key1.ppk c:\iwmake\*.exe qt@tirion:public_html/packages/%QT_VERSION% + + diff --git a/util/scripts/win-binary/doit/doit_2005.bat b/util/scripts/win-binary/doit/doit_2005.bat new file mode 100755 index 0000000..202eeda --- /dev/null +++ b/util/scripts/win-binary/doit/doit_2005.bat @@ -0,0 +1,13 @@ +@rem The qt_pkg_setup is a .bat file that must be in your PATH +@rem It should set the proper environment for the compiler requested +call qt_pkg_setup msvc2005 + +c: +cd \installer\win-binary +call iwmake.bat vs2005-commercial >out.txt +ren log.txt log-commercial.txt +call iwmake.bat vs2005-eval >>out.txt +ren log.txt log-eval.txt +pscp -batch -i c:\key1.ppk c:\iwmake\*.exe qt@tirion:public_html/packages/%QT_VERSION% + + diff --git a/util/scripts/win-binary/doit/doit_2008.bat b/util/scripts/win-binary/doit/doit_2008.bat new file mode 100755 index 0000000..c6d4aae --- /dev/null +++ b/util/scripts/win-binary/doit/doit_2008.bat @@ -0,0 +1,12 @@ +@rem The qt_pkg_setup is a .bat file that must be in your PATH +@rem It should set the proper environment for the compiler requested +call qt_pkg_setup msvc2008 + +c: +cd \installer\win-binary +call iwmake.bat vs2008-commercial >out.txt +ren log.txt log-commercial.txt +call iwmake.bat vs2008-eval >>out.txt +ren log.txt log-eval.txt +pscp -batch -i c:\key1.ppk c:\iwmake\*.exe qt@tirion:public_html/packages/%QT_VERSION% + diff --git a/util/scripts/win-binary/doit/doit_gcc.bat b/util/scripts/win-binary/doit/doit_gcc.bat new file mode 100755 index 0000000..bc5b6ef --- /dev/null +++ b/util/scripts/win-binary/doit/doit_gcc.bat @@ -0,0 +1,9 @@ +@rem The qt_pkg_setup is a .bat file that must be in your PATH +@rem It should set the proper environment for the compiler requested +call qt_pkg_setup mingw + +c: +cd \installer\win-binary +call iwmake.bat mingw-opensource >out.txt +pscp -batch -i c:\key1.ppk c:\iwmake\*.exe qt@tirion:public_html/packages/%QT_VERSION% + diff --git a/util/scripts/win-binary/doit/doit_vc60.bat b/util/scripts/win-binary/doit/doit_vc60.bat new file mode 100755 index 0000000..83f803e --- /dev/null +++ b/util/scripts/win-binary/doit/doit_vc60.bat @@ -0,0 +1,12 @@ +@rem The qt_pkg_setup is a .bat file that must be in your PATH +@rem It should set the proper environment for the compiler requested +call qt_pkg_setup msvc60 + +c: +cd \installer\win-binary +call iwmake.bat vc60-commercial >out.txt +ren log.txt log-commercial.txt +call iwmake.bat vc60-eval >>out.txt +ren log.txt log-eval.txt +pscp -batch -i c:\key1.ppk c:\iwmake\*.exe qt@tirion:public_html/packages/%QT_VERSION% + diff --git a/util/scripts/win-binary/doit/doit_wince_2005.bat b/util/scripts/win-binary/doit/doit_wince_2005.bat new file mode 100644 index 0000000..4cdf3dc --- /dev/null +++ b/util/scripts/win-binary/doit/doit_wince_2005.bat @@ -0,0 +1,13 @@ +@rem The qt_pkg_setup is a .bat file that must be in your PATH +@rem It should set the proper environment for the compiler requested +call qt_pkg_setup msvc2005 + +c: +cd \installer\win-binary +call iwmake.bat vs2005-ce-commercial >out.txt +ren log.txt log-commercial.txt +call iwmake.bat vs2005-ce-eval >> out.txt +ren log.txt log-eval.txt +pscp -batch -i c:\key1.ppk c:\iwmake\*.exe qt@tirion:public_html/packages/%QT_VERSION% + + diff --git a/util/scripts/win-binary/doit/doit_wince_2008.bat b/util/scripts/win-binary/doit/doit_wince_2008.bat new file mode 100755 index 0000000..0b424e4 --- /dev/null +++ b/util/scripts/win-binary/doit/doit_wince_2008.bat @@ -0,0 +1,11 @@ +@rem The qt_pkg_setup is a .bat file that must be in your PATH +@rem It should set the proper environment for the compiler requested +call qt_pkg_setup msvc2008 + +c: +cd \installer\win-binary +call iwmake.bat vs2008-ce-commercial >out.txt +ren log.txt log-commercial.txt +call iwmake.bat vs2008-ce-eval >> out.txt +ren log.txt log-eval.txt +pscp -batch -i c:\key1.ppk c:\iwmake\*.exe qt@tirion:public_html/packages/%QT_VERSION% diff --git a/util/scripts/win-binary/iwmake.bat b/util/scripts/win-binary/iwmake.bat new file mode 100755 index 0000000..90c54be --- /dev/null +++ b/util/scripts/win-binary/iwmake.bat @@ -0,0 +1,85 @@ +rem @echo off +call :init +if "%QT_VERSION%" == "" goto FAILED +if "%IWMAKE_STATUS%"=="failed" goto FAILED +if not exist "%IWMAKE_SCRIPTDIR%\config\%1.conf" goto FAILED +if not "%~2"=="" set IWMAKE_SECTION=%~2 +for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\config.default) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j +if "%IWMAKE_STATUS%"=="failed" goto FAILED +if exist "%IWMAKE_SCRIPTDIR%\config\config.%COMPUTERNAME%" for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\config.%COMPUTERNAME%) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j +if "%IWMAKE_STATUS%"=="failed" goto FAILED +call :checkrequirements +if "%IWMAKE_STATUS%"=="failed" goto FAILED +for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\%1.conf) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j +if "%IWMAKE_STATUS%"=="failed" goto FAILED +goto DONE + +:func_delegate +if "%IWMAKE_STATUS%"=="failed" goto :eof +set IWMAKE_TMP="%IWMAKE_TMP:"=%" + +if /i "%1"=="sectionend" echo Leaving Section& set IWMAKE_PARSESECTION=1& goto :eof +if /i not "%1"=="section" goto callScript +echo Entering Section %~2 +for %%m in (%IWMAKE_SECTION%) do call :checkSection %%m %~2 +goto :eof + +:callScript +if "%IWMAKE_PARSESECTION%"=="0" goto :eof + +call "%IWMAKE_SCRIPTDIR%\batch\%1.bat" %2 %IWMAKE_TMP% +if not "%errorlevel%"=="0" echo %1 %2 "%IWMAKE_TMP%" failed! >> %IWMAKE_LOGFILE%& set IWMAKE_STATUS=failed +goto :eof + +:checkSection + if /i "%1"=="%2" echo Skipping Section& set IWMAKE_PARSESECTION=0 +goto :eof + +:checkrequirements + if not exist %IWMAKE_ROOT% mkdir %IWMAKE_ROOT% + if not "%IWMAKE_SIGNPATH%"=="" goto CheckSIGNOK + call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sign + call "%IWMAKE_SCRIPTDIR%\batch\env.bat" signPath "%IWMAKE_ROOT%\sign" +:CheckSIGNOK + if not "%IWMAKE_WGET%"=="" goto CheckWGETOK + call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync wget + call "%IWMAKE_SCRIPTDIR%\batch\env.bat" wgetDir wget +:CheckWGETOK + if exist "%IWMAKE_PERLPATH%\perl.exe" goto CheckPerlOK + set IWMAKE_STATUS=failed + echo Perl not found in %IWMAKE_PERLPATH%! (check your config file) +:CheckPerlOK + if not "%IWMAKE_UNZIPAPP%"=="" goto CheckUNZIPOK + call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync unzip + call "%IWMAKE_SCRIPTDIR%\batch\env.bat" unzipApp "%IWMAKE_ROOT%\unzip\unzip.exe" +:CheckUNZIPOK + if exist "%IWMAKE_NSISPATH%\makensis.exe" goto CheckNSISOK + set IWMAKE_STATUS=failed + echo NSIS not found! (check your config file) +:CheckNSISOK + call "%IWMAKE_SCRIPTDIR%\batch\installer.bat" updateplugins +goto :eof + +:init + set IWMAKE_SCRIPTDIR=%~dp0 + set IWMAKE_SCRIPTDIR=%IWMAKE_SCRIPTDIR:~0,-1% + call "%IWMAKE_SCRIPTDIR%\batch\env.bat" setglobals +goto :eof + +:cleanup + pushd "%IWMAKE_STARTDIR%" + call "%IWMAKE_SCRIPTDIR%\batch\env.bat" removeglobals + popd +goto :eof + +:FAILED + call :cleanup + echo Failed! +goto END + +:DONE + call :cleanup + echo Done! +goto END + +:END diff --git a/util/scripts/win-binary/nsis/confirmpage.ini b/util/scripts/win-binary/nsis/confirmpage.ini new file mode 100644 index 0000000..cf1fdab --- /dev/null +++ b/util/scripts/win-binary/nsis/confirmpage.ini @@ -0,0 +1,19 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=2 + +[Field 1] +Type=Label +Text=The following components will be uninstalled: +Left=1 +Right=298 +Top=1 +Bottom=12 + +[Field 2] +Type=Label +Left=16 +Right=298 +Top=16 +Bottom=136 + diff --git a/util/scripts/win-binary/nsis/eclipse.ini b/util/scripts/win-binary/nsis/eclipse.ini new file mode 100644 index 0000000..7e715b0 --- /dev/null +++ b/util/scripts/win-binary/nsis/eclipse.ini @@ -0,0 +1,60 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=7 + +[Field 1] +Type=Groupbox +Text=MinGW Installation +Left=1 +Right=300 +Top=65 +Bottom=132 + +[Field 2] +Type=Groupbox +Text=Eclipse Installation +Left=1 +Right=300 +Top=8 +Bottom=59 + +[Field 3] +Type=DirRequest +State=C:\MinGW\bin +Left=12 +Right=286 +Top=91 +Bottom=102 + +[Field 4] +Type=Label +Text=Select where MinGW is installed (The directory where gcc.exe is located): +Left=13 +Right=292 +Top=81 +Bottom=89 + +[Field 5] +Type=DirRequest +State=C:\Eclipse +Left=12 +Right=286 +Top=33 +Bottom=46 + +[Field 6] +Type=Label +Text=Select the Eclipse installation you want to use: +Left=12 +Right=180 +Top=22 +Bottom=30 + +[Field 7] +Type=Label +Text=If you don't specify a MinGW location, you will not get a shortcut in you startmenu to start Eclipse with MinGW in your path. +Left=12 +Right=287 +Top=107 +Bottom=124 + diff --git a/util/scripts/win-binary/nsis/envpage.ini b/util/scripts/win-binary/nsis/envpage.ini new file mode 100644 index 0000000..c383592 --- /dev/null +++ b/util/scripts/win-binary/nsis/envpage.ini @@ -0,0 +1,36 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=4 + +[Field 1] +Type=Groupbox +Text=Environment variables +Left=0 +Right=299 +Top=6 +Bottom=132 + +[Field 2] +Type=Checkbox +Text=Set environment variables +Left=16 +Right=143 +Top=49 +Bottom=59 + +[Field 3] +Type=Label +Text=Qt requires that a set of environment variables is defined. By checking this option the installer adds these variables globally. +Left=9 +Right=290 +Top=20 +Bottom=40 + +[Field 4] +Type=Label +Text=Warning:\r\nEnabling this option makes the installer change settings in your registry. If you don't want to set these variables automatically, the installer provides a qtvars.bat file which sets the required variables. There is also a shortcut, located in your Qt start menu folder, that opens a Qt environment. The installer will try to remove any existing Qt environment variables if found. +Left=8 +Right=292 +Top=70 +Bottom=121 + diff --git a/util/scripts/win-binary/nsis/gwdownload.ini b/util/scripts/win-binary/nsis/gwdownload.ini new file mode 100644 index 0000000..9b4ea16 --- /dev/null +++ b/util/scripts/win-binary/nsis/gwdownload.ini @@ -0,0 +1,78 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=9 + +[Field 1] +Type=Groupbox +Text=Find MinGW +Left=0 +Right=299 +Top=49 +Bottom=91 + +[Field 2] +Type=Label +Text=Please specify a directory where to find MinGW (for instance: C:\\MinGW). If you do not have MinGW installed, you can let the installer download and install it for you. +Left=2 +Right=298 +Top=1 +Bottom=27 + +[Field 3] +Type=DirRequest +Left=8 +Right=290 +Top=68 +Bottom=81 + +[Field 4] +Type=Groupbox +Text=Download and install MinGW +Left=0 +Right=299 +Top=94 +Bottom=137 + +[Field 5] +Type=Label +Text=Previously installed MinGW: +Left=8 +Right=286 +Top=60 +Bottom=68 + +[Field 6] +Type=DirRequest +Left=8 +Right=290 +Top=116 +Bottom=129 +Flags=DISABLED + +[Field 7] +Type=Label +Text=Installation directory: +Left=8 +Right=124 +Top=107 +Bottom=115 +Flags=DISABLED + +[Field 8] +Type=Checkbox +Text=Download and install minimal MinGW installation. +Left=8 +Right=172 +Top=28 +Bottom=40 +Flags=NOTIFY + +[Field 9] +Type=Link +Text=(http://www.mingw.org) +Left=174 +Right=260 +Top=30 +Bottom=38 +State=http://www.mingw.org + diff --git a/util/scripts/win-binary/nsis/gwmirror.ini b/util/scripts/win-binary/nsis/gwmirror.ini new file mode 100644 index 0000000..77a0319 --- /dev/null +++ b/util/scripts/win-binary/nsis/gwmirror.ini @@ -0,0 +1,27 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=3 + +[Field 1] +Type=Label +Text=Select a mirror where to download MinGW: +Left=0 +Right=211 +Top=0 +Bottom=8 + +[Field 2] +Type=Checkbox +Text=Download MinGW source code. (You don't need this to compile Qt) +Left=4 +Right=296 +Top=124 +Bottom=134 + +[Field 3] +Type=Listbox +Left=0 +Right=299 +Top=9 +Bottom=118 + diff --git a/util/scripts/win-binary/nsis/images/install.ico b/util/scripts/win-binary/nsis/images/install.ico Binary files differnew file mode 100644 index 0000000..2cbd979 --- /dev/null +++ b/util/scripts/win-binary/nsis/images/install.ico diff --git a/util/scripts/win-binary/nsis/images/qt-header.bmp b/util/scripts/win-binary/nsis/images/qt-header.bmp Binary files differnew file mode 100644 index 0000000..a5125c9 --- /dev/null +++ b/util/scripts/win-binary/nsis/images/qt-header.bmp diff --git a/util/scripts/win-binary/nsis/images/qt-wizard-clean.bmp b/util/scripts/win-binary/nsis/images/qt-wizard-clean.bmp Binary files differnew file mode 100644 index 0000000..a4dbe2c --- /dev/null +++ b/util/scripts/win-binary/nsis/images/qt-wizard-clean.bmp diff --git a/util/scripts/win-binary/nsis/images/qt-wizard.bmp b/util/scripts/win-binary/nsis/images/qt-wizard.bmp Binary files differnew file mode 100644 index 0000000..2f697af --- /dev/null +++ b/util/scripts/win-binary/nsis/images/qt-wizard.bmp diff --git a/util/scripts/win-binary/nsis/includes/global.nsh b/util/scripts/win-binary/nsis/includes/global.nsh new file mode 100644 index 0000000..9bc8f0a --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/global.nsh @@ -0,0 +1,204 @@ +!include "StrFunc.nsh" +!include "includes\list.nsh" + +${StrCase} +${StrTrimNewLines} +${StrStr} +${StrRep} +${UnStrRep} + +var STARTMENU_STRING +var PRODUCT_UNIQUE_KEY +var RUNNING_AS_ADMIN + +!define QT_VERSION_KEY_NAME "SOFTWARE\Trolltech\Versions" + +!ifndef MODULE_MINGW + !ifdef MODULE_MSVC_VC60 + !define INSTALL_COMPILER "vc60" + !else + !ifdef MODULE_MSVC_VS2002 + !define INSTALL_COMPILER "vs2002" + !else + !ifdef MODULE_MSVC_VS2005 + !define INSTALL_COMPILER "vs2005" + !else + !ifdef MODULE_MSVC_VS2005CE + !define INSTALL_COMPILER "vs2005ce" + !else + !ifdef MODULE_MSVC_VS2008 + !define INSTALL_COMPILER "vs2008" + !else + !ifdef MODULE_MSVC_VS2008CE + !define INSTALL_COMPILER "vs2008ce" + !else + !define INSTALL_COMPILER "vs2003" + !endif + !endif + !endif + !endif + !endif + !endif +!else + !define INSTALL_COMPILER "mingw" +!endif + +var VS_VERSION +var VS_VERSION_SHORT +var ADDIN_INSTDIR +var VSIP_INSTDIR +var HELP_INSTDIR +var ECLIPSE_INSTDIR +var QTJAMBI_INSTDIR +var QTJAMBIECLIPSE_INSTDIR + +; LICENSECHECK +var LICENSE_KEY +var LICENSEE +var LICENSE_PRODUCT +var LICENSE_PLATFORM +var LICENSE_FILE + +; MSVC +!ifdef MODULE_MSVC + !define MSVC_ValidateDirectory + var MSVC_INSTDIR +!endif + +; MINGW +!ifdef MODULE_MINGW + !define MINGW_ValidateDirectory + var MINGW_INSTDIR +!endif + +; QSA +var QSA_INSTDIR + +; QTDIR PAGE +var QTDIR_SELECTED +var COMPILER_SELECTED + +; used by addin7x and vsip +!ifndef MODULE_VSIP_ROOT + !define MODULE_VSIP_ROOT "${INSTALL_ROOT}\vsip" +!endif + +; add to confirm path +var UninstallerConfirmProduct + +Function un.ConfirmOnDelete + exch $0 + push $1 + + push "$0" + push "$UninstallerConfirmProduct" + call un.ItemInList + pop $1 + IntCmp $1 1 ConfirmOnDeleteDone + + strcmp "$UninstallerConfirmProduct" "" 0 +3 + strcpy $UninstallerConfirmProduct "$0" + goto +2 + strcpy $UninstallerConfirmProduct "$UninstallerConfirmProduct$\r$\n$0" + + ConfirmOnDeleteDone: + pop $1 + pop $0 +FunctionEnd + +!macro ConfirmOnRemove REG_KEY PRODUCT_NAME + push $0 + ClearErrors + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "${REG_KEY}" + intcmp $0 1 0 +3 + push "${PRODUCT_NAME}" + call un.ConfirmOnDelete + ClearErrors + pop $0 +!macroend + +!define GLOBAL_SEC_SHORTCUTCREATION_TEXT "Create shortcuts" +!define GLOBAL_SEC_SHORTCUTCREATION_MAX_ID "100" + +Function GetSecShortcutCreationId + push $0 + push $1 + + StrCpy $0 "0" + loopStart: + IntCmp $0 "${GLOBAL_SEC_SHORTCUTCREATION_MAX_ID}" notfound + IntOp $0 $0 + 1 + SectionGetText $0 $1 + StrCmp $1 "${GLOBAL_SEC_SHORTCUTCREATION_TEXT}" done + goto loopStart + + notfound: + StrCpy $0 "-1" + done: + Pop $1 + Exch $0 +FunctionEnd + +Function GetCreateSchortcuts +!ifdef USE_OPTIONAL_SHORTCUTCREATION + Push $0 + Push $1 + Call GetSecShortcutCreationId + Pop $1 + IntCmp $1 -1 setfalse + SectionGetFlags "$1" $0 + IntOp $0 $0 & ${SF_SELECTED} + IntCmp $0 ${SF_SELECTED} settrue setfalse + settrue: + StrCpy $0 true + Goto done + setfalse: + StrCpy $0 false + done: + Pop $1 + Exch $0 +!else ;USE_OPTIONAL_SHORTCUTCREATION + Push true +!endif ;USE_OPTIONAL_SHORTCUTCREATION +FunctionEnd + +!macro CreateConditionalShortCutDirectory DIRECTORY + Push $0 + Call GetCreateSchortcuts + Pop $0 + StrCmp $0 true 0 +2 + CreateDirectory "${DIRECTORY}" + Pop $0 +!macroend + +Function GLOBAL_CreateConditionalShortCutWithParameters + Exch $0 ; PARAMETERS + Exch + Exch $1 ; TARGET + Exch + Exch 2 + Exch $2 ; LINK + Exch 2 + Push $3 + + Call GetCreateSchortcuts + Pop $3 + StrCmp $3 true 0 +2 + CreateShortCut "$2" "$1" "$0" + + Pop $3 + Pop $0 + Pop $1 + Pop $2 +FunctionEnd + +!macro CreateConditionalShortCutWithParameters LINK TARGET PARAMETERS + Push "${LINK}" + Push "${TARGET}" + Push "${PARAMETERS}" + Call GLOBAL_CreateConditionalShortCutWithParameters +!macroend + +!macro CreateConditionalShortCut LINK TARGET + !insertmacro CreateConditionalShortCutWithParameters "${LINK}" "${TARGET}" "" +!macroend diff --git a/util/scripts/win-binary/nsis/includes/help.nsh b/util/scripts/win-binary/nsis/includes/help.nsh new file mode 100644 index 0000000..797337e --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/help.nsh @@ -0,0 +1,133 @@ +!ifndef HELP_INCLUDE +!define HELP_INCLUDE + +; make it as a macro since it's only used twice (about the same overhead) +!macro InstallHelp HELP_PATH HELP_ROOT VS_VERSION + SetOutPath "${HELP_PATH}" + SetOverwrite ifnewer + + File "${MODULE_HELP_ROOT}\h2reg.exe" + File "${MODULE_HELP_ROOT}\h2reg.ini" + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_*.HxS" + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_*C.HxA" + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_*C.HxC" + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_*C.HxT" + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_*KC.HxK" + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_*FC.HxK" + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_h2reg.ini" + + Push $0 + ${If} $VS_VERSION == "2003" + StrCpy $0 "7.1" + ${ElseIf} $VS_VERSION == "2005" + StrCpy $0 "8.0" + ${ElseIf} $VS_VERSION == "2008" + StrCpy $0 "9.0" + ${Else} + StrCpy $0 "" + ${EndIf} + + ${If} $0 != "" + SetOutPath "$COMMONFILES\microsoft shared\VS Help Data\$0\Filters\1033" + File "${MODULE_HELP_ROOT}\qt450.xml" + WriteRegDWORD HKLM "Software\Microsoft\VisualStudio\$0\Help\VisibleFilters" "qt450" 0x00000001 + ${EndIf} + Pop $0 + + !insertmacro InstallHelpInVS ${HELP_ROOT} ${VS_VERSION} +!macroend + +!macro InstallHelpInVS HELP_ROOT VS_VERSION + Push $0 + + Push ${VS_VERSION} + Call GetVSInstallationDir + Pop $0 + StrCmp $0 "" +4 + SetOutPath "$0\HTML\XMLLinks\1033" + SetOverwrite ifnewer + File "${MODULE_HELP_ROOT}\${HELP_ROOT}_*.xml" + ClearErrors + + Pop $0 +!macroend + +!macro RegisterHelp HELP_PATH HELP_ROOT + SetOutPath "${HELP_PATH}" + ClearErrors ; clear the error flag + Push $0 + nsExec::ExecToLog '"${HELP_PATH}\h2reg.exe" -q -r cmdfile="${HELP_PATH}\${HELP_ROOT}_h2reg.ini"' + Pop $0 + StrCmp $0 "error" 0 +2 + MessageBox MB_OK "Cannot register ${HELP_ROOT} help!" + Pop $0 +!macroend + +!macro un.RegisterHelp HELP_PATH HELP_ROOT + ClearErrors ; clear the error flag + IfFileExists "${HELP_PATH}\h2reg.exe" 0 +5 + Push $0 + nsExec::ExecToLog '"${HELP_PATH}\h2reg.exe" -q -u cmdfile="${HELP_PATH}\${HELP_ROOT}_h2reg.ini"' + Pop $0 + StrCmp $0 "error" 0 +3 + MessageBox MB_OK "Cannot unregister ${HELP_ROOT} help!" + SetErrors + Pop $0 +!macroend + +!macro un.InstallHelp HELP_PATH HELP_ROOT VS_VERSION + Delete "${HELP_PATH}\${HELP_ROOT}_h2reg.ini" + Delete "${HELP_PATH}\${HELP_ROOT}_*.HxS" + Delete "${HELP_PATH}\${HELP_ROOT}_*C.HxA" + Delete "${HELP_PATH}\${HELP_ROOT}_*C.HxC" + Delete "${HELP_PATH}\${HELP_ROOT}_*C.HxT" + Delete "${HELP_PATH}\${HELP_ROOT}_*KC.HxK" + Delete "${HELP_PATH}\${HELP_ROOT}_*FC.HxK" + + Push $0 + ${If} $VS_VERSION == "2003" + StrCpy $0 "7.1" + ${ElseIf} $VS_VERSION == "2005" + StrCpy $0 "8.0" + ${ElseIf} $VS_VERSION == "2008" + StrCpy $0 "9.0" + ${Else} + StrCpy $0 "" + ${EndIf} + + ${If} $0 != "" + Delete "$COMMONFILES\microsoft shared\VS Help Data\$0\Filters\qt450.xml" + DeleteRegValue HKLM "Software\Microsoft\VisualStudio\$0\Help\VisibleFilters" "qt450" + ${EndIf} + Pop $0 + + !insertmacro un.InstallHelpInVS ${HELP_ROOT} ${VS_VERSION} +!macroend + +!macro un.InstallHelpInVS HELP_ROOT VS_VERSION + Push $0 + + Push ${VS_VERSION} + Call un.GetVSInstallationDir + + Pop $0 + StrCmp $0 "" +2 0 + Delete "$0\HTML\XMLLinks\1033\${MODULE_HELP_QT_FILE_ROOT}_*.xml" + + ClearErrors + + Pop $0 +!macroend + +Function un.DeleteH2RegFiles + Exch $0 + IfFileExists "$0\*.HxS" DeleteH2RegFiles_Done + Delete "$0\h2reg.exe" + Delete "$0\h2reg.ini" + Delete "$0\h2reg_log.txt" + RMDir "$0" + DeleteH2RegFiles_Done: + Pop $0 +FunctionEnd + +!endif ;HELP_INCLUDE diff --git a/util/scripts/win-binary/nsis/includes/instdir.nsh b/util/scripts/win-binary/nsis/includes/instdir.nsh new file mode 100644 index 0000000..6e4dab2 --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/instdir.nsh @@ -0,0 +1,214 @@ +!ifndef INSTDIR_1 + !macro INSTDIR_INITIALIZE + !define MUI_DIRECTORYPAGE_VARIABLE $${INSTDIR_0}_INSTDIR + !ifdef ${INSTDIR_0}_ValidateDirectory + !define MUI_PAGE_CUSTOMFUNCTION_LEAVE "${INSTDIR_0}_ValidateDirectoryFunc" + !endif + !insertmacro MUI_PAGE_DIRECTORY + !macroend + !macro INSTDIR_FUNCTIONS + !macroend + !macro INSTDIR_STARTUP + !macroend +!else +!macro INSTDIR_INITIALIZE + !define INSTDIR_INI_FILE "instdir.ini" + !define INSTDIR_0_DIRFIELD "Field 10" + !define INSTDIR_0_TEXTFIELD "Field 13" + !define INSTDIR_1_DIRFIELD "Field 7" + !define INSTDIR_1_TEXTFIELD "Field 11" + !define INSTDIR_2_DIRFIELD "Field 5" + !define INSTDIR_2_TEXTFIELD "Field 8" + !define INSTDIR_3_DIRFIELD "Field 3" + !define INSTDIR_3_TEXTFIELD "Field 6" + !define INSTDIR_4_DIRFIELD "Field 2" + !define INSTDIR_4_TEXTFIELD "Field 4" + !define INSTDIR_5_DIRFIELD "Field 9" + !define INSTDIR_5_TEXTFIELD "Field 12" + !define INSTDIR_DIRHEIGHT 18 + + Page custom InitInstDirs UpdateInstDirs + + LangString InstDirLicenseTitle ${LANG_ENGLISH} "Installation Directories" + LangString InstDirLicenseTitleDescription ${LANG_ENGLISH} "Select the directories where you want the software installed." +!macroend + +!macro INSTDIR_FUNCTIONS + Function InitInstDirs + push $0 + push $1 + push $2 + push $3 + + !insertmacro MUI_HEADER_TEXT "$(InstDirLicenseTitle)" "$(InstDirLicenseTitleDescription)" + strcpy $0 "129" + +!ifdef INSTDIR_0 + SectionGetFlags ${${INSTDIR_0}_SEC01} $1 +!ifdef ${INSTDIR_0}_SEC02 + SectionGetFlags ${${INSTDIR_0}_SEC02} $3 + IntOp $1 $1 | $3 +!endif + IntOp $2 $1 & 1 ;just care about the first flag + StrCpy $1 "READONLY" + StrCmp "$2" "1" +2 + StrCpy $1 "DISABLED" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_TEXTFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_TEXTFIELD}" "Text" "${INSTDIR_0_TEXT}" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "State" $${INSTDIR_0}_INSTDIR +!else + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "Type" "Unknown" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_0_TEXTFIELD}" "Type" "Unknown" + intop $0 $0 - ${INSTDIR_DIRHEIGHT} +!endif +!ifdef INSTDIR_1 + SectionGetFlags ${${INSTDIR_1}_SEC01} $1 +!ifdef ${INSTDIR_1}_SEC02 + SectionGetFlags ${${INSTDIR_1}_SEC02} $3 + IntOp $1 $1 | $3 +!endif + IntOp $2 $1 & 1 ;just care about the first flag + StrCpy $1 "READONLY" + StrCmp "$2" "1" +2 + StrCpy $1 "DISABLED" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_TEXTFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_TEXTFIELD}" "Text" "${INSTDIR_1_TEXT}" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "State" $${INSTDIR_1}_INSTDIR +!else + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "Type" "Unknown" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_1_TEXTFIELD}" "Type" "Unknown" + intop $0 $0 - ${INSTDIR_DIRHEIGHT} +!endif +!ifdef INSTDIR_2 + SectionGetFlags ${${INSTDIR_2}_SEC01} $1 +!ifdef ${INSTDIR_2}_SEC02 + SectionGetFlags ${${INSTDIR_2}_SEC02} $3 + IntOp $1 $1 | $3 +!endif + IntOp $2 $1 & 1 ;just care about the first flag + StrCpy $1 "READONLY" + StrCmp "$2" "1" +2 + StrCpy $1 "DISABLED" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_TEXTFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_TEXTFIELD}" "Text" "${INSTDIR_2_TEXT}" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "State" $${INSTDIR_2}_INSTDIR +!else + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "Type" "Unknown" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_2_TEXTFIELD}" "Type" "Unknown" + intop $0 $0 - ${INSTDIR_DIRHEIGHT} +!endif +!ifdef INSTDIR_3 + SectionGetFlags ${${INSTDIR_3}_SEC01} $1 +!ifdef ${INSTDIR_3}_SEC02 + SectionGetFlags ${${INSTDIR_3}_SEC02} $3 + IntOp $1 $1 | $3 +!endif + IntOp $2 $1 & 1 ;just care about the first flag + StrCpy $1 "READONLY" + StrCmp "$2" "1" +2 + StrCpy $1 "DISABLED" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_TEXTFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_TEXTFIELD}" "Text" "${INSTDIR_3_TEXT}" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "State" $${INSTDIR_3}_INSTDIR +!else + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "Type" "Unknown" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_3_TEXTFIELD}" "Type" "Unknown" + intop $0 $0 - ${INSTDIR_DIRHEIGHT} +!endif +!ifdef INSTDIR_4 + SectionGetFlags ${${INSTDIR_4}_SEC01} $1 +!ifdef ${INSTDIR_4}_SEC02 + SectionGetFlags ${${INSTDIR_4}_SEC02} $3 + IntOp $1 $1 | $3 +!endif + IntOp $2 $1 & 1 ;just care about the first flag + StrCpy $1 "READONLY" + StrCmp "$2" "1" +2 + StrCpy $1 "DISABLED" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_TEXTFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_TEXTFIELD}" "Text" "${INSTDIR_4_TEXT}" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "State" $${INSTDIR_4}_INSTDIR +!else + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "Type" "Unknown" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_4_TEXTFIELD}" "Type" "Unknown" + intop $0 $0 - ${INSTDIR_DIRHEIGHT} +!endif +!ifdef INSTDIR_5 + SectionGetFlags ${${INSTDIR_5}_SEC01} $1 +!ifdef ${INSTDIR_5}_SEC02 + SectionGetFlags ${${INSTDIR_5}_SEC02} $3 + IntOp $1 $1 | $3 +!endif + IntOp $2 $1 & 1 ;just care about the first flag + StrCpy $1 "READONLY" + StrCmp "$2" "1" +2 + StrCpy $1 "DISABLED" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_TEXTFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "Flags" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_TEXTFIELD}" "Text" "${INSTDIR_5_TEXT}" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "State" $${INSTDIR_5}_INSTDIR +!else + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "Type" "Unknown" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "${INSTDIR_5_TEXTFIELD}" "Type" "Unknown" + intop $0 $0 - ${INSTDIR_DIRHEIGHT} +!endif + + !insertmacro MUI_INSTALLOPTIONS_WRITE "${INSTDIR_INI_FILE}" "Field 1" "Bottom" "$0" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${INSTDIR_INI_FILE}" + + pop $3 + pop $2 + pop $1 + pop $0 + FunctionEnd + + Function UpdateInstDirs +!ifdef INSTDIR_0 + !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_0}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_0_DIRFIELD}" "State" + !ifdef ${INSTDIR_0}_ValidateDirectory + call ${INSTDIR_0}_ValidateDirectoryFunc + !endif +!endif +!ifdef INSTDIR_1 + !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_1}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_1_DIRFIELD}" "State" + !ifdef ${INSTDIR_1}_ValidateDirectory + call ${INSTDIR_1}_ValidateDirectoryFunc + !endif +!endif +!ifdef INSTDIR_2 + !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_2}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_2_DIRFIELD}" "State" + !ifdef ${INSTDIR_2}_ValidateDirectory + call ${INSTDIR_2}_ValidateDirectoryFunc + !endif +!endif +!ifdef INSTDIR_3 + !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_3}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_3_DIRFIELD}" "State" + !ifdef ${INSTDIR_3}_ValidateDirectory + call ${INSTDIR_3}_ValidateDirectoryFunc + !endif +!endif +!ifdef INSTDIR_4 + !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_4}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_4_DIRFIELD}" "State" + !ifdef ${INSTDIR_4}_ValidateDirectory + call ${INSTDIR_4}_ValidateDirectoryFunc + !endif +!endif +!ifdef INSTDIR_5 + !insertmacro MUI_INSTALLOPTIONS_READ $${INSTDIR_5}_INSTDIR "${INSTDIR_INI_FILE}" "${INSTDIR_5_DIRFIELD}" "State" + !ifdef ${INSTDIR_5}_ValidateDirectory + call ${INSTDIR_5}_ValidateDirectoryFunc + !endif +!endif + FunctionEnd +!macroend + +!macro INSTDIR_STARTUP + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${INSTDIR_INI_FILE}" +!macroend + +!endif ;ifndef INSTDIR_1
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/includes/list.nsh b/util/scripts/win-binary/nsis/includes/list.nsh new file mode 100644 index 0000000..47d1702 --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/list.nsh @@ -0,0 +1,96 @@ +!ifndef LIST_INCLUDE +!define LIST_INCLUDE + +; usage: +; push item +; push list +; call ItemInList +; returns 1 or 0 +!macro ItemInList UN +Function ${UN}ItemInList + exch $0 ;list + exch + exch $1 ;item + push $2 ;counter + push $3 ;substr + push $4 ;char + + strcpy $3 "" + strcpy $2 "0" + + loop: + strcpy $4 $0 1 $2 + strcmp "$4" "" atend + intop $2 $2 + 1 + + strcmp "$4" "|" 0 +4 + strcmp "$3" "$1" found + strcpy $3 "" ;reset substr + goto +2 + strcpy $3 "$3$4" ;append char to substr + goto loop + + found: + strcpy $0 "1" + goto done + + atend: + strcmp "$3" "$1" found + strcpy $0 "0" + + done: + pop $4 + pop $3 + pop $2 + pop $1 + exch $0 +FunctionEnd +!macroend + +!insertmacro ItemInList "" +!insertmacro ItemInList "un." + +Function GetItemInList + exch $0 ;list + exch + exch $1 ;index + push $2 ;counter + push $3 ;substr + push $4 ;char + push $5 ;current index + + strcpy $3 "" + strcpy $2 "0" + strcpy $5 "1" + + loop: + strcpy $4 $0 1 $2 + strcmp "$4" "" atend + intop $2 $2 + 1 + + strcmp "$4" "|" 0 +5 + strcmp "$5" "$1" found + strcpy $3 "" ;reset substr + intop $5 $5 + 1 + goto +2 + strcpy $3 "$3$4" ;append char to substr + goto loop + + found: + strcpy $0 "$3" + goto done + + atend: + strcmp "$5" "$1" found + strcpy $0 "" + + done: + pop $5 + pop $4 + pop $3 + pop $2 + pop $1 + exch $0 +FunctionEnd + +!endif ;LIST_INCLUDE
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/includes/qtcommon.nsh b/util/scripts/win-binary/nsis/includes/qtcommon.nsh new file mode 100644 index 0000000..8ef8207 --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/qtcommon.nsh @@ -0,0 +1,547 @@ +!ifndef QTCOMMON_INCLUDE +!define QTCOMMON_INCLUDE + +!macro MakeQtDirectory UN +Function ${UN}MakeQtDirectory + exch $0 + + push $0 + push " " #replace + push "-" #with + call ${UN}ReplaceString + pop $0 + + push $0 + push "(" #replace + push "" #with + call ${UN}ReplaceString + pop $0 + + push $0 + push ")" #replace + push "" #with + call ${UN}ReplaceString + pop $0 + + exch $0 +FunctionEnd +!macroend +!insertmacro MakeQtDirectory "" +!insertmacro MakeQtDirectory "un." + +Function DeleteFloatingLicenseProgram + exch $1 + push $0 + + StrCmp $LICENSE_KEY "" end + + ClearErrors + qtnsisext::IsFloatingLicense $LICENSE_KEY + IfErrors end + pop $0 + + StrCmp $0 "1" end + IfFileExists "$1\bin\qtusagereporter.exe" 0 end + Delete "$1\bin\qtusagereporter.exe" + + end: + pop $0 + pop $1 +FunctionEnd + +Function AddStartmenuApplication + exch $0 + IfFileExists "$0\assistant.exe" 0 +2 + CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Assistant.lnk" "$0\assistant.exe" + IfFileExists "$0\designer.exe" 0 +2 + CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Designer.lnk" "$0\designer.exe" + IfFileExists "$0\linguist.exe" 0 +2 + CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Linguist.lnk" "$0\linguist.exe" + IfFileExists "$0\qtdemo.exe" 0 +2 + CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Examples and Demos.lnk" "$0\qtdemo.exe" + IfFileExists "$0\..\README" 0 ReadMeShortCutFinished + IfFileExists "$WINDIR\notepad.exe" +3 + CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Qt Readme.lnk" "$SYSDIR\notepad.exe" "$0\..\README" + goto ReadMeShortCutFinished + CreateShortCut "$SMPROGRAMS\$STARTMENU_STRING\Qt Readme.lnk" "$WINDIR\notepad.exe" "$0\..\README" + ReadMeShortCutFinished: + pop $0 +FunctionEnd + +Function un.RemoveStartmenuApplication + Delete "$SMPROGRAMS\$STARTMENU_STRING\Assistant.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\Designer.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\Linguist.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\Examples and Demos.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\Qt Readme.lnk" +FunctionEnd + +#patch the licence information +Function PatchLicenseInformation + exch $0 + push $1 + push $2 + + DetailPrint "Patching license information..." + + IfFileExists "$0\src\corelib\global\qconfig.h" 0 +3 + strcpy $2 "$0\src\corelib\global\qconfig.h" + goto PatchLicensee + + IfFileExists "$0\include\Qt\qconfig.h" 0 PatchConfigPriFile + strcpy $2 "$0\include\Qt\qconfig.h" + + PatchLicensee: + push $2 + push '#define QT_PRODUCT_LICENSEE "' + push '#define QT_PRODUCT_LICENSEE "$LICENSEE"$\r$\n' + call PatchLine + + push $2 + push '#define QT_PRODUCT_LICENSE "' + push '#define QT_PRODUCT_LICENSE "$LICENSE_PRODUCT"$\r$\n' + call PatchLine + + push $2 + ${StrCase} $1 "$LICENSE_PRODUCT" "U" + push '# define QT_EDITION QT_EDITION_' + push '# define QT_EDITION QT_EDITION_$1$\r$\n' + call PatchLine + + PatchConfigPriFile: + IfFileExists "$0\mkspecs\qconfig.pri" 0 PatchLicenseProductDone + push "$0\mkspecs\qconfig.pri" + push "QT_EDITION = " + push "QT_EDITION = $LICENSE_PRODUCT$\r$\n" + call PatchLine + + PatchLicenseProductDone: + pop $2 + pop $1 + pop $0 +FunctionEnd + +Function PatchCommonBinaryFiles + Exch $0 ; Qt installation directory + Exch + Exch $1 ; Dll dir name: "bin", "lib"... + Push $2 ; FindFirst/FindNext handle + Push $3 ; Found QtCore*.dll file + + ${If} ${FileExists} "$0\bin\qmake.exe" + DetailPrint "Patching $0\bin\qmake.exe..." + Push $0 + Push "$0\bin\qmake.exe" + Call PatchBinaryPaths + ${EndIf} + + FindFirst $2 $3 "$0\$1\QtCore*.dll" + ${DoWhile} $3 != "" + Push $0 + Push "$0\$1\$3" + DetailPrint "Patching $0\$1\$3..." + Call PatchBinaryPaths + FindNext $2 $3 + ${Loop} + + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +Function PatchBinaryPaths + exch $0 + exch + exch $2 + push $1 + + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_prfxpath=" "qt_prfxpath=$2" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_docspath=" "qt_docspath=$2\doc" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_hdrspath=" "qt_hdrspath=$2\include" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_libspath=" "qt_libspath=$2\lib" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_binspath=" "qt_binspath=$2\bin" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_plugpath=" "qt_plugpath=$2\plugins" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_datapath=" "qt_datapath=$2" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_trnspath=" "qt_trnspath=$2\translations" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_xmplpath=" "qt_xmplpath=$2\examples" +!ifdef MODULE_LICENSECHECK + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_lcnsuser=" "qt_lcnsuser=$LICENSEE" + qtnsisext::PatchBinary /NOUNLOAD $0 "qt_lcnsprod=" "qt_lcnsprod=$LICENSE_PRODUCT" +!endif + qtnsisext::PatchBinary $0 "qt_demopath=" "qt_demopath=$2\demos" + + pop $1 + pop $2 + pop $0 +FunctionEnd + +# Patching the prl files +Function PatchPrlFiles + Exch $0 ; Absolute path to where Qt is (being) installed + Exch + Exch $1 ; Absolute path to where Qt was built + Push $2 ; FindFirst/FindNext handle + Push $3 ; Found *.prl file name + + FindFirst $2 $3 "$0\lib\*.prl" + ${DoWhile} $3 != "" + Push "$0\lib\$3" + Push $1 + Push $0 + Call PatchPath + FindNext $2 $3 + ${Loop} + + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +# +# patch line in text files +# push "qtcore4.prl" #Filename +# push "#define ..." #START WITH +# push "c:\qt" #REPLACE WITH +# call PatchLine +# +Function PatchLine + exch $2 ;replacement line + exch 2 + exch $1 ;Filename + exch + exch $0 ;start with + push $3 ; tmp filename + push $4 ; handle (tmp) + push $5 ; handle (org) + push $6 ; string + + ClearErrors + GetTempFileName $3 + IfErrors done + FileOpen $4 $3 w + IfErrors done + FileOpen $5 $1 r + IfErrors done + +nextline: + FileRead $5 $6 + IfErrors renameFile + push $6 + push $0 + push $2 + call ReplaceLine + pop $6 + FileWrite $4 $6 + goto nextline + +renameFile: + FileClose $4 + FileClose $5 + SetDetailsPrint none + Delete $1 + Rename $3 $1 + SetDetailsPrint both + + done: + pop $6 + pop $5 + pop $4 + pop $3 + pop $0 + pop $1 + pop $2 +FunctionEnd + +# +# replaces a string that starts with something, with another string +# push string +# push "#define ..." #START WITH +# push "c:\qt" #REPLACE WITH +# call ReplaceLine +# pop $0 #new string +# +Function ReplaceLine + exch $2 ;new line + exch 2 + exch $1 ;string + exch + exch $0 ;start with + + push $3 ; tmp string + push $4 ; counter + push $5 ; strlen + + StrCpy $4 "-1" + StrLen $5 $1 + + loop: + IntOp $4 $4 + 1 ;increase counter + StrCpy $3 $1 $4 ;get substring + IntCmp $4 $5 copystring ; check for end + StrCmp $3 $0 done ;start with found + goto loop + + copystring: + StrCpy $2 $1 + goto done + + done: + pop $5 + pop $4 + pop $3 + pop $0 + pop $1 + exch $2 +FunctionEnd + +# +# patch paths in text files +# push "qtcore4.prl" #Filename +# push "c:\compile" #OLD_QTDIR +# push "c:\qt" #QTDIR +# call PatchPath +# +Function PatchPath + exch $2 ;NEW + exch 2 + exch $1 ;Filename + exch + exch $0 ;OLD + push $3 ;readline + push $4 ;file 1 + push $5 ;file 2 + push $6 ;tmpfilename + + push $7 ;forward slash NEW + push $8 ;forward slash OLD + + push $2 + push "\" + push "/" + call ReplaceString + pop $7 + + push $0 + push "\" + push "/" + call ReplaceString + pop $8 + + ClearErrors + GetTempFileName $6 + IfErrors done + FileOpen $5 $6 w + IfErrors done + FileOpen $4 $1 r + IfErrors done + DetailPrint "Patching $1 ($2)..." + +nextline: + FileRead $4 $3 + IfErrors renameFile + push $3 + push $0 + push $2 + call ReplaceString ;replace backward slash path + push $8 + push $7 + call ReplaceString ;replace forward slash path + pop $3 + FileWrite $5 $3 + goto nextline + +renameFile: + FileClose $5 + FileClose $4 + SetDetailsPrint none + Delete $1 + Rename $6 $1 + SetDetailsPrint both + +done: + pop $8 + pop $7 + pop $6 + pop $5 + pop $4 + pop $3 + pop $0 + pop $1 + pop $2 +FunctionEnd + +# +# replaces a string with another string +# push string +# push "c:\qt" #replace +# push "c:\compile" #with +# call ReplaceString +# pop $0 #new string +# +!macro ReplaceString UN +Function ${UN}ReplaceString + exch $2 ;NEW + exch 2 + exch $1 ;string + exch + exch $0 ;OLD + + push $3 ; tmp string + push $4 ; counter + push $5 ; result + + push $6 ; old strlen + + StrCpy $4 "-1" + StrCpy $5 "" + + StrLen $6 $0 + + loop: + IntOp $4 $4 + 1 ;increase counter + StrCpy $3 $1 $6 $4 ;get substring + StrCmp $3 "" done ; check for end + StrCmp $3 $0 replace ;replace if old + StrCpy $3 $1 "1" $4 + StrCpy $5 $5$3 ;append character to result + goto loop + + replace: + StrCpy $5 $5$2 ;insert new qtdir + IntOp $4 $4 + $6 ;increase offset + IntOp $4 $4 - 1 ;decrease offset one more + goto loop + + done: + StrCpy $2 $5 + pop $6 + pop $5 + pop $4 + pop $3 + pop $0 + pop $1 + exch $2 +FunctionEnd +!macroend +!insertmacro ReplaceString "" +!insertmacro ReplaceString "un." + +Function CommonCheckDirectory + exch $4 + exch + exch $5 + push $0 + push $1 + push $2 + push $3 + + ; check if qt is already installed + IfFileExists "$4\bin\qmake.exe" 0 +2 + IfFileExists "$4\uninst.exe" qtExistsError + + ; check if directory is empty + FindFirst $0 $1 "$4\*" + CommonCheckDirectory_FileSearchLoop: + StrCmp $1 "" CommonCheckDirectory_DirDoesNotExist + StrCmp $1 "." CommonCheckDirectory_ContinueSearchLoop + StrCmp $1 ".." CommonCheckDirectory_ContinueSearchLoop + goto CommonCheckDirectory_FoundFile + CommonCheckDirectory_ContinueSearchLoop: + FindNext $0 $1 + goto CommonCheckDirectory_FileSearchLoop + +CommonCheckDirectory_FoundFile: + FindClose $0 + MessageBox MB_YESNO|MB_ICONEXCLAMATION "This directory already has contents. Are you sure you want to use this directory?" IDYES CommonCheckDirectory_DirDoesNotExist + Goto errorInDirectory +CommonCheckDirectory_DirDoesNotExist: + FindClose $0 + + GetInstDirError $0 + IntCmp 0 $0 0 instDirError + + StrLen $0 $4 + +!ifdef USE_NODIRLENGTHCHECK + StrCpy $1 "400" +!else + StrLen $1 $5 +!endif + + IntCmp $1 $0 0 directoryToLong + + ;check for spaces + StrCpy $2 "-1" + StrCpy $3 "" + + loop: + IntOp $2 $2 + 1 ;increase counter + StrCpy $3 $4 "1" $2 ;get char + StrCmp $3 "" directoryOk ; check for end + StrCmp $3 " " spaceInDirectory ;check for space + goto loop + +qtExistsError: + MessageBox MB_OK|MB_ICONEXCLAMATION "Qt is already installed in this directory. Please uninstall the previous version and try again." + Goto errorInDirectory + +instDirError: + MessageBox MB_OK|MB_ICONEXCLAMATION "This is not a valid installation directory." + Goto errorInDirectory + +spaceInDirectory: + MessageBox MB_OK|MB_ICONEXCLAMATION "The installation path can't contain spaces." + Goto errorInDirectory + +directoryToLong: + MessageBox MB_OK|MB_ICONEXCLAMATION "The installation directory is to long." + Goto errorInDirectory + +errorInDirectory: + pop $3 + pop $2 + pop $1 + pop $0 + pop $5 + pop $4 + Abort + goto done + +directoryOk: + pop $3 + pop $2 + pop $1 + pop $0 + pop $5 + pop $4 +done: +FunctionEnd + +# Sets $0 to 0, $1 to 1. Good for checking register breakages in function calls via dumpstate::debug +# Do not leave this in a release installer!!! +Function MarkAllRegisters + StrCpy $0 "0" + StrCpy $1 "1" + StrCpy $2 "2" + StrCpy $3 "3" + StrCpy $4 "4" + StrCpy $5 "5" + StrCpy $6 "6" + StrCpy $7 "7" + StrCpy $8 "8" + StrCpy $9 "9" + StrCpy $R0 "R0" + StrCpy $R1 "R1" + StrCpy $R2 "R2" + StrCpy $R3 "R3" + StrCpy $R4 "R4" + StrCpy $R5 "R5" + StrCpy $R6 "R6" + StrCpy $R7 "R7" + StrCpy $R8 "R8" + StrCpy $R9 "R9" +FunctionEnd + +!endif ;QTCOMMON_INCLUDE
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/includes/qtdir.nsh b/util/scripts/win-binary/nsis/includes/qtdir.nsh new file mode 100644 index 0000000..ac4de3b --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/qtdir.nsh @@ -0,0 +1,120 @@ +!macro QTDIR_INITIALIZE + !include "includes\qtenv.nsh" + !include "includes\list.nsh" + !define QTDIR_PAGE "qtdir.ini" + + Page custom QtDirPageEnter QtDirPageExit + + LangString QtDirPageTitle ${LANG_ENGLISH} "Select Qt Version" + LangString QtDirPageDescription ${LANG_ENGLISH} "Select the detected Qt Version, or choose a QTDIR manually." +!macroend + +!macro QTDIR_FUNCTIONS + Function QtDirPageEnter + push $0 + push $1 + push $2 + !insertmacro MUI_HEADER_TEXT "$(QtDirPageTitle)" "$(QtDirPageDescription)" + + StrCpy $2 "" + StrCpy $0 0 + loopHKLM: + EnumRegKey $1 HKLM "SOFTWARE\trolltech\Versions" $0 + StrCmp $1 "" doneHKLM + IntOp $0 $0 + 1 + ReadRegStr $1 HKLM "SOFTWARE\trolltech\Versions\$1\" "InstallDir" + StrCmp $1 "" +2 + StrCpy $2 "$2$1|" + goto loopHKLM + doneHKLM: + + StrCpy $0 0 + loopHKCU: + EnumRegKey $1 HKCU "SOFTWARE\trolltech\Versions" $0 + StrCmp $1 "" doneHKCU + IntOp $0 $0 + 1 + ReadRegStr $1 HKCU "SOFTWARE\trolltech\Versions\$1\" "InstallDir" + StrCmp $1 "" +2 + StrCpy $2 "$2$1|" + goto loopHKCU + doneHKCU: + + StrLen $0 $2 + IntOp $0 $0 - 1 + StrCpy $1 $2 $0 + !insertmacro MUI_INSTALLOPTIONS_WRITE ${QTDIR_PAGE} "Field 3" "ListItems" "$1" + + ExpandEnvStrings $0 "%QTDIR%" + strcmp "$QTDIR_SELECTED" "" 0 noQtDirEnv + strcmp "$0" "%QTDIR%" noQtDirEnv + strcmp "$0" "" noQtDirEnv + strcpy $QTDIR_SELECTED $0 + noQtDirEnv: + + strcmp "$QTDIR_SELECTED" "" 0 noFirstItemInList + push "1" + push "$1" + call GetItemInList + pop $0 + strcpy $QTDIR_SELECTED $0 + !insertmacro MUI_INSTALLOPTIONS_WRITE ${QTDIR_PAGE} "Field 3" "State" "$0" + !insertmacro MUI_INSTALLOPTIONS_WRITE ${QTDIR_PAGE} "Field 5" "State" "$0" + noFirstItemInList: + + !insertmacro MUI_INSTALLOPTIONS_WRITE ${QTDIR_PAGE} "Field 3" "State" "$QTDIR_SELECTED" + !insertmacro MUI_INSTALLOPTIONS_WRITE ${QTDIR_PAGE} "Field 5" "State" "$QTDIR_SELECTED" + + call AutoDetectCompilers + pop $1 + !insertmacro MUI_INSTALLOPTIONS_WRITE ${QTDIR_PAGE} "Field 8" "ListItems" "$1" + + strcmp "$COMPILER_SELECTED" "" 0 noFirstCompilerInList + push "1" + push "$1" + call GetItemInList + pop $0 + strcpy $COMPILER_SELECTED $0 + noFirstCompilerInList: + + !insertmacro MUI_INSTALLOPTIONS_WRITE ${QTDIR_PAGE} "Field 8" "State" "$COMPILER_SELECTED" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${QTDIR_PAGE}" + + pop $2 + pop $1 + pop $0 + FunctionEnd + + Function QtDirPageExit + push $0 + push $1 + push $2 + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${QTDIR_PAGE}" "Settings" "State" + strcmp "$0" "3" 0 NoNotify + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${QTDIR_PAGE}" "Field 3" "State" + FindWindow $2 "#32770" "" $HWNDPARENT + GetDlgItem $1 $2 1204 ;line edit (DirRequest) + SendMessage $1 ${WM_SETTEXT} 0 "STR:$0" + abort + NoNotify: + + !insertmacro MUI_INSTALLOPTIONS_READ $QTDIR_SELECTED "${QTDIR_PAGE}" "Field 5" "State" + IfFileExists "$QTDIR_SELECTED\bin\qmake.exe" +3 + MessageBox MB_OK|MB_ICONEXCLAMATION "This is not a valid QTDIR, please try another one." + abort + + !insertmacro MUI_INSTALLOPTIONS_READ $COMPILER_SELECTED "${QTDIR_PAGE}" "Field 8" "State" + strcmp "$COMPILER_SELECTED" "" 0 +3 + MessageBox MB_OK|MB_ICONEXCLAMATION "Please select a compiler." + abort + + pop $2 + pop $1 + pop $0 + FunctionEnd +!macroend + +!macro QTDIR_STARTUP + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${QTDIR_PAGE}" + strcpy $QTDIR_SELECTED "" + strcpy $COMPILER_SELECTED "" +!macroend
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/includes/qtenv.nsh b/util/scripts/win-binary/nsis/includes/qtenv.nsh new file mode 100644 index 0000000..d1c3bfd --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/qtenv.nsh @@ -0,0 +1,350 @@ +!ifndef QTENV_INCLUDE +!define QTENV_INCLUDE + +!include "LogicLib.nsh" + +!macro MAKE_QTVARS_FILE Compiler QtBuildTree WinCESDK + push "${Compiler}" + push "${QtBuildTree}" + push "${WinCESDK}" + call Function_MakeQtVarsFile +!macroend ;MAKE_QTVARS_FILE + +# +# creates a qtvars.bat file in QtBuildTree\bin +# Push "vs2003" ; Compiler +# Push "c:\qt\shadowbuild" ; QtBuildTree +# Push "wincewm60professional-msvc2005" ; WinCESDK. Leave empty if it is not a CE build +# Call MakeQtVarsFile +# +Function Function_MakeQtVarsFile + Exch $0 ; WinCESDK + Exch + Exch $1 ; QtBuildTree + Exch + Exch 2 + Exch $2 ; Compiler + Exch 2 + Push $3 ; qtvars.bat file handle + Push $4 ; GetMkSpec result + Push $5 ; IsExpressVersion result + Push $6 ; GetVSVarsFile result + + Push $2 + Call GetMkSpec + Pop $4 + + CreateDirectory "$1" + CreateDirectory "$1\bin" + ClearErrors + FileOpen $3 "$1\bin\qtvars.bat" w + IfErrors done + FileWrite $3 "@echo off$\r$\n" + FileWrite $3 "rem$\r$\n" + FileWrite $3 "rem This file is generated by the Qt installer$\r$\n" + FileWrite $3 "rem$\r$\n" + FileWrite $3 "$\r$\n" + FileWrite $3 "echo Setting up a Qt environment...$\r$\n" + FileWrite $3 "$\r$\n" + FileWrite $3 "set QTDIR=$1$\r$\n" + FileWrite $3 "echo -- QTDIR set to $1$\r$\n" + FileWrite $3 "set PATH=$1\bin;%PATH%$\r$\n" + FileWrite $3 "echo -- Added $1\bin to PATH$\r$\n" + FileWrite $3 "set QMAKESPEC=$4$\r$\n" + FileWrite $3 "echo -- QMAKESPEC set to $\"$4$\"$\r$\n" + + Push $2 + Call IsExpressVersion + Pop $5 + ${If} $5 != "" + FileWrite $3 "$\r$\n" + FileWrite $3 'regedit /e S$$D$$K$$ "HKEY_LOCAL_MACHINE\Software\Microsoft\MicrosoftSDK"$\r$\n' + FileWrite $3 'if not exist S$$D$$K$$ goto ENDSDK\r$\n' + FileWrite $3 'find "Install Dir" < S$$D$$K$$ > D$$I$$R$$$\r$\n' + FileWrite $3 'del S$$D$$K$$$\r$\n' + FileWrite $3 'for /f "tokens=2 delims==" %%i in (D$$I$$R$$) do call %%i\setenv$\r$\n' + FileWrite $3 'del D$$I$$R$$$\r$\n' + FileWrite $3 ':ENDSDK\r$\n' + ${EndIf} + + Push $2 + Call GetVSVarsFile + Pop $6 + ${If} $6 != "" + FileWrite $3 "$\r$\n" + FileWrite $3 'if not "%1"=="vsvars" goto ENDVSVARS$\r$\n' + FileWrite $3 'call "$6"$\r$\n' + ${If} $0 != "" + FileWrite $3 "call $\"$1\bin\setcepaths.bat$\" $0$\r$\n" + ${EndIf} + FileWrite $3 ":ENDVSVARS$\r$\n" + + FileWrite $3 "$\r$\n" + FileWrite $3 'if not "%1"=="vsstart" goto ENDVSSTART$\r$\n' + FileWrite $3 'call "$6"$\r$\n' + ${If} $0 != "" + FileWrite $3 "call $\"$1\bin\setcepaths.bat$\" $0$\r$\n" + ${EndIf} + ${If} $2 != "vc60" + FileWrite $3 "devenv /useenv$\r$\n" + ${Else} + FileWrite $3 "msdev /useenv$\r$\n" + ${EndIf} + FileWrite $3 ":ENDVSSTART$\r$\n" + ${EndIf} + + FileWrite $3 "$\r$\n" + FileClose $3 + + done: + Pop $6 + Pop $5 + Pop $4 + Pop $3 + Pop $0 + Pop $1 + Pop $2 +FunctionEnd + +Function GetMkSpec + exch $0 + StrCmp $0 "mingw" MINGW + StrCmp $0 "vs2008" VS2008 + StrCmp $0 "vs2008ce" VS2008CE + StrCmp $0 "vs2005" VS2005 + StrCmp $0 "vs2005ce" VS2005CE + StrCmp $0 "vs2003" VS2003 + StrCmp $0 "vs2002" VS2002 + StrCmp $0 "vc60" VS60 + StrCmp $0 "icc" ICC + + MINGW: + pop $0 + push "win32-g++" + goto done + + VS2008: + pop $0 + push "win32-msvc2008" + goto done + + VS2008CE: + pop $0 + push "" + goto done + + VS2005: + pop $0 + push "win32-msvc2005" + goto done + + VS2005CE: + pop $0 + push "" + goto done + + VS2003: + pop $0 + push "win32-msvc2003" + goto done + + VS2002: + pop $0 + push "win32-msvc2002" + goto done + + VS60: + pop $0 + push "win32-msvc" + goto done + + ICC: + pop $0 + push "win32-icc" + goto done + + done: +FunctionEnd + +!define AD_COMPILER_NAME_VS2008 "Visual Studio .NET 2008" +!define AD_COMPILER_NAME_VS2008_EXPRESS "Visual C++ 2008 Express Edition" +!define AD_COMPILER_NAME_VS2005 "Visual Studio .NET 2005" +!define AD_COMPILER_NAME_VS2005_EXPRESS "Visual C++ 2005 Express Edition" +!define AD_COMPILER_NAME_VS2003 "Visual Studio .NET 2003" +!define AD_COMPILER_NAME_VS2002 "Visual Studio .NET 2002" +!define AD_COMPILER_NAME_VC60 "Visual Studio 6.0" +!define AD_COMPILER_NAME_ICC "Intel C++ Compiler" +!define AD_COMPILER_NAME_MINGW "MinGW (Must be in PATH!)" + +Function GetShortCompilerName + exch $0 + + strcmp "$0" "${AD_COMPILER_NAME_VS2008}" 0 +3 + strcpy $0 "vs2008" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_VS2008_EXPRESS}" 0 +3 + strcpy $0 "vs2008" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_VS2005}" 0 +3 + strcpy $0 "vs2005" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_VS2005_EXPRESS}" 0 +3 + strcpy $0 "vs2005" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_VS2003}" 0 +3 + strcpy $0 "vs2003" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_VS2002}" 0 +3 + strcpy $0 "vs2002" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_VC60}" 0 +3 + strcpy $0 "vc60" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_ICC}" 0 +3 + strcpy $0 "icc" + goto done + + strcmp "$0" "${AD_COMPILER_NAME_MINGW}" 0 +3 + strcpy $0 "mingw" + goto done + + strcpy $0 "" ;this is bad! + + done: + exch $0 +FunctionEnd + +# +# returns if a compiler is installed as express version +# push "vs2005" #compiler +# call IsExpressVersion +# +Function IsExpressVersion + exch $1 + push $0 + + StrCpy $0 "" + + StrCmp $1 "vs2005" 0 +2 + ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\8.0" "InstallDir" + + StrCmp $1 "vs2008" 0 +2 + ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\9.0" "InstallDir" + + ClearErrors + exch $0 + exch + pop $1 +FunctionEnd + +Function AutoDetectCompilers + push $0 + push $1 + + strcpy $1 "" + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\9.0" "InstallDir" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_VS2008}|" + + ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\9.0" "InstallDir" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_VS2009_EXPRESS}|" + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\8.0" "InstallDir" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_VS2005}|" + + ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\8.0" "InstallDir" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_VS2005_EXPRESS}|" + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.1" "InstallDir" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_VS2003}|" + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.0" "InstallDir" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_VS2002}|" + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\6.0\Setup" "VsCommonDir" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_VC60}|" + + ReadRegStr $0 HKLM "Software\Intel\Compilers\C++\80" "Major Version" + strcmp $0 "" +2 + strcpy $1 "$1${AD_COMPILER_NAME_ICC}|" + + strcpy $1 "$1${AD_COMPILER_NAME_MINGW}" + + exch + pop $0 + exch $1 +FunctionEnd + +Function GetVSVarsFile + exch $1 + push $0 + + StrCmp $1 "vs2008" VS2008 + StrCmp $1 "vs2008ce" VS2008 + StrCmp $1 "vs2005" VS2005 + StrCmp $1 "vs2005ce" VS2005 + StrCmp $1 "vs2003" VS2003 + StrCmp $1 "vs2002" VS2002 + StrCmp $1 "vc60" VS60 + + push "" ;empty string if not found + goto done + + VS2008: + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\9.0\Setup\VS" "ProductDir" + StrCmp $0 "" +1 foundVSDir ; found msvc.net 2008 + + ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\9.0\Setup\VS" "ProductDir" + StrCmp $0 "" +1 foundVSDir ; found msvc.net 2008 express + + VS2005: + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\8.0\Setup\VS" "ProductDir" + StrCmp $0 "" +1 foundVSDir ; found msvc.net 2005 + + ReadRegStr $0 HKLM "Software\Microsoft\VCExpress\8.0\Setup\VS" "ProductDir" + StrCmp $0 "" +1 foundVSDir ; found msvc.net 2005 express + + VS2003: + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.1\Setup\VS" "ProductDir" + StrCmp $0 "" +1 foundVSDir ; found msvc.net 2003 + + VS2002: + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\7.0\Setup\VS" "ProductDir" + StrCmp $0 "" +1 foundVSDir ; found msvc.net 2002 + + VS60: + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++" "ProductDir" + StrCmp $0 "" +1 foundVCDir ; found msvc 6.0 + + push "" ;empty string if not found + goto done + + foundVSDir: + push "$0Common7\Tools\vsvars32.bat" + goto done + + foundVCDir: + push "$0\bin\vcvars32.bat" + + done: + exch + pop $0 + exch + pop $1 +FunctionEnd + +!endif ;QTENV_INCLUDE diff --git a/util/scripts/win-binary/nsis/includes/regsvr.nsh b/util/scripts/win-binary/nsis/includes/regsvr.nsh new file mode 100644 index 0000000..a2369ed --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/regsvr.nsh @@ -0,0 +1,59 @@ +!ifndef REGSVR_INCLUDE +!define REGSVR_INCLUDE + +; usage: +; push dll to register +; call RegSvr +Function RegSvr + exch $0 ;filename + push $1 + + ClearErrors + + ; get regsvr location + IfFileExists "$SYSDIR\regsvr32.exe" 0 RegSvrNotFoundError + + DetailPrint "Registering $0..." + nsExec::ExecToLog '"$SYSDIR\regsvr32.exe" /s "$0"' + pop $1 + strcmp "$1" "0" 0 RegSvrFailed + DetailPrint "Registering of $0 succeeded!" + goto RegSvrDone + + RegSvrNotFoundError: + DetailPrint "Could not find regsvr32.exe!" + SetErrors + goto RegSvrDone + + RegSvrFailed: + DetailPrint "Registering of $0 failed!$\r$\n(errorcode: $1)" + SetErrors + goto RegSvrDone + + RegSvrDone: + + pop $1 + pop $0 +FunctionEnd + +; usage: +; push dll to unregister +; call un.RegSvr +Function un.RegSvr + exch $0 ;filename + push $1 + + ; get regsvr location + IfFileExists "$SYSDIR\regsvr32.exe" 0 UnRegSvrDone + + DetailPrint "Unregistering $0..." + nsExec::ExecToLog '"$SYSDIR\regsvr32.exe" /s /u "$0"' + pop $1 + strcmp "$1" "0" 0 UnRegSvrDone + DetailPrint "Unregistering of $0 succeeded!" + UnRegSvrDone: + pop $1 + pop $0 +FunctionEnd + +!endif ;REGSVR_INCLUDE
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/includes/system.nsh b/util/scripts/win-binary/nsis/includes/system.nsh new file mode 100644 index 0000000..678c32c --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/system.nsh @@ -0,0 +1,364 @@ +!ifndef SYSTEM_INCLUDE +!define SYSTEM_INCLUDE + +!define QT4VSADDIN_GUID "{6A7385B4-1D62-46e0-A4E3-AED4475371F0}" + +!define QTVSIP2003_OLD2_GUID "{789202F4-94F5-4f0a-AA00-73295FEBFD68}" +!define QTVSIP2005_OLD2_GUID "{789202F4-94F5-4f0a-AA00-73295FEBFD69}" +!define QTVSIP2008_OLD2_GUID "{7E61B999-F2CC-4DC8-8120-EF2E90FDF713}" + +!define QTVSIP2003_OLD_GUID "{789212F4-94F5-4f0a-AA00-73295FEBFD68}" +!define QTVSIP2005_OLD_GUID "{789212F4-94F5-4f0a-AA00-73295FEBFD69}" +!define QTVSIP2008_OLD_GUID "{789212F4-94F5-4f0a-AA00-73295FEBFD70}" +!define QTVSIP_GUID "{789212F4-94F5-4f0a-AFFE-73295BE14F10}" + +!define QMSNET2002_GUID "{C174ACCD-D856-4B60-9887-0FF9E841E0EC}" +!define QMSNET2003_GUID "{C174ACCE-D857-4B61-9888-0FF9E841E0ED}" +!define QMSNET2005_GUID "{14E98DB4-A232-49a4-8EC1-8CE4F6985C73}" +!define QMSNET2008_GUID "{A40CF53F-35D5-460F-9871-A3F0599309A4}" + +!macro GetVSInstallationDir UN +; Usage: +; +; push "7.0" +; call GetVSInstallationDir +; pop $0 +; +; If the requested VS version can be found, its +; installation directory is returned. +Function ${UN}GetVSInstallationDir + Exch $0 + Push $1 + ReadRegStr $1 HKLM "Software\Microsoft\VisualStudio\$0\Packages\{1B027A40-8F43-11D0-8D11-00A0C91BC942}" "About" + StrCmp $1 "" +2 + ReadRegStr $1 HKLM "Software\Microsoft\VisualStudio\$0" "InstallDir" + StrCpy $0 $1 + StrCmp $0 "" 0 +2 + SetErrors + Pop $1 + Exch $0 +FunctionEnd +!macroend + +!insertmacro GetVSInstallationDir "" +!insertmacro GetVSInstallationDir "un." + + +!macro IsDotNETInstalled UN +; Usage: +; +; push "8.0" +; call IsDotNETInstalled +; pop $0 +; +; $0 contains the path where the .NET framework is installed. +; If not installation can be found $0 is empty. +Function ${UN}IsDotNETInstalled + Exch $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + + StrCpy $5 $0 + + ReadRegStr $4 HKEY_LOCAL_MACHINE "Software\Microsoft\.NETFramework" "InstallRoot" + Push $4 + Exch $EXEDIR + Exch $EXEDIR + Pop $4 + + IfFileExists $4 0 noDotNET + StrCpy $0 0 + + EnumStart: + EnumRegKey $2 HKEY_LOCAL_MACHINE "Software\Microsoft\.NETFramework\Policy" $0 + IntOp $0 $0 + 1 + StrCmp $2 "" noDotNET + StrCpy $1 0 + + EnumPolicy: + EnumRegValue $3 HKEY_LOCAL_MACHINE "Software\Microsoft\.NETFramework\Policy\$2" $1 + IntOp $1 $1 + 1 + StrCmp $3 "" EnumStart + + StrCmp $5 "8.0" greaterThan80 + StrCmp $5 "9.0" greaterThan80 testDotNet + greaterThan80: + StrCmp $2 "v2.0" 0 EnumPolicy + + testDotNet: + IfFileExists "$4\$2.$3" foundDotNET EnumPolicy + + noDotNET: + StrCpy $0 0 + Goto done + + foundDotNET: + StrCpy $0 "$4\$2.$3" + + done: + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Exch $0 +FunctionEnd +!macroend + +!insertmacro IsDotNETInstalled "" +!insertmacro IsDotNETInstalled "un." + +!macro IsQt4VSAddinInstalled UN +; Usage: +; +; push "8.0" +; call IsQt4VSAddinInstalled +; pop $0 +Function ${UN}IsQt4VSAddinInstalled + Exch $0 + Push $1 + Push $2 + Push $3 + + StrCmp $0 "8.0" 0 +2 + StrCpy $2 "${QT4VSADDIN_GUID}" + StrCmp $0 "9.0" 0 +2 + StrCpy $2 "${QT4VSADDIN_GUID}" + + StrCpy $3 0 + + ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0\NewProjectTemplates\TemplateDirs\$2\/2" "TemplatesDir" + StrCmp $1 "" +3 + StrCpy $3 1 + goto done + + ReadRegStr $1 HKCU "SOFTWARE\Microsoft\VisualStudio\$0\NewProjectTemplates\TemplateDirs\$2\/2" "TemplatesDir" + StrCmp $1 "" +2 + StrCpy $3 1 + +done: + StrCpy $0 $3 + + Pop $3 + Pop $2 + Pop $1 + Exch $0 +FunctionEnd +!macroend + +!insertmacro IsQt4VSAddinInstalled "" +!insertmacro IsQt4VSAddinInstalled "un." + + +!macro IsQMsNetInstalled UN +; Usage: +; +; push "8.0" +; call IsQMsNetInstalled +; pop $0 +Function ${UN}IsQMsNetInstalled + Exch $0 + Push $1 + Push $2 + Push $3 + + StrCmp $0 "7.0" 0 +2 + StrCpy $2 "${QMSNET2002_GUID}" + StrCmp $0 "7.1" 0 +2 + StrCpy $2 "${QMSNET2003_GUID}" + StrCmp $0 "8.0" 0 +2 + StrCpy $2 "${QMSNET2005_GUID}" + StrCmp $0 "9.0" 0 +2 + StrCpy $2 "${QMSNET2008_GUID}" + + StrCpy $3 0 + + ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0\NewProjectTemplates\TemplateDirs\$2\/2" "TemplatesDir" + StrCmp $1 "" +3 + StrCpy $3 1 + goto done + + ReadRegStr $1 HKCU "SOFTWARE\Microsoft\VisualStudio\$0\NewProjectTemplates\TemplateDirs\$2\/2" "TemplatesDir" + StrCmp $1 "" +2 + StrCpy $3 1 + +done: + StrCpy $0 $3 + + Pop $3 + Pop $2 + Pop $1 + Exch $0 +FunctionEnd +!macroend + +!insertmacro IsQMsNetInstalled "" +!insertmacro IsQMsNetInstalled "un." + +!macro IsQMsDevInstalled UN +; Usage: +; +; call IsQMsDevInstalled +; pop $0 +Function ${UN}IsQMsDevInstalled + Push $0 + Push $1 + Push $2 + + StrCpy $0 0 + + ReadRegStr $1 HKLM "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "Filename" + StrCmp $1 "" +3 + StrCpy $0 1 + goto done + + ReadRegStr $1 HKCU "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "Filename" + StrCmp $1 "" +2 + StrCpy $0 1 + +done: + Pop $2 + Pop $1 + Exch $0 +FunctionEnd +!macroend + +!insertmacro IsQMsDevInstalled "" +!insertmacro IsQMsDevInstalled "un." + +!macro IsIntegrationInstalled UN +; Usage: +; +; push "8.0" +; call IsIntegrationInstalled +; pop $0 +Function ${UN}IsIntegrationInstalled + Exch $0 + Push $1 + Push $2 + Push $3 + Push $4 + + StrCpy $2 "${QTVSIP_GUID}" + StrCmp $0 "7.1" 0 +3 + StrCpy $3 "${QTVSIP2003_OLD_GUID}" + StrCpy $4 "${QTVSIP2003_OLD2_GUID}" + StrCmp $0 "8.0" 0 +3 + StrCpy $3 "${QTVSIP2005_OLD_GUID}" + StrCpy $4 "${QTVSIP2005_OLD2_GUID}" + StrCmp $0 "9.0" 0 +3 + StrCpy $3 "${QTVSIP2008_OLD_GUID}" + StrCpy $4 "${QTVSIP2008_OLD2_GUID}" + + StrCpy $0 0 + + ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0\Packages\$2" "ProductName" + StrCmp $1 "" +3 + StrCpy $0 1 + goto done + + ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0\Packages\$3" "ProductName" + StrCmp $1 "" +3 + StrCpy $0 1 + goto done + + ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0\Packages\$4" "ProductName" + StrCmp $1 "" done + StrCpy $0 1 + +done: + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Exch $0 +FunctionEnd +!macroend + +!insertmacro IsIntegrationInstalled "" +!insertmacro IsIntegrationInstalled "un." + +!macro AdministratorRights UN +Function ${UN}HasAdminRights + push $0 + ClearErrors + UserInfo::GetAccountType + IfErrors Yes ;It's probably Win95 + pop $0 + StrCmp $0 "Admin" Yes + StrCmp $0 "Power" Yes + + StrCpy $0 false + goto Done + + Yes: + StrCpy $0 true + + Done: + exch $0 +FunctionEnd +!macroend +!insertmacro AdministratorRights "" +!insertmacro AdministratorRights "un." + +; Pushes 1 on the stack if VS 2005 SP1 is installed, otherwise 0. +; Usage: +; call IsVS2005SP1Installed +; pop $0 +Function IsVS2005SP1Installed + Push $0 + ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\DevDiv\VS\Servicing\8.0" "SP" + ${If} $0 >= 1 + Pop $0 + Push 1 + Return + ${EndIf} +; try again for Visual Studio 2005 Express + ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\DevDiv\VC\Servicing\8.0" "SP" + ${If} $0 >= 1 + Pop $0 + Push 1 + Return + ${EndIf} + Pop $0 + Push 0 +FunctionEnd + +; Pushes 1 on the stack if .NET 2 SP1 is installed, otherwise 0. +; Usage: +; call IsDotNet2SP1Installed +; pop $0 +Function IsDotNet2SP1Installed + Push $0 + ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" "SP" + ${If} $0 >= 1 + Pop $0 + Push 1 + Return + ${EndIf} + Pop $0 + Push 0 +FunctionEnd + + +; Pushes 1 on the stack if VS 2008 redistributable is installed, otherwise 0. +; Usage: +; call IsVS2008RedistInstalled +; pop $0 +Function IsVS2008RedistInstalled + Push $0 + ClearErrors + ReadRegDword $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version" + ${If} $0 == 151015966 ; 151015966 = 0x900521e + Pop $0 + Push 1 + Return + ${EndIf} + Pop $0 + Push 0 +FunctionEnd + +!endif ;SYSTEM_INCLUDE diff --git a/util/scripts/win-binary/nsis/includes/templates.nsh b/util/scripts/win-binary/nsis/includes/templates.nsh new file mode 100644 index 0000000..62c5677 --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/templates.nsh @@ -0,0 +1,262 @@ +!ifndef TEMPLATE_INCLUDE +!define TEMPLATE_INCLUDE + +Var ProjectInstDir +Var WizardInstDir +Var ItemInstDir + +!macro InstallProjectTemplate SD TT + SetOutPath "$ProjectInstDir" + SetOverwrite ifnewer + + ; Create the vsz file + push ${TT} ;WIZ_NAME + push "$ProjectInstDir" ;PRO_INST_DIR + push "$WizardInstDir" ;WIZ_INST_DIR + call CreateVszFile + + File "${SD}\${TT}.ico" + File "${SD}\${TT}.vsdir" + + CreateDirectory "$WizardInstDir\${TT}" + + CreateDirectory "$WizardInstDir\${TT}\1033" + SetOutPath "$WizardInstDir\${TT}\1033" + SetOverwrite ifnewer + File "${SD}\1033\styles.css" + + CreateDirectory "$WizardInstDir\${TT}\scripts\" + CreateDirectory "$WizardInstDir\${TT}\scripts\1033" + SetOutPath "$WizardInstDir\${TT}\scripts\1033" + SetOverwrite ifnewer + File "${SD}\scripts\1033\default.js" + + CreateDirectory "$WizardInstDir\${TT}\templates" + CreateDirectory "$WizardInstDir\${TT}\templates\1033" + SetOutPath "$WizardInstDir\${TT}\templates\1033" + SetOverwrite ifnewer + File "${SD}\templates\1033\*" + + CreateDirectory "$WizardInstDir\${TT}\images" + SetOutPath "$WizardInstDir\${TT}\images" + SetOverwrite ifnewer + File "${SD}\images\*" + + CreateDirectory "$WizardInstDir\${TT}\html" + CreateDirectory "$WizardInstDir\${TT}\html\1033" + SetOutPath "$WizardInstDir\${TT}\html\1033" + SetOverwrite ifnewer + File "${SD}\html\1033\*" + + CreateDirectory "$WizardInstDir\${TT}\html\1031" + SetOutPath "$WizardInstDir\${TT}\html\1031" + SetOverwrite ifnewer + File /nonfatal "${SD}\html\1031\*" +!macroend + +!macro UnInstallProjectTemplate TT + Delete "$ProjectInstDir\${TT}.vsz" + Delete "$ProjectInstDir\${TT}.ico" + Delete "$ProjectInstDir\${TT}.vsdir" + + Delete "$WizardInstDir\${TT}\1033\styles.css" + RmDir "$WizardInstDir\${TT}\1033" + + Delete "$WizardInstDir\${TT}\scripts\1033\default.js" + RmDir "$WizardInstDir\${TT}\scripts\1033" + RmDir "$WizardInstDir\${TT}\scripts" + + Delete "$WizardInstDir\${TT}\templates\1033\*" + RmDir "$WizardInstDir\${TT}\templates\1033" + RmDir "$WizardInstDir\${TT}\templates" + + Delete "$WizardInstDir\${TT}\images\*" + RmDir "$WizardInstDir\${TT}\images" + + Delete "$WizardInstDir\${TT}\html\1033\*" + RmDir "$WizardInstDir\${TT}\html\1033" + + Delete "$WizardInstDir\${TT}\html\1031\*" + RmDir "$WizardInstDir\${TT}\html\1031" + + RmDir "$WizardInstDir\${TT}\html" + + RmDir "$ProjectInstDir\${TT}" + RmDir "$WizardInstDir\${TT}" +!macroend + +Function InstallProjectTemplates + exch $0 + strcpy $ProjectInstDir "$0\projects\$VS_VERSION_SHORT" + strcpy $WizardInstDir "$0\wizards" + CreateDirectory "$ProjectInstDir" + CreateDirectory "$WizardInstDir" + + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Projects\Qt4GuiProject" "Qt4GuiProject" + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Projects\Qt4ConsoleProject" "Qt4ConsoleProject" + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Projects\Qt4LibProject" "Qt4LibProject" + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Projects\Qt4ActiveQtServerProject" "Qt4ActiveQtServerProject" + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Projects\Qt4DesignerPluginProject" "Qt4DesignerPluginProject" + + # Check whether we have a Qt/WinCE license. + !ifdef MODULE_LICENSECHECK + qtnsisext::IsValidWinCELicense $LICENSE_KEY + IfErrors skipCETemplates + pop $1 + strcmp $1 "0" skipCETemplates + !endif + # Check whether we have VS 2008 or VS 2005. + strcmp "8.0" $VS_VERSION_SHORT installCETemplates 0 + strcmp "9.0" $VS_VERSION_SHORT installCETemplates 0 + goto skipCETemplates + installCETemplates: + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Projects\Qt4WinCEProject" "Qt4WinCEProject" + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Projects\Qt4WinCELibProject" "Qt4WinCELibProject" + skipCETemplates: + + !ifndef MODULE_OLD_ADDIN7X + # install the class wizard + strcpy $ProjectInstDir "$0\wizards\$VS_VERSION_SHORT" ### why do the .vsz file go here? + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Items\Qt4GuiClass" "Qt4GuiClass" + !insertmacro InstallProjectTemplate "${MODULE_VSIP_ROOT}\Items\Qt4Class" "Qt4Class" + !endif + + pop $0 +FunctionEnd + +Function InstallItemTemplates + exch $0 + + !ifdef MODULE_OLD_ADDIN7X + strcpy $ItemInstDir "$0\qt4items" + !else + strcpy $ItemInstDir "$0\uiItems" + !endif + CreateDirectory "$ItemInstDir" + SetOutPath "$ItemInstDir" + SetOverwrite ifnewer + !ifndef MODULE_OLD_ADDIN7X + File "${MODULE_VSIP_ROOT}\Items\uiItems\uiFiles.vsdir" + !endif + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiDialogButtonsRight.ui" + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiDialogButtonsBottom.ui" + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiWidget.ui" + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiMainWindow.ui" + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiDialogButtonsRight.ico" + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiDialogButtonsBottom.ico" + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiWidget.ico" + File "${MODULE_VSIP_ROOT}\Items\uiItems\newUiMainWindow.ico" + + !ifndef MODULE_OLD_ADDIN7X + strcpy $ItemInstDir "$0\qrcItems" + !endif + CreateDirectory "$ItemInstDir" + SetOutPath "$ItemInstDir" + SetOverwrite ifnewer + !ifndef MODULE_OLD_ADDIN7X + File "${MODULE_VSIP_ROOT}\Items\qrcItems\qrcFiles.vsdir" + !endif + File "${MODULE_VSIP_ROOT}\Items\qrcItems\newQrcFile.qrc" + File "${MODULE_VSIP_ROOT}\Items\qrcItems\newQrcFile.ico" + + pop $0 +FunctionEnd + +Function un.InstallProjectTemplates + exch $0 + strcpy $ProjectInstDir "$0\projects\$VS_VERSION_SHORT" + strcpy $WizardInstDir "$0\wizards" + + !insertmacro UnInstallProjectTemplate "Qt4GuiProject" + !insertmacro UnInstallProjectTemplate "Qt4ConsoleProject" + !insertmacro UnInstallProjectTemplate "Qt4LibProject" + !insertmacro UnInstallProjectTemplate "Qt4ActiveQtServerProject" + !insertmacro UnInstallProjectTemplate "Qt4DesignerPluginProject" + !insertmacro UnInstallProjectTemplate "Qt4WinCEProject" + !insertmacro UnInstallProjectTemplate "Qt4WinCELibProject" + + RmDir "$ProjectInstDir" + RmDir "$0\projects" + + !ifndef MODULE_OLD_ADDIN7X + # install the class wizard + strcpy $ProjectInstDir "$0\wizards\$VS_VERSION_SHORT" + !insertmacro UnInstallProjectTemplate "Qt4GuiClass" + !insertmacro UnInstallProjectTemplate "Qt4Class" + RmDir "$ProjectInstDir" + !endif + + RmDir "$WizardInstDir" + pop $0 +FunctionEnd + +Function un.InstallItemTemplates + exch $0 + + !ifdef MODULE_OLD_ADDIN7X + strcpy $ItemInstDir "$0\qt4items" + !else + strcpy $ItemInstDir "$0\uiItems" + Delete "$ItemInstDir\uiFiles.vsdir" + !endif + Delete "$ItemInstDir\newUiDialogButtonsRight.ui" + Delete "$ItemInstDir\newUiDialogButtonsBottom.ui" + Delete "$ItemInstDir\newUiWidget.ui" + Delete "$ItemInstDir\newUiMainWindow.ui" + Delete "$ItemInstDir\newUiDialogButtonsRight.ico" + Delete "$ItemInstDir\newUiDialogButtonsBottom.ico" + Delete "$ItemInstDir\newUiWidget.ico" + Delete "$ItemInstDir\newUiMainWindow.ico" + RmDir "$ItemInstDir" + + !ifndef MODULE_OLD_ADDIN7X + strcpy $ItemInstDir "$0\qrcItems" + Delete "$ItemInstDir\qrcFiles.vsdir" + !endif + Delete "$ItemInstDir\newQrcFile.qrc" + Delete "$ItemInstDir\newQrcFile.ico" + RmDir "$ItemInstDir" + + pop $0 +FunctionEnd + +# +# usage: +# push WIZ_NAME +# push PRO_INST_DIR +# push WIZ_INST_DIR +# call CreateVszFile +# +Function CreateVszFile + exch $1 ;WIZ_INST_DIR + exch 2 + exch $2 ;WIZ_NAME + exch + exch $3 ;PRO_INST_DIR + push $0 + + ClearErrors + FileOpen $0 "$3\$2.vsz" w + IfErrors done + FileWrite $0 "VSWIZARD 7.0$\r$\n" + +; vs2002 don't use version number at all... +strcmp "$VS_VERSION_SHORT" "7.0" +3 + FileWrite $0 "Wizard=VsWizard.VsWizardEngine.$VS_VERSION_SHORT$\r$\n" +goto +2 + FileWrite $0 "Wizard=VsWizard.VsWizardEngine$\r$\n" + + FileWrite $0 "$\r$\n" + FileWrite $0 'Param="WIZARD_NAME = $2"$\r$\n' + FileWrite $0 'Param="ABSOLUTE_PATH = $1\$2"$\r$\n' + FileWrite $0 'Param="FALLBACK_LCID = 1033"$\r$\n' + FileClose $0 + + done: + pop $0 + pop $3 + pop $2 + pop $1 +FunctionEnd + +!endif ;TEMPLATE_INCLUDE diff --git a/util/scripts/win-binary/nsis/includes/writeEnvStr.nsh b/util/scripts/win-binary/nsis/includes/writeEnvStr.nsh new file mode 100644 index 0000000..98926d0 --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/writeEnvStr.nsh @@ -0,0 +1,138 @@ +!ifndef WRITEENVSTR_INCLUDED +!define WRITEENVSTR_INCLUDED + +!include WinMessages.nsh + +!ifdef ALL_USERS + !define WriteEnvStr_RegKey \ + 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' +!else + !define WriteEnvStr_RegKey 'HKCU "Environment"' +!endif + +# +# WriteEnvStr - Writes an environment variable +# Note: Win9x systems requires reboot +# +# Example: +# Push "HOMEDIR" # name +# Push "C:\New Home Dir\" # value +# Call WriteEnvStr +# +Function WriteEnvStr + Exch $1 ; $1 has environment variable value + Exch + Exch $0 ; $0 has environment variable name + Push $2 + + Call IsNT + Pop $2 + StrCmp $2 1 WriteEnvStr_NT + ; Not on NT + StrCpy $2 $WINDIR 2 ; Copy drive of windows (c:) + FileOpen $2 "$2\autoexec.bat" a + FileSeek $2 0 END + FileWrite $2 "$\r$\nSET $0=$1$\r$\n" + FileClose $2 + SetRebootFlag true + Goto WriteEnvStr_done + + WriteEnvStr_NT: + WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $1 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + WriteEnvStr_done: + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +# +# un.DeleteEnvStr - Removes an environment variable +# Note: Win9x systems requires reboot +# +# Example: +# Push "HOMEDIR" # name +# Call un.DeleteEnvStr +# +Function un.DeleteEnvStr + Exch $0 ; $0 now has the name of the variable + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + + Call un.IsNT + Pop $1 + StrCmp $1 1 DeleteEnvStr_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" r + GetTempFileName $4 + FileOpen $2 $4 w + StrCpy $0 "SET $0=" + SetRebootFlag true + + DeleteEnvStr_dosLoop: + FileRead $1 $3 + StrLen $5 $0 + StrCpy $5 $3 $5 + StrCmp $5 $0 DeleteEnvStr_dosLoop + StrCmp $5 "" DeleteEnvStr_dosLoopEnd + FileWrite $2 $3 + Goto DeleteEnvStr_dosLoop + + DeleteEnvStr_dosLoopEnd: + FileClose $2 + FileClose $1 + StrCpy $1 $WINDIR 2 + Delete "$1\autoexec.bat" + CopyFiles /SILENT $4 "$1\autoexec.bat" + Delete $4 + Goto DeleteEnvStr_done + + DeleteEnvStr_NT: + DeleteRegValue ${WriteEnvStr_RegKey} $0 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + DeleteEnvStr_done: + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +# +# [un.]IsNT - Pushes 1 if running on NT, 0 if not +# +# Example: +# Call IsNT +# Pop $0 +# StrCmp $0 1 +3 +# MessageBox MB_OK "Not running on NT!" +# Goto +2 +# MessageBox MB_OK "Running on NT!" +# +!macro IsNT UN +Function ${UN}IsNT + Push $0 + ReadRegStr $0 HKLM \ + "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCmp $0 "" 0 IsNT_yes + ; we are not NT. + Pop $0 + Push 0 + Return + + IsNT_yes: + ; NT!!! + Pop $0 + Push 1 +FunctionEnd +!macroend +!insertmacro IsNT "" +!insertmacro IsNT "un." + +!endif ;WRITEENVSTR_INCLUDED
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/includes/writePathStr.nsh b/util/scripts/win-binary/nsis/includes/writePathStr.nsh new file mode 100644 index 0000000..57e6792 --- /dev/null +++ b/util/scripts/win-binary/nsis/includes/writePathStr.nsh @@ -0,0 +1,241 @@ +!verbose 3 +!include "WinMessages.NSH" +!verbose 4 + +; AddToPath - Adds the given dir to the search path. +; Input - head of the stack +; Note - Win9x systems requires reboot + +Function AddToPath + Exch $0 + Push $1 + Push $2 + Push $3 + + # don't add if the path doesn't exist + IfFileExists $0 "" AddToPath_done + + ReadEnvStr $1 PATH + Push "$1;" + Push "$0;" + Call StringString + Pop $2 + StrCmp $2 "" "" AddToPath_done + Push "$1;" + Push "$0\;" + Call StringString + Pop $2 + StrCmp $2 "" "" AddToPath_done + GetFullPathName /SHORT $3 $0 + Push "$1;" + Push "$3;" + Call StringString + Pop $2 + StrCmp $2 "" "" AddToPath_done + Push "$1;" + Push "$3\;" + Call StringString + Pop $2 + StrCmp $2 "" "" AddToPath_done + + Call IsNT2 + Pop $1 + StrCmp $1 1 AddToPath_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" a + FileSeek $1 -1 END + FileReadByte $1 $2 + IntCmp $2 26 0 +2 +2 # DOS EOF + FileSeek $1 -1 END # write over EOF + FileWrite $1 "$\r$\nSET PATH=$3;%PATH%$\r$\n" + FileClose $1 + SetRebootFlag true + Goto AddToPath_done + + AddToPath_NT: + ReadRegStr $1 HKCU "Environment" "PATH" + StrCpy $2 $1 1 -1 # copy last char + StrCmp $2 ";" 0 +2 # if last char == ; + StrCpy $1 $1 -1 # remove last char + StrCmp $1 "" AddToPath_NTdoIt + StrCpy $0 "$0;$1" + AddToPath_NTdoIt: + WriteRegExpandStr HKCU "Environment" "PATH" $0 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + AddToPath_done: + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +; RemoveFromPath - Remove a given dir from the path +; Input: head of the stack + +!macro RemoveFromPath un +Function ${un}RemoveFromPath + Exch $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + Push $6 + + IntFmt $6 "%c" 26 # DOS EOF + + Call ${un}IsNT2 + Pop $1 + StrCmp $1 1 unRemoveFromPath_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" r + GetTempFileName $4 + FileOpen $2 $4 w + GetFullPathName /SHORT $0 $0 + StrCpy $0 "SET PATH=$0;%PATH%" + Goto unRemoveFromPath_dosLoop + + unRemoveFromPath_dosLoop: + FileRead $1 $3 + StrCpy $5 $3 1 -1 # read last char + StrCmp $5 $6 0 +2 # if DOS EOF + StrCpy $3 $3 -1 # remove DOS EOF so we can compare + StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "" unRemoveFromPath_dosLoopEnd + FileWrite $2 $3 + Goto unRemoveFromPath_dosLoop + unRemoveFromPath_dosLoopRemoveLine: + SetRebootFlag true + Goto unRemoveFromPath_dosLoop + + unRemoveFromPath_dosLoopEnd: + FileClose $2 + FileClose $1 + StrCpy $1 $WINDIR 2 + Delete "$1\autoexec.bat" + CopyFiles /SILENT $4 "$1\autoexec.bat" + Delete $4 + Goto unRemoveFromPath_done + + unRemoveFromPath_NT: + ReadRegStr $1 HKCU "Environment" "PATH" + StrCpy $5 $1 1 -1 # copy last char + StrCmp $5 ";" +2 # if last char != ; + StrCpy $1 "$1;" # append ; + Push $1 + Push "$0;" + Call ${un}StringString ; Find `$0;` in $1 + Pop $2 ; pos of our dir + StrCmp $2 "" unRemoveFromPath_done + ; else, it is in path + # $0 - path to add + # $1 - path var + StrLen $3 "$0;" + StrLen $4 $2 + StrCpy $5 $1 -$4 # $5 is now the part before the path to remove + StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove + StrCpy $3 $5$6 + + StrCpy $5 $3 1 -1 # copy last char + StrCmp $5 ";" 0 +2 # if last char == ; + StrCpy $3 $3 -1 # remove last char + + WriteRegExpandStr HKCU "Environment" "PATH" $3 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + unRemoveFromPath_done: + Pop $6 + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd +!macroend +!insertmacro RemoveFromPath "" +!insertmacro RemoveFromPath "un." + + +########################################### +# Utility Functions # +########################################### + +; IsNT2 +; no input +; output, top of the stack = 1 if NT or 0 if not +; +; Usage: +; Call IsNT2 +; Pop $R0 +; ($R0 at this point is 1 or 0) + +!macro IsNT2 un +Function ${un}IsNT2 + Push $0 + ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCmp $0 "" 0 IsNT2_yes + ; we are not NT. + Pop $0 + Push 0 + Return + + IsNT2_yes: + ; NT!!! + Pop $0 + Push 1 +FunctionEnd +!macroend +!insertmacro IsNT2 "" +!insertmacro IsNT2 "un." + +; StringString +; input, top of stack = string to search for +; top of stack-1 = string to search in +; output, top of stack (replaces with the portion of the string remaining) +; modifies no other variables. +; +; Usage: +; Push "this is a long ass string" +; Push "ass" +; Call StringString +; Pop $R0 +; ($R0 at this point is "ass string") + +!macro StringString un +Function ${un}StringString +Exch $R1 ; st=haystack,old$R1, $R1=needle + Exch ; st=old$R1,haystack + Exch $R2 ; st=old$R1,old$R2, $R2=haystack + Push $R3 + Push $R4 + Push $R5 + StrLen $R3 $R1 + StrCpy $R4 0 + ; $R1=needle + ; $R2=haystack + ; $R3=len(needle) + ; $R4=cnt + ; $R5=tmp + loop: + StrCpy $R5 $R2 $R3 $R4 + StrCmp $R5 $R1 done + StrCmp $R5 "" done + IntOp $R4 $R4 + 1 + Goto loop +done: + StrCpy $R1 $R2 "" $R4 + Pop $R5 + Pop $R4 + Pop $R3 + Pop $R2 + Exch $R1 +FunctionEnd +!macroend +!insertmacro StringString "" +!insertmacro StringString "un." diff --git a/util/scripts/win-binary/nsis/installer.nsi b/util/scripts/win-binary/nsis/installer.nsi new file mode 100644 index 0000000..e61f00e --- /dev/null +++ b/util/scripts/win-binary/nsis/installer.nsi @@ -0,0 +1,524 @@ +; Script generated by the HM NIS Edit Script Wizard. + +SetCompressor /FINAL /SOLID lzma +!include "config.nsh" +!include "includes\global.nsh" + +!define PRODUCT_PUBLISHER "Nokia Corporation and/or its subsidiary(-ies)" +!define PRODUCT_WEB_SITE "http://qtsoftware.com" + +!define INSTALL_ICON "images\install.ico" + +!ifndef WELCOME_ICON + !define WELCOME_ICON "images\qt-wizard.bmp" +!endif +!define PAGE_HEADER_ICON "images\qt-header.bmp" + +!include "MUI.nsh" +!include "FileFunc.nsh" +!insertmacro GetParameters +!insertmacro GetOptions + +; modules +!include "modules\mingw.nsh" +!include "modules\msvc.nsh" +!include "modules\addin7x.nsh" +!include "modules\qsa.nsh" +!include "modules\addin60.nsh" +!include "modules\qtjambi.nsh" +!include "modules\debugext.nsh" +!include "modules\license.nsh" +!include "modules\vsip.nsh" +!include "modules\help.nsh" +!include "modules\registeruiext.nsh" +!include "modules\environment.nsh" +!include "modules\evaluation.nsh" +!include "modules\opensource.nsh" +!include "modules\eclipse.nsh" +!include "modules\qtjambieclipse.nsh" +!include "modules\qtdemo.nsh" +!include "includes\instdir.nsh" + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "${INSTALL_ICON}" +!define MUI_UNICON "${INSTALL_ICON}" + +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "${PAGE_HEADER_ICON}" +!define MUI_HEADERIMAGE_UNBITMAP "${PAGE_HEADER_ICON}" + +!define MUI_WELCOMEFINISHPAGE_BITMAP "${WELCOME_ICON}" +!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${WELCOME_ICON}" + +!ifdef WELCOME_NOTE + !define MUI_WELCOMEPAGE_TEXT "${WELCOME_NOTE}" +!endif +!ifdef WELCOME_TITLE + !define MUI_WELCOMEPAGE_TITLE "${WELCOME_TITLE}" +!endif +!insertmacro MUI_PAGE_WELCOME +!insertmacro OPENSOURCE_INITIALIZE +!insertmacro EVALUATION_INITIALIZE +!insertmacro LICENSECHECK_INITIALIZE +!insertmacro MSVC_INITIALIZE +!insertmacro ADDIN7X_INITIALIZE +!insertmacro ADDIN60_INITIALIZE +!insertmacro QTJAMBI_INITIALIZE +!insertmacro DEBUGEXT_INITIALIZE +!insertmacro HELP_INITIALIZE +!insertmacro VSIP_INITIALIZE + +!ifdef USE_COMPONENT_PAGE + !insertmacro MUI_PAGE_COMPONENTS +!endif + +!ifdef USE_DIRECTORY_PAGE + !insertmacro INSTDIR_INITIALIZE +!endif + +!ifdef USE_STARTMENU_PAGE + !define MUI_STARTMENUPAGE_NODISABLE + !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${DEFAULT_STARTMENU_STRING}" + !insertmacro MUI_PAGE_STARTMENU 1 $STARTMENU_STRING +!endif + +!insertmacro MINGW_INITIALIZE +!insertmacro QSA_INITIALIZE +!insertmacro ENVIRONMENT_INITIALIZE +!insertmacro REGISTERUIEXT_INITIALIZE +!insertmacro ECLIPSE_INITIALIZE +!insertmacro QTJAMBIECLIPSE_INITIALIZE + +!define MUI_FINISHPAGE_NOAUTOCLOSE + +!insertmacro MUI_PAGE_INSTFILES +!ifdef README_FILE + !define MUI_FINISHPAGE_SHOWREADME ${README_FILE} +!else + !ifdef README_FUNCTION + !define MUI_FINISHPAGE_SHOWREADME + !define MUI_FINISHPAGE_SHOWREADME_TEXT "${README_FUNCTION}" + !define MUI_FINISHPAGE_SHOWREADME_FUNCTION "CommonReadmeFunction" + !endif +!endif +!ifdef RUN_FUNCTION + !define MUI_FINISHPAGE_RUN + !define MUI_FINISHPAGE_RUN_TEXT "${RUN_FUNCTION}" + !define MUI_FINISHPAGE_RUN_FUNCTION "CommonRunFunction" +!endif +!ifdef FINISH_TITLE + !define MUI_FINISHPAGE_TITLE "${FINISH_TITLE}" +!endif +!insertmacro MUI_PAGE_FINISH + +!ifdef WELCOME_TITLE + !define MUI_WELCOMEPAGE_TITLE "${WELCOME_TITLE}" +!endif +!insertmacro MUI_UNPAGE_WELCOME +!define UNINSTALLER_CONFIRM_PAGE "confirmpage.ini" +UninstPage custom un.UninstallerConfirmPage +!insertmacro MUI_UNPAGE_INSTFILES + +!ifdef FINISH_TITLE + !define MUI_FINISHPAGE_TITLE "${FINISH_TITLE}" +!endif +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile ${OUTPUT_FILE} + +Section -PreCommonSection +!ifdef INSTDIR_0 ;the default one, must exist + strcpy $INSTDIR $${INSTDIR_0}_INSTDIR + ${StrRep} $PRODUCT_UNIQUE_KEY "${PRODUCT_NAME} ${PRODUCT_VERSION} - $INSTDIR" "\" "_" + strcpy $PRODUCT_UNIQUE_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\$PRODUCT_UNIQUE_KEY" + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_0}_INSTDIR" "$${INSTDIR_0}_INSTDIR" +!endif +!ifdef INSTDIR_1 + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_1}_INSTDIR" "$${INSTDIR_1}_INSTDIR" +!endif +!ifdef INSTDIR_2 + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_2}_INSTDIR" "$${INSTDIR_2}_INSTDIR" +!endif +!ifdef INSTDIR_3 + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_3}_INSTDIR" "$${INSTDIR_3}_INSTDIR" +!endif +!ifdef INSTDIR_4 + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_4}_INSTDIR" "$${INSTDIR_4}_INSTDIR" +!endif +!ifdef INSTDIR_5 + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_5}_INSTDIR" "$${INSTDIR_5}_INSTDIR" +!endif + + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "StartMenu" "$STARTMENU_STRING" + !insertmacro CreateConditionalShortCutDirectory "$SMPROGRAMS\$STARTMENU_STRING" +SectionEnd + +!insertmacro MSVC_SECTIONS +!insertmacro OPENSOURCE_SECTIONS +!insertmacro ADDIN7X_SECTIONS +!insertmacro ADDIN60_SECTIONS +!insertmacro QTJAMBI_SECTIONS +!insertmacro VSIP_SECTIONS +!insertmacro HELP_SECTIONS +!insertmacro DEBUGEXT_SECTIONS +!insertmacro LICENSECHECK_SECTIONS +!insertmacro QSA_SECTIONS +!insertmacro MINGW_SECTIONS +!insertmacro EVALUATION_SECTIONS +!insertmacro ENVIRONMENT_SECTIONS +!insertmacro REGISTERUIEXT_SECTIONS +!insertmacro ECLIPSE_SECTIONS +!insertmacro QTJAMBIECLIPSE_SECTIONS +!insertmacro QTDEMO_SECTIONS + +!ifdef USE_OPTIONAL_SHORTCUTCREATION +Section "Create shortcuts" SEC_SHORTCUTCREATION +SectionEnd +!endif ;USE_OPTIONAL_SHORTCUTCREATION + +!insertmacro INSTDIR_FUNCTIONS + +Section -CommonSection + WriteUninstaller "$INSTDIR\uninst.exe" + + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "DisplayName" "$(^Name)" + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "Publisher" "${PRODUCT_PUBLISHER}" + + WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\QtSoftware.com.lnk" "$INSTDIR\${PRODUCT_NAME}.url" + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\Uninstall ${PRODUCT_NAME} ${PRODUCT_VERSION}.lnk" "$INSTDIR\uninst.exe" + SetOutPath "$INSTDIR" +SectionEnd + +Function CheckLocalLicenseProduct +!ifdef MODULE_LICENSECHECK + !insertmacro QSA_CHECKLICENSEPRODUCT +!endif +FunctionEnd + +Function .onInit + StrCpy $STARTMENU_STRING "${DEFAULT_STARTMENU_STRING}" +!ifdef USE_OPTIONAL_SHORTCUTCREATION + SectionSetText ${SEC_SHORTCUTCREATION} "${GLOBAL_SEC_SHORTCUTCREATION_TEXT}" +!endif ;USE_OPTIONAL_SHORTCUTCREATION + +!ifdef USE_UNINSTALL_PREVIOUS + push "${PRODUCT_NAME}" + call GetExistsPreviousInstallationOfProduct + exch $0 + StrCmp $0 true 0 +3 + MessageBox MB_OK|MB_ICONSTOP "A previous installation of ${PRODUCT_NAME} was detected.$\nPlease uninstall it before running this installer." + Abort + pop $0 +!endif + +!ifdef USE_WARN_NO_QT_FOUND + Push $0 + EnumRegKey $0 HKLM "${QT_VERSION_KEY_NAME}" 0 + StrCmp $0 "" 0 qt_found + EnumRegKey $0 HKCU "${QT_VERSION_KEY_NAME}" 0 + StrCmp $0 "" 0 qt_found + MessageBox MB_OK|MB_ICONEXCLAMATION "No installed Qt package has been detected.$\nPlease make sure that Qt is installed before using the ${PRODUCT_NAME}" + qt_found: + Pop $0 +!endif + + call SetAdminVar + StrCmp "$RUNNING_AS_ADMIN" false 0 common_running_as_admin +!ifdef USE_ADMIN_CHECK + MessageBox MB_OK|MB_ICONSTOP "You need to have administrator rights to install this software!" + Abort +!endif + SetShellVarContext current + goto common_admin_check_done + common_running_as_admin: + SetShellVarContext all + common_admin_check_done: + + Push $0 + Push $1 + ${GetParameters} $0 + ${GetOptions} $0 /LICENSEKEY= $1 + ClearErrors + StrCmp $1 "" +2 + strcpy $LICENSE_KEY "$1" + + ${GetOptions} $0 /LICENSEE= $1 + ClearErrors + StrCmp $1 "" +2 + strcpy $LICENSEE "$1" + + Pop $1 + Pop $0 + + !insertmacro INSTDIR_STARTUP + + !insertmacro LICENSECHECK_STARTUP + !insertmacro ENVIRONMENT_STARTUP + !insertmacro REGISTERUIEXT_STARTUP + !insertmacro MSVC_STARTUP + !insertmacro OPENSOURCE_STARTUP + !insertmacro EVALUATION_STARTUP + !insertmacro ADDIN7X_STARTUP + !insertmacro ADDIN60_STARTUP + !insertmacro QTJAMBI_STARTUP + !insertmacro DEBUGEXT_STARTUP + !insertmacro VSIP_STARTUP + !insertmacro HELP_STARTUP + !insertmacro QSA_STARTUP + !insertmacro MINGW_STARTUP + !insertmacro ECLIPSE_STARTUP + !insertmacro QTJAMBIECLIPSE_STARTUP + !insertmacro QTDEMO_STARTUP +FunctionEnd + +Function .onInstSuccess + !insertmacro LICENSECHECK_FINISH + !insertmacro ENVIRONMENT_FINISH + !insertmacro REGISTERUIEXT_FINISH + !insertmacro MSVC_FINISH + !insertmacro OPENSOURCE_FINISH + !insertmacro EVALUATION_FINISH + !insertmacro ADDIN7X_FINISH + !insertmacro ADDIN60_FINISH + !insertmacro QTJAMBI_FINISH + !insertmacro DEBUGEXT_FINISH + !insertmacro VSIP_FINISH + !insertmacro HELP_FINISH + !insertmacro QSA_FINISH + !insertmacro MINGW_FINISH + !insertmacro ECLIPSE_FINISH + !insertmacro QTJAMBIECLIPSE_FINISH +FunctionEnd + +Function un.onUninstSuccess + !insertmacro LICENSECHECK_UNFINISH + !insertmacro ENVIRONMENT_UNFINISH + !insertmacro REGISTERUIEXT_UNFINISH + !insertmacro MSVC_UNFINISH + !insertmacro OPENSOURCE_UNFINISH + !insertmacro EVALUATION_UNFINISH + !insertmacro ADDIN7X_UNFINISH + !insertmacro ADDIN60_UNFINISH + !insertmacro QTJAMBI_UNFINISH + !insertmacro DEBUGEXT_UNFINISH + !insertmacro VSIP_UNFINISH + !insertmacro HELP_UNFINISH + !insertmacro QSA_UNFINISH + !insertmacro MINGW_UNFINISH + !insertmacro ECLIPSE_UNFINISH + !insertmacro QTJAMBIECLIPSE_UNFINISH +FunctionEnd + +Function un.onInit + call un.SetAdminVar + StrCmp "$RUNNING_AS_ADMIN" false 0 common_running_as_admin +!ifdef USE_ADMIN_CHECK + MessageBox MB_OK|MB_ICONSTOP "You do not have the required access rights to uninstall this package." + Abort +!endif + SetShellVarContext current + goto common_admin_check_done + common_running_as_admin: + SetShellVarContext all + common_admin_check_done: + + ${UnStrRep} $PRODUCT_UNIQUE_KEY "${PRODUCT_NAME} ${PRODUCT_VERSION} - $INSTDIR" "\" "_" + strcpy $PRODUCT_UNIQUE_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\$PRODUCT_UNIQUE_KEY" + + push $0 + ClearErrors + ReadRegStr $0 SHCTX "$PRODUCT_UNIQUE_KEY" "DisplayName" + IfErrors 0 +3 + MessageBox MB_OK|MB_ICONSTOP "The uninstaller was unable to find the product to uninstall." + Abort + pop $0 + + ReadRegStr $STARTMENU_STRING SHCTX "$PRODUCT_UNIQUE_KEY" "StartMenu" + StrCmp "$STARTMENU_STRING" "" 0 +2 + StrCpy $STARTMENU_STRING "${DEFAULT_STARTMENU_STRING}" + +!ifdef INSTDIR_0 ;the default one, must exist + ReadRegStr $${INSTDIR_0}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_0}_INSTDIR" +!endif +!ifdef INSTDIR_1 + ReadRegStr $${INSTDIR_1}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_1}_INSTDIR" +!endif +!ifdef INSTDIR_2 + ReadRegStr $${INSTDIR_2}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_2}_INSTDIR" +!endif +!ifdef INSTDIR_3 + ReadRegStr $${INSTDIR_3}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_3}_INSTDIR" +!endif +!ifdef INSTDIR_4 + ReadRegStr $${INSTDIR_4}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_4}_INSTDIR" +!endif +!ifdef INSTDIR_5 + ReadRegStr $${INSTDIR_5}_INSTDIR SHCTX "$PRODUCT_UNIQUE_KEY" "${INSTDIR_5}_INSTDIR" +!endif + + !insertmacro LICENSECHECK_UNSTARTUP + !insertmacro ENVIRONMENT_UNSTARTUP + !insertmacro REGISTERUIEXT_UNSTARTUP + !insertmacro MSVC_UNSTARTUP + !insertmacro OPENSOURCE_UNSTARTUP + !insertmacro EVALUATION_UNSTARTUP + !insertmacro ADDIN7X_UNSTARTUP + !insertmacro ADDIN60_UNSTARTUP + !insertmacro QTJAMBI_UNSTARTUP + !insertmacro DEBUGEXT_UNSTARTUP + !insertmacro VSIP_UNSTARTUP + !insertmacro HELP_UNSTARTUP + !insertmacro QSA_UNSTARTUP + !insertmacro MINGW_UNSTARTUP + !insertmacro ECLIPSE_UNSTARTUP + !insertmacro QTJAMBIECLIPSE_UNSTARTUP + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${UNINSTALLER_CONFIRM_PAGE}" +FunctionEnd + +!insertmacro HELP_UNINSTALL +!insertmacro DEBUGEXT_UNINSTALL +!insertmacro MSVC_UNINSTALL +!insertmacro OPENSOURCE_UNINSTALL +!insertmacro EVALUATION_UNINSTALL +!insertmacro ENVIRONMENT_UNINSTALL +!insertmacro REGISTERUIEXT_UNINSTALL +!insertmacro QSA_UNINSTALL +!insertmacro MINGW_UNINSTALL +!insertmacro ECLIPSE_UNINSTALL +!insertmacro QTJAMBIECLIPSE_UNINSTALL + +Section Uninstall + !insertmacro LICENSECHECK_UNINSTALL + !insertmacro ADDIN7X_UNINSTALL + !insertmacro ADDIN60_UNINSTALL + !insertmacro QTJAMBI_UNINSTALL + !insertmacro VSIP_UNINSTALL + + ; COMMON + Delete "$INSTDIR\${PRODUCT_NAME}.url" + Delete "$INSTDIR\uninst.exe" + Delete "$SMPROGRAMS\$STARTMENU_STRING\Uninstall ${PRODUCT_NAME} ${PRODUCT_VERSION}.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\QtSoftware.com.lnk" + + RMDir "$SMPROGRAMS\$STARTMENU_STRING" + RMDir "$INSTDIR" + + DeleteRegKey SHCTX "$PRODUCT_UNIQUE_KEY" +SectionEnd + +Function CommonRunFunction + !insertmacro MSVC_RUN_FUNCTION + !insertmacro QSA_RUN_FUNCTION + !insertmacro MINGW_RUN_FUNCTION + DoneRunFunction: +FunctionEnd + +Function CommonReadmeFunction + !insertmacro MSVC_README_FUNCTION + !insertmacro MINGW_README_FUNCTION + DoneReadmeFunction: +FunctionEnd + +Function un.UninstallerConfirmPage + !insertmacro MUI_HEADER_TEXT "Confirm" "Confirm Uninstallation Directories" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${UNINSTALLER_CONFIRM_PAGE}" "Field 2" "Text" "$UninstallerConfirmProduct" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${UNINSTALLER_CONFIRM_PAGE}" +FunctionEnd + +;pops product name from stack and as result pushes TRUE or FALSE on stack +Function GetExistsPreviousInstallationOfProduct + exch $0 + push $1 + push $2 + push $3 + + StrCpy $1 0 + loop: + EnumRegKey $2 HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall $1 + StrCmp $2 "" no_reg_key_found + ${StrStr} $3 $2 $0 + StrCmp $3 $2 reg_key_found + IntOp $1 $1 + 1 + goto loop + + reg_key_found: + push true + goto done + + no_reg_key_found: + push false + + done: + exch + pop $3 + exch + pop $2 + exch + pop $1 + exch + pop $0 +FunctionEnd + +;pops product name from stack +Function WarnIfInstalledProductDetected + exch $0 + push $0 + call GetExistsPreviousInstallationOfProduct + exch $1 + StrCmp $1 true +1 +3 + MessageBox MB_YESNO|MB_ICONQUESTION "An existing installation of $0 was detected.$\nIt is recommended to deinstall $0 before continuing.$\nDo you want to continue this installation nevertheless?" IDYES +2 IDNO +1 + Abort + pop $1 + pop $0 +FunctionEnd + +;sets $RUNNING_AS_ADMIN to true if Admin or Power user +!macro SetAdminVar UN +Function ${UN}SetAdminVar + push $0 + ClearErrors + UserInfo::GetAccountType + IfErrors Admin ;It's probably Win95 + pop $0 + StrCmp $0 "Admin" Admin + StrCmp $0 "Power" Admin + + StrCpy $RUNNING_AS_ADMIN false + goto Done + + Admin: + StrCpy $RUNNING_AS_ADMIN true + + Done: + pop $0 +FunctionEnd +!macroend +!insertmacro SetAdminVar "" +!insertmacro SetAdminVar "un." + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MSVC_DESCRIPTION + !insertmacro OPENSOURCE_DESCRIPTION + !insertmacro ENVIRONMENT_DESCRIPTION + !insertmacro REGISTERUIEXT_DESCRIPTION + !insertmacro EVALUATION_DESCRIPTION + !insertmacro ADDIN7X_DESCRIPTION + !insertmacro ADDIN60_DESCRIPTION + !insertmacro QTJAMBI_DESCRIPTION + !insertmacro DEBUGEXT_DESCRIPTION + !insertmacro HELP_DESCRIPTION + !insertmacro VSIP_DESCRIPTION + !insertmacro QSA_DESCRIPTION + !insertmacro MINGW_DESCRIPTION + !insertmacro ECLIPSE_DESCRIPTION + !insertmacro QTJAMBIECLIPSE_DESCRIPTION +!insertmacro MUI_FUNCTION_DESCRIPTION_END diff --git a/util/scripts/win-binary/nsis/instdir.ini b/util/scripts/win-binary/nsis/instdir.ini new file mode 100644 index 0000000..06b75aa --- /dev/null +++ b/util/scripts/win-binary/nsis/instdir.ini @@ -0,0 +1,102 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=13 + +[Field 1] +Type=Groupbox +Text=Installation Directories +Left=0 +Right=299 +Top=6 +Bottom=129 + +[Field 2] +Type=DirRequest +Left=132 +Right=290 +Top=91 +Bottom=104 +Flags=READONLY + +[Field 3] +Type=DirRequest +Left=132 +Right=290 +Top=73 +Bottom=86 +Flags=READONLY + +[Field 4] +Type=Label +Left=9 +Right=130 +Top=92 +Bottom=100 + +[Field 5] +Type=DirRequest +Left=132 +Right=290 +Top=56 +Bottom=68 +Flags=READONLY + +[Field 6] +Type=Label +Left=9 +Right=131 +Top=75 +Bottom=83 + +[Field 7] +Type=DirRequest +Left=132 +Right=290 +Top=38 +Bottom=51 +Flags=READONLY + +[Field 8] +Type=Label +Left=9 +Right=130 +Top=57 +Bottom=65 + +[Field 9] +Type=DirRequest +Left=132 +Right=290 +Top=108 +Bottom=120 +Flags=READONLY + +[Field 10] +Type=DirRequest +Left=132 +Right=290 +Top=20 +Bottom=33 +Flags=READONLY + +[Field 11] +Type=Label +Left=9 +Right=131 +Top=40 +Bottom=48 + +[Field 12] +Type=Label +Left=9 +Right=130 +Top=108 +Bottom=116 + +[Field 13] +Type=Label +Left=9 +Right=130 +Top=22 +Bottom=30 + diff --git a/util/scripts/win-binary/nsis/license.ini b/util/scripts/win-binary/nsis/license.ini new file mode 100644 index 0000000..7a94ad8 --- /dev/null +++ b/util/scripts/win-binary/nsis/license.ini @@ -0,0 +1,70 @@ +[Settings] +NumFields=8 + +[Field 1] +Type=Groupbox +Text=Qt License Information +Left=0 +Right=299 +Top=73 +Bottom=123 + +[Field 2] +Type=Text +MaxLen=200 +Left=92 +Right=288 +Top=86 +Bottom=100 + +[Field 3] +Type=text +Left=92 +Right=288 +Top=102 +Bottom=116 +MaxLen=200 +Flags=GROUP + +[Field 4] +Type=Label +Text=If you do not have a license, please contact: +Left=2 +Right=156 +Top=128 +Bottom=136 + +[Field 5] +Type=label +Text=Qt License key: +Left=13 +Right=90 +Top=105 +Bottom=115 +Flags=NOTABSTOP + +[Field 6] +Type=Label +Text=To install this package you need the licensee name and a valid license key for the Qt/Win platform. The key is case-sensitive.\r\n\r\nThe licensee name and license key can be found in your license file. +Left=1 +Right=300 +Top=1 +Bottom=46 + +[Field 7] +Type=Link +Text=sales@trolltech.com +State=mailto:sales@trolltech.com +Left=160 +Right=237 +Top=128 +Bottom=137 + +[Field 8] +Type=Label +Text=Licensee name: +Left=13 +Right=88 +Top=88 +Bottom=99 + diff --git a/util/scripts/win-binary/nsis/licensepage.ini b/util/scripts/win-binary/nsis/licensepage.ini new file mode 100644 index 0000000..e90a32e --- /dev/null +++ b/util/scripts/win-binary/nsis/licensepage.ini @@ -0,0 +1,48 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=5 + +[Field 1] +Type=Text +Flags=MULTILINE|VSCROLL|READONLY +Left=4 +Right=296 +Top=14 +Bottom=89 +State=No license agreement file found. Please contact support. + +[Field 2] +Type=Label +Text=Press Page Down to see the rest of the agreement. +Left=4 +Right=294 +Top=0 +Bottom=8 + +[Field 3] +Type=Label +Text=If you accept the terms of the agreement, select the first option below. You must accept the agreement to install this software. Click Next to continue. +Left=4 +Right=297 +Top=92 +Bottom=111 + +[Field 4] +Type=RadioButton +Text=I &accept the terms in the License Agreement +Flags=GROUP|NOTIFY +Left=4 +Right=299 +Top=120 +Bottom=129 + +[Field 5] +Type=RadioButton +Text=I &do not accept the terms in the License Agreement +State=1 +Left=4 +Right=300 +Top=129 +Bottom=140 +Flags=NOTIFY + diff --git a/util/scripts/win-binary/nsis/modules/addin60.nsh b/util/scripts/win-binary/nsis/modules/addin60.nsh new file mode 100644 index 0000000..3a82667 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/addin60.nsh @@ -0,0 +1,139 @@ +!ifdef MODULE_ADDIN60 +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_INITIALIZE +!ifndef MODULE_ADDIN60_NAME + !define MODULE_ADDIN60_NAME "QMsDev Add-In" +!endif +!ifndef MODULE_ADDIN60_VERSION + !define MODULE_ADDIN60_VERSION ${PRODUCT_VERSION} +!endif +!ifndef MODULE_ADDIN60_ROOT + !define MODULE_ADDIN60_ROOT "${INSTALL_ROOT}\addin60" +!endif + +!define QMSDEV_GUID "{73036FFA-7B76-47d4-999F-0F9424F7DC12}" +!include "includes\regsvr.nsh" + +!macroend ;ADDIN60_INITIALIZE + +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_SECTIONS +SectionGroup "${MODULE_ADDIN60_NAME}" +Section "Visual C++ 6.0" ADDIN60_SEC01 + SetOutPath "$ADDIN_INSTDIR\6.0" + File "${MODULE_ADDIN60_ROOT}\q4msdev.dll" + + call RegisterDevAddin + + SetOutPath "$ADDIN_INSTDIR\6.0" + File "${MODULE_ADDIN60_ROOT}\doc\usage.rtf" + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\QMsDev Usage.lnk" "$ADDIN_INSTDIR\6.0\usage.rtf" + + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QMsDevInstalled" 1 +SectionEnd +SectionGroupEnd + +Function RegisterDevAddin + push $0 + + ClearErrors + push "$ADDIN_INSTDIR\6.0\q4msdev.dll" + call RegSvr + IfErrors 0 +3 + MessageBox MB_OK|MB_ICONEXCLAMATION "Could not register q4msdev.dll" + goto done + + WriteRegStr HKCU "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "" "0" + WriteRegStr HKCU "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "Filename" "$ADDIN_INSTDIR\6.0\q4msdev.dll" + + ReadRegStr $0 HKCR "CLSID\${QMSDEV_GUID}" "" + WriteRegStr HKCU "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "DisplayName" $0 + + ReadRegStr $0 HKCR "CLSID\${QMSDEV_GUID}\Description" "" + WriteRegStr HKCU "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" "Description" $0 + + done: + pop $0 +FunctionEnd + +Function un.RegisterDevAddin + push "$ADDIN_INSTDIR\6.0\q4msdev.dll" + call un.RegSvr + DeleteRegKey HKCU "SOFTWARE\Microsoft\DevStudio\6.0\AddIns\q4msdev.Q4MsDev.1" +FunctionEnd +!macroend ;ADDIN60_SECTIONS + +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_DESCRIPTION + !insertmacro MUI_DESCRIPTION_TEXT ${ADDIN60_SEC01} "This installs the QMsDev Add-in ${MODULE_ADDIN60_VERSION} for Visual Studio 6.0" +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_STARTUP + push $0 + SectionSetFlags ${ADDIN60_SEC01} 1 + + Call IsQMsDevInstalled + pop $0 + IntCmp $0 0 +3 + SectionSetFlags ${ADDIN60_SEC01} 16 + MessageBox MB_OK|MB_ICONEXCLAMATION "The installer has detected that a Qt Add-In for Visual Studio 6.0 is already installed.$\r$\nUninstall the previous version before you reinstall it." + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\6.0\Setup" "VsCommonDir" + strcmp $0 "" 0 +2 + SectionSetFlags ${ADDIN60_SEC01} 16 + + strcpy $ADDIN_INSTDIR "$PROGRAMFILES\Trolltech\QMsAddin" + + pop $0 +!macroend ;ADDIN60_STATUP + +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_FINISH +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_UNSTARTUP + !insertmacro ConfirmOnRemove "QMsDevInstalled" "QMsDev Add-In" +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_UNINSTALL + push $0 + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "QMsDevInstalled" + + intcmp $0 1 0 DoneUnInstall60 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QMsDevInstalled" 0 + call un.RegisterDevAddin + Delete "$ADDIN_INSTDIR\6.0\q4msdev.dll" + Delete "$ADDIN_INSTDIR\6.0\usage.rtf" + Delete "$SMPROGRAMS\$STARTMENU_STRING\QMsDev Usage.lnk" + RmDir "$ADDIN_INSTDIR\6.0" + RmDir "$ADDIN_INSTDIR" + DoneUnInstall60: + pop $0 +!macroend ;ADDIN60_UNINSTALL + +;------------------------------------------------------------------------------------------------ +!macro ADDIN60_UNFINISH +!macroend + +!else ;MODULE_ADDIN60 +!macro ADDIN60_INITIALIZE +!macroend +!macro ADDIN60_SECTIONS +!macroend +!macro ADDIN60_DESCRIPTION +!macroend +!macro ADDIN60_STARTUP +!macroend +!macro ADDIN60_FINISH +!macroend +!macro ADDIN60_UNSTARTUP +!macroend +!macro ADDIN60_UNINSTALL +!macroend +!macro ADDIN60_UNFINISH +!macroend +!endif ;MODULE_ADDIN60 + diff --git a/util/scripts/win-binary/nsis/modules/addin7x.nsh b/util/scripts/win-binary/nsis/modules/addin7x.nsh new file mode 100644 index 0000000..06016f4 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/addin7x.nsh @@ -0,0 +1,417 @@ +!ifdef MODULE_ADDIN7X + +;------------------------------------------------------------------------------------------------ +!macro ADDIN7X_INITIALIZE +!ifndef MODULE_ADDIN7X_NAME + !define MODULE_ADDIN7X_NAME "Qt4 Visual Studio Add-In" +!endif +!ifndef MODULE_ADDIN7X_VERSION + !define MODULE_ADDIN7X_VERSION ${PRODUCT_VERSION} +!endif +!ifndef MODULE_ADDIN7X_ROOT + !define MODULE_ADDIN7X_ROOT "${INSTALL_ROOT}\addin7x" +!endif +!ifndef MODULE_VSIP_ROOT + !error "MODULE_VSIP_ROOT must be in the .conf file..." +!endif + +!include "includes\system.nsh" +!include "includes\templates.nsh" +!include "includes\regsvr.nsh" +!macroend ;ADDIN7X_INITIALIZE + +;------------------------------------------------------------------------------------------------ +!macro ADDIN7X_SECTIONS + +SectionGroup "${MODULE_ADDIN7X_NAME}" + +!ifndef MODULE_ADDIN7X_NO2008 +Section "Visual Studio 2008" ADDIN7X_SEC01 + strcpy $VS_VERSION "2008" + strcpy $VS_VERSION_SHORT "9.0" + + SetOutPath "$ADDIN_INSTDIR\$VS_VERSION_SHORT" + File "${MODULE_ADDIN7X_ROOT}\src\bin2008\Qt4VSAddin.AddIn" + File "${MODULE_ADDIN7X_ROOT}\src\bin2008\Qt4VSAddin.dll" + File "${MODULE_ADDIN7X_ROOT}\src\bin2008\QtProjectLib.dll" + File "${MODULE_ADDIN7X_ROOT}\src\bin2008\QtProjectEngineLib.dll" + File "${MODULE_ADDIN7X_ROOT}\src\bin2008\qmakewrapper1Lib.dll" + WriteRegStr SHCTX "Software\Microsoft\VisualStudio\9.0\AutomationOptions\LookInFolders" "$ADDIN_INSTDIR\$VS_VERSION_SHORT" "" + + !insertmacro InstallHelp "$ADDIN_INSTDIR\help" "qt4vs" "$VS_VERSION_SHORT" + + call InstallCommonFiles + call RegisterAddin + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VSAddin2008" 1 +SectionEnd +!endif + +!ifndef MODULE_ADDIN7X_NO2005 +Section "Visual Studio 2005" ADDIN7X_SEC02 + strcpy $VS_VERSION "2005" + strcpy $VS_VERSION_SHORT "8.0" + + SetOutPath "$ADDIN_INSTDIR\$VS_VERSION_SHORT" + File "${MODULE_ADDIN7X_ROOT}\src\bin2005\Qt4VSAddin.AddIn" + File "${MODULE_ADDIN7X_ROOT}\src\bin2005\Qt4VSAddin.dll" + File "${MODULE_ADDIN7X_ROOT}\src\bin2005\QtProjectLib.dll" + File "${MODULE_ADDIN7X_ROOT}\src\bin2005\QtProjectEngineLib.dll" + File "${MODULE_ADDIN7X_ROOT}\src\bin2005\qmakewrapper1Lib.dll" + + SetOutPath "$ADDIN_INSTDIR\$VS_VERSION_SHORT\en" + File "${MODULE_ADDIN7X_ROOT}\src\bin2005\en\Qt4VSAddin.resources.dll" + + WriteRegStr SHCTX "Software\Microsoft\VisualStudio\8.0\AutomationOptions\LookInFolders" "$ADDIN_INSTDIR\$VS_VERSION_SHORT" "" + + !insertmacro InstallHelp "$ADDIN_INSTDIR\help" "qt4vs" "$VS_VERSION_SHORT" + + call InstallCommonFiles + call RegisterAddin + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VSAddin2005" 1 +SectionEnd +!endif + +SectionGroupEnd + +Function InstallCommonFiles + ; make sure one of the addins is installed + IfFileExists "$ADDIN_INSTDIR\8.0\Qt4VSAddin.dll" installCommon + IfFileExists "$ADDIN_INSTDIR\9.0\Qt4VSAddin.dll" installCommon done + + installCommon: + SetOverwrite ifnewer + + push $ADDIN_INSTDIR + call InstallProjectTemplates + push $ADDIN_INSTDIR + call InstallItemTemplates + + ; Install additional tools and stuff + SetOutPath "$ADDIN_INSTDIR" + File "${MODULE_ADDIN7X_ROOT}\src\common\qmakewrapper1.dll" + File "${MODULE_ADDIN7X_ROOT}\src\common\qrceditor.exe" + File "${MODULE_ADDIN7X_ROOT}\src\common\QtCore4.dll" + File "${MODULE_ADDIN7X_ROOT}\src\common\QtGui4.dll" + File "${MODULE_ADDIN7X_ROOT}\src\common\QtXml4.dll" + + ; register help + IfFileExists "$ADDIN_INSTDIR\help\h2reg.exe" 0 AddinCommonFilesHelp_Done + !insertmacro RegisterHelp "$ADDIN_INSTDIR\help" "qt4vs" + AddinCommonFilesHelp_Done: + + ; Install VC redistributable + Push $0 + Call IsVS2008RedistInstalled + Pop $0 + ${If} $0 == 0 + SetOutPath "$ADDIN_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_VSIP_ROOT}\redist\vcredist_x86.exe" + ExecWait '"$ADDIN_INSTDIR\vcredist_x86.exe" /q' $0 + Delete "$ADDIN_INSTDIR\vcredist_x86.exe" + ${EndIf} + Pop $0 + + SetOverwrite off ;ifnewer + done: +FunctionEnd + +Function RegisterAddin + push $2 + push $3 + + push "$VS_VERSION_SHORT" + call IsDotNETInstalled + Pop $3 + strcpy $2 "$3\regasm.exe" + + ClearErrors + push "$ADDIN_INSTDIR\qmakewrapper1.dll" + call RegSvr + IfErrors 0 Module_Addin_RegisterWizards + MessageBox MB_OK "Can not register qmakewrapper1.dll!" + + Module_Addin_RegisterWizards: + ClearErrors + DetailPrint "Registering the Qt Wizard Engine." + nsExec::ExecToLog '"$2" /codebase "$ADDIN_INSTDIR\$VS_VERSION_SHORT\QtProjectEngineLib.dll"' + pop $3 + strcmp "$3" "error" 0 RegEngineDone + MessageBox MB_OK "Can not register QtProjectEngineLib.dll!" + MessageBox MB_OK '"$2" /codebase "$ADDIN_INSTDIR\$VS_VERSION_SHORT\QtProjectEngineLib.dll"' + RegEngineDone: + + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\NewProjectTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "" "Qt4 Projects" + WriteRegDWORD SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\NewProjectTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "SortPriority" 16 + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\NewProjectTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "TemplatesDir" "$ADDIN_INSTDIR\projects\$VS_VERSION_SHORT" + WriteRegDWORD SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\NewProjectTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/2" "SortPriority" 16 + + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "" "Qt Forms" + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "TemplatesDir" "$ADDIN_INSTDIR\uiItems" + WriteRegDWORD SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "SortPriority" 16 + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/2" "" "Qt Resources" + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/2" "TemplatesDir" "$ADDIN_INSTDIR\qrcItems" + WriteRegDWORD SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/2" "SortPriority" 16 + + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEBA-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "" "Qt4 Classes" + WriteRegStr SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEBA-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "TemplatesDir" "$ADDIN_INSTDIR\wizards\$VS_VERSION_SHORT" + WriteRegDWORD SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEBA-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/1" "SortPriority" 16 + WriteRegDWORD SHCTX "SOFTWARE\Microsoft\VisualStudio\$VS_VERSION_SHORT\Projects\{8BC9CEBA-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}\/2" "SortPriority" 16 + + Done: + + pop $3 + pop $2 +FunctionEnd + +Function un.RegisterAddin + push $2 + push $3 + + push "$VS_VERSION_SHORT" + call un.IsDotNETInstalled + Pop $3 + strcpy $2 "$3\regasm.exe" + + ClearErrors + IfFileExists "$ADDIN_INSTDIR\$VS_VERSION_SHORT\QtProjectEngineLib.dll" 0 UnRegEngineDone + nsExec::ExecToLog '"$2" /unregister "$ADDIN_INSTDIR\$VS_VERSION_SHORT\QtProjectEngineLib.dll"' + pop $3 + strcmp "$3" "error" 0 UnRegEngineDone + MessageBox MB_OK "Can not unregister QtProjectEngineLib.dll!" + UnRegEngineDone: + + pop $3 + pop $2 +FunctionEnd + +Function GetVSVersion + push $0 + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\9.0\Setup\VS" "ProductDir" + StrCmp $0 "" 0 foundVS2008 ; found msvc.net 2008 + + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\8.0\Setup\VS" "ProductDir" + StrCmp $0 "" 0 foundVS2005 ; found msvc.net 2005 + + push "" ;empty string if not found + goto done + + foundVS2008: + push "2008" + goto done + + foundVS2005: + push "2005" + goto done + + done: + exch + pop $0 +FunctionEnd +!macroend ;ADDIN7X_SECTIONS + +;------------------------------------------------------------------------------------------------ +!macro ADDIN7X_DESCRIPTION +!ifdef ADDIN7X_SEC01 + !insertmacro MUI_DESCRIPTION_TEXT ${ADDIN7X_SEC01} "This installs the Qt4 Add-in ${MODULE_ADDIN7X_VERSION} for Visual Studio 2008" +!endif +!ifdef ADDIN7X_SEC02 + !insertmacro MUI_DESCRIPTION_TEXT ${ADDIN7X_SEC02} "This installs the Qt4 Add-in ${MODULE_ADDIN7X_VERSION} for Visual Studio 2005" +!endif +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ADDIN7X_STARTUP + push $0 + push $1 + +!ifdef ADDIN7X_SEC01 + SectionSetFlags ${ADDIN7X_SEC01} 0 +!endif +!ifdef ADDIN7X_SEC02 + SectionSetFlags ${ADDIN7X_SEC02} 0 +!endif + +!ifdef ADDIN7X_SEC02 + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\8.0" "InstallDir" + strcmp $0 "" +3 + SectionSetFlags ${ADDIN7X_SEC02} 1 + goto +2 + SectionSetFlags ${ADDIN7X_SEC02} 16 +!endif + +!ifdef ADDIN7X_SEC01 + ReadRegStr $0 HKLM "Software\Microsoft\VisualStudio\9.0" "InstallDir" + strcmp $0 "" +3 + SectionSetFlags ${ADDIN7X_SEC01} 1 + goto +2 + SectionSetFlags ${ADDIN7X_SEC01} 16 +!endif + + strcpy $ADDIN_INSTDIR "$PROGRAMFILES\Nokia\Qt4VSAddin" + + Push "8.0" + Call IsIntegrationInstalled + Pop $0 + IntCmp $0 1 Addin7x_Warn + + Push "9.0" + Call IsIntegrationInstalled + Pop $0 + IntCmp $0 1 Addin7x_Warn + + Goto Addin7x_Done + Addin7x_Warn: + MessageBox MB_OK|MB_ICONEXCLAMATION "The installer has detected that a version of the Qt Visual Studio Integration is installed.$\r$\nThe Add-In's conflict with the integration." + Addin7x_Done: + + StrCpy $1 "" + Push "8.0" + Call IsQMsNetInstalled + Pop $0 + IntCmp $0 0 +2 + StrCpy $1 "$1$\r$\n - Visual Studio 2005" + + Push "9.0" + Call IsQMsNetInstalled + Pop $0 + IntCmp $0 0 +2 + StrCpy $1 "$1$\r$\n - Visual Studio 2008" + + StrCpy $1 "" + Push "8.0" + Call IsQt4VSAddinInstalled + Pop $0 + IntCmp $0 0 +2 + StrCpy $1 "$1$\r$\n - Visual Studio 2005" + + Push "9.0" + Call IsQt4VSAddinInstalled + Pop $0 + IntCmp $0 0 +2 + StrCpy $1 "$1$\r$\n - Visual Studio 2008" + + StrCmp $1 "" +2 + MessageBox MB_OK|MB_ICONEXCLAMATION "The installer has detected that the following versions of the Add-In are already installed:$1$\r$\nUninstall the previous versions before you reinstall them." + + pop $1 + pop $0 +!macroend ;ADDIN7X_STATUP + +;------------------------------------------------------------------------------------------------ +!macro ADDIN7X_FINISH +!macroend + +!macro ADDIN7X_UNSTARTUP + !insertmacro ConfirmOnRemove "Qt4VSAddin2008" "$ADDIN_INSTDIR" + !insertmacro ConfirmOnRemove "Qt4VSAddin2005" "$ADDIN_INSTDIR" +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ADDIN7X_UNINSTALL + push $0 + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VSAddin2008" + intcmp $0 1 0 DoneUnInstall2008 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VSAddin2008" 0 + strcpy $VS_VERSION "2008" + strcpy $VS_VERSION_SHORT "9.0" + call un.RegisterAddin + Delete "$ADDIN_INSTDIR\9.0\Qt4VSAddin.AddIn" + Delete "$ADDIN_INSTDIR\9.0\Qt4VSAddin.dll" + Delete "$ADDIN_INSTDIR\9.0\QtProjectLib.dll" + Delete "$ADDIN_INSTDIR\9.0\QtProjectEngineLib.dll" + Delete "$ADDIN_INSTDIR\9.0\qmakewrapper1Lib.dll" + RmDir "$ADDIN_INSTDIR\9.0" + DeleteRegKey SHCTX "SOFTWARE\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\${QT4VSADDIN_GUID}" + DeleteRegKey SHCTX "SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}" + DeleteRegKey SHCTX "SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{8BC9CEBA-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}" + DeleteRegValue SHCTX "Software\Microsoft\VisualStudio\9.0\AutomationOptions\LookInFolders" "$ADDIN_INSTDIR\9.0" + !insertmacro un.InstallHelpInVS "qt4vs" "$VS_VERSION_SHORT" + + push "$ADDIN_INSTDIR" + call un.InstallProjectTemplates + strcpy $WizardInstDir "$ADDIN_INSTDIR\wizards" + RmDir "$ProjectInstDir" + DoneUnInstall2008: + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VSAddin2005" + intcmp $0 1 0 DoneUnInstall2005 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VSAddin2005" 0 + strcpy $VS_VERSION "2005" + strcpy $VS_VERSION_SHORT "8.0" + call un.RegisterAddin + Delete "$ADDIN_INSTDIR\8.0\en\Qt4VSAddin.resources.dll" + RmDir "$ADDIN_INSTDIR\8.0\en" + Delete "$ADDIN_INSTDIR\8.0\Qt4VSAddin.AddIn" + Delete "$ADDIN_INSTDIR\8.0\Qt4VSAddin.dll" + Delete "$ADDIN_INSTDIR\8.0\QtProjectLib.dll" + Delete "$ADDIN_INSTDIR\8.0\QtProjectEngineLib.dll" + Delete "$ADDIN_INSTDIR\8.0\qmakewrapper1Lib.dll" + RmDir "$ADDIN_INSTDIR\8.0" + DeleteRegKey SHCTX "SOFTWARE\Microsoft\VisualStudio\8.0\NewProjectTemplates\TemplateDirs\${QT4VSADDIN_GUID}" + DeleteRegKey SHCTX "SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}" + DeleteRegKey SHCTX "SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{8BC9CEBA-8B4A-11D0-8D11-00A0C91BC942}\AddItemTemplates\TemplateDirs\${QT4VSADDIN_GUID}" + DeleteRegValue SHCTX "Software\Microsoft\VisualStudio\8.0\AutomationOptions\LookInFolders" "$ADDIN_INSTDIR\8.0" + !insertmacro un.InstallHelpInVS "qt4vs" "$VS_VERSION_SHORT" + + push "$ADDIN_INSTDIR" + call un.InstallProjectTemplates + strcpy $WizardInstDir "$ADDIN_INSTDIR\wizards" + RmDir "$ProjectInstDir" + DoneUnInstall2005: + + strcmp $VS_VERSION "2005" DoUninstallAddinCommon + strcmp $VS_VERSION "2008" DoUninstallAddinCommon DoneUninstallAddinCommon + + DoUninstallAddinCommon: + + IfFileExists "$ADDIN_INSTDIR\help\h2reg.exe" 0 DoneUninstallAddinHelp + !insertmacro un.RegisterHelp "$ADDIN_INSTDIR\help" "qt4vs" + !insertmacro un.InstallHelp "$ADDIN_INSTDIR\help" "qt4vs" "0.0" + Push "$ADDIN_INSTDIR\help" + Call un.DeleteH2RegFiles + DoneUninstallAddinHelp: + + Delete "$ADDIN_INSTDIR\qmakewrapper1.dll" + Delete "$ADDIN_INSTDIR\qrceditor.exe" + Delete "$ADDIN_INSTDIR\QtCore4.dll" + Delete "$ADDIN_INSTDIR\QtGui4.dll" + Delete "$ADDIN_INSTDIR\QtXml4.dll" + + RmDir "$ADDIN_INSTDIR\projects" + RmDir "$ADDIN_INSTDIR\wizards" + + Delete "$ADDIN_INSTDIR\uiItems\Qt4Files.vsdir" + push $ADDIN_INSTDIR + call un.InstallItemTemplates + + RmDir "$ADDIN_INSTDIR" + + DoneUninstallAddinCommon: + pop $0 +!macroend ;ADDIN7X_UNINSTALL + +!macro ADDIN7X_UNFINISH +!macroend + +!else ;MODULE_ADDIN7X +!macro ADDIN7X_INITIALIZE +!macroend +!macro ADDIN7X_SECTIONS +!macroend +!macro ADDIN7X_DESCRIPTION +!macroend +!macro ADDIN7X_STARTUP +!macroend +!macro ADDIN7X_FINISH +!macroend +!macro ADDIN7X_UNSTARTUP +!macroend +!macro ADDIN7X_UNINSTALL +!macroend +!macro ADDIN7X_UNFINISH +!macroend +!endif ;MODULE_ADDIN7X + diff --git a/util/scripts/win-binary/nsis/modules/debugext.nsh b/util/scripts/win-binary/nsis/modules/debugext.nsh new file mode 100644 index 0000000..e1ad199 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/debugext.nsh @@ -0,0 +1,669 @@ +!ifdef MODULE_DEBUGEXT + +var DEBUGEXT_INITIALIZED + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_INITIALIZE +!ifndef MODULE_DEBUGEXT_INSTALLER + !define MODULE_DEBUGEXT_INSTALLER "${PRODUCT_NAME} v${PRODUCT_VERSION}" +!endif +!ifndef MODULE_DEBUGEXT_ROOT + !define MODULE_DEBUGEXT_ROOT "${INSTALL_ROOT}\debugext" +!endif +!macroend ;DEBUGEXT_INITIALIZE + + +;------------------------------------------------------------------------------------------------ +!macro CleanAutoExp UN +Function ${UN}CleanAutoExp + exch $1 ;filename autoexp + exch + exch $0 ;version + push $3 ;readline + push $4 ;handle autoexp + push $5 ;tmpfile handle + push $6 ;tmp copy of autoexp.dat + push $7 + + ClearErrors + IfErrors done + + StrCpy $6 "$1_tmp" + CopyFiles /FILESONLY "$1" "$6" + + FileOpen $5 $1 w + IfErrors done + + FileOpen $4 $6 r + IfErrors done + +nextline: + FileRead $4 $3 + IfErrors renameFile + + strcmp $0 "" 0 +4 + strcpy $7 $3 15 + strcmp $7 ";QT_DEBUG_START" nowrite + goto +3 + strcmp $3 ";QT_DEBUG_START ($0)$\n" nowrite + strcmp $3 ";QT_DEBUG_START ($0)$\r$\n" nowrite + + strcpy $7 $3 14 ;qt3 (always remove qt3 stuff) + strcmp $7 "; Trolltech Qt" nowrite write + nowrite: + FileRead $4 $3 + IfErrors renameFile + strcpy $7 $3 13 + strcmp $7 ";QT_DEBUG_END" nextline + strcpy $7 $3 14 ;qt3 + strcmp $7 "QObject =class" nextline nowrite + write: + FileWrite $5 $3 + goto nextline + +renameFile: + FileClose $5 + FileClose $4 + SetDetailsPrint none + Delete $6 + SetDetailsPrint both + +done: + pop $7 + pop $6 + pop $5 + pop $4 + pop $3 + pop $0 + pop $1 +FunctionEnd +!macroend ;CleanAutoExp + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_SECTIONS + +Section -PreDebugExtSection + StrCpy $DEBUGEXT_INITIALIZED "0" + + SetOutPath $TEMP + File "${MODULE_DEBUGEXT_ROOT}\autoexp.dat_entries.txt" + File "${MODULE_DEBUGEXT_ROOT}\autoexp.dat-autoexpand2003" + File "${MODULE_DEBUGEXT_ROOT}\autoexp.dat-autoexpand2005" + File "${MODULE_DEBUGEXT_ROOT}\autoexp.dat-autoexpand2008" + File "${MODULE_DEBUGEXT_ROOT}\autoexp.dat-visualizer2005" + File "${MODULE_DEBUGEXT_ROOT}\autoexp.dat-visualizer2008" +SectionEnd + +SectionGroup "Debugger Extension" + +!ifndef MODULE_DEBUGEXT_NOVS2008 +Section "Visual Studio 2008" DEBUGEXT_SEC01 + push $0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\9.0" "InstallDir" + strcmp $0 "" done90 + push "$0..\Packages\Debugger\" + push "2008" + call DoUpdateDatFile + push "$0usertype.dat" + call UpdateUserType + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2008DebugExtInstalled" 1 + StrCpy $DEBUGEXT_INITIALIZED "1" + done90: + + pop $0 +SectionEnd +!endif + +!ifndef MODULE_DEBUGEXT_NOVS2005 +Section "Visual Studio 2005" DEBUGEXT_SEC02 + push $0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\8.0" "InstallDir" + strcmp $0 "" done80 + push "$0..\Packages\Debugger\" + push "2005" + call DoUpdateDatFile + push "$0usertype.dat" + call UpdateUserType + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2005DebugExtInstalled" 1 + StrCpy $DEBUGEXT_INITIALIZED "1" + done80: + + pop $0 +SectionEnd +!endif + +!ifndef MODULE_DEBUGEXT_NOVS2003 +Section "Visual Studio 2003" DEBUGEXT_SEC03 + push $0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\7.1" "InstallDir" + strcmp $0 "" done71 + push "$0..\Packages\Debugger\" + push "2003" + call DoUpdateDatFile + push "$0usertype.dat" + call UpdateUserType + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2003DebugExtInstalled" 1 + StrCpy $DEBUGEXT_INITIALIZED "1" + done71: + + pop $0 +SectionEnd +!endif + +!ifndef MODULE_DEBUGEXT_NOVS2002 +Section "Visual Studio 2002" DEBUGEXT_SEC04 + push $0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\7.0" "InstallDir" + strcmp $0 "" done70 + push "$0..\Packages\Debugger\" + push "2002" + call DoUpdateDatFile + push "$0usertype.dat" + call UpdateUserType + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2002DebugExtInstalled" 1 + StrCpy $DEBUGEXT_INITIALIZED "1" + done70: + + pop $0 +SectionEnd +!endif + +!ifndef MODULE_DEBUGEXT_NOVC60 +Section "Visual C++ 6.0" DEBUGEXT_SEC05 + push $0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\6.0\Setup" "VsCommonDir" + strcmp $0 "" done60 + push "$0\MsDev98\bin\" + push "6.0" + call DoUpdateDatFile + push "$0\MsDev98\bin\usertype.dat" + call UpdateUserType + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VC60DebugExtInstalled" 1 + StrCpy $DEBUGEXT_INITIALIZED "1" + done60: + + pop $0 +SectionEnd +!endif + +SectionGroupEnd + +Section -PostDebugExtSection + Delete "$TEMP\autoexp.dat_entries.txt" + Delete "$TEMP\autoexp.dat-autoexpand2003" + Delete "$TEMP\autoexp.dat-autoexpand2005" + Delete "$TEMP\autoexp.dat-autoexpand2008" + Delete "$TEMP\autoexp.dat-visualizer2005" + Delete "$TEMP\autoexp.dat-visualizer2008" + +# IntCmp $DEBUGEXT_INITIALIZED 0 nodebugext + +# SetOutPath "$INSTDIR\debugext" +# File "${MODULE_DEBUGEXT_ROOT}\doc\usage.rtf" +# !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\Debugger Extension Readme.lnk" "$INSTDIR\debugext\usage.rtf" + + nodebugext: +SectionEnd + +Function DoUpdateDatFile + exch $0 ; vs version + exch + exch $1 ;dir + push $2 + + strcpy $2 "$1\autoexp.dat" + + push $2 + call BackupFile + + + push "" ;remove all qt related stuff + push $2 + call CleanAutoExp + + push "[AutoExpand]" + push $2 + ${If} $0 == "6.0" + ${OrIf} $0 == "2002" + push "$TEMP\autoexp.dat_entries.txt" + ${Else} + push "$TEMP\autoexp.dat-autoexpand$0" + ${EndIf} + call InsertAutoExp + + ${If} $0 == "2005" + ${OrIf} $0 == "2008" + push "[Visualizer]" + push $2 + push "$TEMP\autoexp.dat-visualizer$0" + call InsertAutoExp + ${EndIf} + + pop $2 + pop $1 + pop $0 +FunctionEnd + +Function UpdateUserType + exch $0 ;usertype filename + push $1 + + push $0 + call BackupFile + + ClearErrors + FileOpen $1 $0 a + IfErrors done + + push "Q_OBJECT" + push $1 + call AddUserType + push "Q_ENUMS" + push $1 + call AddUserType + push "Q_FLAGS" + push $1 + call AddUserType + push "Q_INTERFACES" + push $1 + call AddUserType + push "Q_PROPERTY" + push $1 + call AddUserType + push "Q_SETS" + push $1 + call AddUserType + push "Q_CLASSINFO" + push $1 + call AddUserType + push "emit" + push $1 + call AddUserType + push "SIGNAL" + push $1 + call AddUserType + push "SLOT" + push $1 + call AddUserType + push "signals:" + push $1 + call AddUserType + push "slots:" + push $1 + call AddUserType + push "qobject_cast" + push $1 + call AddUserType + push "qvariant_cast" + push $1 + call AddUserType + +done: + FileClose $1 + + pop $1 + pop $0 +FunctionEnd + +Function AddUserType + exch $0 ;file handle + exch + exch $1 ;value + push $2 + + FileSeek $0 0 ;beginning + +scann: + FileRead $0 $2 + IfErrors insert + strcmp "$2" "$1" done + strcmp "$2" "$1$\r" done + strcmp "$2" "$1$\n" done + strcmp "$2" "$1$\r$\n" done + goto scann + +insert: + FileSeek $0 -2 CUR ;previous char + ClearErrors + FileRead $0 $2 2 + IfErrors +3 + strcmp $2 "$\r$\n" +2 + FileWrite $0 "$\r$\n" + FileWrite $0 "$1$\r$\n" + +done: + pop $2 + pop $1 + pop $0 +FunctionEnd + +Function BackupFile + exch $0 + push $1 + push $2 + + IfFileExists $0 0 done + + ; remove extension + strlen $1 $0 + intop $1 $1 - 3 + strcpy $2 $0 $1 + + IfFileExists "$2qto" writeqte writeqto + + writeqto: + copyfiles /FILESONLY "$0" "$2qto" + goto done + + writeqte: + SetDetailsPrint none + IfFileExists "$2qte" 0 +2 + Delete "$2qte" + SetDetailsPrint both + copyfiles /FILESONLY "$0" "$2qte" + + done: + pop $2 + pop $1 + pop $0 +FunctionEnd + +Function InsertAutoExp + exch $0 ;filename qtrules + exch + exch $1 ;filename autoexp + exch + exch 2 + exch $8 ; section name in autoexp file "[AutoExpand]" + exch 2 + push $2 ;handle qtrules + push $3 ;readline + push $4 ;handle autoexp + push $5 ;tmpfile handle + push $6 ;tmp copy of autoexp.dat + push $7 + + ClearErrors + IfErrors done + + StrCpy $6 "$1_tmp" + CopyFiles /FILESONLY "$1" "$6" + + FileOpen $5 $1 a + IfErrors done + + FileOpen $4 $6 r + IfErrors done + + FileOpen $2 $0 r + IfErrors done + +nextline: + FileRead $4 $3 + IfErrors insertloop + + strcpy $7 $3 12 + strcmp $7 $8 insert copyline + copyline: + FileWrite $5 $3 + goto nextline + + insert: + FileWrite $5 $3 + insertloop: + FileRead $2 $3 + IfErrors copyrest + strcpy $7 $3 15 + strcmp $7 ";QT_DEBUG_START" 0 +2 + strcpy $3 "$7 (${MODULE_DEBUGEXT_INSTALLER})$\r$\n" + FileWrite $5 $3 + goto insertloop + + copyrest: + FileRead $4 $3 + IfErrors renameFile + FileWrite $5 $3 + goto copyrest + +renameFile: + FileClose $5 + FileClose $4 + FileClose $2 + SetDetailsPrint none + Delete $6 + SetDetailsPrint both + +done: + pop $7 + pop $6 + pop $5 + pop $4 + pop $3 + pop $2 + pop $0 + pop $1 + pop $8 +FunctionEnd + +!insertmacro CleanAutoExp "" +!insertmacro CleanAutoExp "un." +!macroend ;DEBUGEXT_SECTIONS + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_DESCRIPTION +!ifndef MODULE_DEBUGEXT_NOVS2008 + !insertmacro MUI_DESCRIPTION_TEXT ${DEBUGEXT_SEC01} "This installs Qt 4 debug extensions. This makes it easier to debug Qt objects in Visual Studio (Overwrites Qt 3 debug extensions)." +!endif +!ifndef MODULE_DEBUGEXT_NOVS2005 + !insertmacro MUI_DESCRIPTION_TEXT ${DEBUGEXT_SEC02} "This installs Qt 4 debug extensions. This makes it easier to debug Qt objects in Visual Studio (Overwrites Qt 3 debug extensions)." +!endif +!ifndef MODULE_DEBUGEXT_NOVS2003 + !insertmacro MUI_DESCRIPTION_TEXT ${DEBUGEXT_SEC03} "This installs Qt 4 debug extensions. This makes it easier to debug Qt objects in Visual Studio (Overwrites Qt 3 debug extensions)." +!endif +!ifndef MODULE_DEBUGEXT_NOVS2002 + !insertmacro MUI_DESCRIPTION_TEXT ${DEBUGEXT_SEC04} "This installs Qt 4 debug extensions. This makes it easier to debug Qt objects in Visual Studio (Overwrites Qt 3 debug extensions)." +!endif +!ifndef MODULE_DEBUGEXT_NOVC60 + !insertmacro MUI_DESCRIPTION_TEXT ${DEBUGEXT_SEC05} "This installs Qt 4 debug extensions. This makes it easier to debug Qt objects in Visual Studio (Overwrites Qt 3 debug extensions)." +!endif +!macroend + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_STARTUP + push $0 + push $1 + push $3 + +!ifndef MODULE_DEBUGEXT_NOVS2008 + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\9.0" "InstallDir" + strcmp $0 "" debugext_startup_not90 + strcpy $1 "$0..\Packages\Debugger\autoexp.dat" + ClearErrors + FileOpen $3 $1 a + IfErrors debugext_startup_not90 + FileClose $3 + + Goto debugext_startup_done90 + debugext_startup_not90: + SectionSetFlags ${DEBUGEXT_SEC01} "16" + debugext_startup_done90: +!endif + +!ifndef MODULE_DEBUGEXT_NOVS2005 + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\8.0" "InstallDir" + strcmp $0 "" debugext_startup_not80 + strcpy $1 "$0..\Packages\Debugger\autoexp.dat" + ClearErrors + FileOpen $3 $1 a + IfErrors debugext_startup_not80 + FileClose $3 + + Goto debugext_startup_done80 + debugext_startup_not80: + SectionSetFlags ${DEBUGEXT_SEC02} "16" + debugext_startup_done80: +!endif + +!ifndef MODULE_DEBUGEXT_NOVS2003 + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\7.1" "InstallDir" + strcmp $0 "" debugext_startup_not71 + strcpy $1 "$0..\Packages\Debugger\autoexp.dat" + ClearErrors + FileOpen $3 $1 a + IfErrors debugext_startup_not71 + FileClose $3 + + Goto debugext_startup_done71 + debugext_startup_not71: + SectionSetFlags ${DEBUGEXT_SEC03} "16" + debugext_startup_done71: +!endif + +!ifndef MODULE_DEBUGEXT_NOVS2002 + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\7.0" "InstallDir" + strcmp $0 "" debugext_startup_not70 + strcpy $1 "$0..\Packages\Debugger\autoexp.dat" + ClearErrors + FileOpen $3 $1 a + IfErrors debugext_startup_not70 + FileClose $3 + + Goto debugext_startup_done70 + debugext_startup_not70: + SectionSetFlags ${DEBUGEXT_SEC04} "16" + debugext_startup_done70: +!endif + +!ifndef MODULE_DEBUGEXT_NOVC60 + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\6.0\Setup" "VsCommonDir" + strcmp $0 "" debugext_startup_not60 + strcpy $1 "$0\MsDev98\bin\autoexp.dat" + ClearErrors + FileOpen $3 $1 a + IfErrors debugext_startup_not60 + FileClose $3 + + Goto debugext_startup_done60 + debugext_startup_not60: + SectionSetFlags ${DEBUGEXT_SEC05} "16" + debugext_startup_done60: +!endif + + pop $3 + pop $1 + pop $0 +!macroend ;DEBUGEXT_STATUP + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_FINISH +!macroend + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_UNSTARTUP + !insertmacro ConfirmOnRemove "VS2008DebugExtInstalled" "Qt Debugger Extension (VS2008)" + !insertmacro ConfirmOnRemove "VS2005DebugExtInstalled" "Qt Debugger Extension (VS2005)" + !insertmacro ConfirmOnRemove "VS2003DebugExtInstalled" "Qt Debugger Extension (VS2003)" + !insertmacro ConfirmOnRemove "VS2002DebugExtInstalled" "Qt Debugger Extension (VS2002)" + !insertmacro ConfirmOnRemove "VC60DebugExtInstalled" "Qt Debugger Extension (VC60)" +!macroend + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_UNINSTALL +Section un."Debugger Extension" + push $0 + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "VS2008DebugExtInstalled" + intcmp $0 1 0 done90 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2008DebugExtInstalled" 0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\9.0" "InstallDir" + strcmp $0 "" done90 + push "$0..\Packages\Debugger\" + call un.DoCleanDatFile + done90: + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "VS2005DebugExtInstalled" + intcmp $0 1 0 done80 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2005DebugExtInstalled" 0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\8.0" "InstallDir" + strcmp $0 "" done80 + push "$0..\Packages\Debugger\" + call un.DoCleanDatFile + done80: + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "VS2003DebugExtInstalled" + intcmp $0 1 0 done71 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2003DebugExtInstalled" 0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\7.1" "InstallDir" + strcmp $0 "" done71 + push "$0..\Packages\Debugger\" + call un.DoCleanDatFile + done71: + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "VS2002DebugExtInstalled" + intcmp $0 1 0 done70 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VS2002DebugExtInstalled" 0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\7.0" "InstallDir" + strcmp $0 "" done70 + push "$0..\Packages\Debugger\" + call un.DoCleanDatFile + done70: + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "VC60DebugExtInstalled" + intcmp $0 1 0 done60 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "VC60DebugExtInstalled" 0 + + ReadRegStr $0 SHCTX "Software\Microsoft\VisualStudio\6.0\Setup" "VsCommonDir" + strcmp $0 "" done60 + push "$0\MsDev98\bin\" + call un.DoCleanDatFile + done60: + +# Delete "$INSTDIR\debugext\usage.rtf" +# RmDir "$INSTDIR\debugext" +# Delete "$SMPROGRAMS\$STARTMENU_STRING\Debugger Extension Readme.lnk" + + pop $0 +SectionEnd + +Function un.DoCleanDatFile + exch $0 ;dir + push "${MODULE_DEBUGEXT_INSTALLER}" + push "$0autoexp.dat" + call un.CleanAutoExp + pop $0 +FunctionEnd + +!macroend ;DEBUGEXT_UNINSTALL + +;------------------------------------------------------------------------------------------------ +!macro DEBUGEXT_UNFINISH +!macroend + +!else ;MODULE_DEBUGEXT +!macro DEBUGEXT_INITIALIZE +!macroend +!macro DEBUGEXT_SECTIONS +!macroend +!macro DEBUGEXT_DESCRIPTION +!macroend +!macro DEBUGEXT_STARTUP +!macroend +!macro DEBUGEXT_FINISH +!macroend +!macro DEBUGEXT_UNSTARTUP +!macroend +!macro DEBUGEXT_UNINSTALL +!macroend +!macro DEBUGEXT_UNFINISH +!macroend +!endif ;MODULE_DEBUGEXT + diff --git a/util/scripts/win-binary/nsis/modules/eclipse.nsh b/util/scripts/win-binary/nsis/modules/eclipse.nsh new file mode 100644 index 0000000..8a826ab --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/eclipse.nsh @@ -0,0 +1,398 @@ +!ifdef MODULE_ECLIPSE + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_INITIALIZE + +!define ECLIPSE_LOCATION_KEY "EclipseLocation" +var ECLIPSE_LOCATION +var ECLIPSE_MINGW_LOCATION + +!ifndef MODULE_ECLIPSE_INSTALLER + !define MODULE_ECLIPSE_INSTALLER "${PRODUCT_NAME} v${PRODUCT_VERSION}" +!endif +!ifndef MODULE_ECLIPSE_ROOT + !define MODULE_ECLIPSE_ROOT "${INSTALL_ROOT}\eclipse" +!endif +!ifndef MODULE_ECLIPSE_VERSION + !define MODULE_ECLIPSE_VERSION ${PRODUCT_VERSION} +!endif + +!define MODULE_ECLIPSE_QT_PREFIX "qtcpp" + +!define MODULE_ECLIPSE_QT_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}_${MODULE_ECLIPSE_VERSION}" + +!define MODULE_ECLIPSE_QTFEATURE_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}.feature_${MODULE_ECLIPSE_VERSION}" + +!define MODULE_ECLIPSE_QTPROJECT_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}project_${MODULE_ECLIPSE_VERSION}" +!define MODULE_ECLIPSE_QTPROJECT_LABEL "Qt Project Integration" +!define MODULE_ECLIPSE_QTPROJECT_INSTALLEDKEY "EclipseQtProjectInstalled" +!define MODULE_ECLIPSE_QTPROJECT_WIN32X86_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}project.win32.x86_${MODULE_ECLIPSE_VERSION}" + +!define MODULE_ECLIPSE_QTDESIGNER_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}designer_${MODULE_ECLIPSE_VERSION}" +!define MODULE_ECLIPSE_QTDESIGNER_LABEL "Qt Designer Integration" +!define MODULE_ECLIPSE_QTDESIGNER_INSTALLEDKEY "EclipseQtDesignerInstalled" +!define MODULE_ECLIPSE_QTDESIGNER_WIN32X86_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}designer.win32.x86_${MODULE_ECLIPSE_VERSION}" +!define MODULE_ECLIPSE_QTDESIGNER_QT_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}designer.${MODULE_ECLIPSE_QT_PREFIX}_${MODULE_ECLIPSE_VERSION}" +!define MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}designerplugins.win32.x86_${MODULE_ECLIPSE_VERSION}" + +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_ID "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}integrationhelp_${MODULE_ECLIPSE_VERSION}" +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_LABEL "Qt Integration Help" +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_INSTALLEDKEY "EclipseQtIntegrationHelpInstalled" +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESSUBFOLDER "com.trolltech.${MODULE_ECLIPSE_QT_PREFIX}integrationhelp.examples_${MODULE_ECLIPSE_VERSION}" +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESSOURCE "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESSUBFOLDER}" +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESTARGET "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESSUBFOLDER}" +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE "${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESSOURCE}\AddressBook" +!define MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET "${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESTARGET}\AddressBook" + +!define MODULE_ECLIPSE_MSRT_VERSION "71" + +LangString ModuleEclipsePageTitle ${LANG_ENGLISH} "Eclipse Installation Location" +LangString ModuleEclipsePageDescription ${LANG_ENGLISH} "Select where eclipse is installed, and where MinGW is located." + +!define MODULE_ECLIPSE_PAGE "eclipse.ini" +Page custom ModuleEclipsePageEnter ModuleEclipsePageExit + +!include "includes\regsvr.nsh" + +!macroend ;ECLIPSE_INITIALIZE + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_SECTIONS + +Section -PreEclipseSection + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${ECLIPSE_LOCATION_KEY}" $ECLIPSE_LOCATION +SectionEnd + +SectionGroup "Eclipse Integration" + +Section "${MODULE_ECLIPSE_QTPROJECT_LABEL}" ECLIPSE_SEC01 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "${MODULE_ECLIPSE_QTPROJECT_INSTALLEDKEY}" 1 + SetOutPath "$ECLIPSE_LOCATION\plugins\" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QT_ID}.jar" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTPROJECT_ID}.jar" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTPROJECT_WIN32X86_ID}.jar" + + SetOutPath "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTFEATURE_ID}\corporate.gif" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTFEATURE_ID}\feature.xml" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTFEATURE_ID}\license.html" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-0.9.5" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-1.0.0" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-1.0.1" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-1.4.0" + + Call InstallQtModules + + SetOutPath "$ECLIPSE_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\bin\${MODULE_ECLIPSE_QT_PREFIX}proparser.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\${MODULE_ECLIPSE_QT_PREFIX}qrceditor.dll" + + push "$ECLIPSE_INSTDIR\${MODULE_ECLIPSE_QT_PREFIX}proparser.dll" + call RegEclipseSvr + + push "$ECLIPSE_INSTDIR\${MODULE_ECLIPSE_QT_PREFIX}qrceditor.dll" + call RegEclipseSvr + + IfFileExists "$ECLIPSE_MINGW_LOCATION\gcc.exe" 0 done + Call MakeEclipseStartFile + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\License.lnk" "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\license.html" + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\Start Eclipse with MinGW.lnk" "%COMSPEC%" "/c $\"$ECLIPSE_INSTDIR\start.bat$\"" + + done: +SectionEnd + +Section "${MODULE_ECLIPSE_QTDESIGNER_LABEL}" ECLIPSE_SEC02 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "${MODULE_ECLIPSE_QTDESIGNER_INSTALLEDKEY}" 1 + SetOutPath "$ECLIPSE_LOCATION\plugins\" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNER_ID}.jar" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNER_WIN32X86_ID}.jar" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNER_QT_ID}.jar" + + SetOutPath "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\qt3supportwidgets.dll" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\Qt3Support4.dll" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\QtSql4.dll" + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\QtNetwork4.dll" + SetOutPath "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\META-INF\" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\META-INF\MANIFEST.MF" + + Call InstallQtModules + + SetOutPath "$ECLIPSE_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\bin\QtDesigner4.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\QtScript4.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\QtDesignerComponents4.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\${MODULE_ECLIPSE_QT_PREFIX}designer.dll" + + push "$ECLIPSE_INSTDIR\${MODULE_ECLIPSE_QT_PREFIX}designer.dll" + call RegEclipseSvr +SectionEnd + +Section "${MODULE_ECLIPSE_QTINTEGRATIONHELP_LABEL}" ECLIPSE_SEC03 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "${MODULE_ECLIPSE_QTINTEGRATIONHELP_INSTALLEDKEY}" 1 + SetOutPath "$ECLIPSE_LOCATION\plugins\" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\plugins\${MODULE_ECLIPSE_QTINTEGRATIONHELP_ID}.jar" + SetOutPath "${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESTARGET}\META-INF" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESSOURCE}\META-INF\MANIFEST.MF" + SetOutPath "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\adddialog.cpp" + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\adddialog.h" + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\adddialog.ui" + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\addressbook.cpp" + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\addressbook.h" + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\AddressBook.pro" + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\addressbook.ui" + File "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKSOURCE}\main.cpp" +SectionEnd + +SectionGroupEnd + +; usage: +; push dll to register +; call RegEclipseSvr +Function RegEclipseSvr + exch $0 ;filename + + ClearErrors + push $0 + call RegSvr + IfErrors 0 +2 + MessageBox MB_OK|MB_ICONEXCLAMATION 'Could not register "$0"' + + pop $0 +FunctionEnd + +# +# creates a start.bat file with mingw in the path +# +Function MakeEclipseStartFile + push $0 ; file handle + + ClearErrors + FileOpen $0 "$ECLIPSE_INSTDIR\start.bat" w + IfErrors done + + FileWrite $0 "@echo off$\r$\n" + FileWrite $0 "rem$\r$\n" + FileWrite $0 "rem This file is generated by the installer$\r$\n" + FileWrite $0 "rem$\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "echo Setting up environment...$\r$\n" + FileWrite $0 "echo -- Using MinGW in: $ECLIPSE_MINGW_LOCATION $\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "set PATH=$ECLIPSE_MINGW_LOCATION$\r$\n" + FileWrite $0 "set PATH=%PATH%;%SystemRoot%\System32$\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "echo Starting eclipse...$\r$\n" + FileWrite $0 'call "$ECLIPSE_LOCATION\eclipse.exe" -clean' + FileWrite $0 "$\r$\n" + FileClose $0 + + done: + pop $0 +FunctionEnd + +Function InstallQtModules + SetOutPath "$ECLIPSE_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_ECLIPSE_ROOT}\bin\msvcp${MODULE_ECLIPSE_MSRT_VERSION}.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\msvcr${MODULE_ECLIPSE_MSRT_VERSION}.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\QtCore4.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\QtGui4.dll" + File "${MODULE_ECLIPSE_ROOT}\bin\QtXml4.dll" +FunctionEnd + +Function ModuleEclipsePageEnter + !insertmacro MUI_HEADER_TEXT "$(ModuleEclipsePageTitle)" "$(ModuleEclipsePageDescription)" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_ECLIPSE_PAGE}" +FunctionEnd + +Function ModuleEclipsePageExit + push $0 + push $1 + + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_ECLIPSE_PAGE}" "Field 5" "State" + IfFileExists "$0\eclipse.exe" eclipse_found + MessageBox MB_OK|MB_ICONSTOP "$0\eclipse.exe not found!$\nPlease select a valid installation directory." + Goto failed + eclipse_found: + + ClearErrors + FileOpen $1 "$0\plugins\com.trolltech.writetest" a + IfErrors 0 has_write_access + MessageBox MB_OK|MB_ICONSTOP "Can't write to $0\plugins.$\nPlease select a valid installation directory." + Goto failed + has_write_access: + + FileClose $1 + Delete "$0\plugins\com.trolltech.writetest" + StrCpy $ECLIPSE_LOCATION $0 + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_ECLIPSE_PAGE}" "Field 3" "State" + StrCpy $ECLIPSE_MINGW_LOCATION $0 + IfFileExists "$ECLIPSE_MINGW_LOCATION\g++.exe" done + MessageBox MB_YESNO|MB_ICONSTOP "g++ not found in $ECLIPSE_MINGW_LOCATION . Continue with installation?" IDYES done IDNO failed + + failed: + pop $1 + pop $0 + Abort + + done: + pop $1 + pop $0 +FunctionEnd + +!macroend ;ECLIPSE_SECTIONS + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_DESCRIPTION +!ifdef ECLIPSE_SEC01 + !insertmacro MUI_DESCRIPTION_TEXT ${ECLIPSE_SEC01} "This installs the ${MODULE_ECLIPSE_QTPROJECT_LABEL} into Eclipse." +!endif +!ifdef ECLIPSE_SEC02 + !insertmacro MUI_DESCRIPTION_TEXT ${ECLIPSE_SEC02} "This installs the ${MODULE_ECLIPSE_QTDESIGNER_LABEL} into Eclipse." +!endif +!ifdef ECLIPSE_SEC03 + !insertmacro MUI_DESCRIPTION_TEXT ${ECLIPSE_SEC03} "This installs the ${MODULE_ECLIPSE_QTINTEGRATIONHELP_LABEL} into Eclipse." +!endif +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_STARTUP + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_ECLIPSE_PAGE}" + SectionSetFlags ${ECLIPSE_SEC01} 17 + SectionSetFlags ${ECLIPSE_SEC02} 1 + SectionSetFlags ${ECLIPSE_SEC03} 1 + + strcpy $ECLIPSE_INSTDIR "$PROGRAMFILES\Trolltech\Eclipse" +!macroend ;ECLIPSE_STATUP + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_FINISH +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_UNSTARTUP + ReadRegStr $ECLIPSE_LOCATION SHCTX "$PRODUCT_UNIQUE_KEY" "${ECLIPSE_LOCATION_KEY}" + !insertmacro ConfirmOnRemove "${MODULE_ECLIPSE_QTPROJECT_INSTALLEDKEY}" "${MODULE_ECLIPSE_QTPROJECT_LABEL}" + !insertmacro ConfirmOnRemove "${MODULE_ECLIPSE_QTDESIGNER_INSTALLEDKEY}" "${MODULE_ECLIPSE_QTDESIGNER_LABEL}" + !insertmacro ConfirmOnRemove "${MODULE_ECLIPSE_QTINTEGRATIONHELP_INSTALLEDKEY}" "${MODULE_ECLIPSE_QTINTEGRATIONHELP_LABEL}" +!macroend + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_UNINSTALL +Section un."Eclipse Integration" + push $0 + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "${MODULE_ECLIPSE_QTPROJECT_INSTALLEDKEY}" + intcmp $0 1 0 DoneUnInstallQtProject + push "$ECLIPSE_INSTDIR\qtproparser.dll" + call un.RegSvr + push "$ECLIPSE_INSTDIR\qtqrceditor.dll" + call un.RegSvr + + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QT_ID}.jar" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTPROJECT_ID}.jar" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTPROJECT_WIN32X86_ID}.jar" + + Delete "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\corporate.gif" + Delete "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\feature.xml" + Delete "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\license.html" + Delete "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-0.9.5" + Delete "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-1.0.0" + Delete "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-1.0.1" + Delete "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}\Changes-1.4.0" + RMDir "$ECLIPSE_LOCATION\features\${MODULE_ECLIPSE_QTFEATURE_ID}" + + Delete "$ECLIPSE_INSTDIR\${MODULE_ECLIPSE_QT_PREFIX}proparser.dll" + Delete "$ECLIPSE_INSTDIR\${MODULE_ECLIPSE_QT_PREFIX}qrceditor.dll" + Delete "$SMPROGRAMS\$STARTMENU_STRING\License.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\Start Eclipse with MinGW.lnk" + Delete "$ECLIPSE_INSTDIR\start.bat" + DoneUnInstallQtProject: + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" ${MODULE_ECLIPSE_QTDESIGNER_INSTALLEDKEY} + intcmp $0 1 0 DoneUnInstallQtDesigner + push "$ECLIPSE_INSTDIR\${MODULE_ECLIPSE_QT_PREFIX}designer.dll" + call un.RegSvr + + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNER_ID}.jar" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNER_WIN32X86_ID}.jar" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNER_QT_ID}.jar" + Delete "$ECLIPSE_INSTDIR\QtDesigner4.dll" + Delete "$ECLIPSE_INSTDIR\QtScript4.dll" + Delete "$ECLIPSE_INSTDIR\QtDesignerComponents4.dll" + Delete "$ECLIPSE_INSTDIR\${MODULE_ECLIPSE_QT_PREFIX}designer.dll" + + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\META-INF\MANIFEST.MF" + RMDir "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\META-INF" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\qt3supportwidgets.dll" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\Qt3Support4.dll" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\QtSql4.dll" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}\QtNetwork4.dll" + RMDir "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTDESIGNERPLUGINS_ID}" + + DoneUnInstallQtDesigner: + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "${MODULE_ECLIPSE_QTINTEGRATIONHELP_INSTALLEDKEY}" + intcmp $0 1 0 DoneUnInstallQtIntegrationHelp + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_ECLIPSE_QTINTEGRATIONHELP_ID}.jar" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESTARGET}\META-INF\MANIFEST.MF" + RMDir "${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESTARGET}\META-INF" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\adddialog.cpp" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\adddialog.h" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\adddialog.ui" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\addressbook.cpp" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\addressbook.h" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\AddressBook.pro" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\addressbook.ui" + Delete "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}\main.cpp" + RMDir "${MODULE_ECLIPSE_QTINTEGRATIONHELP_ADDRESSBOOKTARGET}" + RMDir "${MODULE_ECLIPSE_QTINTEGRATIONHELP_EXAMPLESTARGET}" + DoneUnInstallQtIntegrationHelp: + + Delete "$ECLIPSE_INSTDIR\msvcp${MODULE_ECLIPSE_MSRT_VERSION}.dll" + Delete "$ECLIPSE_INSTDIR\msvcr${MODULE_ECLIPSE_MSRT_VERSION}.dll" + Delete "$ECLIPSE_INSTDIR\QtCore4.dll" + Delete "$ECLIPSE_INSTDIR\QtGui4.dll" + Delete "$ECLIPSE_INSTDIR\QtXml4.dll" + + RMDir "$ECLIPSE_INSTDIR" + + pop $0 +SectionEnd +!macroend ;ECLIPSE_UNINSTALL + +;------------------------------------------------------------------------------------------------ +!macro ECLIPSE_UNFINISH +!macroend + +!else ;MODULE_ECLIPSE +!macro ECLIPSE_INITIALIZE +!macroend +!macro ECLIPSE_SECTIONS +!macroend +!macro ECLIPSE_DESCRIPTION +!macroend +!macro ECLIPSE_STARTUP +!macroend +!macro ECLIPSE_FINISH +!macroend +!macro ECLIPSE_UNSTARTUP +!macroend +!macro ECLIPSE_UNINSTALL +!macroend +!macro ECLIPSE_UNFINISH +!macroend +!endif ;MODULE_ECLIPSE + diff --git a/util/scripts/win-binary/nsis/modules/environment.nsh b/util/scripts/win-binary/nsis/modules/environment.nsh new file mode 100644 index 0000000..a8d2548 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/environment.nsh @@ -0,0 +1,176 @@ +!ifdef MODULE_ENVIRONMENT +!macro ENVIRONMENT_INITIALIZE + !include "includes\writeEnvStr.nsh" + !include "includes\writePathStr.nsh" + + !ifndef MODULE_ENVIRONMENT_QTDIR + !ifdef MODULE_MINGW + !define MODULE_ENVIRONMENT_QTDIR $MINGW_INSTDIR + !endif + + !ifdef MODULE_MSVC + !define MODULE_ENVIRONMENT_QTDIR $MSVC_INSTDIR + !endif + !endif + + !define MODULE_ENVIRONMENT_PAGE "envpage.ini" + var MODULE_ENVIRONMENT_SET + var MODULE_ENVIRONMENT_OLD + LangString ModuleEnvironmentTitle ${LANG_ENGLISH} "Configure Environment" + LangString ModuleEnvironmentDescription ${LANG_ENGLISH} "Configure Qt environment variables" + + Page custom ModuleEnvironmentPageEnter ModuleEnvironmentPageExit +!macroend +!macro ENVIRONMENT_SECTIONS + Section -ModuleEnvironmentRegister + push "${MODULE_ENVIRONMENT_QTDIR}" + call RegisterQtEnvVariables + SectionEnd + + Function ModuleEnvironmentPageEnter + push $0 + Call IsNT + pop $0 + strcmp "$0" "1" +2 + abort + pop $0 + + !insertmacro MUI_HEADER_TEXT "$(ModuleEnvironmentTitle)" "$(ModuleEnvironmentDescription)" + + strcmp $MODULE_ENVIRONMENT_SET "1" 0 envCheckNo + !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_ENVIRONMENT_PAGE}" "Field 2" "State" "1" + goto showEnvPage + envCheckNo: + !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_ENVIRONMENT_PAGE}" "Field 2" "State" "0" + + showEnvPage: + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_ENVIRONMENT_PAGE}" + FunctionEnd + + Function ModuleEnvironmentPageExit + !insertmacro MUI_INSTALLOPTIONS_READ $MODULE_ENVIRONMENT_SET "${MODULE_ENVIRONMENT_PAGE}" "Field 2" "State" + FunctionEnd + + Function RegisterQtEnvVariables + exch $2 ; the installation path = QTDIR + push $0 ; I think WriteEnvStr mixes up $0 and $1 + push $1 + + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtEnvSet" $MODULE_ENVIRONMENT_SET + + strcmp $MODULE_ENVIRONMENT_SET "1" 0 noenv + + StrCmp $MODULE_ENVIRONMENT_OLD "0" +4 + DetailPrint "Removing $MODULE_ENVIRONMENT_OLD\bin from PATH" + push "$MODULE_ENVIRONMENT_OLD\bin" + Call RemoveFromPath ; remove old qtdir + + DetailPrint "Setting QTDIR to $2" + push "QTDIR" + push $2 + Call WriteEnvStr ; set the QTDIR + + DetailPrint "Adding $2\bin to PATH" + push "$2\bin" + Call AddToPath ; set the PATH + + + push "QMAKESPEC" + push ${INSTALL_COMPILER} + Call GetMkSpec + pop $0 + DetailPrint "Setting QMAKESPEC to $0" + push $0 + Call WriteEnvStr ; set the QMAKESPEC + + noenv: + pop $1 + pop $0 + pop $2 + FunctionEnd + + Function un.RegisterQtEnvVariables + exch $0 ; QTDIR + push $1 + + ClearErrors + ReadRegDWORD $MODULE_ENVIRONMENT_SET SHCTX "$PRODUCT_UNIQUE_KEY" "QtEnvSet" + intcmp $MODULE_ENVIRONMENT_SET 0 noenv + + DetailPrint "Removing $0\bin from the PATH" + push "$0\bin" + Call un.RemoveFromPath ; removes qt from the path + + ;Check if QTDIR is equal to installdir + ExpandEnvStrings $1 "%QTDIR%" + + StrCmp "$0" "$1" removeenv + StrCmp "$0\" "$1" removeenv + StrCmp "$0" "$1\" removeenv + Goto noenv + + removeenv: + DetailPrint "Removing QTDIR" + push "QTDIR" + Call un.DeleteEnvStr ; removes QTDIR + + DetailPrint "Removing QMAKESPEC" + push "QMAKESPEC" + Call un.DeleteEnvStr ; removes QMAKESPEC + + noenv: + pop $1 + pop $0 + FunctionEnd +!macroend +!macro ENVIRONMENT_DESCRIPTION +!macroend +!macro ENVIRONMENT_STARTUP + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_ENVIRONMENT_PAGE}" + push $0 + ExpandEnvStrings $0 "%QTDIR%" + + StrCmp $0 "%QTDIR%" +4 + strcpy $MODULE_ENVIRONMENT_SET "0" ;QTDIR exists + strcpy $MODULE_ENVIRONMENT_OLD $0 + Goto +3 + strcpy $MODULE_ENVIRONMENT_SET "1" ;no QTDIR + strcpy $MODULE_ENVIRONMENT_OLD "0" + + Call IsNT + pop $0 + strcmp "$0" "1" +2 + strcpy $MODULE_ENVIRONMENT_SET "0" + pop $0 +!macroend +!macro ENVIRONMENT_FINISH +!macroend +!macro ENVIRONMENT_UNSTARTUP +!macroend +!macro ENVIRONMENT_UNINSTALL + Section -un.ModuleEnvironmentRegister + push "${MODULE_ENVIRONMENT_QTDIR}" + call un.RegisterQtEnvVariables + SectionEnd +!macroend +!macro ENVIRONMENT_UNFINISH +!macroend +!else ;MODULE_ENVIRONMENT +!macro ENVIRONMENT_INITIALIZE +!macroend +!macro ENVIRONMENT_SECTIONS +!macroend +!macro ENVIRONMENT_DESCRIPTION +!macroend +!macro ENVIRONMENT_STARTUP +!macroend +!macro ENVIRONMENT_FINISH +!macroend +!macro ENVIRONMENT_UNSTARTUP +!macroend +!macro ENVIRONMENT_UNINSTALL +!macroend +!macro ENVIRONMENT_UNFINISH +!macroend +!endif ;MODULE_ENVIRONMENT + diff --git a/util/scripts/win-binary/nsis/modules/evaluation.nsh b/util/scripts/win-binary/nsis/modules/evaluation.nsh new file mode 100644 index 0000000..7bcb31e --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/evaluation.nsh @@ -0,0 +1,116 @@ +!ifdef MODULE_EVALUATION +!macro EVALUATION_INITIALIZE + !ifndef MODULE_EVALUATION_QTDIR + !ifdef MODULE_MINGW + !define MODULE_EVALUATION_QTDIR $MINGW_INSTDIR + !endif + + !ifdef MODULE_MSVC + !define MODULE_EVALUATION_QTDIR $MSVC_INSTDIR + !endif + + !ifdef MODULE_QTJAMBI + !define MODULE_EVALUATION_QTDIR $QTJAMBI_INSTDIR + !endif + !endif +!macroend +!macro EVALUATION_SECTIONS + Section -ModuleEvaluationSection + !ifdef MODULE_MSVC_WIN32BUILDTREE & MODULE_MSVC_WIN32BUILDINSTALLDIRNAME + push "$MSVC_INSTDIR\${MODULE_MSVC_WIN32BUILDINSTALLDIRNAME}" + push "bin" + call PatchKeyInBinary + !endif + !ifdef MODULE_MSVC_WM50BUILDTREE & MODULE_MSVC_WM50BUILDINSTALLDIRNAME + push "$MSVC_INSTDIR\${MODULE_MSVC_WM50BUILDINSTALLDIRNAME}" + push "lib" + call PatchKeyInBinary + !endif + !ifdef MODULE_MSVC_SSDK50X86BUILDTREE & MODULE_MSVC_SSDK50X86BUILDINSTALLDIRNAME + push "$MSVC_INSTDIR\${MODULE_MSVC_SSDK50X86BUILDINSTALLDIRNAME}" + push "lib" + call PatchKeyInBinary + !endif + !ifndef MODULE_MSVC_WIN32BUILDTREE | MODULE_MSVC_WM50BUILDTREE | MODULE_MSVC_SSDK50X86BUILDTREE + push "${MODULE_EVALUATION_QTDIR}" + push "bin" + call PatchKeyInBinary + !endif + SectionEnd + + Function PatchKeyInBinary + exch $3 + exch + exch $2 + exch + push $0 + push $1 + + DetailPrint "Patching key in core ($2\$3)..." + FindFirst $0 $1 "$2\$3\QtCore*.dll" + StrCmp $1 "" ErrorPatchingCore + qtnsisext::PatchBinary "$2\$3\$1" "qt_qevalkey=" "qt_qevalkey=$LICENSE_KEY" + + FindNext $0 $1 + StrCmp $1 "" ErrorPatchingCore + qtnsisext::PatchBinary "$2\$3\$1" "qt_qevalkey=" "qt_qevalkey=$LICENSE_KEY" + + ErrorPatchingCore: + + DetailPrint "Patching key in gui ($2\$3)..." + FindFirst $0 $1 "$2\$3\QtGui*.dll" + StrCmp $1 "" ErrorPatchingGUI + qtnsisext::PatchBinary "$2\$3\$1" "qt_qevalkey=" "qt_qevalkey=$LICENSE_KEY" + + FindNext $0 $1 + StrCmp $1 "" ErrorPatchingGUI + qtnsisext::PatchBinary "$2\$3\$1" "qt_qevalkey=" "qt_qevalkey=$LICENSE_KEY" + + ErrorPatchingGUI: + + IfFileExists "$2\include\Qt\qconfig.h" 0 NoConfigFileFound + CopyFiles /FILESONLY "$2\include\Qt\qconfig.h" "$2\include\QtCore" + NoConfigFileFound: + + pop $1 + pop $0 + pop $3 + pop $2 + FunctionEnd +!macroend +!macro EVALUATION_DESCRIPTION +!macroend +!macro EVALUATION_STARTUP +!macroend +!macro EVALUATION_FINISH +!macroend +!macro EVALUATION_UNSTARTUP +!macroend +!macro EVALUATION_UNINSTALL + Section un.-ModuleEvaluationSection + Delete "${MODULE_EVALUATION_QTDIR}\include\QtCore\qconfig.h" + RMDir "${MODULE_EVALUATION_QTDIR}\include\QtCore" + RMDir "${MODULE_EVALUATION_QTDIR}\include" + SectionEnd +!macroend +!macro EVALUATION_UNFINISH +!macroend +!else ;MODULE_EVALUATION +!macro EVALUATION_INITIALIZE +!macroend +!macro EVALUATION_SECTIONS +!macroend +!macro EVALUATION_DESCRIPTION +!macroend +!macro EVALUATION_STARTUP +!macroend +!macro EVALUATION_FINISH +!macroend +!macro EVALUATION_UNSTARTUP +!macroend +!macro EVALUATION_UNINSTALL +!macroend +!macro EVALUATION_UNFINISH +!macroend +!endif ;MODULE_EVALUATION + diff --git a/util/scripts/win-binary/nsis/modules/help.nsh b/util/scripts/win-binary/nsis/modules/help.nsh new file mode 100644 index 0000000..ccd0cd2 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/help.nsh @@ -0,0 +1,274 @@ +; Help Module + +!ifdef MODULE_HELP + +;------------------------------------------------------------------------------------------------ +!macro HELP_INITIALIZE +!ifndef MODULE_HELP_NAME + !define MODULE_HELP_NAME "Help Integration" +!endif +!ifndef MODULE_HELP_ROOT + !define MODULE_HELP_ROOT "${INSTALL_ROOT}\vsip\help" +!endif +!ifndef MODULE_HELP_QT_FILE_ROOT + !define MODULE_HELP_QT_FILE_ROOT "qt" +!endif + +!include "includes\system.nsh" +!include "includes\help.nsh" + +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro HELP_SECTIONS + +Section -PreHelpSection + ; use default instdir if not set + strcmp "$HELP_INSTDIR" "" 0 +2 + StrCpy $HELP_INSTDIR "$INSTDIR\help" +SectionEnd + +SectionGroup "Help Integration" + +!ifndef MODULE_HELP_NOVS2008 +Section "Visual Studio 2008" HELP_SEC01 + !insertmacro InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "9.0" + WriteRegDWORD SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 9.0" 1 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp90Installed" 1 +SectionEnd +!endif + +!ifndef MODULE_HELP_NOVS2005 +Section "Visual Studio 2005" HELP_SEC02 + !insertmacro InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "8.0" + WriteRegDWORD SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 8.0" 1 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp80Installed" 1 +SectionEnd +!endif + +!ifndef MODULE_HELP_NOVS2003 +Section "Visual Studio 2003" HELP_SEC03 + !insertmacro InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "7.1" + WriteRegDWORD SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 7.1" 1 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp71Installed" 1 +SectionEnd +!endif + +!ifndef MODULE_HELP_NOVS2002 +Section "Visual Studio 2002" HELP_SEC04 + !insertmacro InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "7.0" + WriteRegDWORD SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 7.0" 1 + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp70Installed" 1 +SectionEnd +!endif + +SectionGroupEnd + +Section -PostHelpSection + IfFileExists "$HELP_INSTDIR\h2reg.exe" 0 PostHelpSectionFinished + !insertmacro RegisterHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} +PostHelpSectionFinished: +SectionEnd + +!macroend + +;------------------------------------------------------------------------------------------------ +!macro HELP_DESCRIPTION +!ifdef HELP_SEC01 + !insertmacro MUI_DESCRIPTION_TEXT ${HELP_SEC01} "This installs the Qt Help Integration for Visual Studio 2008" +!endif +!ifdef HELP_SEC02 + !insertmacro MUI_DESCRIPTION_TEXT ${HELP_SEC02} "This installs the Qt Help Integration for Visual Studio 2005" +!endif +!ifdef HELP_SEC03 + !insertmacro MUI_DESCRIPTION_TEXT ${HELP_SEC03} "This installs the Qt Help Integration for Visual Studio 2003" +!endif +!ifdef HELP_SEC04 + !insertmacro MUI_DESCRIPTION_TEXT ${HELP_SEC04} "This installs the Qt Help Integration for Visual Studio 2002" +!endif +!macroend + +;------------------------------------------------------------------------------------------------ +!macro HELP_STARTUP + Push $0 + Push $1 + Push $2 + + StrCmp $RUNNING_AS_ADMIN "false" 0 Module_Help_CheckForInstallation +!ifdef HELP_SEC01 + SectionSetFlags ${HELP_SEC01} "16" +!endif +!ifdef HELP_SEC02 + SectionSetFlags ${HELP_SEC02} "16" +!endif +!ifdef HELP_SEC03 + SectionSetFlags ${HELP_SEC03} "16" +!endif + Goto Module_Help_Done + + Module_Help_CheckForInstallation: +!ifdef HELP_SEC01 + ReadRegDWORD $0 SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 9.0" + intcmp $0 1 0 +2 + SectionSetFlags ${HELP_SEC01} "16" +!endif + +!ifdef HELP_SEC02 + ReadRegDWORD $0 SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 8.0" + intcmp $0 1 0 +2 + SectionSetFlags ${HELP_SEC02} "16" +!endif + +!ifdef HELP_SEC03 + ReadRegDWORD $0 SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 7.1" + intcmp $0 1 0 +2 + SectionSetFlags ${HELP_SEC03} "16" +!endif + +!ifdef HELP_SEC04 + ReadRegDWORD $0 SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 7.0" + intcmp $0 1 0 +2 + SectionSetFlags ${HELP_SEC04} "16" +!endif + +!ifdef HELP_SEC01 + ClearErrors + Push "9.0" + Call GetVSInstallationDir + Pop $2 + IfErrors 0 +2 + SectionSetFlags ${HELP_SEC01} "16" +!endif + +!ifdef HELP_SEC02 + ClearErrors + Push "8.0" + Call GetVSInstallationDir + Pop $2 + IfErrors 0 +2 + SectionSetFlags ${HELP_SEC02} "16" +!endif + +!ifdef HELP_SEC03 + ClearErrors + Push "7.1" + Call GetVSInstallationDir + Pop $2 + IfErrors 0 +2 + SectionSetFlags ${HELP_SEC03} "16" +!endif + +!ifdef HELP_SEC04 + ClearErrors + Push "7.0" + Call GetVSInstallationDir + Pop $2 + IfErrors 0 +2 + SectionSetFlags ${HELP_SEC04} "16" +!endif + + Module_Help_Done: + Pop $2 + Pop $1 + Pop $0 +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro HELP_FINISH +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro HELP_UNSTARTUP + ; use default instdir if not set + strcmp "$HELP_INSTDIR" "" 0 +2 + StrCpy $HELP_INSTDIR "$INSTDIR\help" +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro HELP_UNINSTALL +Section un."${MODULE_HELP_NAME}" + push $0 + push $1 + push $2 + push $3 + push $4 + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp90Installed" + ReadRegDWORD $1 SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp80Installed" + ReadRegDWORD $2 SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp71Installed" + ReadRegDWORD $3 SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp70Installed" + + IntOp $4 $0 | $1 + IntOp $4 $4 | $2 + IntOp $4 $4 | $3 + IntCmp $4 0 Module_Help_End + + !insertmacro un.RegisterHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} + + IntCmp $0 0 Module_Help_NoVS2008 + !insertmacro un.InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "9.0" + DeleteRegValue SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp90Installed" + DeleteRegValue SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 9.0" + Module_Help_NoVS2008: + + IntCmp $1 0 Module_Help_NoVS2005 + !insertmacro un.InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "8.0" + DeleteRegValue SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp80Installed" + DeleteRegValue SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 8.0" + Module_Help_NoVS2005: + + IntCmp $2 0 Module_Help_NoVS2003 + !insertmacro un.InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "7.1" + DeleteRegValue SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp71Installed" + DeleteRegValue SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 7.1" + Module_Help_NoVS2003: + + IntCmp $3 0 Module_Help_NoVS2002 + !insertmacro un.InstallHelp "$HELP_INSTDIR" ${MODULE_HELP_QT_FILE_ROOT} "7.0" + DeleteRegValue SHCTX "$PRODUCT_UNIQUE_KEY" "QtHelp70Installed" + DeleteRegValue SHCTX "SOFTWARE\Trolltech\QtHelp" "${PRODUCT_NAME} ${PRODUCT_VERSION} - 7.0" + Module_Help_NoVS2002: + + DeleteRegKey /ifempty SHCTX "SOFTWARE\Trolltech\QtHelp" + + push "$HELP_INSTDIR" + Call un.DeleteH2RegFiles + + Module_Help_End: + pop $4 + pop $3 + pop $2 + pop $1 + pop $0 +SectionEnd +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro HELP_UNFINISH +!macroend + +;------------------------------------------------------------------------------------------------ + +!else +!macro HELP_INITIALIZE +!macroend +!macro HELP_SECTIONS +!macroend +!macro HELP_DESCRIPTION +!macroend +!macro HELP_STARTUP +!macroend +!macro HELP_FINISH +!macroend +!macro HELP_UNSTARTUP +!macroend +!macro HELP_UNINSTALL +!macroend +!macro HELP_UNFINISH +!macroend +!endif diff --git a/util/scripts/win-binary/nsis/modules/license.nsh b/util/scripts/win-binary/nsis/modules/license.nsh new file mode 100644 index 0000000..78b443c --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/license.nsh @@ -0,0 +1,377 @@ +!ifdef MODULE_LICENSECHECK + +!macro LICENSECHECK_INITIALIZE + !include "includes\list.nsh" + !define TT_QTKEY_INI_FILE "license.ini" + !define MODULE_LICENSECHECK_PAGE "licensepage.ini" + + LangString LicenseTitle ${LANG_ENGLISH} "Qt License" + LangString LicenseTitleDescription ${LANG_ENGLISH} "Enter your Qt License key." + + LangString LicensePageTitle ${LANG_ENGLISH} "License Agreement" + LangString LicensePageDescription ${LANG_ENGLISH} "Please review the license terms before installing $(^Name)." + + Page custom CheckQtLicense CopyKeyAndValidate + Page custom ModuleLicensePageEnter ModuleLicensePageExit + + !ifdef MODULE_LICENSECHECK_PACKAGEDATE + !echo "Using package date: ${MODULE_LICENSECHECK_PACKAGEDATE}" + !endif +!macroend + +!macro LICENSECHECK_SECTIONS + Section -ModuleLicenseCheck + push $0 + push $1 + push $2 + push $3 + push $4 + push $5 + push $6 + + qtnsisext::GetLicenseInfo + pop $6 ; ExpiryDate + pop $5 ; Products + pop $4 ; CustomerID + pop $1 ; Licensee + pop $3 ; OldLicenseKey + pop $0 ; License Key + + strcmp "$0" "$LICENSE_KEY" done ;use the .qt-license that already exists + + ; create a new .qt-license file + ExpandEnvStrings $0 "%HOME%" + strcmp "$0" "%HOME%" 0 writeLicenseFile + ExpandEnvStrings $0 "%USERPROFILE%" + strcmp "$0" "%USERPROFILE%" 0 writeLicenseFile + ExpandEnvStrings $0 "%HOMEDRIVE%%HOMEPATH%" + + ; if bka exists, write backup to file bkb + writeLicenseFile: + IfFileExists "$0\.qt-license" 0 noBackup + + strcpy $1 "$0\.qt-license-original" + IfFileExists "$1" 0 +2 + strcpy $1 "$0\.qt-license-backup" + + IfFileExists "$1" 0 +2 + Delete "$1" + + ClearErrors + CopyFiles /FILESONLY "$0\.qt-license" "$1" + IfErrors done + Delete "$0\.qt-license" + IfErrors done + + noBackup: + qtnsisext::GetLicenseID $LICENSE_KEY + pop $2 + + ClearErrors + FileOpen $1 "$0\.qt-license" w + IfErrors done + FileWrite $1 '# Qt license file (Created by the binary installer)$\r$\n' + + strcmp "$4" "" +2 + FileWrite $1 'CustomerID="$4"$\r$\n' + + FileWrite $1 'LicenseID="$2"$\r$\n' + FileWrite $1 'Licensee="$LICENSEE"$\r$\n' + + strcmp "$5" "" +2 + FileWrite $1 'Products="$5"$\r$\n' + + strcmp "$6" "" +2 + FileWrite $1 "ExpiryDate=$6$\r$\n" + + strcmp "$3" "" +2 + FileWrite $1 "LicenseKey=$3$\r$\n" + FileWrite $1 "LicenseKeyExt=$LICENSE_KEY$\r$\n" + FileClose $1 + + done: + pop $6 + pop $5 + pop $4 + pop $3 + pop $2 + pop $1 + pop $0 + SectionEnd + + Function ModuleLicensePageEnter + push $0 + push $1 + !insertmacro MUI_HEADER_TEXT "$(LicensePageTitle)" "$(LicensePageDescription)" + + GetDlgItem $1 $HWNDPARENT 1 + EnableWindow $1 0 + !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_LICENSECHECK_PAGE}" "Field 4" "State" "0" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_LICENSECHECK_PAGE}" "Field 5" "State" "1" + + !insertmacro MUI_INSTALLOPTIONS_INITDIALOG ${MODULE_LICENSECHECK_PAGE} + FindWindow $0 "#32770" "" $HWNDPARENT + GetDlgItem $1 $0 1200 + SetCtlColors $1 0x000000 0xFFFFFF + qtnsisext::ShowLicenseFile "$1" "$LICENSE_FILE" + !insertmacro MUI_INSTALLOPTIONS_SHOW + + pop $1 + pop $0 + FunctionEnd + + Function ModuleLicensePageExit + push $0 + push $1 + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_LICENSECHECK_PAGE}" "Settings" "State" + strcmp "$0" "4" +2 + strcmp "$0" "5" 0 NoNotify + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_LICENSECHECK_PAGE}" "Field 4" "State" + GetDlgItem $1 $HWNDPARENT 1 + strcmp "$0" "1" +3 + EnableWindow $1 0 + goto +2 + EnableWindow $1 1 + pop $1 + pop $0 + abort + NoNotify: + + pop $1 + pop $0 + call CheckLocalLicenseProduct + FunctionEnd + + Function CheckQtLicense + !insertmacro MUI_HEADER_TEXT "$(LicenseTitle)" "$(LicenseTitleDescription)" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY ${TT_QTKEY_INI_FILE} + FunctionEnd + + Function CopyKeyAndValidate + IfSilent +3 0 + !insertmacro MUI_INSTALLOPTIONS_READ $LICENSEE "${TT_QTKEY_INI_FILE}" "Field 2" "State" + !insertmacro MUI_INSTALLOPTIONS_READ $LICENSE_KEY "${TT_QTKEY_INI_FILE}" "Field 3" "State" + + call ValidateKey + FunctionEnd +!macroend + +Function ValidateKey + push $1 + push $2 + + StrLen $1 $LICENSEE + IntCmp $1 0 wrongLicensee + + ClearErrors + !ifdef MODULE_LICENSECHECK_WINCE + qtnsisext::IsValidWinCELicense $LICENSE_KEY + !else + qtnsisext::IsValidLicense $LICENSE_KEY + !endif + IfErrors wrongKey + pop $1 + strcmp $1 "0" wrongKey + + !ifdef MODULE_LICENSECHECK_CHECKPRODUCT + qtnsisext::HasLicenseProduct $LICENSE_KEY "${MODULE_LICENSECHECK_CHECKPRODUCT}" + pop $1 + strcmp $1 "0" wrongProduct + !endif + + qtnsisext::GetLicenseProduct $LICENSE_KEY + pop $LICENSE_PRODUCT + + qtnsisext::GetLicensePlatform $LICENSE_KEY + pop $LICENSE_PLATFORM + + !ifdef MODULE_LICENSECHECK_PRODUCTLIST + push "$LICENSE_PRODUCT" + push "${MODULE_LICENSECHECK_PRODUCTLIST}" + call ItemInList + pop $1 + strcmp $1 "0" wrongKey + !endif + + strcmp "$LICENSE_PRODUCT" "SupportedEvaluation" 0 +2 + strcpy $LICENSE_PRODUCT "Evaluation" + strcmp "$LICENSE_PRODUCT" "UnsupportedEvaluation" 0 +2 + strcpy $LICENSE_PRODUCT "Evaluation" + strcmp "$LICENSE_PRODUCT" "FullSourceEvaluation" 0 +2 + strcpy $LICENSE_PRODUCT "Evaluation" + + !ifdef MODULE_LICENSECHECK_PACKAGEDATE + strcmp "$LICENSE_PRODUCT" "Evaluation" expiryDateCurrent expiryDatePackage + expiryDateCurrent: + qtnsisext::IsValidDate $LICENSE_KEY "" + pop $1 + strcmp $1 "0" keyExpired + goto expiryDateEnd + expiryDatePackage: + qtnsisext::IsValidDate $LICENSE_KEY "${MODULE_LICENSECHECK_PACKAGEDATE}" + pop $1 + strcmp $1 "0" keyExpired + expiryDateEnd: + !endif + + !ifndef MODULE_LICENSECHECK_LICENSE + ${StrCase} $2 "-$LICENSE_PRODUCT" "U" + strcmp $2 "-UNIVERSAL" 0 +2 + strcpy $2 "-DESKTOP" + strcmp $2 "-DESKTOP" 0 +2 + strcpy $2 "-DESKTOP" + strcmp $2 "-DESKTOPLIGHT" 0 +2 + strcpy $2 "-DESKTOP" + strcpy $LICENSE_FILE "$PLUGINSDIR\.LICENSE$2" + ${If} $LICENSE_PRODUCT != "Evaluation" + ${If} $LICENSE_PLATFORM == "AllOS" + strcpy $LICENSE_FILE "$PLUGINSDIR\.LICENSE-ALLOS" + ${Else} + ${If} $LICENSE_PLATFORM == "Embedded" + strcpy $LICENSE_FILE "$PLUGINSDIR\.LICENSE-EMBEDDED" + ${EndIf} + ${EndIf} + ${EndIf} + !else + strcpy $LICENSE_FILE "$PLUGINSDIR\${MODULE_LICENSECHECK_LICENSE}" + !endif + + ; In case there is a .LICENSE we assume that we have a custom package + ; custom means alpha,beta,rc or such. We still check for a valid + ; license key but display the license provided in that file. + ${If} ${FileExists} "$PLUGINSDIR\.LICENSE" + strcpy $LICENSE_FILE "$PLUGINSDIR\.LICENSE" + ${EndIf} + + qtnsisext::UsesUsLicense $LICENSE_KEY + pop $2 + strcmp "$2" "0" licenseFileCheck + + !ifdef MODULE_LICENSECHECK_USLICENSE + strcpy $LICENSE_FILE "$PLUGINSDIR\${MODULE_LICENSECHECK_USLICENSE}" + !else + strcpy $LICENSE_FILE "$LICENSE_FILE-US" + !endif + + licenseFileCheck: + IfFileExists $LICENSE_FILE 0 wrongLicenseFile + + goto end + wrongLicensee: + IfSilent 0 +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "The licensee name is not valid!" + Quit + MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "The licensee name is not valid. Do you want to try again?" IDRETRY tryAgain 0 + Quit + wrongKey: + IfSilent 0 +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "The specified license key is not valid!" + Quit + MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "The license key you entered is not valid. Do you want to try again?" IDRETRY tryAgain 0 + Quit + keyExpired: + IfSilent 0 +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "The specified license key has expired!" + Quit + MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "The license key you entered has expired. Do you want to try again?" IDRETRY tryAgain 0 + Quit + wrongProduct: + IfSilent 0 +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "The license key you specified does not include ${MODULE_LICENSECHECK_CHECKPRODUCT}!" + Quit + MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "The license key you entered does not include ${MODULE_LICENSECHECK_CHECKPRODUCT}. Do you want to try again?" IDRETRY tryAgain 0 + Quit + wrongLicenseFile: + IfSilent 0 +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "No license agreement file found. Please contact support." + Quit + MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "No license agreement file found. Please contact support." IDRETRY tryAgain 0 + Quit + tryAgain: + pop $2 + pop $1 + Abort + end: + pop $2 + pop $1 +FunctionEnd + + +!macro LICENSECHECK_STARTUP + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${TT_QTKEY_INI_FILE}" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_LICENSECHECK_PAGE}" + + SetOutPath "$PLUGINSDIR" + !ifndef MODULE_LICENSECHECK_LICENSE + File "${MODULE_LICENSECHECK_LICENSEDIR}\.LICENSE*" + !else + File "${MODULE_LICENSECHECK_LICENSEDIR}\${MODULE_LICENSECHECK_LICENSE}" + !ifdef MODULE_LICENSECHECK_USLICENSE + File "${MODULE_LICENSECHECK_LICENSEDIR}\${MODULE_LICENSECHECK_USLICENSE}" + !endif + !endif + + push $0 + push $1 + push $2 + push $3 + push $4 + push $5 + + qtnsisext::GetLicenseInfo + pop $5 ; ExpiryDate + pop $4 ; Products + pop $3 ; CustomerID + pop $1 ; Licensee + pop $2 ; OldLicenseKey + pop $0 ; License Key + + strcmp $LICENSEE "" +2 + strcpy $1 $LICENSEE + + strcmp $LICENSE_KEY "" +2 + strcpy $0 $LICENSE_KEY + + !insertmacro MUI_INSTALLOPTIONS_WRITE "${TT_QTKEY_INI_FILE}" "Field 2" "State" "$1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${TT_QTKEY_INI_FILE}" "Field 3" "State" "$0" + IfSilent 0 +4 + strcpy $LICENSEE "$1" + strcpy $LICENSE_KEY "$0" + call ValidateKey + + pop $5 + pop $4 + pop $3 + pop $2 + pop $1 + pop $0 +!macroend + +!macro LICENSECHECK_FINISH +!macroend +!macro LICENSECHECK_UNSTARTUP +!macroend +!macro LICENSECHECK_UNINSTALL +!macroend +!macro LICENSECHECK_UNFINISH +!macroend +!else ;MODULE_LICENSECHECK +!macro LICENSECHECK_INITIALIZE + !ifdef LICENSE_FILE + !define MUI_LICENSEPAGE_RADIOBUTTONS + !insertmacro MUI_PAGE_LICENSE ${LICENSE_FILE} + !endif +!macroend +!macro LICENSECHECK_SECTIONS +!macroend +!macro LICENSECHECK_STARTUP +!macroend +!macro LICENSECHECK_FINISH +!macroend +!macro LICENSECHECK_UNSTARTUP +!macroend +!macro LICENSECHECK_UNINSTALL +!macroend +!macro LICENSECHECK_UNFINISH +!macroend +!endif ;MODULE_LICENSECHECK diff --git a/util/scripts/win-binary/nsis/modules/mingw.nsh b/util/scripts/win-binary/nsis/modules/mingw.nsh new file mode 100644 index 0000000..9d19e8d --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/mingw.nsh @@ -0,0 +1,629 @@ +!ifdef MODULE_MINGW +!macro MINGW_INITIALIZE +!include "includes\qtcommon.nsh" +!ifndef MODULE_MINGW_NAME + !define MODULE_MINGW_NAME "Qt" +!endif +!ifndef MODULE_MINGW_VERSION + !define MODULE_MINGW_VERSION "${PRODUCT_VERSION}" +!endif +!ifndef MODULE_MINGW_BUILDDIR + !error "MODULE_MINGW_BUILDDIR not defined!" +!endif +!ifndef MODULE_MINGW_URL + !define MODULE_MINGW_URL "ftp://ftp.trolltech.com/misc" +!endif +!ifndef MODULE_MINGW_COMPILERVERSION + !define MODULE_MINGW_COMPILERVERSION "3.4.2" +!endif +!ifndef MODULE_MINGW_LICENSE + !define MODULE_MINGW_LICENSE "C:\MinGW\COPYING" +!endif + +!define MODULE_MINGW_DOWNLOADPAGE "gwdownload.ini" +!define MODULE_MINGW_MIRRORPAGE "gwmirror.ini" +!define MODULE_MINGW_RUNTIME_LIB "mingw*.dll" +!define MODULE_MINGW_DOWNLOADFILE "MinGW-${MODULE_MINGW_COMPILERVERSION}" + +var MODULE_MINGW_DOWNLOAD +var MODULE_MINGW_SOURCEDOWNLOAD +var MODULE_MINGW_MIRRORS +var MODULE_MINGW_INSTOK +var MODULE_MINGW_COMPILERINSTDIR + +LangString ModuleMinGWTitle ${LANG_ENGLISH} "MinGW Installation" +LangString ModuleMinGWDescription ${LANG_ENGLISH} "You need MinGW to be able to compile Qt applications." +LangString ModuleMinGWMirrorTitle ${LANG_ENGLISH} "MinGW Download Mirror" +LangString ModuleMinGWMirrorDescription ${LANG_ENGLISH} "Select a download mirror." + +Page custom ModuleMinGWDownloadPageEnter ModuleMinGWDownloadPageExit +!define MUI_PAGE_CUSTOMFUNCTION_PRE ModuleMinGWLicensePageEnter +!define MUI_PAGE_HEADER_TEXT "MinGW License Agreement" +!define MUI_PAGE_HEADER_SUBTEXT "Please review the license terms before installing MinGW." +!define MUI_LICENSEPAGE_TEXT_TOP "MinGW License Information" +!insertmacro MUI_PAGE_LICENSE "${MODULE_MINGW_LICENSE}" +Page custom ModuleMinGWMirrorPageEnter ModuleMinGWMirrorPageExit + +!include "includes\qtenv.nsh" +!macroend + +!macro MINGW_SECTIONS +Section "${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION}" MINGW_SEC01 + strcmp "$MINGW_INSTDIR" "" 0 +5 + StrCpy $MINGW_INSTDIR "$INSTDIR\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION}" + push $MINGW_INSTDIR + call MakeQtDirectory + pop $MINGW_INSTDIR + + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" 1 + + SetOutPath "$MINGW_INSTDIR" + SetOverwrite ifnewer + !insertmacro MODULE_MINGW_INSTALLFILES + + push "$MINGW_INSTDIR" + call DeleteFloatingLicenseProgram + + push "$MINGW_INSTDIR\bin" + call AddStartmenuApplication + + push ${MODULE_MINGW_BUILDDIR} + push "$MINGW_INSTDIR" + call PatchPrlFiles + + IfFileExists "$MINGW_INSTDIR\.qmake.cache" 0 +5 + push "$MINGW_INSTDIR\.qmake.cache" + push ${MODULE_MINGW_BUILDDIR} + push $MINGW_INSTDIR + call PatchPath + + IfFileExists "$MINGW_INSTDIR\mkspecs\default\qmake.conf" 0 +5 + push "$MINGW_INSTDIR\mkspecs\default\qmake.conf" + push ${MODULE_MINGW_BUILDDIR} + push $MINGW_INSTDIR + call PatchPath + + Push "bin" + push $MINGW_INSTDIR + call PatchCommonBinaryFiles + + push $MINGW_INSTDIR + call PatchLicenseInformation + + WriteRegStr SHCTX "SOFTWARE\Trolltech\Common\${MODULE_MINGW_VERSION}\$LICENSE_PRODUCT" "Key" "$LICENSE_KEY" + + push $MINGW_INSTDIR + call ModuleMinGWMakeEnvFile + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} Command Prompt.lnk" "%COMSPEC%" "/k $\"$MINGW_INSTDIR\bin\qtvars.bat$\"" + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} (Build Debug Libraries).lnk" "%COMSPEC%" "/k $\"$MINGW_INSTDIR\bin\qtvars.bat compile_debug$\"" + + push $0 + strcmp $MODULE_MINGW_DOWNLOAD "no" DoneMinGWInstall + DetailPrint "Installing MinGW into $MODULE_MINGW_COMPILERINSTDIR" + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWInstDir" "$MODULE_MINGW_COMPILERINSTDIR" + nsExec::ExecToLog '"$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.exe" /S /D=$MODULE_MINGW_COMPILERINSTDIR' + pop $0 + strcmp $MODULE_MINGW_SOURCEDOWNLOAD "no" DoneMinGWInstall + DetailPrint "Installing MinGW sources into $MODULE_MINGW_COMPILERINSTDIR\src" + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWSources" 1 + nsExec::ExecToLog '"$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}-src.exe" /S /D=$MODULE_MINGW_COMPILERINSTDIR\src' + pop $0 + DoneMinGWInstall: + pop $0 + + DetailPrint "Copying MinGW runtime..." + SetDetailsPrint none + CopyFiles /SILENT "$MODULE_MINGW_COMPILERINSTDIR\bin\${MODULE_MINGW_RUNTIME_LIB}" "$MINGW_INSTDIR\bin" + SetDetailsPrint both +SectionEnd + +Function EnableButtons + Push $0 + GetDlgItem $0 $HWNDPARENT 3 + EnableWindow $0 1 + GetDlgItem $0 $HWNDPARENT 1 + EnableWindow $0 1 + GetDlgItem $0 $HWNDPARENT 2 + EnableWindow $0 1 + Pop $0 +FunctionEnd + +Function DisableButtons + Push $0 + GetDlgItem $0 $HWNDPARENT 3 + EnableWindow $0 0 + GetDlgItem $0 $HWNDPARENT 1 + EnableWindow $0 0 + GetDlgItem $0 $HWNDPARENT 2 + EnableWindow $0 0 + Pop $0 +FunctionEnd + +Function ModuleMinGWDownloadPageEnter + strcmp $MODULE_MINGW_INSTOK "yes" 0 +2 + Abort + + !insertmacro MUI_HEADER_TEXT "$(ModuleMinGWTitle)" "$(ModuleMinGWTitleDescription)" + Call UpdateCtrlStates + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_MINGW_DOWNLOADPAGE}" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_MINGW_DOWNLOADPAGE}" "Field 8" "State" "0" +FunctionEnd + +Function ModuleMinGWMirrorPageEnter + strcmp $MODULE_MINGW_DOWNLOAD "yes" +2 + Abort + + !insertmacro MUI_HEADER_TEXT "$(ModuleMinGWMirrorTitle)" "$(ModuleMinGWMirrorDescription)" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_MINGW_MIRRORPAGE}" +FunctionEnd + +Function ModuleMinGWLicensePageEnter + strcmp $MODULE_MINGW_DOWNLOAD "yes" +2 + Abort +FunctionEnd + +Function UpdateCtrlStates + push $0 + push $1 + push $2 + + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 8" "State" + intop $0 $0 ! + FindWindow $2 "#32770" "" $HWNDPARENT + GetDlgItem $1 $2 1205 + EnableWindow $1 $0 + GetDlgItem $1 $2 1202 + EnableWindow $1 $0 + GetDlgItem $1 $2 1203 + EnableWindow $1 $0 + + intop $0 $0 ! + GetDlgItem $1 $2 1206 + EnableWindow $1 $0 + GetDlgItem $1 $2 1207 + EnableWindow $1 $0 + GetDlgItem $1 $2 1208 + EnableWindow $1 $0 + + GetDlgItem $1 $HWNDPARENT 1 + IntCmp $0 0 +3 + SendMessage $1 ${WM_SETTEXT} 0 "STR:Next >" + Goto +2 + SendMessage $1 ${WM_SETTEXT} 0 "STR:Install" + + pop $2 + pop $1 + pop $0 +FunctionEnd + +Function ModuleMinGWDownloadPageExit + push $0 + push $1 + + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Settings" "State" + strcmp "$0" "8" 0 NoNotify + Call UpdateCtrlStates + abort + NoNotify: + + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 8" "State" + strcmp "$0" "0" noDownload doDownload + +doDownload: + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 6" "State" + strcmp $0 "" 0 +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "You need to specify an installation directory!" + goto tryAgain + + strcpy $MODULE_MINGW_COMPILERINSTDIR $0 + strcpy $MODULE_MINGW_DOWNLOAD "yes" + CreateDirectory "$MINGW_INSTDIR\downloads" + + Call DisableButtons + InetLoad::load /BANNER "Mirror Download" "Downloading mirrors from server..." "${MODULE_MINGW_URL}/${MODULE_MINGW_DOWNLOADFILE}.mirrors" "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" /END + Pop $1 ;Get the return value + Call EnableButtons + + StrCmp $1 "OK" +3 + MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "Was not able to download mirror list ($1)." IDRETRY tryAgain 0 + Quit + + call ModuleMinGWReadMirrors + !insertmacro MUI_INSTALLOPTIONS_WRITE ${MODULE_MINGW_MIRRORPAGE} "Field 3" "ListItems" "$MODULE_MINGW_MIRRORS" + goto done + +noDownload: + strcpy $MODULE_MINGW_DOWNLOAD "no" + strcpy $MODULE_MINGW_SOURCEDOWNLOAD "no" + call ModuleMinGWChecking + strcmp $MODULE_MINGW_INSTOK "yes" done + MessageBox MB_ICONEXCLAMATION|MB_YESNO "There is a problem with your MinGW installation:$\r$\n$MODULE_MINGW_INSTOK$\r$\nDo you still want to continue? (Your installation may not work)" IDNO tryAgain + goto done + +tryAgain: + pop $1 + pop $0 + Abort + +done: + pop $1 + pop $0 +FunctionEnd + +Function ModuleMinGWMirrorPageExit + push $0 + push $2 + push $1 + + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_MIRRORPAGE}" "Field 3" "State" + strcmp "$0" "" 0 +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "You must select a mirror to download from!" + goto tryAgain + + push $0 + call ModuleMinGWGetMirror + pop $0 + + Call DisableButtons + InetLoad::load /BANNER "MinGW Download" "Downloading MinGW from server..." "$0/${MODULE_MINGW_DOWNLOADFILE}.exe" "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.exe" /END + Pop $2 ;get the return value + Call EnableButtons + + StrCmp $2 "OK" +3 + MessageBox MB_ICONEXCLAMATION|MB_OK "Was not able to download MinGW ($2). Please try another mirror." + Goto tryAgain + + !insertmacro MUI_INSTALLOPTIONS_READ $1 "${MODULE_MINGW_MIRRORPAGE}" "Field 2" "State" + strcmp "$1" "0" done + + Call DisableButtons + InetLoad::load /BANNER "MinGW Sources Download" "Downloading MinGW Sources from server..." "$0/${MODULE_MINGW_DOWNLOADFILE}-src.exe" "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}-src.exe" /END + Pop $2 + Call EnableButtons + + strcpy $MODULE_MINGW_SOURCEDOWNLOAD "yes" + + StrCmp $2 "OK" +3 + MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL "Was not able to download MinGW sources ($2). Please try another mirror?" IDRETRY tryAgain 0 + Quit + + goto done + +tryAgain: + pop $1 + pop $2 + pop $0 + Abort + +done: + pop $1 + pop $2 + pop $0 +FunctionEnd + +Function ModuleMinGWReadMirrors + push $0 ;file handle + push $1 ;line + + ClearErrors + FileOpen $0 "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" r + IfErrors done + + strcpy $MODULE_MINGW_MIRRORS "" + +nextline: + FileRead $0 $1 + IfErrors done + push $1 + call ModuleMinGWRemoveNewLine + pop $1 + strcpy $MODULE_MINGW_MIRRORS "$MODULE_MINGW_MIRRORS|$1" + FileRead $0 $1 ;Jump over next line + IfErrors done + goto nextline + +done: + FileClose $0 + strlen $1 $MODULE_MINGW_MIRRORS + intcmp $1 0 failed failed cleanup + +failed: + MessageBox MB_ICONSTOP|MB_OK "Unable to parse mirror list, exiting!" + Quit + +cleanup: + pop $1 + pop $0 +FunctionEnd + +#this just removes the last two chars +Function ModuleMinGWRemoveNewLine +exch $0 +push $1 +push $2 + +strlen $1 $0 +intop $1 $1 - 1 +strcpy $2 $0 1 $1 ;get last char + +strcmp "$2" "$\n" 0 +2 +intop $1 $1 - 1 + +strcpy $2 $0 1 $1 ;get last char +strcmp "$2" "$\r" 0 +2 +intop $1 $1 - 1 + +intop $1 $1 + 1 +strcpy $0 $0 $1 + +pop $2 +pop $1 +exch $0 +FunctionEnd + +#push serverid +#call GetMirror +#pop server +Function ModuleMinGWGetMirror + exch $1 ;id + push $0 ;file handle + push $2 ;line + push $3 ;tmp + + strcpy $3 "" + + ClearErrors + FileOpen $0 "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" r + IfErrors done + +nextline: + FileRead $0 $2 + IfErrors done + push $2 + call ModuleMinGWRemoveNewLine + pop $2 + strcmp $1 $2 0 nextline + FileRead $0 $3 + IfErrors done + push $3 + call ModuleMinGWRemoveNewLine + pop $3 + +done: + strcpy $1 $3 + FileClose $0 + strlen $2 $1 + intcmp $2 0 failed failed cleanup + +failed: + MessageBox MB_ICONSTOP|MB_OK "Unable to parse mirror list, exiting!" + Quit + +cleanup: + pop $3 + pop $2 + pop $0 + exch $1 +FunctionEnd + +Function ModuleMinGWChecking + push $0 + + ### update with plugin + strcpy $MODULE_MINGW_INSTOK "yes" + strcpy $MODULE_MINGW_COMPILERINSTDIR "C:\MinGW" ;fallback dir + + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_MINGW_DOWNLOADPAGE}" "Field 3" "State" + strcmp "$0" "" +2 + strcpy $MODULE_MINGW_COMPILERINSTDIR $0 + + IfFileExists "$MODULE_MINGW_COMPILERINSTDIR\bin\g++.exe" +3 0 + strcpy $MODULE_MINGW_INSTOK "g++ not found in $MODULE_MINGW_COMPILERINSTDIR\bin\" + goto DoneChecking + + ; check w32api.h + push $MODULE_MINGW_COMPILERINSTDIR + qtnsisext::HasValidWin32Library + pop $0 + strcmp "$0" "1" +3 0 + strcpy $MODULE_MINGW_INSTOK "The installer could not find a valid $MODULE_MINGW_COMPILERINSTDIR\include\w32api.h$\r$\n(The supported version is 3.2)" + goto DoneChecking + + ; check version + push $MODULE_MINGW_COMPILERINSTDIR + qtnsisext::GetMinGWVersion + pop $0 + strcmp "$0" "${MODULE_MINGW_COMPILERVERSION}" +3 0 + strcpy $MODULE_MINGW_INSTOK "g++ version found does not match ${MODULE_MINGW_COMPILERVERSION} (Found version $0)." + goto DoneChecking + +DoneChecking: + pop $0 +FunctionEnd + +# +# creates a qtvars.bat file in $QTDIR\bin +# push "c:\qt" #QTDIR +# call ModuleMinGWMakeEnvFile +# +Function ModuleMinGWMakeEnvFile + push $0 ; file handle + + ClearErrors + FileOpen $0 "$MINGW_INSTDIR\bin\qtvars.bat" w + IfErrors WriteMakeFile + FileWrite $0 "@echo off$\r$\n" + FileWrite $0 "rem$\r$\n" + FileWrite $0 "rem This file is generated$\r$\n" + FileWrite $0 "rem$\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "echo Setting up a MinGW/Qt only environment...$\r$\n" + FileWrite $0 "echo -- QTDIR set to $MINGW_INSTDIR$\r$\n" + FileWrite $0 "echo -- PATH set to $MINGW_INSTDIR\bin$\r$\n" + FileWrite $0 "echo -- Adding $MODULE_MINGW_COMPILERINSTDIR\bin to PATH$\r$\n" + FileWrite $0 "echo -- Adding %SystemRoot%\System32 to PATH$\r$\n" + FileWrite $0 "echo -- QMAKESPEC set to win32-g++$\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "set QTDIR=$MINGW_INSTDIR$\r$\n" + FileWrite $0 "set PATH=$MINGW_INSTDIR\bin$\r$\n" + FileWrite $0 "set PATH=%PATH%;$MODULE_MINGW_COMPILERINSTDIR\bin$\r$\n" + FileWrite $0 "set PATH=%PATH%;%SystemRoot%\System32$\r$\n" + FileWrite $0 "set QMAKESPEC=win32-g++$\r$\n" + FileWrite $0 "$\r$\n" + + FileWrite $0 'if not "%1"=="compile_debug" goto END$\r$\n' + FileWrite $0 "cd %QTDIR%$\r$\n" + FileWrite $0 "echo This will configure and compile qt in debug.$\r$\n" + FileWrite $0 "echo The release libraries will not be recompiled.$\r$\n" + FileWrite $0 "pause$\r$\n" + FileWrite $0 "configure -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg$\r$\n" + FileWrite $0 "cd %QTDIR%\src$\r$\n" + FileWrite $0 "qmake$\r$\n" + FileWrite $0 "mingw32-make debug$\r$\n" + FileWrite $0 ":END$\r$\n" + FileClose $0 + +WriteMakeFile: + ClearErrors + FileOpen $0 "$MINGW_INSTDIR\bin\make.bat" w + IfErrors done + FileWrite $0 "@echo off$\r$\n" + FileWrite $0 "mingw32-make %*$\r$\n" + FileClose $0 + +done: +; pop $1 + pop $0 +FunctionEnd + +Function MINGW_ValidateDirectoryFunc + push "${MODULE_MINGW_BUILDDIR}" + push $MINGW_INSTDIR + call CommonCheckDirectory +FunctionEnd +!macroend + +!macro MINGW_DESCRIPTION + !insertmacro MUI_DESCRIPTION_TEXT ${MINGW_SEC01} "This installs ${MODULE_MINGW_NAME} version ${MODULE_MINGW_VERSION} on your system." +!macroend + +!macro MINGW_STARTUP + !ifndef MODULE_MINGW_NODEFAULT + SectionSetFlags ${MINGW_SEC01} 17 + !endif + strcpy $MINGW_INSTDIR "C:\Qt\${MODULE_MINGW_VERSION}" + push $MINGW_INSTDIR + call MakeQtDirectory + pop $MINGW_INSTDIR + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_MINGW_DOWNLOADPAGE}" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_MINGW_MIRRORPAGE}" + + !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_MINGW_DOWNLOADPAGE}" "Field 3" "State" "C:\MinGW" + !insertmacro MUI_INSTALLOPTIONS_WRITE "${MODULE_MINGW_DOWNLOADPAGE}" "Field 6" "State" "C:\MinGW" + + strcpy $MODULE_MINGW_DOWNLOAD "no" + strcpy $MODULE_MINGW_SOURCEDOWNLOAD "no" +!macroend + +!macro MINGW_FINISH +!macroend + +!macro MINGW_RUN_FUNCTION + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" + intcmp $0 1 0 DoneRunFunctionMINGW + + IfFileExists "$MINGW_INSTDIR\bin\qtdemo.exe" 0 +2 + Exec '$MINGW_INSTDIR\bin\qtdemo.exe' + goto DoneRunFunction ;don't run more applications + + DoneRunFunctionMINGW: +!macroend + +!macro MINGW_README_FUNCTION + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" + intcmp $0 1 0 DoneReadmeFunctionMINGW + + IfFileExists "$MINGW_INSTDIR\bin\assistant.exe" 0 +2 + Exec '$MINGW_INSTDIR\bin\assistant.exe' + goto DoneReadmeFunction ;don't run more applications + + DoneReadmeFunctionMINGW: +!macroend + +!macro MINGW_UNSTARTUP + strcmp "$MINGW_INSTDIR" "" 0 +5 + StrCpy $MINGW_INSTDIR "$INSTDIR\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION}" + push $MINGW_INSTDIR + call un.MakeQtDirectory + pop $MINGW_INSTDIR + + !insertmacro ConfirmOnRemove "MINGWInstalled" "- ${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} in $MINGW_INSTDIR" +!macroend + +!macro MINGW_UNINSTALL +Section un.ModuleMinGW + push $0 + push $1 + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MINGWInstalled" + intcmp $0 1 0 DoneUnInstallMINGW + + Delete "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.mirrors" + + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWSources" + strcmp $0 "" MinGWSourcesUninstallDone ;not installed + Delete "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}-src.exe" + nsExec::ExecToLog '"$0\src\uninst.exe"' + pop $1 + MinGWSourcesUninstallDone: + + ReadRegStr $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MinGWInstDir" + strcmp $0 "" MinGWUninstallDone ;not installed + Delete "$MINGW_INSTDIR\downloads\${MODULE_MINGW_DOWNLOADFILE}.exe" + nsExec::ExecToLog '"$0\uninst.exe"' + pop $1 + MinGWUninstallDone: + + DetailPrint "Removing start menu shortcuts" + call un.RemoveStartmenuApplication + Delete "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} Command Prompt.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION} (Build Debug Libraries).lnk" + + Delete "$MINGW_INSTDIR\bin\${MODULE_MINGW_RUNTIME_LIB}" + Delete "$MINGW_INSTDIR\bin\make.bat" + Delete "$MINGW_INSTDIR\bin\qtvars.bat" + + !insertmacro MODULE_MINGW_REMOVE "$MINGW_INSTDIR" + RMDir $MINGW_INSTDIR ;removes it if empty + + DoneUnInstallMINGW: + pop $1 + pop $0 +SectionEnd +!macroend +!macro MINGW_UNFINISH +!macroend +!else ;MODULE_MINGW +!macro MINGW_INITIALIZE +!macroend +!macro MINGW_SECTIONS +!macroend +!macro MINGW_DESCRIPTION +!macroend +!macro MINGW_STARTUP +!macroend +!macro MINGW_FINISH +!macroend +!macro MINGW_RUN_FUNCTION +!macroend +!macro MINGW_README_FUNCTION +!macroend +!macro MINGW_UNSTARTUP +!macroend +!macro MINGW_UNINSTALL +!macroend +!macro MINGW_UNFINISH +!macroend +!endif ;MODULE_MINGW + diff --git a/util/scripts/win-binary/nsis/modules/msvc.nsh b/util/scripts/win-binary/nsis/modules/msvc.nsh new file mode 100644 index 0000000..5c52ec4 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/msvc.nsh @@ -0,0 +1,439 @@ +!ifdef MODULE_MSVC + +!include "includes\system.nsh" + +!macro MSVC_INITIALIZE +!include "includes\qtcommon.nsh" +!ifndef MODULE_MSVC_NAME + !define MODULE_MSVC_NAME "Qt" +!endif +!ifndef MODULE_MSVC_VERSION + !define MODULE_MSVC_VERSION "${PRODUCT_VERSION}" +!endif +!ifndef MODULE_MSVC_BUILDDIR + !error "MODULE_MSVC_BUILDDIR not defined!" +!endif +var MSVC_QtDesktopInstallBuildTree +!include "includes\qtenv.nsh" +!macroend + +!macro MSVC_PATCH_QT_INSTALLATION QtBuildTree QtInstallBuildTree QtSourceTree QtInstallSourceTree DLLPDBDirName + Push "${QtInstallBuildTree}" + Call DeleteFloatingLicenseProgram + + Push "${QtInstallBuildTree}\bin" + Call AddStartmenuApplication + + Push "${QtBuildTree}" + Push "${QtInstallBuildTree}" + Call PatchPrlFiles + + ${If} ${FileExists} "${QtInstallBuildTree}\.qmake.cache" + Push "${QtInstallBuildTree}\.qmake.cache" + Push "${QtBuildTree}" + Push "${QtInstallBuildTree}" + Call PatchPath + ${If} "${QtInstallBuildTree}" != "${QtInstallSourceTree}" + Push "${QtInstallBuildTree}\.qmake.cache" + Push "${QtSourceTree}" + Push "${QtInstallSourceTree}" + Call PatchPath + ${EndIf} + ${EndIf} + + ${If} ${FileExists} "${QtInstallBuildTree}\mkspecs\default\qmake.conf" + Push "${QtInstallBuildTree}\mkspecs\default\qmake.conf" + Push "${QtSourceTree}" + Push "${QtInstallSourceTree}" + Call PatchPath + ${EndIf} + + Push "${DLLPDBDirName}" + Push "${QtInstallBuildTree}" + Call PatchCommonBinaryFiles + +!ifndef MODULE_MSVC_SKIPPATCHLICENSEINFORMATION + Push "${QtInstallBuildTree}" + Call PatchLicenseInformation +!endif + + Push "${DLLPDBDirName}" + Push "${QtBuildTree}" + Push "${QtInstallBuildTree}" + Call PatchMSVCBinaryFiles + ${If} "${QtInstallBuildTree}" != "${QtInstallSourceTree}" + Push "${DLLPDBDirName}" + Push "${QtSourceTree}" + Push "${QtInstallSourceTree}" + Call PatchMSVCBinaryFiles + ${EndIf} +!macroend ;MSVC_PATCH_QT_INSTALLATION + +!macro MSVC_POST_WIN32_INSTALLFILES QtBuildTree QtInstallBuildTree QtSourceTree QtInstallSourceTree VersionName + !insertmacro MSVC_PATCH_QT_INSTALLATION \ + "${QtBuildTree}" \ + "${QtInstallBuildTree}" \ + "${QtSourceTree}" \ + "${QtInstallSourceTree}" \ + "bin" + + Push "${VersionName}" + Push "${QtInstallBuildTree}" + Call MSVC_AddQtVersionToRegistry + + Push "${INSTALL_COMPILER}" + Push "${QtInstallBuildTree}" + Push "" + Push "${VersionName}" + Call MSVC_CreateQtVarsBatAndShortcut + + StrCpy $MSVC_QtDesktopInstallBuildTree "${QtInstallBuildTree}" +!macroend ;MSVC_POST_WIN32_INSTALLFILES + +!macro MSVC_POST_WINCE_INSTALLFILES QtBuildTree QtInstallBuildTree QtSourceTree QtInstallSourceTree VersionName WinCESDK + !insertmacro MSVC_PATCH_QT_INSTALLATION \ + "${QtBuildTree}" \ + "${QtInstallBuildTree}" \ + "${QtSourceTree}" \ + "${QtInstallSourceTree}" \ + "lib" + + Push "${VersionName}" + Push "${QtInstallBuildTree}" + Call MSVC_AddQtVersionToRegistry + + Push "${INSTALL_COMPILER}ce" + Push "${QtInstallBuildTree}" + Push "${WinCESDK}" + Push "${VersionName}" + Call MSVC_CreateQtVarsBatAndShortcut +!macroend ;MSVC_POST_WINCE_INSTALLFILES + +!macro MSVC_PATCH_MSVC_BINARY_FILE BinaryFile QtBuildDir QtInstallDir + ${If} ${FileExists} "${BinaryFile}" + DetailPrint "Patching ${BinaryFile} (${QtInstallDir})..." +!ifdef MODULE_MSVC_VC60 + qtnsisext::PatchVC6Binary "${BinaryFile}" "${QtBuildDir}" "${QtInstallDir}" +!else + qtnsisext::PatchVC7Binary "${BinaryFile}" "${QtBuildDir}" "${QtInstallDir}" +!endif + ${EndIf} +!macroend + +!macro MSVC_SECTIONS +Section "${MODULE_MSVC_NAME} ${MODULE_MSVC_VERSION}" MSVC_SEC01 + ${If} "$MSVC_INSTDIR" == "" + StrCpy $MSVC_INSTDIR "$INSTDIR\${MODULE_MSVC_NAME} ${MODULE_MSVC_VERSION}" + Push $MSVC_INSTDIR + Call MakeQtDirectory + Pop $MSVC_INSTDIR + ${EndIf} + + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "MSVCInstalled" 1 + + SetOutPath "$MSVC_INSTDIR" + SetOverwrite ifnewer + !insertmacro MODULE_MSVC_INSTALLFILES + +!ifdef MODULE_MSVC_WIN32BUILDTREE & MODULE_MSVC_WIN32BUILDINSTALLDIRNAME & MODULE_MSVC_QTSOURCETREE & MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_WIN32_INSTALLFILES \ + "${MODULE_MSVC_WIN32BUILDTREE}" /* QtBuildTree */ \ + "$MSVC_INSTDIR\${MODULE_MSVC_WIN32BUILDINSTALLDIRNAME}" /* QtInstallBuildTree */ \ + "${MODULE_MSVC_QTSOURCETREE}" /* QtSourceTree */ \ + "$MSVC_INSTDIR\${MODULE_MSVC_QTSOURCEINSTALLDIRNAME}" /* QtInstallSourceTree */ \ + "${MODULE_MSVC_VERSION} Desktop" /* VersionName */ +!endif +!ifdef MODULE_MSVC_WM50BUILDTREE & MODULE_MSVC_WM50BUILDINSTALLDIRNAME & MODULE_MSVC_QTSOURCETREE & MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_WINCE_INSTALLFILES \ + "${MODULE_MSVC_WM50BUILDTREE}" /* QtBuildTree */ \ + "$MSVC_INSTDIR\${MODULE_MSVC_WM50BUILDINSTALLDIRNAME}" /* QtInstallBuildTree */ \ + "${MODULE_MSVC_QTSOURCETREE}" /* QtSourceTree */ \ + "$MSVC_INSTDIR\${MODULE_MSVC_QTSOURCEINSTALLDIRNAME}" /* QtInstallSourceTree */ \ + "${MODULE_MSVC_VERSION} ${MODULE_MSVC_WM50VERSIONPRETTY}" /* VersionName */ \ + ${MODULE_MSVC_WM50SDK} /* WinCESDK */ +!endif +!ifdef MODULE_MSVC_SSDK50X86BUILDTREE & MODULE_MSVC_SSDK50X86BUILDINSTALLDIRNAME & MODULE_MSVC_QTSOURCETREE & MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_WINCE_INSTALLFILES \ + "${MODULE_MSVC_SSDK50X86BUILDTREE}" /* QtBuildTree */ \ + "$MSVC_INSTDIR\${MODULE_MSVC_SSDK50X86BUILDINSTALLDIRNAME}" /* QtInstallBuildTree */ \ + "${MODULE_MSVC_QTSOURCETREE}" /* QtSourceTree */ \ + "$MSVC_INSTDIR\${MODULE_MSVC_QTSOURCEINSTALLDIRNAME}" /* QtInstallSourceTree */ \ + "${MODULE_MSVC_VERSION} ${MODULE_MSVC_SSDK50X86VERSIONPRETTY}" /* VersionName */ \ + ${MODULE_MSVC_SSDK50X86SDK} /* WinCESDK */ +!endif +!ifndef MODULE_MSVC_WIN32BUILDTREE | MODULE_MSVC_WM50BUILDTREE | MODULE_MSVC_QTSOURCETREE | MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_WIN32_INSTALLFILES \ + "${MODULE_MSVC_BUILDDIR}" /* QtBuildTree */ \ + "$MSVC_INSTDIR" /* QtInstallBuildTree */ \ + "${MODULE_MSVC_BUILDDIR}" /* QtSourceTree */ \ + "$MSVC_INSTDIR" /* QtInstallSourceTree */ \ + "${MODULE_MSVC_VERSION}" /* VersionName */ +!endif + +!ifdef MODULE_LICENSECHECK + WriteRegStr SHCTX "SOFTWARE\Trolltech\Common\${MODULE_MSVC_VERSION}\$LICENSE_PRODUCT" "Key" "$LICENSE_KEY" + call MSVC_UpdateExistingVsipLicenseKeys +!endif + +SectionEnd + +Function PatchMSVCBinaryFiles + Exch $0 ; Absolute path to where Qt is installed + Exch + Exch $1 ; Absolute path to where Qt was built + Exch + Exch 2 + Exch $2 ; Name of directory containing PDBs + Exch 2 + Push $3 ; FindFirst/FindNext handle + Push $4 ; Found .pdb file name + + FindFirst $3 $4 "$0\$2\*.pdb" + ${DoWhile} $4 != "" + !insertmacro MSVC_PATCH_MSVC_BINARY_FILE "$0\$2\$4" "$1" "$0" + FindNext $3 $4 + ${Loop} + + !insertmacro MSVC_PATCH_MSVC_BINARY_FILE "$0\lib\qtmaind.lib" "$1" "$0" + + Pop $4 + Pop $3 + Pop $0 + Pop $1 + Pop $2 +FunctionEnd + +Function MSVC_AddQtVersionToRegistry + Exch $0 ; VersionDir + Exch + Exch $1 ; VersionName + Exch + Push $2 + + WriteRegStr HKCU "${QT_VERSION_KEY_NAME}\$1\" "InstallDir" "$0" + ${If} "$RUNNING_AS_ADMIN" == true + WriteRegStr HKLM "${QT_VERSION_KEY_NAME}\$1\" "InstallDir" "$0" + ${EndIf} + + ReadRegStr $2 HKCU "${QT_VERSION_KEY_NAME}" "DefaultQtVersion" + ${If} $2 == "" + WriteRegStr HKCU "${QT_VERSION_KEY_NAME}" "DefaultQtVersion" "$1" + ${EndIf} + + Pop $2 + Pop $0 + Pop $1 +FunctionEnd ;MSVC_AddQtVersionToRegistry + +Function MSVC_CreateQtVarsBatAndShortcut + Exch $0 ; VersionName + Exch + Exch $1 ; WinCESDK + Exch + Exch 2 + Exch $2 ; QtBuildTree + Exch 2 + Exch 3 + Exch $3 ; Compiler + Exch 3 + Push $4 ; Found substring "command.com" + Push $5 ; Expanded %COMSPEC% + + ${If} ${FileExists} "$2\bin\qmake.exe" + !insertmacro MAKE_QTVARS_FILE "$3" "$2" "$1" + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\Visual Studio with ${MODULE_MSVC_NAME} $0.lnk" "$2\bin\qtvars.bat" "vsstart" + + ExpandEnvStrings $5 "%COMSPEC%" + ${StrStr} $4 "$5" "command.com" + ${If} "$4" == "" + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MSVC_NAME} $0 Command Prompt.lnk" "%COMSPEC%" "/k $\"$2\bin\qtvars.bat vsvars$\"" + ${Else} + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MSVC_NAME} $0 Command Prompt.lnk" "%COMSPEC%" "/e:4096 /k $\"$2\bin\qtvars.bat vsvars$\"" + ${EndIf} + ${EndIf} + + Pop $5 + Pop $4 + Pop $0 + Pop $1 + Pop $2 + Pop $3 +FunctionEnd ;MSVC_CreateQtVarsBatAndShortcut + +Function MSVC_ValidateDirectoryFunc + push "${MODULE_MSVC_BUILDDIR}" + push $MSVC_INSTDIR + call CommonCheckDirectory +FunctionEnd + +Function MSVC_UpdateExistingVsipLicenseKeys + Push $0 ; EnumRegKey loop index + Push $1 ; Reg key + Push $2 ; StrStr result + + StrCpy $0 0 + loop: + EnumRegKey $1 SHCTX SOFTWARE\Trolltech $0 + StrCmp $1 "" no_reg_key_found + ${StrStr} $2 $1 "Qt4VS" + StrCmp $2 $1 0 +1 + WriteRegStr SHCTX "SOFTWARE\Trolltech\$2" "LicenseKey" "$LICENSE_KEY" + IntOp $0 $0 + 1 + goto loop + no_reg_key_found: + + Pop $2 + Pop $1 + Pop $0 +FunctionEnd +!macroend + +!macro MSVC_DESCRIPTION + !insertmacro MUI_DESCRIPTION_TEXT ${MSVC_SEC01} "This installs ${MODULE_MSVC_NAME} version ${MODULE_MSVC_VERSION} on your system." +!macroend + +!macro MSVC_STARTUP + !ifdef MODULE_MSVC_VS2005 + Call IsVS2005SP1Installed + Pop $1 + ${If} $1 == 0 + MessageBox MB_OK|MB_ICONEXCLAMATION "Service Pack 1 for Visual Studio 2005 is not installed.$\n${PRODUCT_NAME} for VS 2005 will not work properly without it." + Abort + ${EndIf} + !endif + + !ifndef MODULE_MSVC_NODEFAULT + SectionSetFlags ${MSVC_SEC01} 17 + !endif + strcpy $MSVC_INSTDIR "C:\Qt\${MODULE_MSVC_VERSION}" + push $MSVC_INSTDIR + call MakeQtDirectory + pop $MSVC_INSTDIR +!macroend + +!macro MSVC_FINISH +!macroend + +!macro MSVC_RUN_FUNCTION + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MSVCInstalled" + ${If} $0 == 1 + ${If} ${FileExists} "$MSVC_QtDesktopInstallBuildTree\bin\qtdemo.exe" + Exec '$MSVC_QtDesktopInstallBuildTree\bin\qtdemo.exe' + ${EndIf} + Goto DoneRunFunction ;don't run more applications + ${EndIf} +!macroend + +!macro MSVC_README_FUNCTION + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MSVCInstalled" + ${If} $0 == 1 + ${If} ${FileExists} "$MSVC_QtDesktopInstallBuildTree\bin\assistant.exe" +!ifndef README_STARTPAGE + Exec "$MSVC_QtDesktopInstallBuildTree\bin\assistant.exe" +!else + Exec "$MSVC_QtDesktopInstallBuildTree\bin\assistant.exe -showurl $\"${README_STARTPAGE}$\"" +!endif + ${EndIf} + Goto DoneReadmeFunction ;don't run more applications + ${EndIf} +!macroend + +!macro MSVC_UNSTARTUP + ${If} "$MSVC_INSTDIR" == "" + StrCpy $MSVC_INSTDIR "$INSTDIR\${MODULE_MSVC_NAME} ${MODULE_MSVC_VERSION}" + Push $MSVC_INSTDIR + Call un.MakeQtDirectory + Pop $MSVC_INSTDIR + ${EndIf} + + !insertmacro ConfirmOnRemove "MSVCInstalled" "- ${MODULE_MSVC_NAME} ${MODULE_MSVC_VERSION} in $MSVC_INSTDIR" +!macroend + +!macro MSVC_POST_UNINSTALLFILES QtInstallBuildTree VersionName + Delete "$SMPROGRAMS\$STARTMENU_STRING\Visual Studio with ${MODULE_MSVC_NAME} ${VersionName}.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\${MODULE_MSVC_NAME} ${VersionName} Command Prompt.lnk" + Delete "${QtInstallBuildTree}\bin\qtvars.bat" + + Push "${VersionName}" + Push "${QtInstallBuildTree}" + Call un.MSVC_RemoveQtVersionFromRegistry +!macroend ;MSVC_POST_UNINSTALLFILES + +!macro MSVC_UNINSTALL +Section un."${MODULE_MSVC_NAME} ${MODULE_MSVC_VERSION}" + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "MSVCInstalled" + ${If} $0 == 1 + DetailPrint "Removing start menu shortcuts and registry entries" + Call un.RemoveStartmenuApplication +!ifdef MODULE_MSVC_WIN32BUILDTREE & MODULE_MSVC_WIN32BUILDINSTALLDIRNAME & MODULE_MSVC_QTSOURCETREE & MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_UNINSTALLFILES \ + "$MSVC_INSTDIR\${MODULE_MSVC_WIN32BUILDINSTALLDIRNAME}" \ + "${MODULE_MSVC_VERSION} Desktop" +!endif +!ifdef MODULE_MSVC_WM50BUILDTREE & MODULE_MSVC_WM50BUILDINSTALLDIRNAME & MODULE_MSVC_QTSOURCETREE & MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_UNINSTALLFILES \ + "$MSVC_INSTDIR\${MODULE_MSVC_WM50BUILDINSTALLDIRNAME}" \ + "${MODULE_MSVC_VERSION} ${MODULE_MSVC_WM50VERSIONPRETTY}" +!endif +!ifdef MODULE_MSVC_SSDK50X86BUILDTREE & MODULE_MSVC_SSDK50X86BUILDINSTALLDIRNAME & MODULE_MSVC_QTSOURCETREE & MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_UNINSTALLFILES \ + "$MSVC_INSTDIR\${MODULE_MSVC_SSDK50X86BUILDINSTALLDIRNAME}" \ + "${MODULE_MSVC_VERSION} ${MODULE_MSVC_SSDK50X86VERSIONPRETTY}" +!endif +!ifndef MODULE_MSVC_WIN32BUILDTREE | MODULE_MSVC_WM50BUILDTREE | MODULE_MSVC_QTSOURCETREE | MODULE_MSVC_QTSOURCEINSTALLDIRNAME + !insertmacro MSVC_POST_UNINSTALLFILES \ + "$MSVC_INSTDIR" \ + "${MODULE_MSVC_VERSION}" +!endif + !insertmacro MODULE_MSVC_REMOVE "$MSVC_INSTDIR" + RMDir $MSVC_INSTDIR ;removes it if empty + ${EndIf} +SectionEnd + +Function un.MSVC_RemoveQtVersionFromRegistry + Exch $0 ; QtInstallBuildTree + Exch + Exch $1 ; VersionName + Exch + Push $2 ; Temp + + ReadRegStr $2 HKCU "${QT_VERSION_KEY_NAME}\$1" "InstallDir" + ${If} "$2" == "$0" + DeleteRegKey HKCU "${QT_VERSION_KEY_NAME}\$1" + ${EndIf} + + ReadRegStr $2 HKLM "${QT_VERSION_KEY_NAME}\$1" "InstallDir" + ${If} "$2" == "$0" + DeleteRegKey HKLM "${QT_VERSION_KEY_NAME}\$1" + ${EndIf} + + Pop $2 + Pop $0 + Pop $1 +FunctionEnd +!macroend +!macro MSVC_UNFINISH +!macroend +!else ;MODULE_MSVC +!macro MSVC_INITIALIZE +!macroend +!macro MSVC_SECTIONS +!macroend +!macro MSVC_DESCRIPTION +!macroend +!macro MSVC_STARTUP +!macroend +!macro MSVC_FINISH +!macroend +!macro MSVC_README_FUNCTION +!macroend +!macro MSVC_RUN_FUNCTION +!macroend +!macro MSVC_UNSTARTUP +!macroend +!macro MSVC_UNINSTALL +!macroend +!macro MSVC_UNFINISH +!macroend +!endif ;MODULE_MSVC + diff --git a/util/scripts/win-binary/nsis/modules/opensource.nsh b/util/scripts/win-binary/nsis/modules/opensource.nsh new file mode 100644 index 0000000..19f154d --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/opensource.nsh @@ -0,0 +1,56 @@ +!ifdef MODULE_OPENSOURCE +!macro OPENSOURCE_INITIALIZE + !define MODULE_OPENSOURCE_PAGE "opensource.ini" + page custom ModuleOpenSourceShowPage +!macroend +!macro OPENSOURCE_SECTIONS + Section -ModuleOpenSourceSection + !ifdef MODULE_OPENSOURCE_ROOT + SetOutPath "$INSTDIR" + File "${MODULE_OPENSOURCE_ROOT}\OPENSOURCE-NOTICE.TXT" + !endif + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\OpenSource Notice.lnk" "$INSTDIR\OPENSOURCE-NOTICE.TXT" + SectionEnd + + Function ModuleOpenSourceShowPage + !insertmacro MUI_HEADER_TEXT "Open Source Edition" " " + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_OPENSOURCE_PAGE}" + strcpy "$LICENSEE" "Open Source" + strcpy "$LICENSE_PRODUCT" "OpenSource" + FunctionEnd +!macroend +!macro OPENSOURCE_DESCRIPTION +!macroend +!macro OPENSOURCE_STARTUP + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_OPENSOURCE_PAGE}" +!macroend +!macro OPENSOURCE_FINISH +!macroend +!macro OPENSOURCE_UNSTARTUP +!macroend +!macro OPENSOURCE_UNINSTALL + Section -un.ModuleOpenSourceSection + Delete "$SMPROGRAMS\$STARTMENU_STRING\OpenSource Notice.lnk" + SectionEnd +!macroend +!macro OPENSOURCE_UNFINISH +!macroend +!else ;MODULE_OPENSOURCE +!macro OPENSOURCE_INITIALIZE +!macroend +!macro OPENSOURCE_SECTIONS +!macroend +!macro OPENSOURCE_DESCRIPTION +!macroend +!macro OPENSOURCE_STARTUP +!macroend +!macro OPENSOURCE_FINISH +!macroend +!macro OPENSOURCE_UNSTARTUP +!macroend +!macro OPENSOURCE_UNINSTALL +!macroend +!macro OPENSOURCE_UNFINISH +!macroend +!endif ;MODULE_OPENSOURCE + diff --git a/util/scripts/win-binary/nsis/modules/qsa.nsh b/util/scripts/win-binary/nsis/modules/qsa.nsh new file mode 100644 index 0000000..ab74300 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/qsa.nsh @@ -0,0 +1,255 @@ +!ifdef MODULE_QSA +!macro QSA_INITIALIZE + !include "includes\qtenv.nsh" + !define MODULE_QSA_OPTIONPAGE "qsa.ini" + !ifndef MODULE_QSA_NAME + !define MODULE_QSA_NAME "QSA" + !endif + !ifndef MODULE_QSA_VERSION + !define MODULE_QSA_VERSION ${PRODUCT_VERSION} + !endif + !ifndef MODULE_QSA_ROOT + !define MODULE_QSA_ROOT "${INSTALL_ROOT}\qsa" + !endif + !ifndef MODULE_QSA_INTEGRATE + !include "includes\qtdir.nsh" + !insertmacro QTDIR_INITIALIZE + !endif + + var MODULE_QSA_NOIDE + var MODULE_QSA_NOEDITOR + + LangString ModuleQSATitle ${LANG_ENGLISH} "${MODULE_QSA_NAME} ${MODULE_QSA_VERSION} Build Options" + LangString ModuleQSADescription ${LANG_ENGLISH} "Do you want build the QSA Workbench and the QSA Editor?" + Page custom ModuleQSAOptionsPageEnter ModuleQSAOptionsPageExit +!macroend +!macro QSA_SECTIONS + Section "${MODULE_QSA_NAME} ${MODULE_QSA_VERSION}" QSA_SEC01 + push $0 + strcmp "$QSA_INSTDIR" "" 0 +2 + StrCpy $QSA_INSTDIR "$INSTDIR\${MODULE_QSA_NAME} ${MODULE_QSA_VERSION}" + + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QSAInstalled" 1 + + SetOutPath "$QSA_INSTDIR" + SetOverwrite ifnewer + File /r "${MODULE_QSA_ROOT}\*.*" + + call QsaModuleWriteBuildFile + + DetailPrint "Please wait while building ${MODULE_QSA_NAME} ${MODULE_QSA_VERSION}..." + nsExec::ExecToLog "$QSA_INSTDIR\qsabuild.bat" + pop $0 + strcmp "$0" "0" +2 + MessageBox MB_OK|MB_ICONEXCLAMATION "Building ${MODULE_QSA_NAME} ${MODULE_QSA_VERSION} failed.$\r$\nLook at the output, resolve the problem, and try to rebuild it manually.$\r$\n(errorcode: $0)" + + call ModuleQSAAddShortCuts + + pop $0 + SectionEnd + + !ifndef MODULE_QSA_INTEGRATE + !insertmacro QTDIR_FUNCTIONS + !endif + + Function ModuleQSAOptionsPageEnter + !insertmacro MUI_HEADER_TEXT "$(ModuleQSATitle)" "$(ModuleQSADescription)" + push $0 + ${strstr} $0 "$QTDIR_SELECTED" "4.0.0" + strcmp $0 "" +2 + MessageBox MB_OK|MB_ICONEXCLAMATION "QSA 1.2.0 requires Qt 4.0.1 snapshots or later" + pop $0 + + + strcmp "$MODULE_QSA_NOIDE" "" +3 + !insertmacro MUI_INSTALLOPTIONS_WRITE ${MODULE_QSA_OPTIONPAGE} "Field 2" "State" "1" + goto +2 + !insertmacro MUI_INSTALLOPTIONS_WRITE ${MODULE_QSA_OPTIONPAGE} "Field 2" "State" "0" + + strcmp "$MODULE_QSA_NOEDITOR" "" +3 + !insertmacro MUI_INSTALLOPTIONS_WRITE ${MODULE_QSA_OPTIONPAGE} "Field 3" "State" "1" + goto +2 + !insertmacro MUI_INSTALLOPTIONS_WRITE ${MODULE_QSA_OPTIONPAGE} "Field 3" "State" "0" + + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_QSA_OPTIONPAGE}" + FunctionEnd + +Function ModuleQSAAddShortCuts + push $0 + push $1 + push $2 + push $3 + + !insertmacro CreateConditionalShortCutDirectory "$SMPROGRAMS\$STARTMENU_STRING\Examples" + + FindFirst $0 $1 "$QSA_INSTDIR\examples\*.*" +loop: + StrCmp $1 "" done + IfFileExists "$QSA_INSTDIR\examples\$1\release\$1.exe" 0 +3 + strcpy $2 "release" + goto +3 + IfFileExists "$QSA_INSTDIR\examples\$1\debug\$1.exe" 0 example_shortcuts_next + strcpy $2 "debug" + + FileOpen $3 "$QSA_INSTDIR\examples\$1\$1.bat" w + IfErrors example_shortcuts_next + FileWrite $3 "@rem ----------------------$\r$\n" + FileWrite $3 "@rem This file is generated$\r$\n" + FileWrite $3 "@rem ----------------------$\r$\n" + FileWrite $3 "$\r$\n" + FileWrite $3 "set PATH=$QTDIR_SELECTED\bin;%PATH%$\r$\n" + FileWrite $3 "start $2\$1.exe$\r$\n" + FileClose $3 + + SetOutPath "$QSA_INSTDIR\examples\$1" + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\Examples\$1.lnk" "%COMSPEC%" "/c $1.bat" +example_shortcuts_next: + FindNext $0 $1 + Goto loop + + done: + SetOutPath "$QSA_INSTDIR" + pop $3 + pop $2 + pop $1 + pop $0 +FunctionEnd + + + Function ModuleQSAOptionsPageExit + push $0 + !insertmacro MUI_INSTALLOPTIONS_READ $0 ${MODULE_QSA_OPTIONPAGE} "Field 2" "State" + strcmp "$0" "1" +3 + strcpy $MODULE_QSA_NOIDE "" + goto +2 + strcpy $MODULE_QSA_NOIDE "-no-ide " + + !insertmacro MUI_INSTALLOPTIONS_READ $0 ${MODULE_QSA_OPTIONPAGE} "Field 3" "State" + strcmp "$0" "1" +3 + strcpy $MODULE_QSA_NOEDITOR "" + goto +2 + strcpy $MODULE_QSA_NOEDITOR "-no-editor " + + pop $0 + FunctionEnd + + Function QsaModuleWriteBuildFile + push $0 ; file handle + push $1 ; compiler + push $2 ; qmakespec + push $3 ; vars file + + push $COMPILER_SELECTED + call GetShortCompilerName + pop $1 + + push $1 + call GetMkSpec + pop $2 + + push $1 + call GetVSVarsFile + pop $3 + + ClearErrors + FileOpen $0 "$QSA_INSTDIR\qsabuild.bat" w + IfErrors done + FileWrite $0 "@rem ----------------------$\r$\n" + FileWrite $0 "@rem This file is generated$\r$\n" + FileWrite $0 "@rem ----------------------$\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "@echo Setting QTDIR to $QTDIR_SELECTED$\r$\n" + FileWrite $0 "@set QTDIR=$QTDIR_SELECTED$\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "@echo Adding %QTDIR%\bin to PATH$\r$\n" + FileWrite $0 "@set PATH=%QTDIR%\bin;%PATH%$\r$\n" + FileWrite $0 "$\r$\n" + FileWrite $0 "@echo Setting QMAKESPEC to $2$\r$\n" + FileWrite $0 "@set QMAKESPEC=$2$\r$\n" + FileWrite $0 "$\r$\n" + strcmp "$3" "" +3 + FileWrite $0 '@call "$3"$\r$\n' + FileWrite $0 "$\r$\n" + FileWrite $0 "@echo Running configure in $QSA_INSTDIR$\r$\n" + FileWrite $0 "@cd $QSA_INSTDIR$\r$\n" + FileWrite $0 "@configure $MODULE_QSA_NOIDE$MODULE_QSA_NOEDITOR-automake$\r$\n" + FileWrite $0 "$\r$\n" + FileClose $0 + done: + + pop $3 + pop $2 + pop $1 + pop $0 + FunctionEnd +!macroend +!macro QSA_CHECKLICENSEPRODUCT + push $0 + qtnsisext::HasLicenseProduct $LICENSE_KEY "QSA" + pop $0 + strcmp $0 "1" QSALicenseOK + SectionSetText ${QSA_SEC01} "${MODULE_QSA_NAME} (No License)" + SectionSetFlags ${QSA_SEC01} 16 + QSALicenseOK: + pop $0 +!macroend +!macro QSA_DESCRIPTION + !insertmacro MUI_DESCRIPTION_TEXT ${QSA_SEC01} "This installs ${MODULE_QSA_NAME} version ${MODULE_QSA_VERSION} on your system." +!macroend +!macro QSA_STARTUP + !ifndef MODULE_QSA_INTEGRATE + !insertmacro QTDIR_STARTUP + !endif + strcpy $QSA_INSTDIR "C:\${MODULE_QSA_NAME}\${MODULE_QSA_VERSION}" + strcpy $MODULE_QSA_NOIDE "" + strcpy $MODULE_QSA_NOEDITOR "" + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_QSA_OPTIONPAGE}" +!macroend +!macro QSA_FINISH +!macroend +!macro QSA_RUN_FUNCTION +!macroend +!macro QSA_UNSTARTUP + strcmp "$QSA_INSTDIR" "" 0 +2 + StrCpy $QSA_INSTDIR "$INSTDIR\${MODULE_QSA_NAME} ${MODULE_QSA_VERSION}" + + !insertmacro ConfirmOnRemove "QSAInstalled" "$QSA_INSTDIR" +!macroend +!macro QSA_UNINSTALL + Section un."${MODULE_QSA_NAME} ${MODULE_QSA_VERSION}" + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "QSAInstalled" + intcmp $0 1 0 DoneUnInstallQSA + + DetailPrint "Removing installation directory..." + RMDir /r "$QSA_INSTDIR" + RmDir /r "$SMPROGRAMS\$STARTMENU_STRING\Examples" + + DoneUnInstallQSA: + SectionEnd +!macroend +!macro QSA_UNFINISH +!macroend +!else ;MODULE_QSA +!macro QSA_INITIALIZE +!macroend +!macro QSA_SECTIONS +!macroend +!macro QSA_CHECKLICENSEPRODUCT +!macroend +!macro QSA_DESCRIPTION +!macroend +!macro QSA_STARTUP +!macroend +!macro QSA_FINISH +!macroend +!macro QSA_RUN_FUNCTION +!macroend +!macro QSA_UNSTARTUP +!macroend +!macro QSA_UNINSTALL +!macroend +!macro QSA_UNFINISH +!macroend +!endif ;MODULE_QSA + diff --git a/util/scripts/win-binary/nsis/modules/qtdemo.nsh b/util/scripts/win-binary/nsis/modules/qtdemo.nsh new file mode 100644 index 0000000..9f4fe5f --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/qtdemo.nsh @@ -0,0 +1,112 @@ +!ifdef MODULE_QTDEMO + +;------------------------------- +; Test which version of Microsoft DirectX is installed +; Returns e.g. 900 for version 9 +; +; Original code is from nsis.sourceforge.net +Function GetDXVersion + Push $0 + Push $1 + + ClearErrors + ReadRegStr $0 HKLM "Software\Microsoft\DirectX" "Version" + IfErrors noDirectX + + StrCpy $1 $0 2 5 ; get the minor version + StrCpy $0 $0 2 2 ; get the major version + IntOp $0 $0 * 100 ; $0 = major * 100 + minor + IntOp $0 $0 + $1 + Goto done + +noDirectX: + StrCpy $0 0 + +done: + Pop $1 + Exch $0 +FunctionEnd + +;------------------------------- +; Test if Visual Studio Redistributables 2005+ SP1 installed +; Returns -1 if there is no VC redistributables installed +; otherwise returns version number (e.g. 134274064 for VS2005 SP1) +; +; Original code is from nsis.sourceforge.net +Function CheckVCRedist + Push $0 + ClearErrors + ReadRegDword $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" "Version" + + IfErrors 0 done + StrCpy $0 -1 + +done: + Exch $0 +FunctionEnd + + +!macro INSTALLVCREDIST VCREDIST_EXE + Push $R0 + DetailPrint "Checking for Microsoft Visual C++ 2005 SP1 Redistributable Runtime ..." + Call CheckVCRedist + Pop $R0 + IntCmp $R0 134274064 vcexists +1 +1 ; 134274064 = 800dc10 + MessageBox MB_YESNO|MB_ICONINFORMATION "Qt demo requires the Microsoft Visual C++ 2005 SP1 Runtime to be installed. Do you want to install the Runtime now?" IDYES vcinstall IDNO vcdone +vcinstall: + DetailPrint "Installing Microsoft Visual C++ 2005 SP1 Runtime ..." + nsExec::Exec '"$INSTDIR\${VCREDIST_EXE}" /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" "' $R0 + IntCmp $R0 1 vcdone vcdone +1 ; return value 0,1 -> done + IntCmp $R0 3010 0 vcerror vcerror ; other return values + MessageBox MB_OK|MB_ICONINFORMATION "Please reboot after finishing this installation" + Goto vcdone +vcerror: + MessageBox MB_OK|MB_ICONEXCLAMATION "Installing the Microsoft Visual C++ 2005 SP1 Runtime failed (error code $R0)! Please try to run '$INSTDIR\${VCREDIST_EXE}' manually" + Goto vcdone +vcexists: + DetailPrint "Microsoft Visual C++ 2005 SP1 Runtime SP1 is already installed" +vcdone: + Pop $R0 +!macroend + +!macro INSTALLDIRECTX DIRECTX_EXE + Push $R0 + DetailPrint "Checking for Microsoft Direct X version 9 or higher ..." + Call GetDXVersion + Pop $R0 + IntCmp $R0 900 dxexists +1 dxexists + MessageBox MB_YESNO|MB_ICONINFORMATION "The mediaplayer demo requires Microsoft Direct X 9 or higher to be installed. Do you want to download and install Direct X 9 now?" IDYES dxinstall IDNO dxdone +dxinstall: + DetailPrint "Running Microsoft Direct X installer ..." + nsExec::Exec '"$INSTDIR\${DIRECTX_EXE}"' + Goto dxdone +dxexists: + DetailPrint "Microsoft Direct X version 9 or higher is already installed (version detected: $R0)" +dxdone: + Pop $R0 +!macroend + +!macro QTDEMO_STARTUP + SectionSetFlags ${QTDEMO_SEC01} 17 ; selected & read-only +!macroend + +!macro QTDEMO_SECTIONS + Section "Prerequisites" QTDEMO_SEC01 + !ifdef MODULE_QTDEMO_VCREDIST + !insertmacro INSTALLVCREDIST "${MODULE_QTDEMO_VCREDIST}" + !endif + !ifdef MODULE_QTDEMO_DIRECTX + !insertmacro INSTALLDIRECTX "${MODULE_QTDEMO_DIRECTX}" + !endif + SectionEnd +!macroend + +!else ;MODULE_QTDEMO + +!macro QTDEMO_STARTUP +!macroend + +!macro QTDEMO_SECTIONS +!macroend + +!endif
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/modules/qtjambi.nsh b/util/scripts/win-binary/nsis/modules/qtjambi.nsh new file mode 100644 index 0000000..948945b --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/qtjambi.nsh @@ -0,0 +1,98 @@ +!ifdef MODULE_QTJAMBI +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_INITIALIZE +!include "includes\qtcommon.nsh" +!ifndef MODULE_QTJAMBI_NAME + !define MODULE_QTJAMBI_NAME "Qt Jambi" +!endif +!ifndef MODULE_QTJAMBI_VERSION + !define MODULE_QTJAMBI_VERSION ${PRODUCT_VERSION} +!endif + +!macroend ;QTJAMBI_INITIALIZE + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_SECTIONS +SectionGroup "${MODULE_QTJAMBI_NAME}" +Section "QtJambi" QTJAMBI_SEC01 + SetOutPath "$QTJAMBI_INSTDIR" + SetOverwrite ifnewer + !insertmacro MODULE_QTJAMBI_INSTALLFILES + + !insertmacro CreateConditionalShortCutWithParameters "$SMPROGRAMS\$STARTMENU_STRING\Readme.lnk" "notepad" "$QTJAMBI_INSTDIR\README" + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\Examples and Demos.lnk" "$QTJAMBI_INSTDIR\qtjambi.exe" + + Push "bin" + push $QTJAMBI_INSTDIR + call PatchCommonBinaryFiles + + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtJambiInstalled" 1 +SectionEnd +SectionGroupEnd +!macroend ;QTJAMBI_SECTIONS + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_DESCRIPTION + !insertmacro MUI_DESCRIPTION_TEXT ${QTJAMBI_SEC01} "This installs the Qt Jambi ${MODULE_QTJAMBI_VERSION} for Visual Studio 6.0" +!macroend + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_STARTUP + push $0 + SectionSetFlags ${QTJAMBI_SEC01} 1 +!ifdef MODULE_ENVIRONMENT + strcpy $QTJAMBI_INSTDIR "C:\Qt\qtjambi-win32-eval-${MODULE_QTJAMBI_VERSION}" +!else + strcpy $QTJAMBI_INSTDIR "C:\Qt\qtjambi-win32-commercial-${MODULE_QTJAMBI_VERSION}" +!endif + + pop $0 +!macroend ;QTJAMBI_STATUP + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_FINISH +!macroend + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_UNSTARTUP + !insertmacro ConfirmOnRemove "QtJambiInstalled" "Qt Jambi" +!macroend + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_UNINSTALL + push $0 + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "QtJambiInstalled" + + intcmp $0 1 0 DoneUnInstallQtJambi + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "QtJambiInstalled" 0 + Delete "$SMPROGRAMS\$STARTMENU_STRING\Readme.lnk" + Delete "$SMPROGRAMS\$STARTMENU_STRING\Examples and Demos.lnk" + !insertmacro MODULE_QTJAMBI_REMOVE "$QTJAMBI_INSTDIR" + RMDir $QTJAMBI_INSTDIR ;removes it if empty + DoneUnInstallQtJambi: + pop $0 +!macroend ;QTJAMBI_UNINSTALL + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBI_UNFINISH +!macroend + +!else ;MODULE_QTJAMBI +!macro QTJAMBI_INITIALIZE +!macroend +!macro QTJAMBI_SECTIONS +!macroend +!macro QTJAMBI_DESCRIPTION +!macroend +!macro QTJAMBI_STARTUP +!macroend +!macro QTJAMBI_FINISH +!macroend +!macro QTJAMBI_UNSTARTUP +!macroend +!macro QTJAMBI_UNINSTALL +!macroend +!macro QTJAMBI_UNFINISH +!macroend +!endif ;MODULE_QTJAMBI + diff --git a/util/scripts/win-binary/nsis/modules/qtjambieclipse.nsh b/util/scripts/win-binary/nsis/modules/qtjambieclipse.nsh new file mode 100644 index 0000000..d8cae70 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/qtjambieclipse.nsh @@ -0,0 +1,223 @@ +!ifdef MODULE_QTJAMBIECLIPSE + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_INITIALIZE + +!define ECLIPSE_LOCATION_KEY "EclipseLocation" +var ECLIPSE_LOCATION + +!ifndef MODULE_QTJAMBIECLIPSE_INSTALLER + !define MODULE_QTJAMBIECLIPSE_INSTALLER "${PRODUCT_NAME} v${PRODUCT_VERSION}" +!endif +!ifndef MODULE_QTJAMBIECLIPSE_ROOT + !define MODULE_QTJAMBIECLIPSE_ROOT "${INSTALL_ROOT}\qtjambieclipse" +!endif +!ifndef MODULE_QTJAMBIECLIPSE_VERSION + !define MODULE_QTJAMBIECLIPSE_VERSION ${PRODUCT_VERSION} +!endif + +!define MODULE_QTJAMBIECLIPSE_QTJAMBIVERSION "1.0.0" + +!define MODULE_QTJAMBIECLIPSE_QT_ID "com.trolltech.qt_${MODULE_QTJAMBIECLIPSE_QTJAMBIVERSION}" +!define MODULE_QTJAMBIECLIPSE_QTJAMBI_ID "com.trolltech.qtjambi_${MODULE_QTJAMBIECLIPSE_QTJAMBIVERSION}" +!define MODULE_QTJAMBIECLIPSE_QTDESIGNER_ID "com.trolltech.qtdesigner_${MODULE_QTJAMBIECLIPSE_QTJAMBIVERSION}" +!define MODULE_QTJAMBIECLIPSE_QTDESIGNER_QTJAMBI_ID "com.trolltech.qtdesigner.qtjambi_${MODULE_QTJAMBIECLIPSE_QTJAMBIVERSION}" +!define MODULE_QTJAMBIECLIPSE_QTDESIGNERPLUGINS_ID "com.trolltech.qtdesignerplugins" + +!define MODULE_QTJAMBIECLIPSE_BINARIES "${MODULE_QTJAMBIECLIPSE_ROOT}\plugins\com.trolltech.qtdesigner.win32.x86_${MODULE_QTJAMBIECLIPSE_QTJAMBIVERSION}" + +LangString ModuleQtjambieclipsePageTitle ${LANG_ENGLISH} "Eclipse Installation Location" +LangString ModuleQtjambieclipsePageDescription ${LANG_ENGLISH} "Select where eclipse is installed." + +!define MODULE_QTJAMBIECLIPSE_PAGE "qtjambieclipse.ini" +Page custom ModuleQtjambieclipsePageEnter ModuleQtjambieclipsePageExit + +!include "includes\regsvr.nsh" + +!define MODULE_QTJAMBIECLIPSE_INCOMPATIBLEPRODUCT "Qt Eclipse Integration" + +!macroend ;QTJAMBIECLIPSE_INITIALIZE + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_SECTIONS + +Section -PreEclipseSection + WriteRegStr SHCTX "$PRODUCT_UNIQUE_KEY" "${ECLIPSE_LOCATION_KEY}" $ECLIPSE_LOCATION +SectionEnd + +SectionGroup "Eclipse Integration" + +Section "Qt Jambi Eclipse Integration" QTJAMBIECLIPSE_SEC01 + SetOutPath "$ECLIPSE_LOCATION\plugins\" + SetOverwrite ifnewer + File "${MODULE_QTJAMBIECLIPSE_ROOT}\plugins\${MODULE_QTJAMBIECLIPSE_QT_ID}.jar" + File "${MODULE_QTJAMBIECLIPSE_ROOT}\plugins\${MODULE_QTJAMBIECLIPSE_QTJAMBI_ID}.jar" + File "${MODULE_QTJAMBIECLIPSE_ROOT}\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNER_ID}.jar" + File "${MODULE_QTJAMBIECLIPSE_ROOT}\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNER_QTJAMBI_ID}.jar" + + SetOutPath "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNERPLUGINS_ID}" + SetOverwrite ifnewer + File "${MODULE_QTJAMBIECLIPSE_ROOT}\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNERPLUGINS_ID}\JambiCustomWidget.dll" + File "${MODULE_QTJAMBIECLIPSE_ROOT}\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNERPLUGINS_ID}\JambiLanguage.dll" + + SetOutPath "$QTJAMBIECLIPSE_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_QTJAMBIECLIPSE_ROOT}\LICENSE.QT_JAMBI_ECLIPSE_INTEGRATION" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\msvcp71.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\msvcr71.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\QtCore4.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\QtGui4.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\QtXml4.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\QtScript4.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\QtDesigner4.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\QtDesignerComponents4.dll" + File "${MODULE_QTJAMBIECLIPSE_BINARIES}\qtdesigner.dll" + + push "$QTJAMBIECLIPSE_INSTDIR\qtdesigner.dll" + call RegEclipseSvr + + push "$QTJAMBIECLIPSE_INSTDIR\qtdesigner.dll" + call RegEclipseSvr + + Rename "$QTJAMBIECLIPSE_INSTDIR\LICENSE.QT_JAMBI_ECLIPSE_INTEGRATION" "$QTJAMBIECLIPSE_INSTDIR\LICENSE.txt" + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\License.lnk" "$QTJAMBIECLIPSE_INSTDIR\LICENSE.txt" +SectionEnd + +SectionGroupEnd + +; usage: +; push dll to register +; call RegEclipseSvr +Function RegEclipseSvr + exch $0 ;filename + + ClearErrors + push $0 + call RegSvr + IfErrors 0 +2 + MessageBox MB_OK|MB_ICONEXCLAMATION 'Could not register "$0"' + + pop $0 +FunctionEnd + +Function ModuleQtjambieclipsePageEnter + !insertmacro MUI_HEADER_TEXT "$(ModuleQtjambieclipsePageTitle)" "$(ModuleQtjambieclipsePageDescription)" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${MODULE_QTJAMBIECLIPSE_PAGE}" +FunctionEnd + +Function ModuleQtjambieclipsePageExit + push $0 + push $1 + + !insertmacro MUI_INSTALLOPTIONS_READ $0 "${MODULE_QTJAMBIECLIPSE_PAGE}" "Field 2" "State" + IfFileExists "$0\eclipse.exe" eclipse_found + MessageBox MB_OK|MB_ICONSTOP "$0\eclipse.exe not found!$\nPlease select a valid installation directory." + Goto failed + eclipse_found: + + ClearErrors + FileOpen $1 "$0\plugins\com.trolltech.writetest" a + IfErrors 0 has_write_access + MessageBox MB_OK|MB_ICONSTOP "Can't write to $0\plugins.$\nPlease select a valid installation directory." + Goto failed + has_write_access: + + FileClose $1 + Delete "$0\plugins\com.trolltech.writetest" + StrCpy $ECLIPSE_LOCATION $0 + + Goto done + failed: + pop $1 + pop $0 + Abort + + done: + pop $1 + pop $0 +FunctionEnd + +!macroend ;QTJAMBIECLIPSE_SECTIONS + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_DESCRIPTION +!ifdef QTJAMBIECLIPSE_SEC01 + !insertmacro MUI_DESCRIPTION_TEXT ${QTJAMBIECLIPSE_SEC01} "This installs the Qt Jambi plugin into Eclipse." +!endif +!macroend + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_STARTUP + push "${MODULE_QTJAMBIECLIPSE_INCOMPATIBLEPRODUCT}" + call WarnIfInstalledProductDetected + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${MODULE_QTJAMBIECLIPSE_PAGE}" + SectionSetFlags ${QTJAMBIECLIPSE_SEC01} 17 + + strcpy $QTJAMBIECLIPSE_INSTDIR "$PROGRAMFILES\Trolltech\Qt Jambi Eclipse Integration" +!macroend ;QTJAMBIECLIPSE_STATUP + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_FINISH +!macroend ;QTJAMBIECLIPSE_FINISH + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_UNSTARTUP + ReadRegStr $ECLIPSE_LOCATION SHCTX "$PRODUCT_UNIQUE_KEY" "${ECLIPSE_LOCATION_KEY}" +!macroend ;QTJAMBIECLIPSE_UNSTARTUP + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_UNINSTALL +Section un."Eclipse Integration" + push "$QTJAMBIECLIPSE_INSTDIR\qtdesigner.dll" + call un.RegSvr + + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QT_ID}.jar" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QTJAMBI_ID}.jar" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNER_ID}.jar" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNER_QTJAMBI_ID}.jar" + + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNERPLUGINS_ID}\JambiCustomWidget.dll" + Delete "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNERPLUGINS_ID}\JambiLanguage.dll" + RMDir "$ECLIPSE_LOCATION\plugins\${MODULE_QTJAMBIECLIPSE_QTDESIGNERPLUGINS_ID}" + + Delete "$SMPROGRAMS\$STARTMENU_STRING\License.lnk" + + Delete "$QTJAMBIECLIPSE_INSTDIR\LICENSE.txt" + Delete "$QTJAMBIECLIPSE_INSTDIR\msvcp71.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\msvcr71.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\QtCore4.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\QtGui4.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\QtXml4.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\QtScript4.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\QtDesigner4.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\QtDesignerComponents4.dll" + Delete "$QTJAMBIECLIPSE_INSTDIR\qtdesigner.dll" + + RMDir "$QTJAMBIECLIPSE_INSTDIR" +SectionEnd +!macroend ;QTJAMBIECLIPSE_UNINSTALL + +;------------------------------------------------------------------------------------------------ +!macro QTJAMBIECLIPSE_UNFINISH +!macroend + +!else ;MODULE_QTJAMBIECLIPSE +!macro QTJAMBIECLIPSE_INITIALIZE +!macroend +!macro QTJAMBIECLIPSE_SECTIONS +!macroend +!macro QTJAMBIECLIPSE_DESCRIPTION +!macroend +!macro QTJAMBIECLIPSE_STARTUP +!macroend +!macro QTJAMBIECLIPSE_FINISH +!macroend +!macro QTJAMBIECLIPSE_UNSTARTUP +!macroend +!macro QTJAMBIECLIPSE_UNINSTALL +!macroend +!macro QTJAMBIECLIPSE_UNFINISH +!macroend +!endif ;MODULE_QTJAMBIECLIPSE + diff --git a/util/scripts/win-binary/nsis/modules/registeruiext.nsh b/util/scripts/win-binary/nsis/modules/registeruiext.nsh new file mode 100644 index 0000000..51f7df5 --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/registeruiext.nsh @@ -0,0 +1,174 @@ +; UI Extension Module + +!ifdef MODULE_REGISTERUIEXT + +;------------------------------------------------------------------------------------------------ +!macro REGISTERUIEXT_INITIALIZE + !include "includes\system.nsh" + + !ifndef MODULE_REGISTERUIEXT_QTDIR + !ifdef MODULE_MINGW + !define MODULE_REGISTERUIEXT_QTDIR $MINGW_INSTDIR + !endif + + !ifdef MODULE_MSVC + !define MODULE_REGISTERUIEXT_QTDIR $MSVC_INSTDIR + !endif + !endif + + !define MODULE_REGISTERUIEXT_INTERNAL_DESC "Trolltech.DesignerForm" + !define MODULE_REGISTERUIEXT_DESC_DESIGNER "Open with Qt Designer" + !define MODULE_REGISTERUIEXT_DESC_DEVENV "Open with Visual Studio .NET" + !define MODULE_REGISTERUIEXT_FILE_DESC "Qt Designer File" +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro REGISTERUIEXT_SECTIONS + +Function GetSelectedVSIP + Push $0 + Push $1 + + StrCpy $0 "" +!ifdef MODULE_VSIP +!ifdef VSIP_SEC01 + SectionGetFlags ${VSIP_SEC01} $1 + IntOp $1 $1 & 1 + IntCmp $1 0 +2 + StrCpy $0 "7.1" +!endif +!ifdef VSIP_SEC02 + SectionGetFlags ${VSIP_SEC02} $1 + IntOp $1 $1 & 1 + IntCmp $1 0 +2 + StrCpy $0 "8.0" +!endif +!ifdef VSIP_SEC03 + SectionGetFlags ${VSIP_SEC03} $1 + IntOp $1 $1 & 1 + IntCmp $1 0 +2 + StrCpy $0 "9.0" +!endif +!endif + + Pop $1 + Exch $0 +FunctionEnd + +SectionGroup "File Associations" +Section "UI Files (*.ui)" REGISTERUIEXT_SEC01 + call ModuleRegisterUI +SectionEnd +SectionGroupEnd + +Function ModuleRegisterUI + push $0 + push $1 + + WriteRegDWORD SHCTX "$PRODUCT_UNIQUE_KEY" "UIExtRegistered" 1 + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" "" "${MODULE_REGISTERUIEXT_FILE_DESC}" + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell" "" "open" + + Call GetSelectedVSIP + Pop $1 + + StrCmp "$1" "" 0 RegisterVSIP + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\open" "" "${MODULE_REGISTERUIEXT_DESC_DESIGNER}" + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\open\command" "" "${MODULE_REGISTERUIEXT_QTDIR}\bin\designer.exe $\"%1$\"" + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\DefaultIcon" "" "${MODULE_REGISTERUIEXT_QTDIR}\bin\designer.exe,0" + goto RegisterFinished + + RegisterVSIP: + Push $1 + Call GetVSInstallationDir + Pop $0 + + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\open" "" "${MODULE_REGISTERUIEXT_DESC_DEVENV}" + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\shell\${MODULE_REGISTERUIEXT_DESC_DEVENV}\command" "" "$0\devenv.exe $\"%1$\"" + WriteRegStr HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}\DefaultIcon" "" "$VSIP_INSTDIR\ui.ico" + RegisterFinished: + WriteRegStr HKCR ".ui" "" "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" + + pop $1 + pop $0 +FunctionEnd + +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro REGISTERUIEXT_DESCRIPTION + !insertmacro MUI_DESCRIPTION_TEXT ${REGISTERUIEXT_SEC01} "This will associate the file extention .ui with the Qt GUI editor." +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro REGISTERUIEXT_STARTUP + ${If} $RUNNING_AS_ADMIN == false + SectionSetFlags ${REGISTERUIEXT_SEC01} 16 + ${EndIf} +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro REGISTERUIEXT_FINISH +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro REGISTERUIEXT_UNSTARTUP +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro REGISTERUIEXT_UNINSTALL +Function un.ModuleRegisterUI + push $1 + ReadRegStr $1 HKCR ".ui" "" + strcmp $1 "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" 0 continue + ; do not delete this key since a subkey openwithlist + ; or open withprogid may exist + WriteRegStr HKCR ".ui" "" "" + continue: + ; just delete it since nobody else is supposed to use it + DeleteRegKey HKCR "${MODULE_REGISTERUIEXT_INTERNAL_DESC}" + + pop $1 +FunctionEnd + +Section -un.ModuleRegisterUIExtSection + push $0 + ReadRegDWORD $0 SHCTX "$PRODUCT_UNIQUE_KEY" "UIExtRegistered" + intcmp $0 1 0 DoneUnRegister + call un.ModuleRegisterUI + DoneUnRegister: + pop $0 +SectionEnd +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro REGISTERUIEXT_UNFINISH +!macroend + +;------------------------------------------------------------------------------------------------ + +!else +!macro REGISTERUIEXT_INITIALIZE +!macroend +!macro REGISTERUIEXT_SECTIONS +!macroend +!macro REGISTERUIEXT_DESCRIPTION +!macroend +!macro REGISTERUIEXT_STARTUP +!macroend +!macro REGISTERUIEXT_FINISH +!macroend +!macro REGISTERUIEXT_UNSTARTUP +!macroend +!macro REGISTERUIEXT_UNINSTALL +!macroend +!macro REGISTERUIEXT_UNFINISH +!macroend +!endif diff --git a/util/scripts/win-binary/nsis/modules/vsip.nsh b/util/scripts/win-binary/nsis/modules/vsip.nsh new file mode 100644 index 0000000..a11763b --- /dev/null +++ b/util/scripts/win-binary/nsis/modules/vsip.nsh @@ -0,0 +1,1030 @@ +; Integration Module + +!ifdef MODULE_VSIP + +;------------------------------------------------------------------------------------------------ +!macro VSIP_INITIALIZE + +!ifndef MODULE_VSIP_NAME + !define MODULE_VSIP_NAME "Qt Visual Studio Integration" +!endif +!ifndef MODULE_VSIP_VERSION + !define MODULE_VSIP_VERSION ${PRODUCT_VERSION} +!endif +!ifndef MODULE_VSIP_ROOT + !define MODULE_VSIP_ROOT "${INSTALL_ROOT}\vsip" +!endif +!ifndef MODULE_HELP_ROOT + !define MODULE_HELP_ROOT "${MODULE_VSIP_ROOT}\help" +!endif + + +!include "includes\templates.nsh" +!include "includes\system.nsh" +!include "includes\help.nsh" +!include "includes\regsvr.nsh" +!include "includes\qtcommon.nsh" +!include "WinMessages.nsh" + +!macroend ;VSIP_INITIALIZE + +;------------------------------------------------------------------------------------------------ + +!macro VSIP_SECTIONS + +SectionGroup "Qt Visual Studio Integration" +!ifndef MODULE_VSIP_NO2003 +Section "Visual Studio 2003" VSIP_SEC01 + WriteRegStr SHCTX "SOFTWARE\\Trolltech\\Qt4VS2003" "LicenseKey" $LICENSE_KEY + + SetOutPath "$VSIP_INSTDIR" + SetOverwrite ifnewer + + WriteRegDWord SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VS2003" "1" + + StrCpy $VS_VERSION_SHORT "7.1" + StrCpy $VS_VERSION "2003" + Push $VS_VERSION_SHORT + Call InstallVSIP + + !insertmacro InstallHelp "$VSIP_INSTDIR\help" "qt4vs" "$VS_VERSION_SHORT" + + ;install readme file + SetOutPath "$VSIP_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_VSIP_ROOT}\Readme.txt" + File "${MODULE_VSIP_ROOT}\ui.ico" + File "${MODULE_VSIP_ROOT}\Changes-${MODULE_VSIP_VERSION}" +SectionEnd +!endif + +!ifndef MODULE_VSIP_NO2005 +Section "Visual Studio 2005" VSIP_SEC02 + WriteRegStr SHCTX "SOFTWARE\\Trolltech\\Qt4VS2005" "LicenseKey" $LICENSE_KEY + + SetOutPath "$VSIP_INSTDIR" + SetOverwrite ifnewer + + WriteRegDWord SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VS2005" "1" + + StrCpy $VS_VERSION_SHORT "8.0" + StrCpy $VS_VERSION "2005" + Push $VS_VERSION_SHORT + Call InstallVSIP + + !insertmacro InstallHelp "$VSIP_INSTDIR\help" "qt4vs" "$VS_VERSION_SHORT" + + ;install readme file + SetOutPath "$VSIP_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_VSIP_ROOT}\Readme.txt" + File "${MODULE_VSIP_ROOT}\ui.ico" + File "${MODULE_VSIP_ROOT}\Changes-${MODULE_VSIP_VERSION}" +SectionEnd +!endif + +!ifndef MODULE_VSIP_NO2008 +Section "Visual Studio 2008" VSIP_SEC03 + WriteRegStr SHCTX "SOFTWARE\\Trolltech\\Qt4VS2008" "LicenseKey" $LICENSE_KEY + + SetOutPath "$VSIP_INSTDIR" + SetOverwrite ifnewer + + WriteRegDWord SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VS2008" "1" + + StrCpy $VS_VERSION_SHORT "9.0" + StrCpy $VS_VERSION "2008" + Push $VS_VERSION_SHORT + Call InstallVSIP + + !insertmacro InstallHelp "$VSIP_INSTDIR\help" "qt4vs" "$VS_VERSION_SHORT" + + ;install readme file + SetOutPath "$VSIP_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_VSIP_ROOT}\Readme.txt" + File "${MODULE_VSIP_ROOT}\ui.ico" + File "${MODULE_VSIP_ROOT}\Changes-${MODULE_VSIP_VERSION}" +SectionEnd +!endif + +SectionGroupEnd + +Section -PostVSIPSection + IfFileExists "$VSIP_INSTDIR\help\h2reg.exe" 0 PostVSIPSectionHelp_Done + !insertmacro RegisterHelp "$VSIP_INSTDIR\help" "qt4vs" + PostVSIPSectionHelp_Done: + + IfFileExists "$VSIP_INSTDIR\Readme.txt" 0 PostVSIPSection_Done + !insertmacro CreateConditionalShortCut "$SMPROGRAMS\$STARTMENU_STRING\Visual Studio Integration Readme.lnk" "$VSIP_INSTDIR\Readme.txt" + PostVSIPSection_Done: +SectionEnd + +Function InstallVSIP + Exch $0 + + Push $0 + Call InstallIntegration + + Push $0 + Call RegisterIntegration + + Push $VSIP_INSTDIR + Call InstallProjectTemplates + + Push $VSIP_INSTDIR + Call InstallItemTemplates + + Call InstallResources + + Call InstallSamples + + Push $0 + Call InstallAddin + + Pop $0 +FunctionEnd + + +Function InstallIntegration + Exch $0 + Push $1 + + CreateDirectory "$VSIP_INSTDIR\bin" + SetOutPath "$VSIP_INSTDIR\bin" + SetOverwrite ifnewer + + ; Install common files + File "${MODULE_VSIP_ROOT}\bin\QtCore4.dll" + File "${MODULE_VSIP_ROOT}\bin\QtGui4.dll" + File "${MODULE_VSIP_ROOT}\bin\QtXml4.dll" + File "${MODULE_VSIP_ROOT}\bin\QtScript4.dll" + + File "${MODULE_VSIP_ROOT}\bin\QtDesigner4.dll" + File "${MODULE_VSIP_ROOT}\bin\QtDesignerComponents4.dll" + File "${MODULE_VSIP_ROOT}\bin\FormEditor1.dll" + + DetailPrint "Patching $VSIP_INSTDIR\bin\QtCore4.dll..." + Push "$VSIP_INSTDIR" + Push "$VSIP_INSTDIR\bin\QtCore4.dll" + Call PatchBinaryPaths + + CreateDirectory "$VSIP_INSTDIR\bin\$0" + SetOutPath "$VSIP_INSTDIR\bin\$0" + SetOverwrite ifnewer + + StrCmp $0 "7.1" 0 MODULE_VSIP_2005_1 + File "${MODULE_VSIP_ROOT}\bin\7.1\Qt4VSa.dll" + SetFileAttributes "$VSIP_INSTDIR\bin\7.1\Qt4VSa.dll" HIDDEN + ClearErrors + + ; Install Integration Libs + File "${MODULE_VSIP_ROOT}\bin\7.1\Axformeditor1Lib.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\formeditor1Lib.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\QtProjectLib.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\Microsoft.VisualStudio.dll" + + File "${MODULE_VSIP_ROOT}\bin\7.1\Qt4VS2003.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\Trolltech.Qt4VS2003Base.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\Microsoft.VisualStudio.Designer.Interfaces.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\RegQt4VS2003.exe" + + File "${MODULE_VSIP_ROOT}\bin\7.1\QtProjectEngineLib.dll" + + ; Install MS Interop Assemblies + File "${MODULE_VSIP_ROOT}\bin\7.1\Microsoft.VisualStudio.OLE.Interop.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\Microsoft.VisualStudio.Shell.Interop.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\Microsoft.VisualStudio.TextManager.Interop.dll" + + Goto MODULE_VSIP_ALL + + MODULE_VSIP_2005_1: + StrCmp $0 "8.0" 0 MODULE_VSIP_2008 + File "${MODULE_VSIP_ROOT}\bin\8.0\Qt4VSa.dll" + SetFileAttributes "$VSIP_INSTDIR\bin\8.0\Qt4VSa.dll" HIDDEN + ClearErrors + + File "${MODULE_VSIP_ROOT}\bin\8.0\Axformeditor1Lib.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\formeditor1Lib.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\QtProjectLib.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\Microsoft.VisualStudio.dll" + + File "${MODULE_VSIP_ROOT}\bin\8.0\Qt4VS2005.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\Trolltech.Qt4VS2005Base.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\RegQt4VS2005.exe" + + File "${MODULE_VSIP_ROOT}\bin\8.0\QtProjectEngineLib.dll" + + ; Install MS Interop Assemblies + File "${MODULE_VSIP_ROOT}\bin\8.0\Microsoft.VisualStudio.OLE.Interop.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\Microsoft.VisualStudio.Shell.Interop.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\Microsoft.VisualStudio.TextManager.Interop.dll" + Goto MODULE_VSIP_ALL + + MODULE_VSIP_2008: + StrCmp $0 "9.0" 0 MODULE_VSIP_ALL + File "${MODULE_VSIP_ROOT}\bin\9.0\Qt4VSa.dll" + SetFileAttributes "$VSIP_INSTDIR\bin\9.0\Qt4VSa.dll" HIDDEN + ClearErrors + + File "${MODULE_VSIP_ROOT}\bin\9.0\Axformeditor1Lib.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\formeditor1Lib.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\QtProjectLib.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\Microsoft.VisualStudio.dll" + + File "${MODULE_VSIP_ROOT}\bin\9.0\Qt4VS2008.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\Trolltech.Qt4VS2008Base.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\RegQt4VS2008.exe" + + File "${MODULE_VSIP_ROOT}\bin\9.0\QtProjectEngineLib.dll" + + ; Install MS Interop Assemblies + File "${MODULE_VSIP_ROOT}\bin\9.0\Microsoft.VisualStudio.OLE.Interop.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\Microsoft.VisualStudio.Shell.Interop.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\Microsoft.VisualStudio.TextManager.Interop.dll" + + + MODULE_VSIP_ALL: + !insertmacro InstallUnManagedTranslation $0 "1033" + !insertmacro InstallUnManagedTranslation $0 "1031" + !insertmacro InstallUnManagedTranslation $0 "1041" + !insertmacro InstallManagedTranslation $0 "de" + !insertmacro InstallManagedTranslation $0 "ja" + + ;CreateDirectory "$VSIP_INSTDIR\bin\$0\1033" + ;SetOutPath "$VSIP_INSTDIR\bin\$0\1033" + ;SetOverwrite ifnewer + + ;StrCmp $0 "8.0" 0 +2 + ; File "${MODULE_VSIP_ROOT}\bin\8.0\1033\Qt4VS2005UI.dll" + + ;StrCmp $0 "7.1" 0 +2 + ;File "${MODULE_VSIP_ROOT}\bin\7.1\1033\Qt4VS2003UI.dll" + + SetOutPath "$VSIP_INSTDIR\plugins\designer" + SetOverwrite ifnewer + File "${MODULE_VSIP_ROOT}\plugins\designer\qaxwidget.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\qt3supportwidgets.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\customwidgetplugin.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\worldtimeclockplugin.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\containerextension.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\taskmenuextension.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\QtNetwork4.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\Qt3Support4.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\QtSql4.dll" + ${If} $0 != "7.1" + File "${MODULE_VSIP_ROOT}\plugins\designer\phonon4.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\QtWebKit4.dll" + File "${MODULE_VSIP_ROOT}\plugins\designer\qwebview.dll" + ${EndIf} + + SetOutPath "$VSIP_INSTDIR\plugins\imageformats" + SetOverwrite ifnewer + File "${MODULE_VSIP_ROOT}\plugins\imageformats\QtSvg4.dll" + File "${MODULE_VSIP_ROOT}\plugins\imageformats\qsvg4.dll" + File "${MODULE_VSIP_ROOT}\plugins\imageformats\qgif4.dll" + File "${MODULE_VSIP_ROOT}\plugins\imageformats\qjpeg4.dll" + File "${MODULE_VSIP_ROOT}\plugins\imageformats\qtiff4.dll" + File "${MODULE_VSIP_ROOT}\plugins\imageformats\qico4.dll" + + ; Install VC redistributable + Push $0 + Call IsVS2008RedistInstalled + Pop $0 + ${If} $0 == 0 + SetOutPath "$VSIP_INSTDIR" + SetOverwrite ifnewer + File "${MODULE_VSIP_ROOT}\redist\vcredist_x86.exe" + ExecWait '"$VSIP_INSTDIR\vcredist_x86.exe" /q' $0 + Delete "$VSIP_INSTDIR\vcredist_x86.exe" + ${EndIf} + Pop $0 + + ; Install usertype.dat + + Push $0 + Call GetVSInstallationDir + Pop $1 + SetOutPath "$1" + SetOverwrite off ;ifnewer + File "${MODULE_VSIP_ROOT}\usertype.dat" + + Pop $1 + Pop $0 +FunctionEnd + + +Function InstallAddin + Exch $0 + CreateDirectory "$VSIP_INSTDIR\bin\$0" + ClearErrors + SetOutPath "$VSIP_INSTDIR\bin\$0" + SetOverwrite ifnewer + + StrCmp $0 "7.1" MODULE_VSIP_ADDIN_71 + StrCmp $0 "8.0" MODULE_VSIP_ADDIN_80 + File "${MODULE_VSIP_ROOT}\bin\9.0\StartQtVSIP.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\StartQtVSIP2008.AddIn" + WriteRegStr SHCTX "Software\Microsoft\VisualStudio\9.0\AutomationOptions\LookInFolders" "$VSIP_INSTDIR\bin\$0" "" + Goto MODULE_VSIP_ADDIN_End + + MODULE_VSIP_ADDIN_80: + File "${MODULE_VSIP_ROOT}\bin\8.0\StartQtVSIP.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\StartQtVSIP2005.AddIn" + WriteRegStr SHCTX "Software\Microsoft\VisualStudio\8.0\AutomationOptions\LookInFolders" "$VSIP_INSTDIR\bin\$0" "" + Goto MODULE_VSIP_ADDIN_End + + MODULE_VSIP_ADDIN_71: + Push $1 + Push $2 + + Push $0 + Call IsDotNETInstalled + Pop $1 + + File "${MODULE_VSIP_ROOT}\bin\7.1\StartQtVSIP.dll" + + ClearErrors + DetailPrint "Registering StartQtVSIP..." + nsExec::ExecToLog '"$1\regasm.exe" /codebase "StartQtVSIP.dll"' + Pop $2 + StrCmp $2 "error" 0 +3 + MessageBox MB_OK 'The command $\n"$1\regasm.exe" /codebase "StartQtVSIP.dll"$\n failed.' + Goto MODULE_VSIP_ADDIN_71_End + + WriteRegDWORD SHCTX "Software\Microsoft\VisualStudio\7.1\Addins\StartQtVSIP" "CommandLineSafe" 0x00000001 + WriteRegDWORD SHCTX "Software\Microsoft\VisualStudio\7.1\Addins\StartQtVSIP" "CommandPreload" 0x00000000 + WriteRegDWORD SHCTX "Software\Microsoft\VisualStudio\7.1\Addins\StartQtVSIP" "LoadBehavior" 0x00000003 + + MODULE_VSIP_ADDIN_71_End: + Pop $2 + Pop $1 + + MODULE_VSIP_ADDIN_End: + Pop $0 +FunctionEnd + + +Function RegisterIntegration + Exch $0 + Push $1 + Push $2 + Push $3 + + Push $0 + Call GetVSInstallationDir + Pop $1 + + Push $0 + Call IsDotNETInstalled + Pop $2 + + SetOutPath "$VSIP_INSTDIR\bin" + +; MessageBox MB_OK '"$2\regasm.exe" /codebase "$0\bin\QtProjectEngineLib.dll"' +; MessageBox MB_OK '"$0\bin\RegQt4VS${MODULE_VSIP_VS_VERSION}.exe" /templatepath:"$0//" "$0\bin\Qt4VS${MODULE_VSIP_VS_VERSION}.dll"' +; MessageBox MB_OK "Can not setup devenv! The command $\n$1\devenv.exe /setup$\n failed. Try to run in manually!" + + ClearErrors ; clear the error flag + nsExec::ExecToLog '"$2\regasm.exe" /codebase "$VSIP_INSTDIR\bin\$0\QtProjectEngineLib.dll"' + Pop $3 + StrCmp $3 "error" 0 Module_VSIP_RegFormEditor + MessageBox MB_OK "Can not register QtProjectEngineLib.dll!" + MessageBox MB_OK '"$2\regasm.exe" /codebase "$VSIP_INSTDIR\bin\$0\QtProjectEngineLib.dll"' + + Module_VSIP_RegFormEditor: + ClearErrors + push "$VSIP_INSTDIR\bin\formeditor1.dll" + call RegSvr + IfErrors 0 Module_VSIP_RegPackage + MessageBox MB_OK "Can not register formeditor1.dll!" + + Module_VSIP_RegPackage: + StrCpy $VS_VERSION "2008" + StrCmp $0 "8.0" 0 +2 + StrCpy $VS_VERSION "2005" + StrCmp $0 "7.1" 0 +2 + StrCpy $VS_VERSION "2003" + nsExec::ExecToLog '"$VSIP_INSTDIR\bin\$0\RegQt4VS$VS_VERSION.exe" /root:Software\Microsoft\VisualStudio\$0 /templatepath:"$VSIP_INSTDIR//" "$VSIP_INSTDIR\bin\$0\Qt4VS$VS_VERSION.dll"' + Pop $3 + StrCmp $3 "error" 0 Module_VSIP_SetupVS + MessageBox MB_OK "Can not register package!" + + Module_VSIP_SetupVS: + DetailPrint "Calling devenv /setup ..." + nsExec::Exec '"$1\devenv.exe" /setup' + Pop $3 + StrCmp $3 "error" 0 Module_VSIP_SetupOK + MessageBox MB_OK "Can not setup devenv! The command $\n$1\devenv.exe /setup$\n failed. Try to run in manually!" + goto Module_VSIP_EndRegisterPackage + Module_VSIP_SetupOK: + DetailPrint "Running setup was successfull." + Module_VSIP_EndRegisterPackage: + + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + + +Function InstallSamples + CreateDirectory "$VSIP_INSTDIR\samples\AddressBook" + SetOutPath "$VSIP_INSTDIR\samples\AddressBook" + SetOverwrite ifnewer + + File "${MODULE_VSIP_ROOT}\samples\AddressBook\adddialog.cpp" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\adddialog.h" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\adddialog.ui" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\addressbook.cpp" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\addressbook.h" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\AddressBook.ico" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\AddressBook.rc" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\addressbook.ui" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\AddressBook.vcproj" + File "${MODULE_VSIP_ROOT}\samples\AddressBook\main.cpp" +FunctionEnd + +Function InstallResources + CreateDirectory "$VSIP_INSTDIR\resources" + + SetOutPath "$VSIP_INSTDIR\resources" + SetOverWrite ifnewer + + !insertmacro InstallResourceFiles "bmp" "bitmap" + !insertmacro InstallResourceFiles "txt" "text" + !insertmacro InstallResourceFiles "htm" "page" + !insertmacro InstallResourceFiles "xml" "xmlfile" + !insertmacro InstallResourceFiles "png" "image" + !insertmacro InstallResourceFiles "ui" "form" +FunctionEnd + +Function un.InstallVSIP + Exch $0 + + Push $0 + Call un.InstallAddin + + Call un.InstallSamples + + Call un.InstallResources + + Push $VSIP_INSTDIR + Call un.InstallProjectTemplates + + Push $VSIP_INSTDIR + Call un.InstallItemTemplates + + Push $0 + Call un.RegisterIntegration + + Push $0 + Call un.InstallIntegration + + Pop $0 +FunctionEnd + + +Function un.InstallIntegration + Exch $0 + Push $1 + + Delete "$VSIP_INSTDIR\bin\$0\Microsoft.VisualStudio.TextManager.Interop.dll" + Delete "$VSIP_INSTDIR\bin\$0\Microsoft.VisualStudio.Shell.Interop.dll" + Delete "$VSIP_INSTDIR\bin\$0\Microsoft.VisualStudio.OLE.Interop.dll" + Delete "$VSIP_INSTDIR\bin\$0\QtProjectEngineLib.dll" + Delete "$VSIP_INSTDIR\bin\$0\Microsoft.VisualStudio.dll" + + StrCmp $0 "7.1" 0 MODULE_VSIP_UNINST_2005 + ;Delete "$VSIP_INSTDIR\bin\$0\1033\Qt4VS2003UI.dll" + Delete "$VSIP_INSTDIR\bin\$0\RegQt4VS2003.exe" + Delete "$VSIP_INSTDIR\bin\$0\Microsoft.VisualStudio.Designer.Interfaces.dll" + Delete "$VSIP_INSTDIR\bin\$0\Trolltech.Qt4VS2003Base.dll" + Delete "$VSIP_INSTDIR\bin\$0\Qt4VS2003.dll" + Goto MODULE_VSIP_CONTINUE + + MODULE_VSIP_UNINST_2005: + StrCmp $0 "8.0" 0 MODULE_VSIP_UNINST_2008 + ;Delete "$VSIP_INSTDIR\bin\$0\1033\Qt4VS2005UI.dll" + Delete "$VSIP_INSTDIR\bin\$0\RegQt4VS2005.exe" + Delete "$VSIP_INSTDIR\bin\$0\Trolltech.Qt4VS2005Base.dll" + Delete "$VSIP_INSTDIR\bin\$0\Qt4VS2005.dll" + Goto MODULE_VSIP_CONTINUE + + MODULE_VSIP_UNINST_2008: + ;Delete "$VSIP_INSTDIR\bin\$0\1033\Qt4VS2008UI.dll" + Delete "$VSIP_INSTDIR\bin\$0\RegQt4VS2008.exe" + Delete "$VSIP_INSTDIR\bin\$0\Trolltech.Qt4VS2008Base.dll" + Delete "$VSIP_INSTDIR\bin\$0\Qt4VS2008.dll" + + MODULE_VSIP_CONTINUE: + !insertmacro UnInstallUnManagedTranslation $0 "1033" + !insertmacro UnInstallUnManagedTranslation $0 "1031" + !insertmacro UnInstallUnManagedTranslation $0 "1041" + !insertmacro UnInstallManagedTranslation $0 "de" + !insertmacro UnInstallManagedTranslation $0 "ja" + + ;RmDir "$VSIP_INSTDIR\bin\$0\1033" + + Delete "$VSIP_INSTDIR\bin\$0\QtProjectLib.dll" + Delete "$VSIP_INSTDIR\bin\$0\formeditor1Lib.dll" + Delete "$VSIP_INSTDIR\bin\$0\Axformeditor1Lib.dll" + Delete "$VSIP_INSTDIR\bin\$0\Qt4VSa.dll" + RmDir "$VSIP_INSTDIR\bin\$0" + + Delete "$VSIP_INSTDIR\bin\FormEditor1.dll" + Delete "$VSIP_INSTDIR\bin\QtDesigner4.dll" + Delete "$VSIP_INSTDIR\bin\QtDesignerComponents4.dll" + Delete "$VSIP_INSTDIR\bin\QtCore4.dll" + Delete "$VSIP_INSTDIR\bin\QtGui4.dll" + Delete "$VSIP_INSTDIR\bin\QtXml4.dll" + Delete "$VSIP_INSTDIR\bin\QtScript4.dll" + RmDir "$VSIP_INSTDIR\bin" + + Push $0 + Call un.GetVSInstallationDir + Pop $1 + ;Delete "$1\usertype.dat" + + Delete "$VSIP_INSTDIR\plugins\imageformats\QtSvg4.dll" + Delete "$VSIP_INSTDIR\plugins\imageformats\qsvg4.dll" + Delete "$VSIP_INSTDIR\plugins\imageformats\qgif4.dll" + Delete "$VSIP_INSTDIR\plugins\imageformats\qjpeg4.dll" + Delete "$VSIP_INSTDIR\plugins\imageformats\qtiff4.dll" + Delete "$VSIP_INSTDIR\plugins\imageformats\qico4.dll" + RmDir "$VSIP_INSTDIR\plugins\imageformats" + + Delete "$VSIP_INSTDIR\plugins\designer\qaxwidget.dll" + Delete "$VSIP_INSTDIR\plugins\designer\qt3supportwidgets.dll" + Delete "$VSIP_INSTDIR\plugins\designer\customwidgetplugin.dll" + Delete "$VSIP_INSTDIR\plugins\designer\worldtimeclockplugin.dll" + Delete "$VSIP_INSTDIR\plugins\designer\containerextension.dll" + Delete "$VSIP_INSTDIR\plugins\designer\taskmenuextension.dll" + Delete "$VSIP_INSTDIR\plugins\designer\qwebview.dll" + Delete "$VSIP_INSTDIR\plugins\designer\QtSql4.dll" + Delete "$VSIP_INSTDIR\plugins\designer\QtNetwork4.dll" + Delete "$VSIP_INSTDIR\plugins\designer\phonon4.dll" + Delete "$VSIP_INSTDIR\plugins\designer\QtWebKit4.dll" + Delete "$VSIP_INSTDIR\plugins\designer\Qt3Support4.dll" + RmDir "$VSIP_INSTDIR\plugins\designer" + RmDir "$VSIP_INSTDIR\plugins" + + Pop $1 + Pop $0 +FunctionEnd + + +Function un.InstallAddin + Exch $0 + + StrCmp $0 "7.1" MODULE_VSIP_ADDIN_71 0 + StrCmp $0 "8.0" MODULE_VSIP_ADDIN_80 0 + Delete "$VSIP_INSTDIR\bin\$0\StartQtVSIP2008.AddIn" + DeleteRegValue SHCTX "Software\Microsoft\VisualStudio\9.0\AutomationOptions\LookInFolders" "$VSIP_INSTDIR\bin\$0" + Goto MODULE_VSIP_ADDIN_End + + MODULE_VSIP_ADDIN_80: + Delete "$VSIP_INSTDIR\bin\$0\StartQtVSIP2005.AddIn" + DeleteRegValue SHCTX "Software\Microsoft\VisualStudio\8.0\AutomationOptions\LookInFolders" "$VSIP_INSTDIR\bin\$0" + Goto MODULE_VSIP_ADDIN_End + + MODULE_VSIP_ADDIN_71: + Push $1 + Push $2 + + Push $0 + Call un.IsDotNETInstalled + Pop $1 + + ClearErrors + DetailPrint "Unregistering StartQtVSIP..." + nsExec::ExecToLog '"$1\regasm.exe" /unregister "$VSIP_INSTDIR\bin\$0\StartQtVSIP.dll"' + Pop $2 + StrCmp $2 "error" 0 +3 + MessageBox MB_OK 'The command $\n"$1\regasm.exe" /unregister "$VSIP_INSTDIR\bin\$0\StartQtVSIP.dll"$\n failed.' + Goto MODULE_VSIP_ADDIN_71_End + + DeleteRegKey SHCTX "Software\Microsoft\VisualStudio\7.1\Addins\StartQtVSIP" + + MODULE_VSIP_ADDIN_71_End: + Pop $2 + Pop $1 + + MODULE_VSIP_ADDIN_End: + + Delete "$VSIP_INSTDIR\bin\$0\StartQtVSIP.dll" + Pop $0 +FunctionEnd + + +Function un.RegisterIntegration + Exch $0 + Push $1 + Push $2 + Push $3 + + Push $0 + Call un.GetVSInstallationDir + Pop $1 + + Push $0 + Call un.IsDotNETInstalled + Pop $2 + +; UnRegPackage: + IfErrors 0 ; clear the error flag + StrCpy $VS_VERSION "2003" + StrCmp $0 "8.0" 0 +2 + StrCpy $VS_VERSION "2005" + StrCmp $0 "9.0" 0 +2 + StrCpy $VS_VERSION "2008" + + IfFileExists "$VSIP_INSTDIR\bin\$0\RegQt4VS$VS_VERSION.exe" 0 Module_VSIP_UnRegProjectEngine + nsExec::ExecToLog '"$VSIP_INSTDIR\bin\$0\RegQt4VS$VS_VERSION.exe" /root:Software\Microsoft\VisualStudio\$0 /unregister "$VSIP_INSTDIR\bin\$0\Qt4VS$VS_VERSION.dll"' + Pop $3 + StrCmp $3 "error" 0 Module_VSIP_UnRegProjectEngine + MessageBox MB_OK "Can not unregister Package!" + + Module_VSIP_UnRegProjectEngine: + IfFileExists "$VSIP_INSTDIR\bin\$0\QtProjectEngineLib.dll" 0 Module_VSIP_UnRegFormEditor + nsExec::ExecToLog '"$2\regasm.exe" /unregister "$VSIP_INSTDIR\bin\$0\QtProjectEngineLib.dll"' + Pop $3 + StrCmp $3 "error" 0 Module_VSIP_UnRegFormEditor + MessageBox MB_OK "Can not unregister QtProjectEngineLib.dll!" + + Module_VSIP_UnRegFormEditor: + IfFileExists "$VSIP_INSTDIR\bin\formeditor1.dll" 0 Module_VSIP_SetupVS + + ClearErrors + SetOutPath "$VSIP_INSTDIR\bin" + push "$VSIP_INSTDIR\bin\formeditor1.dll" + call un.RegSvr + + Module_VSIP_SetupVS: + SetOutPath "$1" ; don't stay in .\bin + StrCmp $1 "" Module_VSIP_EndUnReg 0 + DetailPrint "Calling devenv /setup ..." + nsExec::Exec '"$1\devenv.exe" /setup' + Pop $3 + StrCmp $3 "error" 0 Module_VSIP_SetupOK + MessageBox MB_OK "Can not setup devenv! The command $\n$1\devenv.exe /setup$\n failed. Try to run in manually!" + Goto Module_VSIP_EndUnReg + Module_VSIP_SetupOK: + DetailPrint "Running setup was successfull." + Module_VSIP_EndUnReg: + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + + +Function un.InstallSamples + Delete "$VSIP_INSTDIR\samples\AddressBook\adddialog.cpp" + Delete "$VSIP_INSTDIR\samples\AddressBook\adddialog.h" + Delete "$VSIP_INSTDIR\samples\AddressBook\adddialog.ui" + Delete "$VSIP_INSTDIR\samples\AddressBook\addressbook.cpp" + Delete "$VSIP_INSTDIR\samples\AddressBook\addressbook.h" + Delete "$VSIP_INSTDIR\samples\AddressBook\AddressBook.ico" + Delete "$VSIP_INSTDIR\samples\AddressBook\AddressBook.rc" + Delete "$VSIP_INSTDIR\samples\AddressBook\addressbook.ui" + Delete "$VSIP_INSTDIR\samples\AddressBook\AddressBook.vcproj" + Delete "$VSIP_INSTDIR\samples\AddressBook\main.cpp" + RMDir "$VSIP_INSTDIR\samples\AddressBook" + RMDir "$VSIP_INSTDIR\samples" +FunctionEnd + +Function un.InstallResources + !insertmacro UnInstallResourceFiles "bmp" "bitmap" + !insertmacro UnInstallResourceFiles "txt" "text" + !insertmacro UnInstallResourceFiles "htm" "page" + !insertmacro UnInstallResourceFiles "xml" "xmlfile" + !insertmacro UnInstallResourceFiles "png" "image" + !insertmacro UnInstallResourceFiles "ui" "form" + + RmDir "$VSIP_INSTDIR\resources" +FunctionEnd +!macroend + +!macro InstallResourceFiles TYPE TMPLNAME + File "${MODULE_VSIP_ROOT}\resources\${TYPE}.xml" + File "${MODULE_VSIP_ROOT}\resources\${TYPE}icon.bmp" + File "${MODULE_VSIP_ROOT}\resources\${TMPLNAME}.${TYPE}" +!macroend + +!macro UnInstallResourceFiles TYPE TMPLNAME + Delete "$VSIP_INSTDIR\resources\${TYPE}.xml" + Delete "$VSIP_INSTDIR\resources\${TYPE}icon.bmp" + Delete "$VSIP_INSTDIR\resources\${TMPLNAME}.${TYPE}" +!macroend + +!macro InstallUnManagedTranslation VS_SHORT LOCALE + CreateDirectory "$VSIP_INSTDIR\bin\${VS_SHORT}\${LOCALE}" + SetOutPath "$VSIP_INSTDIR\bin\${VS_SHORT}\${LOCALE}" + SetOverwrite ifnewer + + StrCmp ${VS_SHORT} "9.0" 0 +2 + File "${MODULE_VSIP_ROOT}\bin\9.0\${LOCALE}\Qt4VS2008UI.dll" + + StrCmp ${VS_SHORT} "8.0" 0 +2 + File "${MODULE_VSIP_ROOT}\bin\8.0\${LOCALE}\Qt4VS2005UI.dll" + + StrCmp ${VS_SHORT} "7.1" 0 +2 + File "${MODULE_VSIP_ROOT}\bin\7.1\${LOCALE}\Qt4VS2003UI.dll" +!macroend + +!macro UnInstallUnManagedTranslation VS_SHORT LOCALE + StrCmp ${VS_SHORT} "9.0" 0 +2 + Delete "$VSIP_INSTDIR\bin\9.0\${LOCALE}\Qt4VS2008UI.dll" + + StrCmp ${VS_SHORT} "8.0" 0 +2 + Delete "$VSIP_INSTDIR\bin\8.0\${LOCALE}\Qt4VS2005UI.dll" + + StrCmp ${VS_SHORT} "7.1" 0 +2 + Delete "$VSIP_INSTDIR\bin\7.1\${LOCALE}\Qt4VS2003UI.dll" + + RMDir "$VSIP_INSTDIR\bin\${VS_SHORT}\${LOCALE}" +!macroend + +!macro InstallManagedTranslation VS_SHORT LOCALE + CreateDirectory "$VSIP_INSTDIR\bin\${VS_SHORT}\${LOCALE}" + SetOutPath "$VSIP_INSTDIR\bin\${VS_SHORT}\${LOCALE}" + SetOverwrite ifnewer + + StrCmp ${VS_SHORT} "9.0" 0 +3 + File "${MODULE_VSIP_ROOT}\bin\9.0\${LOCALE}\Qt4VS2008.resources.dll" + File "${MODULE_VSIP_ROOT}\bin\9.0\${LOCALE}\QtProjectLib.resources.dll" + + StrCmp ${VS_SHORT} "8.0" 0 +3 + File "${MODULE_VSIP_ROOT}\bin\8.0\${LOCALE}\Qt4VS2005.resources.dll" + File "${MODULE_VSIP_ROOT}\bin\8.0\${LOCALE}\QtProjectLib.resources.dll" + + StrCmp ${VS_SHORT} "7.1" 0 +3 + File "${MODULE_VSIP_ROOT}\bin\7.1\${LOCALE}\Qt4VS2003.resources.dll" + File "${MODULE_VSIP_ROOT}\bin\7.1\${LOCALE}\QtProjectLib.resources.dll" +!macroend + +!macro UnInstallManagedTranslation VS_SHORT LOCALE + StrCmp ${VS_SHORT} "9.0" 0 +2 + Delete "$VSIP_INSTDIR\bin\9.0\${LOCALE}\Qt4VS2008.resources.dll" + + StrCmp ${VS_SHORT} "8.0" 0 +2 + Delete "$VSIP_INSTDIR\bin\8.0\${LOCALE}\Qt4VS2005.resources.dll" + + StrCmp ${VS_SHORT} "7.1" 0 +2 + Delete "$VSIP_INSTDIR\bin\7.1\${LOCALE}\Qt4VS2003.resources.dll" + + Delete "$VSIP_INSTDIR\bin\${VS_SHORT}\${LOCALE}\QtProjectLib.resources.dll" + RMDir "$VSIP_INSTDIR\bin\${VS_SHORT}\${LOCALE}" +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro VSIP_DESCRIPTION + !insertmacro MUI_DESCRIPTION_TEXT ${VSIP_SEC01} "Qt Integration for Visual Studio .NET 2003 v${MODULE_VSIP_VERSION}." + !insertmacro MUI_DESCRIPTION_TEXT ${VSIP_SEC02} "Qt Integration for Visual Studio .NET 2005 v${MODULE_VSIP_VERSION}." + !insertmacro MUI_DESCRIPTION_TEXT ${VSIP_SEC03} "Qt Integration for Visual Studio .NET 2008 v${MODULE_VSIP_VERSION}." +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro VSIP_STARTUP + Push $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + Push $6 + + ClearErrors + StrCmp "$RUNNING_AS_ADMIN" "false" 0 Module_VSIP_CheckForInstallation +!ifndef MODULE_VSIP_NO2003 + SectionSetFlags ${VSIP_SEC01} "16" +!endif +!ifndef MODULE_VSIP_NO2005 + SectionSetFlags ${VSIP_SEC02} "16" +!endif +!ifndef MODULE_VSIP_NO2008 + SectionSetFlags ${VSIP_SEC03} "16" +!endif + Module_VSIP_CheckForInstallation: + + StrCpy $2 "0" + StrCpy $4 "0" + StrCpy $5 "0" + + ClearErrors + + Push "7.1" + Call IsIntegrationInstalled + Pop $1 + +!ifndef MODULE_VSIP_NO2003 + Push "7.1" + Call IsQMsNetInstalled + Pop $4 + + IntCmp $1 0 +2 + SectionSetFlags ${VSIP_SEC01} "16" + + Push "7.1" + Call GetVSInstallationDir + Pop $3 + StrCmp $3 "" 0 +2 + SectionSetFlags ${VSIP_SEC01} "16" +!endif + + ClearErrors + + Push "8.0" + Call IsIntegrationInstalled + Pop $1 + +!ifndef MODULE_VSIP_NO2005 + Push "8.0" + Call IsQMsNetInstalled + Pop $2 + + IntCmp $1 0 +2 + SectionSetFlags ${VSIP_SEC02} "16" + + Push "8.0" + Call GetVSInstallationDir + Pop $3 + StrCmp $3 "" 0 +3 + SectionSetFlags ${VSIP_SEC02} "16" + Goto VSIP_STARTUP_2008 + + Call IsVS2005SP1Installed + Pop $1 + ${If} $1 == 0 + SectionSetFlags ${VSIP_SEC02} ${SF_RO} + MessageBox MB_OK|MB_ICONEXCLAMATION "Service Pack 1 for Visual Studio 2005 is not installed.$\n${PRODUCT_NAME} for VS 2005 will not work properly without it.$\nYou will not be able to choose the ${PRODUCT_NAME} for VS 2005 component for installation." + ${EndIf} + + Call IsDotNet2SP1Installed + Pop $1 + ${If} $1 == 0 + StrCpy $6 "1" + SectionSetFlags ${VSIP_SEC02} ${SF_RO} + MessageBox MB_OK|MB_ICONEXCLAMATION "Service Pack 1 for .NET Framework 2.0 is not installed.$\n${PRODUCT_NAME} for VS 2005 will not work properly without it.$\nYou will not be able to choose the ${PRODUCT_NAME} for VS 2005 component for installation." + ${Else} + StrCpy $6 "0" + ${EndIf} +VSIP_STARTUP_2008: +!endif + + ClearErrors + + Push "9.0" + Call IsIntegrationInstalled + Pop $1 + +!ifndef MODULE_VSIP_NO2008 + Push "9.0" + Call IsQMsNetInstalled + Pop $5 + + IntCmp $1 0 +2 + SectionSetFlags ${VSIP_SEC03} "16" + + Push "9.0" + Call GetVSInstallationDir + Pop $3 + StrCmp $3 "" 0 +2 + SectionSetFlags ${VSIP_SEC03} "16" + + ${If} $6 == "0" + Call IsDotNet2SP1Installed + Pop $1 + ${If} $1 == 0 + SectionSetFlags ${VSIP_SEC02} ${SF_RO} + MessageBox MB_OK|MB_ICONEXCLAMATION "Service Pack 1 for .NET Framework 2.0 is not installed.$\n${PRODUCT_NAME} for VS 2008 will not work properly without it.$\nYou will not be able to choose the ${PRODUCT_NAME} for VS 2008 component for installation." + ${EndIf} + ${EndIf} +!endif + + IntOp $1 $2 + $4 + IntOp $1 $1 + $5 + IntCmp $1 0 +2 + MessageBox MB_OK|MB_ICONEXCLAMATION "The installer has detected that the Qt Visual Studio Add-In is installed.$\r$\nThe Add-In conflicts with the integration." + + StrCpy $VSIP_INSTDIR "$PROGRAMFILES\Nokia\Qt VS Integration" + +!ifndef MODULE_VSIP_NO2003 + SectionSetSize ${VSIP_SEC01} 7000 +!endif +!ifndef MODULE_VSIP_NO2005 + SectionSetSize ${VSIP_SEC02} 7000 +!endif +!ifndef MODULE_VSIP_NO2008 + SectionSetSize ${VSIP_SEC03} 7000 +!endif + + Pop $6 + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro VSIP_FINISH +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro VSIP_UNSTARTUP + !insertmacro ConfirmOnRemove "Qt4VS2003" "Qt Visual Studio Integration (VS2003)" + !insertmacro ConfirmOnRemove "Qt4VS2005" "Qt Visual Studio Integration (VS2005)" + !insertmacro ConfirmOnRemove "Qt4VS2008" "Qt Visual Studio Integration (VS2008)" +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro VSIP_UNINSTALL + + Push $0 + Push $1 + Push $2 + + ReadRegDWord $0 SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VS2003" + IntCmp $0 1 0 MODULE_VSIP_UNINSTALL2005 + StrCpy $VS_VERSION_SHORT "7.1" + StrCpy $VS_VERSION "2003" + Push $VS_VERSION_SHORT + Call un.InstallVSIP + !insertmacro un.InstallHelpInVS "qt4vs" "$VS_VERSION_SHORT" + + MODULE_VSIP_UNINSTALL2005: + ReadRegDWord $1 SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VS2005" + IntCmp $1 1 0 MODULE_VSIP_UNINSTALL2008 + StrCpy $VS_VERSION_SHORT "8.0" + StrCpy $VS_VERSION "2005" + Push $VS_VERSION_SHORT + Call un.InstallVSIP + !insertmacro un.InstallHelpInVS "qt4vs" "$VS_VERSION_SHORT" + + MODULE_VSIP_UNINSTALL2008: + ReadRegDWord $2 SHCTX "$PRODUCT_UNIQUE_KEY" "Qt4VS2008" + IntCmp $2 1 0 MODULE_VSIP_UNINSTALL_COMMON + StrCpy $VS_VERSION_SHORT "9.0" + StrCpy $VS_VERSION "2008" + Push $VS_VERSION_SHORT + Call un.InstallVSIP + !insertmacro un.InstallHelpInVS "qt4vs" "$VS_VERSION_SHORT" + + MODULE_VSIP_UNINSTALL_COMMON: + Delete "$SMPROGRAMS\$STARTMENU_STRING\Visual Studio Integration Readme.lnk" + + IfFileExists "$VSIP_INSTDIR\help\h2reg.exe" 0 MODULE_VSIP_UNINSTALL_HELP_DONE + !insertmacro un.RegisterHelp "$VSIP_INSTDIR\help" "qt4vs" + !insertmacro un.InstallHelp "$VSIP_INSTDIR\help" "qt4vs" "0.0" + Push "$VSIP_INSTDIR\help" + Call un.DeleteH2RegFiles + MODULE_VSIP_UNINSTALL_HELP_DONE: + + Delete "$VSIP_INSTDIR\Readme.txt" + Delete "$VSIP_INSTDIR\ui.ico" + Delete "$VSIP_INSTDIR\Changes-${MODULE_VSIP_VERSION}" + RmDir "$VSIP_INSTDIR" + + Pop $2 + Pop $1 + Pop $0 + +!macroend + +;------------------------------------------------------------------------------------------------ + +!macro VSIP_UNFINISH +!macroend + +;------------------------------------------------------------------------------------------------ + +!else +!macro VSIP_INITIALIZE +!macroend +!macro VSIP_SECTIONS +!macroend +!macro VSIP_MERGE_HELP_NAMESPACE_SECTIONS +!macroend +!macro VSIP_DESCRIPTION +!macroend +!macro VSIP_STARTUP +!macroend +!macro VSIP_FINISH +!macroend +!macro VSIP_UNSTARTUP +!macroend +!macro VSIP_CLEANUP_HELP_NAMESPACE +!macroend +!macro VSIP_UNINSTALL +!macroend +!macro VSIP_UNFINISH +!macroend +!endif diff --git a/util/scripts/win-binary/nsis/opensource.ini b/util/scripts/win-binary/nsis/opensource.ini new file mode 100644 index 0000000..03d6178 --- /dev/null +++ b/util/scripts/win-binary/nsis/opensource.ini @@ -0,0 +1,38 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=4 + +[Field 1] +Type=Label +Text=You are now installing the Open Source Edition of Qt. It is licensed under GNU LGPL version 2.1 and the GPL version 3. +Left=0 +Right=300 +Top=0 +Bottom=78 + +[Field 2] +Type=Link +Text=http://qtsoftware.com/developer/downloads/qt +State=http://qtsoftware.com/developer/downloads/qt +Left=0 +Right=278 +Top=80 +Bottom=88 + +[Field 3] +Type=Link +Text=http://qtsoftware.com/company/model +State=http://qtsoftware.com/company/model +Left=0 +Right=267 +Top=112 +Bottom=120 + +[Field 4] +Type=Label +Text=To read more about Nokia's licensing, please go to: +Left=0 +Right=278 +Top=97 +Bottom=105 + diff --git a/util/scripts/win-binary/nsis/qsa.ini b/util/scripts/win-binary/nsis/qsa.ini new file mode 100644 index 0000000..7af62e2 --- /dev/null +++ b/util/scripts/win-binary/nsis/qsa.ini @@ -0,0 +1,28 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=3 + +[Field 1] +Type=Groupbox +Text=QSA Build Options +Left=0 +Right=299 +Top=9 +Bottom=65 + +[Field 2] +Type=Checkbox +Text=Don't compile QSA Workbench into QSA. +Left=20 +Right=284 +Top=27 +Bottom=37 + +[Field 3] +Type=Checkbox +Text=Don't compile QSA Workbench nor QSA Editor into QSA. +Left=20 +Right=247 +Top=45 +Bottom=56 + diff --git a/util/scripts/win-binary/nsis/qtdir.ini b/util/scripts/win-binary/nsis/qtdir.ini new file mode 100644 index 0000000..698a1d6 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtdir.ini @@ -0,0 +1,70 @@ +; Ini file generated by the HM NIS Edit IO designer. +[Settings] +NumFields=8 + +[Field 1] +Type=Groupbox +Text=Select Qt Version +Left=0 +Right=299 +Top=65 +Bottom=130 + +[Field 2] +Type=Label +Text=Please choose a Qt Version from the detected versions list. If the Qt Version you want to use is missing from the list, you should specify QTDIR manually. +Left=4 +Right=294 +Top=1 +Bottom=20 + +[Field 3] +Type=Droplist +Text=Droplist +Flags=NOTIFY +Left=9 +Right=290 +Top=85 +Bottom=138 +ListItems= + +[Field 4] +Type=Label +Text=Detected Qt Versions: +Left=9 +Right=154 +Top=76 +Bottom=84 + +[Field 5] +Type=DirRequest +Left=9 +Right=290 +Top=110 +Bottom=123 + +[Field 6] +Type=Label +Text=Specify QTDIR manually: +Left=9 +Right=154 +Top=102 +Bottom=110 + +[Field 7] +Type=Groupbox +Text=Select a Compiler +Left=0 +Right=299 +Top=24 +Bottom=59 + +[Field 8] +Type=Droplist +Text=Droplist +ListItems= +Left=9 +Right=290 +Top=39 +Bottom=89 + diff --git a/util/scripts/win-binary/nsis/qtjambieclipse.ini b/util/scripts/win-binary/nsis/qtjambieclipse.ini new file mode 100644 index 0000000..2898c24 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtjambieclipse.ini @@ -0,0 +1,26 @@ +[Settings] +NumFields=3 + +[Field 1] +Type=Groupbox +Text=Eclipse Installation +Left=1 +Right=300 +Top=8 +Bottom=59 + +[Field 2] +Type=DirRequest +State=C:\Eclipse +Left=12 +Right=286 +Top=33 +Bottom=46 + +[Field 3] +Type=Label +Text=Select the Eclipse installation you want to use: +Left=12 +Right=157 +Top=22 +Bottom=30 diff --git a/util/scripts/win-binary/nsis/qtnsisext/binpatch.cpp b/util/scripts/win-binary/nsis/qtnsisext/binpatch.cpp new file mode 100644 index 0000000..1c5109c --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/binpatch.cpp @@ -0,0 +1,216 @@ +/**************************************************************************** +** +** 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 <stdio.h> +#include <locale> + +#include "binpatch.h" + +// returns positive value if it finds a null termination inside the buffer +long BinPatch::getBufferStringLength(char *data, char *end) +{ + long size = 0; + while (data < end) { + if (*data == '\0') + return size; + ++data; + ++size; + } + + return -1; +} + +// returns true if data ends with one of the tokens. (Sep. with ;) +bool BinPatch::endsWithTokens(const char *data) +{ + if(strlen(endTokens) > 0) { + char endstmp[1024]; + ulong tlen = ulong(strlen(data)); + + if(strlen(endTokens) >= sizeof(endstmp)) + return false; + + strcpy(endstmp, endTokens); + + char *token = strtok(endstmp, ";"); + + while(token != NULL) { + // check if it ends with the token + if ((tlen >= strlen(token)) + && (stricmp((data+tlen)-strlen(token), token) == 0)) + return true; + token = strtok(NULL, ";"); + } + } else { + return true; //true if no tokens + } + + return false; //no matching tokens +} + +bool BinPatch::patchHelper(char *inbuffer, const char *oldstr, const char *newstr, size_t len, long *rw) +{ + char nc1 = *oldstr; + char nc2 = 0; + char *inend = inbuffer + len; + size_t oldlen = strlen(oldstr); + size_t newlen = strlen(newstr); + char *instart = inbuffer; + *rw = 0; + bool write = true; + + isupper(nc1) ? nc2 = tolower(nc1) : nc2 = toupper(nc1); + + while(inbuffer < inend) { + if ((*inbuffer == nc1) || (*inbuffer == nc2)) { + if (inbuffer > (inend-oldlen) || inbuffer > (inend-newlen)) { + *rw = (long)(inend-inbuffer); //rewind, not enough to make a compare + break; + } + + if (strnicmp(inbuffer, oldstr, oldlen) == 0) { + if (useLength && (instart == inbuffer)) { + *rw = (long)(len+1); //we don't have access to the length byte, rewind all + 1! + write = false; + break; + } + + long oldsize = -1; + if (useLength) { //VC60 + oldsize = (unsigned char)(*(inbuffer-1)); + + // vc60 pdb files sometimes uses 0A, then it should be null terminated + if (oldsize < (long)oldlen) { + if (oldsize != 0x0A) { //strange case... skip + inbuffer+=oldlen; + continue; + } + + oldsize = getBufferStringLength(inbuffer, inend); + + if (oldsize < 0) { + *rw = (long)(inend-inbuffer); //rewind, entire string not in buffer + break; + } + } + + if (inbuffer > (inend-oldsize)) { + *rw = (long)(inend-inbuffer); //rewind, entire string not in buffer + break; + } + } else { //VC7x + oldsize = getBufferStringLength(inbuffer, inend); + if (oldsize < 0) { + *rw = (long)(inend-inbuffer); //rewind, entire string not in buffer + break; + } + } + + char oldPath[1024]; + if (oldsize > sizeof(oldPath)) { + //at least don't crash + inbuffer+=oldsize; + continue; + } + memset(oldPath, '\0', sizeof(oldPath)); + strncpy(oldPath, newstr, newlen); + + if (insertReplace) + strncat(oldPath, inbuffer+oldlen, oldsize-oldlen); + + // just replace if it ends with a token in endTokens + if (endsWithTokens(oldPath)) { + if (oldsize < (long)strlen(oldPath)) + oldsize = (long)strlen(oldPath); + + memcpy(inbuffer, oldPath, oldsize); + } + + inbuffer+=oldsize; + continue; + } + } + ++inbuffer; + } + + return write; +} + +bool BinPatch::patch(const char *oldstr, const char *newstr) +{ + size_t oldlen = strlen(oldstr); + size_t newlen = strlen(newstr); + + if ((!fileName || strlen(fileName) < 1) + || (!oldstr || oldlen < 1) + || (!newstr || newlen < 1)) + return false; + + FILE *input; + + if (!(input = fopen(fileName, "r+b"))) + { + fprintf(stderr, "Cannot open file %s!\n", fileName); + return false; + } + + char data[60000]; + long rw = 0; + long offset = 0; + + size_t len; + len = fread(data, sizeof(char), sizeof(data), input); + + do { + if (patchHelper(data, oldstr, newstr, len, &rw)) { + fseek(input, offset, SEEK_SET); //overwrite + fwrite(data, sizeof(char), len, input); + } + + offset += (long)((-rw) + len); + if (fseek(input, offset, SEEK_SET) != 0) + break; + len = fread(data, sizeof(char), sizeof(data), input); + } while(!(feof(input) && (len <= oldlen || len <= newlen))); + + fclose(input); + + return true; +} diff --git a/util/scripts/win-binary/nsis/qtnsisext/binpatch.h b/util/scripts/win-binary/nsis/qtnsisext/binpatch.h new file mode 100644 index 0000000..7cbc6a5 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/binpatch.h @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ +#ifndef BINPATCH_H +#define BINPATCH_H + +#include <string.h> + +typedef unsigned long ulong; +typedef unsigned int uint; + +class BinPatch +{ +public: + BinPatch(const char *file) + : useLength(false), insertReplace(false) + { + strcpy(endTokens, ""); + strcpy(fileName, file); + } + + void enableUseLength(bool enabled) + { useLength = enabled; } + void enableInsertReplace(bool enabled) + { insertReplace = enabled; } + void setEndTokens(const char *tokens) + { strcpy(endTokens, tokens); } + + bool patch(const char *oldstr, const char *newstr); + +private: + long getBufferStringLength(char *data, char *end); + bool endsWithTokens(const char *data); + + bool patchHelper(char *inbuffer, const char *oldstr, + const char *newstr, size_t len, long *rw); + + bool useLength; + bool insertReplace; + char endTokens[1024]; + char fileName[1024]; +}; + +#endif
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/qtnsisext/exdll.h b/util/scripts/win-binary/nsis/qtnsisext/exdll.h new file mode 100644 index 0000000..3f5a0ef --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/exdll.h @@ -0,0 +1,137 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ +#ifndef _EXDLL_H_ +#define _EXDLL_H_ + +// only include this file from one place in your DLL. +// (it is all static, if you use it in two places it will fail) + +#define EXDLL_INIT() { \ + g_stringsize=string_size; \ + g_stacktop=stacktop; \ + g_variables=variables; } + +// For page showing plug-ins +#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8) +#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd) +#define NOTIFY_BYE_BYE 'x' + +typedef struct _stack_t { + struct _stack_t *next; + char text[1]; // this should be the length of string_size +} stack_t; + + +static unsigned int g_stringsize; +static stack_t **g_stacktop; +static char *g_variables; + +static int __stdcall popstring(char *str); // 0 on success, 1 on empty stack +static void __stdcall pushstring(char *str); + +enum +{ +INST_0, // $0 +INST_1, // $1 +INST_2, // $2 +INST_3, // $3 +INST_4, // $4 +INST_5, // $5 +INST_6, // $6 +INST_7, // $7 +INST_8, // $8 +INST_9, // $9 +INST_R0, // $R0 +INST_R1, // $R1 +INST_R2, // $R2 +INST_R3, // $R3 +INST_R4, // $R4 +INST_R5, // $R5 +INST_R6, // $R6 +INST_R7, // $R7 +INST_R8, // $R8 +INST_R9, // $R9 +INST_CMDLINE, // $CMDLINE +INST_INSTDIR, // $INSTDIR +INST_OUTDIR, // $OUTDIR +INST_EXEDIR, // $EXEDIR +INST_LANG, // $LANGUAGE +__INST_LAST +}; + + +// utility functions (not required but often useful) +static int __stdcall popstring(char *str) +{ + stack_t *th; + if (!g_stacktop || !*g_stacktop) return 1; + th=(*g_stacktop); + lstrcpy(str,th->text); + *g_stacktop = th->next; + GlobalFree((HGLOBAL)th); + return 0; +} + +static void __stdcall pushstring(char *str) +{ + stack_t *th; + if (!g_stacktop) return; + th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize); + lstrcpyn(th->text,str,g_stringsize); + th->next=*g_stacktop; + *g_stacktop=th; +} + +static char * __stdcall getuservariable(int varnum) +{ + if (varnum < 0 || varnum >= __INST_LAST) return NULL; + return g_variables+varnum*g_stringsize; +} + +static void __stdcall setuservariable(int varnum, char *var) +{ + if (var != NULL && varnum >= 0 && varnum < __INST_LAST) + lstrcpy(g_variables + varnum*g_stringsize, var); +} + + + +#endif//_EXDLL_H_
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/qtnsisext/licensefinder.cpp b/util/scripts/win-binary/nsis/qtnsisext/licensefinder.cpp new file mode 100644 index 0000000..7de1618 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/licensefinder.cpp @@ -0,0 +1,250 @@ +/**************************************************************************** +** +** 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 <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include "licensefinder.h" + +LicenseFinder::LicenseFinder() +{ + searched = false; + memset(licensee, '\0', sizeof(licensee)*sizeof(char)); + memset(m_key, '\0', sizeof(m_key)*sizeof(char)); + memset(m_oldkey, '\0', sizeof(m_oldkey)*sizeof(char)); + memset(m_customerId, '\0', sizeof(m_customerId)*sizeof(char)); + memset(m_products, '\0', sizeof(m_products)*sizeof(char)); + memset(m_expiryDate, '\0', sizeof(m_expiryDate)*sizeof(char)); +} + +char *LicenseFinder::getLicensee() +{ + if (!searched) + searchLicense(); + + return licensee; +} + +char *LicenseFinder::getLicenseKey() +{ + if (!searched) + searchLicense(); + + return m_key; +} + +char *LicenseFinder::getOldLicenseKey() +{ + if (!searched) + searchLicense(); + + return m_oldkey; +} + +char *LicenseFinder::getCustomerID() +{ + if (!searched) + searchLicense(); + + return m_customerId; +} + +char *LicenseFinder::getProducts() +{ + if (!searched) + searchLicense(); + + return m_products; +} + +char *LicenseFinder::getExpiryDate() +{ + if (!searched) + searchLicense(); + + return m_expiryDate; +} + +void LicenseFinder::searchLicense() +{ + searched = true; + char *path = getenv("HOME"); + if (path && lookInDirectory(path)) + return; + + path = getenv("USERPROFILE"); + if (path && lookInDirectory(path)) + return; + + path = getenv("HOMEDRIVE"); + if (path) { + char *dir = getenv("HOMEPATH"); + if (dir) { + char *combined = (char*)malloc(sizeof(char)*(strlen(path) + strlen(dir) + 1)); + strcpy(combined, path); + strcat(combined, dir); + lookInDirectory(combined); + free(combined); + } + } +} + +bool LicenseFinder::lookInDirectory(const char *dir) +{ + FILE *f; + char file[_MAX_PATH]; + char buf[60000]; + + // reset the buffers again, just to be safe :) + memset(file, '\0', sizeof(file)); + memset(buf, '\0', sizeof(buf)); + memset(licensee, '\0', sizeof(licensee)); + memset(m_key, '\0', sizeof(m_key)); + memset(m_oldkey, '\0', sizeof(m_oldkey)); + memset(m_customerId, '\0', sizeof(m_customerId)); + memset(m_products, '\0', sizeof(m_products)); + memset(m_expiryDate, '\0', sizeof(m_expiryDate)); + + if (((strlen(dir)+strlen("\\.qt-license"))*sizeof(char)) >= _MAX_PATH) + return false; + + strcpy(file, dir); + strcat(file, "\\.qt-license"); + if ((f = fopen(file, "r")) == NULL) + return false; + + size_t r = fread(buf, sizeof(char), 59999, f); + buf[r] = '\0'; + + /* Licensee */ + const char *pat1 = "Licensee=\""; + char *tmp = findPattern(buf, pat1, ulong(r)); + if (tmp && (strlen(tmp) > 1)) { + char *end = strchr(tmp, '\"'); + if (end && ((end-tmp) < MAX_LICENSEE_LENGTH)) + strncpy(licensee, tmp, end-tmp); + } + + /* LicenseKey */ + const char *pat2 = "LicenseKeyExt="; + tmp = findPattern(buf, pat2, ulong(r)); + if (tmp) { + char *end = strchr(tmp, '\r'); + if (!end) + end = strchr(tmp, '\n'); + if (end && ((end-tmp) < MAX_KEY_LENGTH)) + strncpy(m_key, tmp, end-tmp); + else if (strlen(tmp) < MAX_KEY_LENGTH) + strcpy(m_key, tmp); + } + + /* OldLicenseKey */ + const char *pat3 = "LicenseKey="; + tmp = findPattern(buf, pat3, ulong(r)); + if (tmp) { + char *end = strchr(tmp, '\r'); + if (!end) + end = strchr(tmp, '\n'); + if (end && ((end-tmp) < MAX_KEY_LENGTH)) + strncpy(m_oldkey, tmp, end-tmp); + else if (strlen(tmp) < MAX_KEY_LENGTH) + strcpy(m_oldkey, tmp); + } + + /* CustomerID */ + const char *pat4 = "CustomerID=\""; + tmp = findPattern(buf, pat4, ulong(r)); + if (tmp && (strlen(tmp) > 1)) { + char *end = strchr(tmp, '\"'); + if (end && ((end-tmp) < MAX_QT3INFO_LENGTH)) + strncpy(m_customerId, tmp, end-tmp); + } + + /* Products */ + const char *pat5 = "Products=\""; + tmp = findPattern(buf, pat5, ulong(r)); + if (tmp && (strlen(tmp) > 1)) { + char *end = strchr(tmp, '\"'); + if (end && ((end-tmp) < MAX_QT3INFO_LENGTH)) + strncpy(m_products, tmp, end-tmp); + } + + /* ExpiryDate */ + const char *pat6 = "ExpiryDate="; + tmp = findPattern(buf, pat6, ulong(r)); + if (tmp) { + char *end = strchr(tmp, '\r'); + if (!end) + end = strchr(tmp, '\n'); + if (end && ((end-tmp) < MAX_QT3INFO_LENGTH)) + strncpy(m_expiryDate, tmp, end-tmp); + else if (strlen(tmp) < MAX_QT3INFO_LENGTH) + strcpy(m_expiryDate, tmp); + } + + fclose(f); + + return true; +} + +/* copied from binpatch.cpp */ +char *LicenseFinder::findPattern(char *h, const char *n, ulong hlen) +{ + if (!h || !n || hlen == 0) + return 0; + + ulong nlen; + + char nc = *n++; + nlen = ulong(strlen(n)); + char hc; + + do { + do { + hc = *h++; + if (hlen-- < 1) + return 0; + } while (hc != nc); + if (nlen > hlen) + return 0; + } while (strncmp(h, n, nlen) != 0); + return h + nlen; +}
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/qtnsisext/licensefinder.h b/util/scripts/win-binary/nsis/qtnsisext/licensefinder.h new file mode 100644 index 0000000..0957d65 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/licensefinder.h @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ +#ifndef LICENSEFINDER_H +#define LICENSEFINDER_H + +#define MAX_KEY_LENGTH 512 +#define MAX_LICENSEE_LENGTH 512 +#define MAX_QT3INFO_LENGTH 512 + +typedef unsigned long ulong; + +class LicenseFinder +{ +public: + LicenseFinder(); + char *getLicenseKey(); + char *getOldLicenseKey(); + char *getLicensee(); + char *getCustomerID(); + char *getProducts(); + char *getExpiryDate(); + +private: + void searchLicense(); + bool lookInDirectory(const char* dir); + char *findPattern(char *h, const char *n, ulong hlen); + bool searched; + char m_key[MAX_KEY_LENGTH]; + char m_oldkey[MAX_KEY_LENGTH]; + char licensee[MAX_LICENSEE_LENGTH]; + char m_customerId[MAX_QT3INFO_LENGTH]; + char m_products[MAX_QT3INFO_LENGTH]; + char m_expiryDate[MAX_QT3INFO_LENGTH]; +}; + +#endif
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/qtnsisext/mingw.cpp b/util/scripts/win-binary/nsis/qtnsisext/mingw.cpp new file mode 100644 index 0000000..15ff3c1 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/mingw.cpp @@ -0,0 +1,156 @@ +/**************************************************************************** +** +** 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 <windows.h> +#include <io.h> +#include <stdio.h> +#include "mingw.h" + +HANDLE hChildStdoutWr, hChildStdoutRd; + +#define VERSION_SIZE 30 +#define WIN32_VERSION_STRING "__W32API_VERSION 3.2" + +BOOL CreateChildProcess(char *command) +{ + PROCESS_INFORMATION piProcInfo; + STARTUPINFOA siStartInfo; + BOOL bFuncRetn = FALSE; + + ZeroMemory( &piProcInfo, sizeof(PROCESS_INFORMATION) ); + + ZeroMemory( &siStartInfo, sizeof(STARTUPINFOA) ); + siStartInfo.cb = sizeof(STARTUPINFOA); + siStartInfo.hStdError = hChildStdoutWr; + siStartInfo.hStdOutput = hChildStdoutWr; + siStartInfo.dwFlags |= STARTF_USESTDHANDLES; + + bFuncRetn = CreateProcessA(NULL, + command, + NULL, // process security attributes + NULL, // thread security attributes + TRUE, // inherit handles + CREATE_NO_WINDOW, + NULL, // use environment + NULL, // use current directory + &siStartInfo, + &piProcInfo); + + if (bFuncRetn == 0) + return 0; + else + { + CloseHandle(piProcInfo.hProcess); + CloseHandle(piProcInfo.hThread); + return bFuncRetn; + } +} + +void getMinGWVersion(char *path, int *major, int *minor, int *patch) +{ + char command[MINGW_BUFFER_SIZE]; + char instr[VERSION_SIZE]; + + strcpy(command, path); + strcat(command, "\\bin\\gcc.exe --version"); + + SECURITY_ATTRIBUTES saAttr; + + saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); + saAttr.bInheritHandle = TRUE; + saAttr.lpSecurityDescriptor = NULL; + + if (!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0)) + return;; + + if (CreateChildProcess(command) == 0) + return; + + DWORD nBytes = 0; + ReadFile(hChildStdoutRd, instr, VERSION_SIZE, &nBytes, NULL); + instr[VERSION_SIZE-1] = '\0'; + + char *gcc = strstr(instr, "(GCC)"); + if (gcc == NULL) + return; + + sscanf(gcc, "(GCC) %d.%d.%d ", major, minor, patch); +} + +bool hasValidIncludeFiles(char *path) +{ + char filename[MINGW_BUFFER_SIZE]; + char buffer[MINGW_BUFFER_SIZE]; + + strcpy(filename, path); + strcat(filename, "\\include\\w32api.h"); + + FILE *finc; + if ((finc = fopen(filename, "rb")) == NULL) + return false; + + memset(buffer, '\0', sizeof(char)*MINGW_BUFFER_SIZE); + fread(buffer, sizeof(char), MINGW_BUFFER_SIZE-1, finc); + + if (strstr(buffer, WIN32_VERSION_STRING) != NULL) + return true; + + return false; +} + +bool shInEnvironment() +{ + char chpath[_MAX_PATH]; + char *env = getenv("PATH"); + char seps[] = ";"; + char *path; + + path = strtok(env, seps); + while(path != NULL) + { + sprintf(chpath, "%s\\sh.exe", path); + if(_access(chpath, 0) != -1) + return true; + + path = strtok(NULL, seps); + } + + return false; +} diff --git a/util/scripts/win-binary/nsis/qtnsisext/mingw.h b/util/scripts/win-binary/nsis/qtnsisext/mingw.h new file mode 100644 index 0000000..e975a9e --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/mingw.h @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ +#define MINGW_BUFFER_SIZE 1024 + +void getMinGWVersion(char *path, int *major, int *minor, int *patch); +bool hasValidIncludeFiles(char *path); +bool shInEnvironment();
\ No newline at end of file diff --git a/util/scripts/win-binary/nsis/qtnsisext/qtlibspatcher.exe b/util/scripts/win-binary/nsis/qtnsisext/qtlibspatcher.exe Binary files differnew file mode 100755 index 0000000..b9ec6d2 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/qtlibspatcher.exe diff --git a/util/scripts/win-binary/nsis/qtnsisext/qtlibspatcher.vcproj b/util/scripts/win-binary/nsis/qtnsisext/qtlibspatcher.vcproj new file mode 100644 index 0000000..aeed5ec --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/qtlibspatcher.vcproj @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="qtlibspatcher" + ProjectGUID="{DC56C66A-5D15-46C8-91E6-AB36FC26F8DA}" + RootNamespace="qtlibspatcher" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + GenerateDebugInformation="false" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\binpatch.cpp" + > + </File> + <File + RelativePath=".\qtlibspatchermain.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\binpatch.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/util/scripts/win-binary/nsis/qtnsisext/qtlibspatchermain.cpp b/util/scripts/win-binary/nsis/qtnsisext/qtlibspatchermain.cpp new file mode 100644 index 0000000..008cc46 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/qtlibspatchermain.cpp @@ -0,0 +1,200 @@ +/**************************************************************************** +** +** 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 "binpatch.h" +#include <stdio.h> + +bool patchBinaryWithQtPathes(const char *fileName, const char *baseQtPath) +{ + bool result = true; + + static const struct + { + const char *variable; + const char *subDirectory; + } variables[] = { + {"qt_prfxpath=", ""}, + {"qt_docspath=", "/doc"}, + {"qt_hdrspath=", "/include"}, + {"qt_libspath=", "/lib"}, + {"qt_binspath=", "/bin"}, + {"qt_plugpath=", "/plugins"}, + {"qt_datapath=", ""}, + {"qt_trnspath=", "/translations"}, + {"qt_xmplpath=", "/examples"}, + {"qt_demopath=", "/demos"} + }; + + for (int i = 0; i < sizeof(variables)/sizeof(variables[0]); i++) { + char newStr[256] = ""; + strncpy(newStr, variables[i].variable, sizeof(newStr)); + newStr[sizeof(newStr) - 1] = 0; + strncat(newStr, baseQtPath, sizeof(newStr) - strlen(newStr) - 1); + newStr[sizeof(newStr) - 1] = 0; + strncat(newStr, variables[i].subDirectory, sizeof(newStr) - strlen(newStr) - 1); + newStr[sizeof(newStr) - 1] = 0; + BinPatch binFile(fileName); + if (!binFile.patch(variables[i].variable, newStr)) { + result = false; + break; + } + } + + return result; +} + +bool patchBinariesWithQtPathes(const char *baseQtPath) +{ + bool result = true; + + static const char *filesToPatch[] = { + "/bin/qmake.exe", + "/bin/QtCore4.dll", + "/bin/QtCored4.dll" + }; + + for (int i = 0; i < sizeof(filesToPatch)/sizeof(filesToPatch[0]); i++) { + char fileName[FILENAME_MAX] = ""; + strncpy(fileName, baseQtPath, sizeof(fileName)); + fileName[sizeof(fileName)-1] = '\0'; + strncat(fileName, filesToPatch[i], sizeof(fileName) - strlen(fileName) - 1); + fileName[sizeof(fileName)-1] = '\0'; + if (!patchBinaryWithQtPathes(fileName, baseQtPath)) { + result = false; + break; + } + } + + return result; +} + +bool patchDebugLibrariesWithQtPath(const char *baseQtPath) +{ + bool result = true; + + static const struct + { + const char *fileName; + const char *sourceLocation; + } libraries[] = { + {"/bin/Qt3Supportd4.dll", "/src/qt3support/"}, + {"/bin/QtCored4.dll", "/src/corelib/"}, + {"/bin/QtGuid4.dll", "/src/gui/"}, + {"/bin/QtHelpd4.dll", "/tools/assistant/lib/"}, + {"/bin/QtNetworkd4.dll", "/src/network/"}, + {"/bin/QtOpenGLd4.dll", "/src/opengl/"}, + {"/bin/QtScriptd4.dll", "/src/script/"}, + {"/bin/QtSqld4.dll", "/src/sql/"}, + {"/bin/QtSvgd4.dll", "/src/svg/"}, + {"/bin/QtTestd4.dll", "/src/testlib/"}, + {"/bin/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"}, + {"/bin/QtXmld4.dll", "/src/xml/"}, + {"/bin/QtXmlPatternsd4.dll", "/src/xmlpatterns/"}, + {"/plugins/accessible/qtaccessiblecompatwidgetsd4.dll", "/src/plugins/accessible/compat/"}, + {"/plugins/accessible/qtaccessiblewidgetsd4.dll", "/src/plugins/accessible/widgets/"}, + {"/plugins/codecs/qcncodecsd4.dll", "/src/plugins/codecs/cn/"}, + {"/plugins/codecs/qjpcodecsd4.dll", "/src/plugins/codecs/jp/"}, + {"/plugins/codecs/qkrcodecsd4.dll", "/src/plugins/codecs/kr/"}, + {"/plugins/codecs/qtwcodecsd4.dll", "/src/plugins/codecs/tw/"}, + {"/plugins/iconengines/qsvgicond4.dll", "/src/plugins/iconengines/svgiconengine/"}, + {"/plugins/imageformats/qgifd4.dll", "/src/plugins/imageformats/gif/"}, + {"/plugins/imageformats/qjpegd4.dll", "/src/plugins/imageformats/jpeg/"}, + {"/plugins/imageformats/qmngd4.dll", "/src/plugins/imageformats/mng/"}, + {"/plugins/imageformats/qsvgd4.dll", "/src/plugins/imageformats/svg/"}, + {"/plugins/imageformats/qtiffd4.dll", "/src/plugins/imageformats/tiff/"}, + {"/plugins/sqldrivers/qsqlited4.dll", "/src/plugins/sqldrivers/sqlite/"}, +// {"/plugins/sqldrivers/qsqlodbcd4.dll", "/src/plugins/sqldrivers/odbc/"} + }; + + for (int i = 0; i < sizeof(libraries)/sizeof(libraries[0]); i++) { + char fileName[FILENAME_MAX] = ""; + strncpy(fileName, baseQtPath, sizeof(fileName)); + fileName[sizeof(fileName)-1] = '\0'; + strncat(fileName, libraries[i].fileName, sizeof(fileName) - strlen(fileName) - 1); + fileName[sizeof(fileName)-1] = '\0'; + + char oldSourcePath[FILENAME_MAX] = + "C:/depot/qt-workbench/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Trolltech"; + strncat(oldSourcePath, libraries[i].sourceLocation, sizeof(oldSourcePath) - strlen(oldSourcePath) - 1); + oldSourcePath[sizeof(oldSourcePath)-1] = '\0'; + + char newSourcePath[FILENAME_MAX] = ""; + strncpy(newSourcePath, baseQtPath, sizeof(newSourcePath)); + newSourcePath[sizeof(newSourcePath)-1] = '\0'; + strncat(newSourcePath, libraries[i].sourceLocation, sizeof(newSourcePath) - strlen(newSourcePath) - 1); + newSourcePath[sizeof(newSourcePath)-1] = '\0'; + + BinPatch binFile(fileName); + if (!binFile.patch(oldSourcePath, newSourcePath)) { + result = false; + break; + } + } + + return result; +} + +int main(int argc, char *args[]) +{ + if (argc != 2) { + printf("Please provide a QTDIR value as parameter.\n" + "This is also the location where the binaries are expected\n" + "in the \"/bin\" and \"/plugins\" subdirectories.\n"); + return 1; + } + + char baseQtPath[FILENAME_MAX] = ""; + strncpy(baseQtPath, args[1], sizeof(baseQtPath)); + baseQtPath[sizeof(baseQtPath)-1] = '\0'; + + // Convert backslash to slash + for (char *p = baseQtPath; *p != '\0'; p++) + if (*p == '\\') + *p = '/'; + + // Remove trailing slash(es) + for (char *p = baseQtPath + strlen(baseQtPath) - 1; p != baseQtPath; p--) + if (*p == '/') + *p = '\0'; + else + break; + + return patchBinariesWithQtPathes(baseQtPath) && patchDebugLibrariesWithQtPath(baseQtPath)?0:1; +} diff --git a/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.cpp b/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.cpp new file mode 100644 index 0000000..c9deb73 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.cpp @@ -0,0 +1,495 @@ +/**************************************************************************** +** +** 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 <windows.h> +#include "exdll.h" +#include "keydec.h" +#include "licensefinder.h" +#include "binpatch.h" +#include "mingw.h" +#include <stdio.h> +#include <time.h> + +HINSTANCE g_hInstance; +HWND g_hwndParent; + +#define EXPORT_NSIS_FUNCTION(funcName) \ +extern "C" void __declspec(dllexport) funcName(HWND hwndParent, int string_size, \ + char *variables, stack_t **stacktop) + +BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) +{ + g_hInstance=static_cast<HINSTANCE>(hInst); + return TRUE; +} + +EXPORT_NSIS_FUNCTION(IsValidLicense) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char isValid[2]; + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(key); + + KeyDecoder kdec(key); + if (kdec.IsValid() && ( + kdec.getPlatforms() & KeyDecoder::Windows + || kdec.getPlatforms() & KeyDecoder::Embedded + || kdec.getPlatforms() & KeyDecoder::WinCE)) + strcpy(isValid, "1"); + else + strcpy(isValid, "0"); + + LocalFree(key); + pushstring(isValid); +} + +EXPORT_NSIS_FUNCTION(IsValidWinCELicense) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char isValid[2]; + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(key); + + KeyDecoder kdec(key); + if (kdec.IsValid() && (kdec.getPlatforms() & KeyDecoder::WinCE)) + strcpy(isValid, "1"); + else + strcpy(isValid, "0"); + + LocalFree(key); + pushstring(isValid); +} + +EXPORT_NSIS_FUNCTION(HasLicenseProduct) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char retVal[2]; + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *product = (char *)LocalAlloc(LPTR, g_stringsize+1); + uint qtproduct = 0; + + popstring(key); + popstring(product); + + for (int i=0; i<KeyDecoder::NumberOfProducts; ++i) { + if (KeyDecoder::Products[i] != 0 && stricmp(product, KeyDecoder::Products[i]) == 0) { + qtproduct = (1 << i); + break; + } + } + + KeyDecoder kdec(key); + if (kdec.IsValid() + && (qtproduct != 0) + && (kdec.getProducts() & qtproduct)) { + strcpy(retVal, "1"); + } else { + strcpy(retVal, "0"); + } + + LocalFree(product); + LocalFree(key); + pushstring(retVal); +} + +EXPORT_NSIS_FUNCTION(GetLicenseID) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(key); + + char lcnsid[512]; + lcnsid[0] = '\0'; + + KeyDecoder kdec(key); + if (kdec.IsValid()) { + uint qtlcnsid = kdec.getLicenseID(); + sprintf(lcnsid, "%d", qtlcnsid); + } + + LocalFree(key); + pushstring(lcnsid); +} + +EXPORT_NSIS_FUNCTION(GetLicenseProduct) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(key); + + char lcnsprod[512]; + lcnsprod[0] = '\0'; + + KeyDecoder kdec(key); + if (kdec.IsValid()) { + uint qtschema = kdec.getLicenseSchema(); + if(qtschema & KeyDecoder::SupportedEvaluation) + strcpy(lcnsprod, "SupportedEvaluation"); + else if(qtschema & KeyDecoder::UnsupportedEvaluation) + strcpy(lcnsprod, "UnsupportedEvaluation"); + else if(qtschema & KeyDecoder::FullSourceEvaluation) + strcpy(lcnsprod, "FullSourceEvaluation"); + else if(qtschema & KeyDecoder::Academic) + strcpy(lcnsprod, "Academic"); + else if(qtschema & KeyDecoder::Educational) + strcpy(lcnsprod, "Educational"); + else if(qtschema & KeyDecoder::FullCommercial) + { + uint qtproduct = kdec.getProducts(); + if (qtproduct & KeyDecoder::QtUniversal) + strcpy(lcnsprod, "Universal"); + else if(qtproduct & KeyDecoder::QtDesktop) + strcpy(lcnsprod, "Desktop"); + else if(qtproduct & KeyDecoder::QtDesktopLight) + strcpy(lcnsprod, "DesktopLight"); + else if(qtproduct & KeyDecoder::QtConsole) + strcpy(lcnsprod, "Console"); + } + } + + LocalFree(key); + pushstring(lcnsprod); +} + +EXPORT_NSIS_FUNCTION(GetLicensePlatform) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(key); + + char lcnsplat[512]; + lcnsplat[0] = '\0'; + + KeyDecoder kdec(key); + if (kdec.getPlatforms() == KeyDecoder::AllOS) + strcpy(lcnsplat, "AllOS"); + else if (kdec.getPlatforms() & KeyDecoder::Embedded) + strcpy(lcnsplat, "Embedded"); + else if (kdec.getPlatforms() & KeyDecoder::WinCE) + strcpy(lcnsplat, "Embedded"); + else if (kdec.getPlatforms() & KeyDecoder::Windows) + strcpy(lcnsplat, "Windows"); + + LocalFree(key); + pushstring(lcnsplat); +} + +EXPORT_NSIS_FUNCTION(UsesUSLicense) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char isUSCustomer[2]; + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(key); + + KeyDecoder kdec(key); + if (kdec.IsValid() + && (kdec.getLicenseFeatures() & KeyDecoder::USCustomer)) + strcpy(isUSCustomer, "1"); + else + strcpy(isUSCustomer, "0"); + + LocalFree(key); + pushstring(isUSCustomer); +} + +EXPORT_NSIS_FUNCTION(IsValidDate) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + int year = 0; + int month = 0; + int day = 0; + char isValid[2]; + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *pkgDate = (char *)LocalAlloc(LPTR, g_stringsize+1); + + popstring(key); + popstring(pkgDate); + + if (strlen(pkgDate) > 0) + { + sscanf(pkgDate, "%d-%d-%d", &year, &month, &day); + } else { + //use current date + char curDate[9]; + _strdate(curDate); + sscanf(curDate, "%d/%d/%d", &month, &day, &year); + year += 2000; + } + + KeyDecoder kdec(key); + CDate expiryDate = kdec.getExpiryDate(); + if (year == expiryDate.year()) { + if (month == expiryDate.month()) { + if (day <= expiryDate.day()) { + strcpy(isValid, "1"); + } else { + strcpy(isValid, "0"); + } + } else if (month < expiryDate.month()) { + strcpy(isValid, "1"); + } else { + strcpy(isValid, "0"); + } + } else if (year < expiryDate.year()) { + strcpy(isValid, "1"); + } else { + strcpy(isValid, "0"); + } + + LocalFree(pkgDate); + LocalFree(key); + pushstring(isValid); +} + +EXPORT_NSIS_FUNCTION(IsFloatingLicense) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *key = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(key); + char isFloatingLicense[2]; + + KeyDecoder kdec(key); + if (kdec.IsValid() && + kdec.getLicenseFeatures() & KeyDecoder::FloatingLicense) + strcpy(isFloatingLicense, "1"); + else + strcpy(isFloatingLicense, "0"); + + LocalFree(key); + pushstring(isFloatingLicense); +} + +EXPORT_NSIS_FUNCTION(GetLicenseInfo) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + LicenseFinder f; + pushstring(f.getLicenseKey()); + pushstring(f.getOldLicenseKey()); + pushstring(f.getLicensee()); + pushstring(f.getCustomerID()); + pushstring(f.getProducts()); + pushstring(f.getExpiryDate()); +} + +EXPORT_NSIS_FUNCTION(PatchVC6Binary) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *fileName = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *oldStr = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *newStr = (char *)LocalAlloc(LPTR, g_stringsize+1); + + popstring(fileName); + popstring(oldStr); + popstring(newStr); + + // remove last separator... + int oldLen = (int)strlen(oldStr); + int newLen = (int)strlen(newStr); + if (oldStr[oldLen-1] == '\\') + oldStr[oldLen-1] = '\0'; + if (newStr[newLen-1] == '\\') + newStr[newLen-1] = '\0'; + + BinPatch binFile(fileName); + binFile.enableInsertReplace(true); + binFile.enableUseLength(true); + binFile.setEndTokens(".cpp;.h;.moc;.pdb"); + binFile.patch(oldStr, newStr); + + //patch also with path sep. the other way since + //vc60 in some cases uses different path separators :| + char *reverse = (char *)malloc(sizeof(char)*(oldLen+1)); + for (int i=0; i<oldLen; ++i) { + if (oldStr[i] == '\\') + reverse[i] = '/'; + else + reverse[i] = oldStr[i]; + } + reverse[oldLen] = '\0'; + binFile.patch(reverse, newStr); + + LocalFree(newStr); + LocalFree(oldStr); + LocalFree(fileName); +} + +EXPORT_NSIS_FUNCTION(PatchVC7Binary) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *fileName = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *oldStr = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *newStr = (char *)LocalAlloc(LPTR, g_stringsize+1); + + popstring(fileName); + popstring(oldStr); + popstring(newStr); + + BinPatch binFile(fileName); + binFile.enableInsertReplace(true); + binFile.setEndTokens(".cpp;.h;.moc;.pdb"); + binFile.patch(oldStr, newStr); + + LocalFree(newStr); + LocalFree(oldStr); + LocalFree(fileName); +} + +EXPORT_NSIS_FUNCTION(PatchBinary) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *fileName = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *oldStr = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *newStr = (char *)LocalAlloc(LPTR, g_stringsize+1); + + popstring(fileName); + popstring(oldStr); + popstring(newStr); + + BinPatch binFile(fileName); + binFile.patch(oldStr, newStr); + + LocalFree(newStr); + LocalFree(oldStr); + LocalFree(fileName); +} + +EXPORT_NSIS_FUNCTION(ShowLicenseFile) +{ + char licenseBuffer[60000]; + g_hwndParent = hwndParent; + EXDLL_INIT(); + + void *hCtrl = 0; + char *strCtrl = (char *)LocalAlloc(LPTR, g_stringsize+1); + char *strLicenseFile = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(strCtrl); + popstring(strLicenseFile); + + if (sscanf(strCtrl, "%d", &hCtrl) == 1) { + FILE *fIn = fopen(strLicenseFile, "rb"); + if (fIn) { + size_t r = fread(licenseBuffer, sizeof(char), 59999, fIn); + licenseBuffer[r] = '\0'; + fclose(fIn); + SendMessage((HWND)hCtrl, (UINT)WM_SETTEXT, 0, (LPARAM)licenseBuffer); + } + } + + LocalFree(strLicenseFile); + LocalFree(strCtrl); +} + +EXPORT_NSIS_FUNCTION(HasValidWin32Library) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char isValid[2]; + char *path = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(path); + + if (hasValidIncludeFiles(path)) + strcpy(isValid, "1"); + else + strcpy(isValid, "0"); + + LocalFree(path); + pushstring(isValid); +} + +EXPORT_NSIS_FUNCTION(GetMinGWVersion) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + + char *path = (char *)LocalAlloc(LPTR, g_stringsize+1); + popstring(path); + + int major = 0, minor = 0, patch = 0; + char versionstr[MINGW_BUFFER_SIZE]; + + getMinGWVersion(path, &major, &minor, &patch); + sprintf(versionstr, "%d.%d.%d", major, minor, patch); + + LocalFree(path); + pushstring(versionstr); +} + +EXPORT_NSIS_FUNCTION(ShInPath) +{ + g_hwndParent = hwndParent; + EXDLL_INIT(); + char res[2]; + + if (shInEnvironment()) + res[0] = '1'; + else + res[0] = '0'; + + res[1] = '\0'; + + pushstring(res); +} diff --git a/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.dll b/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.dll Binary files differnew file mode 100644 index 0000000..a75d896 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.dll diff --git a/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.vcproj b/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.vcproj new file mode 100644 index 0000000..3600136 --- /dev/null +++ b/util/scripts/win-binary/nsis/qtnsisext/qtnsisext.vcproj @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="qtnsisext" + ProjectGUID="{DC56C66A-5D15-46C8-91E6-AB36FC26F8DA}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="." + IntermediateDirectory="Debug" + ConfigurationType="2" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;QTNSISEXT_EXPORTS" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/qtnsisext.dll" + LinkIncremental="2" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/qtnsisext.pdb" + SubSystem="1" + ImportLibrary="$(OutDir)/qtnsisext.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="." + IntermediateDirectory="Release" + ConfigurationType="2" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\..\..\..\..\..\qt\util\scripts\mac-binary\package\InstallerPane" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;QTNSISEXT_EXPORTS" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3" + CallingConvention="0" + CompileAs="2"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/qtnsisext.dll" + LinkIncremental="1" + GenerateDebugInformation="FALSE" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + ImportLibrary="$(OutDir)/qtnsisext.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath=".\binpatch.cpp"> + </File> + <File + RelativePath="..\..\..\..\..\..\qt\util\scripts\mac-binary\package\InstallerPane\keydec.cpp"> + </File> + <File + RelativePath=".\licensefinder.cpp"> + </File> + <File + RelativePath=".\mingw.cpp"> + </File> + <File + RelativePath=".\qtnsisext.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath=".\binpatch.h"> + </File> + <File + RelativePath=".\exdll.h"> + </File> + <File + RelativePath="..\..\..\..\..\..\qt\util\scripts\mac-binary\package\InstallerPane\keydec.h"> + </File> + <File + RelativePath=".\licensefinder.h"> + </File> + <File + RelativePath=".\mingw.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |