diff options
Diffstat (limited to 'examples')
42 files changed, 13 insertions, 1793 deletions
diff --git a/examples/RepositoryExchangeTutorial.txt b/examples/RepositoryExchangeTutorial.txt deleted file mode 100644 index 280e20ac7..000000000 --- a/examples/RepositoryExchangeTutorial.txt +++ /dev/null @@ -1,11 +0,0 @@ -To exchange an online repository during update process do the following steps. - -1. navigate to the source folder of installerbase ( from trunk this is installerbuilder/installerbase ) -2. open the installerbase.qrc and add an entry pointing to overrideconfig.xml -3. copy the config.xml file in the installerbase source folder rename it to overrideconfig.xml -4. rebuild installerbase - -The override config is now shipped with the installerbase.exe and always overrides the old given config until -a new installerbase.exe is shipped without this resource. - - diff --git a/examples/config/config.xml b/examples/config/config.xml deleted file mode 100644 index 6da2208ec..000000000 --- a/examples/config/config.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0"?> -<Installer> - <Name>Test App</Name> - <Version>1.0.0</Version> - <Title>Test App_Hurra</Title> - <MaintenanceTitle>Test App_MAN</MaintenanceTitle> - <Publisher>Nokia</Publisher> - <ProductUrl>http://qt.nokia.com</ProductUrl> - <Icon>qticon</Icon> - <Watermark>watermark.png</Watermark> - <UninstallerName>TestAppUninstaller</UninstallerName> - <RemoteRepositories> - <Repository> - <Url>http://www.kdab.com/~bjoern/sha1repo</Url> - <Required>false</Required> - </Repository> - </RemoteRepositories> - - <!-- @homeDir@ and @rootDir@ are some of the supported vars --> - <TargetDir>@homeDir@/testinstall</TargetDir> - <AdminTargetDir>/opt</AdminTargetDir> -</Installer> diff --git a/examples/examples.pro b/examples/examples.pro index 623d96691..7efd15957 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,7 +1,3 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS += testapp -SUBDIRS += updater - -IDE_BUILD_TREE = "$$(QTCREATOR_SOURCE_PATH)" -!isEmpty( IDE_BUILD_TREE ):SUBDIRS += updaterplugin diff --git a/examples/packages/generateindex.sh b/examples/packages/generateindex.sh deleted file mode 100644 index 746f376d6..000000000 --- a/examples/packages/generateindex.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -echo "<Components>" -for i in `find . -maxdepth 1 -type d -not -name \\\.*`; do - echo "Processing $i..." >&2 - if [ -f "$i/meta/package.xml" ]; then - echo "<Component>$i</Component>" - else - echo "Ignoring $i: Could not find meta/package.xml" >&2 - fi -done -echo "</Components>" - diff --git a/examples/packages/generatetranslation.sh b/examples/packages/generatetranslation.sh deleted file mode 100644 index ec4c8784b..000000000 --- a/examples/packages/generatetranslation.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -if [ $# -lt 1 ]; then - echo "Usage: $0 scriptfile [uifiles]*" >/dev/stderr - exit 1 -fi - -FILE="$TMPDIR/$(basename $0).$RANDOM.$$.tmp" -FILE2="$TMPDIR/$(basename $0).$RANDOM.$$.tmp" -FILE3="$TMPDIR/$(basename $0).$RANDOM.$$.tmp" - -CONTEXT=`basename $1 | sed -e 's,\([^.]*\)\..*,\1,'` - -# first work on the script file -sed -ne 's/qsTr *( *"\(\([^"\\]*\(\\.\)*\)*\)"/\ -TRANSLATE\1TRANSLATE\ -/pg' $1 | sed -ne 's,^TRANSLATE\(.*\)TRANSLATE$,\1,p' | -sed -e 's/\\"/";/g' | -sed -e 's/</\</g' > $FILE - -# remove duplicates -sort -u $FILE > $FILE3 -mv $FILE3 $FILE - -echo "<?xml version=\"1.0\" encoding=\"utf8\"?>" > $FILE2 -echo "<!DOCTYPE TS><TS version=\"1.1\">" >> $FILE2 -echo "<context>" >> $FILE2 -echo " <name>$CONTEXT</name>" >> $FILE2 - -sed -e 's/\(.*\)/ <message>\ - <source>\1<\/source>\ - <translation type="unfinished"><\/translation>\ - <\/message>/' < $FILE >> $FILE2 - -echo "</context>" >> $FILE2 - - -while [ $# -gt 1 ]; do -shift - -CONTEXT=`sed -ne 's,.*<class>\([^<]*\)</class>.*,\1,p' $1` - -echo "<context>" >> $FILE2 -echo " <name>$CONTEXT</name>" >> $FILE2 - -# then work on the ui files -sed -ne 's/<string>\([^<\\]*\)<\/string>/\ -TRANSLATE\1TRANSLATE\ -/pg' $1 | sed -ne 's,^TRANSLATE\(.*\)TRANSLATE$,\1,p' | -sed -e 's/\\"/";/g' | -sed -e 's/</\</g' > $FILE - -# remove duplicates -sort -u $FILE > $FILE3 -mv $FILE3 $FILE - - - -sed -e 's/\(.*\)/ <message>\ - <source>\1<\/source>\ - <translation type="unfinished"><\/translation>\ - <\/message>/' < $FILE >> $FILE2 - - -echo "</context>" >> $FILE2 - -done - -echo "</TS>" >> $FILE2 - -cat $FILE2 - -rm $FILE -rm $FILE2 - -exit 0 diff --git a/examples/packages/index.xml b/examples/packages/index.xml deleted file mode 100644 index 94f091a44..000000000 --- a/examples/packages/index.xml +++ /dev/null @@ -1,9 +0,0 @@ -<Components> -<Component>./qtcore</Component> -<Component>./qtgui</Component> -<Component>./qt</Component> -<Component>./qtcreator</Component> -<Component>./dbus4win</Component> -<Component>./nokiasdk</Component> -<Component>./python</Component> -</Components> diff --git a/examples/testapp/config/config.xml b/examples/testapp/config/config.xml index f020d92e4..e66c57a84 100644 --- a/examples/testapp/config/config.xml +++ b/examples/testapp/config/config.xml @@ -1,11 +1,22 @@ <?xml version="1.0"?> <Installer> <Name>Test App</Name> - <Version>1</Version> - <Title>Test App</Title> + <Version>1.0.0</Version> + <Title>Test App_Hurra</Title> + <MaintenanceTitle>Test App_MAN</MaintenanceTitle> <Publisher>Nokia</Publisher> <ProductUrl>http://qt.nokia.com</ProductUrl> + <Icon>qticon</Icon> + <Watermark>watermark.png</Watermark> + <UninstallerName>TestAppUninstaller</UninstallerName> +<!-- <RemoteRepositories> + <Repository> + <Url>http://www.xxxx.com/repository</Url> + <Required>false</Required> + </Repository> + </RemoteRepositories> +--> <PublicKey> -----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDzdb8ti9Ss5kmEY5rGf2HFEsj0 diff --git a/examples/config/license.txt b/examples/testapp/config/license.txt index a55990fe3..a55990fe3 100644 --- a/examples/config/license.txt +++ b/examples/testapp/config/license.txt diff --git a/examples/config/logo.png b/examples/testapp/config/logo.png Binary files differindex 8a9562614..8a9562614 100644 --- a/examples/config/logo.png +++ b/examples/testapp/config/logo.png diff --git a/examples/config/qticon.icns b/examples/testapp/config/qticon.icns Binary files differindex 6291dd397..6291dd397 100644 --- a/examples/config/qticon.icns +++ b/examples/testapp/config/qticon.icns diff --git a/examples/config/qticon.ico b/examples/testapp/config/qticon.ico Binary files differindex 9e1b83f1b..9e1b83f1b 100644 --- a/examples/config/qticon.ico +++ b/examples/testapp/config/qticon.ico diff --git a/examples/config/qticon.png b/examples/testapp/config/qticon.png Binary files differindex d68b205cd..d68b205cd 100644 --- a/examples/config/qticon.png +++ b/examples/testapp/config/qticon.png diff --git a/examples/config/watermark.png b/examples/testapp/config/watermark.png Binary files differindex b07780d9d..b07780d9d 100644 --- a/examples/config/watermark.png +++ b/examples/testapp/config/watermark.png diff --git a/examples/testcases/result-example.xml b/examples/testcases/result-example.xml deleted file mode 100644 index 937625b3c..000000000 --- a/examples/testcases/result-example.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="utf-8""?> -<feed xmlns="http://www.w3.org/2005/Atom" xmlns:tf="http://sdk.nokia.com/test-framework/ns/1.0"> - <entry> - <title>ab12cd34ef - installer-20090310.exe - checks failed :-(</title> - <updated>2010-03-10T14:00Z</updated> - <tf:host>test-machine_1.local</tf:host> - <tf:testStart>2010-03-10T13:00Z</tf:testStart> - <tf:testEnd>2010-03-10T13:49Z</tf:testEnd> - - <tf:installer> - <tf:sourceUrl>ftp://buildmachine/installers/installer-20090310.exe</tf:sourceUrl> - <tf:revision>ab12cd34ef</tf:revision> <!-- if we have sth like that --> - <tf:platform>windows</tf:platform> - </tf:installer> - <tf:virtualMachine> - <tf:path>/home/testuser/VMs/WindowsXp/WindowsXp.vmx</tf:path> - <tf:platform>windows</tf:platform> - <tf:snapshot>base</tf:snapshot> - </tf:virtualMachine> - <tf:testCase> - <tf:name>Basic Installation</tf:name> - <tf:path>/home/testuser/testcases/basic/basic.cfg</tf:path> - <tf:installScript>/home/testuser/testcases/basic/testscript.qs</tf:installScript> - </tf:testCase> - <tf:installationResult> - <tf:exitCode>0</tf:exitCode> - <tf:exitStatus>normal</tf:exitStatus> - <tf:summary>NoError</tf:summary> - </tf:installationResult> - <tf:checkerResult> - <tf:item type="files">c:\sdk\bin\qmake.exe: md5 sum mismatch: expected: abcd1234 actual: 1234abcd</tf:item> - <tf:summary>InstallerError</tf:summary> - </tf:checkerResult> - <tf:internalErrors/> - <tf:errorSummary>InstallerError</tf:summary> - </entry> -</feed> diff --git a/examples/testcases/testcase1/packagemanagement.qs b/examples/testcases/testcase1/packagemanagement.qs deleted file mode 100644 index 3c6dcfdeb..000000000 --- a/examples/testcases/testcase1/packagemanagement.qs +++ /dev/null @@ -1,35 +0,0 @@ -function Controller() -{ - installer.autoRejectMessageBoxes - this.componentSelectionCounter = 0 -} - -Controller.prototype.UpdaterSelectedCallback = function() -{ - tabController.setCurrentTab( TabController.PACKAGE_MANAGER ) -} - -Controller.prototype.ComponentSelectionPageCallback = function() -{ - if ( this.componentSelectionCounter == 0 ) { - print( "first time, uninstall" ) - var page = gui.pageWidgetByObjectName( "ComponentSelectionPage" ) - page.deselectComponent( "com.nokia.sdk.doc.qtcreator" ) - gui.clickButton( buttons.NextButton, 3000 ) - this.componentSelectionCounter += 1 - } else { - print( "second time, click cancel" ) - gui.clickButton( buttons.CancelButton ) - } -} - - -Controller.prototype.ReadyForInstallationPageCallback = function() -{ - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.FinishedPageCallback = function() -{ - gui.clickButton( buttons.CommitButton ) -} diff --git a/examples/testcases/testcase1/test-uninstall.qs b/examples/testcases/testcase1/test-uninstall.qs deleted file mode 100644 index c2d707fe1..000000000 --- a/examples/testcases/testcase1/test-uninstall.qs +++ /dev/null @@ -1,30 +0,0 @@ -function Controller() -{ - installer.autoRejectMessageBoxes -} - - -Controller.prototype.IntroductionPageCallback = function() -{ - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.ComponentSelectionPageCallback = function() -{ - var page = gui.pageWidgetByObjectName( "ComponentSelectionPage" ) - page.keepSelectedComponentsRB.setChecked( true ) - page.deselectComponent( "com.nokia.sdk.qt.gui" ) - page.deselectComponent( "hgrmpfl (non-existing package)" ) // bad case for component lookup - page.selectComponent( "hgrmpfl2 (another non-existing package)" ) // bad case for component lookup - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.ReadyForInstallationPageCallback = function() -{ - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.FinishedPageCallback = function() -{ - gui.clickButton( buttons.FinishButton ) -} diff --git a/examples/testcases/testcase1/testcase1.cfg b/examples/testcases/testcase1/testcase1.cfg deleted file mode 100644 index d66c7d56c..000000000 --- a/examples/testcases/testcase1/testcase1.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[General] -installscript=testscript.qs -platforms=windows,linux -targetDirectory=c:\Users\kdab\Desktop\testinstall -checkerTestDir=checker diff --git a/examples/testcases/testcase1/testscript.qs b/examples/testcases/testcase1/testscript.qs deleted file mode 100644 index a19c0f9de..000000000 --- a/examples/testcases/testcase1/testscript.qs +++ /dev/null @@ -1,69 +0,0 @@ -function Controller() -{ - installer.autoRejectMessageBoxes - installer.setMessageBoxAutomaticAnswer( "overwriteTargetDirectory", QMessageBox.Yes ) -} - - -Controller.prototype.IntroductionPageCallback = function() -{ - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.LicenseAgreementPageCallback = function() -{ - var page = gui.pageWidgetByObjectName( "LicenseAgreementPage" ) - page.acceptLicenseRB.setChecked( true ) - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.TargetDirectoryPageCallback = function() -{ - var page = gui.pageWidgetByObjectName( "TargetDirectoryPage" ) - page.targetDirectoryLE.setText( "c:\\Users\\kdab\\Desktop\\testinstall" ) - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.ComponentSelectionPageCallback = function() -{ - var page = gui.pageWidgetByObjectName( "ComponentSelectionPage" ) - page.deselectComponent( "com.nokia.sdk.qtcreator" ) - page.deselectComponent( "hgrmpfl (non-existing package)" ) // bad case for component lookup - page.selectComponent( "hgrmpfl2 (another non-existing package)" ) // bad case for component lookup - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.DynamicQtGuiPageCallback = function() -{ - var page = gui.pageWidgetByObjectName( "DynamicQtGuiPage" ) - page.checkBoxLib.setChecked( false ) - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.DynamicErrorPageCallback = function() -{ - var page = gui.pageWidgetByObjectName( "DynamicErrorPage" ) - page.checkBoxMakeSure.setChecked( true ) - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.ReadyForInstallationPageCallback = function() -{ - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.StartMenuDirectoryPageCallback = function() -{ - gui.clickButton( buttons.NextButton ) -} - -Controller.prototype.PerformInstallationPageCallback = function() -{ - var page = gui.pageWidgetByObjectName( "PerformInstallationPage" ) - page.details.button.click -} - -Controller.prototype.FinishedPageCallback = function() -{ - gui.clickButton( buttons.FinishButton ) -} diff --git a/examples/testreturn/main.cpp b/examples/testreturn/main.cpp deleted file mode 100644 index 390029243..000000000 --- a/examples/testreturn/main.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#include <QFile> -#include <QString> -#include <iostream> - -static void crash() { - QString* nemesis = 0; - nemesis->clear(); -} - -int main( int argc, char** argv ) { - std::cout << "Hello." << std::endl; - if ( argc < 2 ) - return 0; - const QString arg = QString::fromLocal8Bit( argv[1] ); - bool ok = false; - const int num = arg.toInt( &ok ); - if ( ok ) - return num; - if ( arg == QLatin1String("crash") ) { - std::cout << "Yeth, mather. I Crath." << std::endl; - crash(); - } - if ( arg == QLatin1String("--script") ) { - const QString fn = QString::fromLocal8Bit( argv[2] ); - QFile f( fn ); - if ( !f.open( QIODevice::ReadOnly ) ) { - std::cerr << "Could not open file for reading: " << qPrintable(f.errorString()) << std::endl; - crash(); - } - bool ok; - const int rv = QString::fromLatin1( f.readAll() ).toInt( &ok ); - if ( ok ) - return rv; - else - crash(); - } - -} diff --git a/examples/testreturn/testreturn.pro b/examples/testreturn/testreturn.pro deleted file mode 100644 index a99a57b7a..000000000 --- a/examples/testreturn/testreturn.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -QT -= gui -CONFIG += console - -# Input -SOURCES += main.cpp diff --git a/examples/testvm-configs/franks-host-config.cfg b/examples/testvm-configs/franks-host-config.cfg deleted file mode 100644 index bddb76af9..000000000 --- a/examples/testvm-configs/franks-host-config.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[General] -vmrun=vmrun -checkerInstallation=/home/frank/workspace-eclipse/test-framework/checker -testcase0=TestCases/testcase1/testcase1.cfg -vm0=VMs/NokiaTestVistaVM.cfg diff --git a/examples/testvm-configs/franks-test-vm.cfg b/examples/testvm-configs/franks-test-vm.cfg deleted file mode 100644 index 9bd0a113e..000000000 --- a/examples/testvm-configs/franks-test-vm.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[General] -snapshot=base -username=kdab -password=kdab -vmx=NokiaTestVistaVM/WindowsVista32Bit.vmx -tempDir=c:\Users\kdab\Desktop -os=windows diff --git a/examples/testvm-configs/mikes-host-config.cfg b/examples/testvm-configs/mikes-host-config.cfg deleted file mode 100644 index 42fb37d79..000000000 --- a/examples/testvm-configs/mikes-host-config.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[General] -checkerInstallation=/Users/mike/Documents/KDAB/NokiaSDK/installer/test-framework/checker -testcase0=/Users/mike/Documents/KDAB/NokiaSDK/installer/examples/testcases/testcase1/testcase1.cfg -vm0=/Users/mike/Documents/KDAB/NokiaSDK/installer/examples/testvm-configs/mikes-test-vm.cfg
\ No newline at end of file diff --git a/examples/testvm-configs/mikes-test-vm.cfg b/examples/testvm-configs/mikes-test-vm.cfg deleted file mode 100644 index cc8fa4179..000000000 --- a/examples/testvm-configs/mikes-test-vm.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[General] -snapshot=base -username=nokia -password=nokia -vmx=/Users/mike/Documents/Virtual Machines.localized/Nokia.vmwarevm/Nokia.vmx -tempDir=c:\Users\nokia\Desktop -os=windows
\ No newline at end of file diff --git a/examples/updater/components.xml b/examples/updater/components.xml deleted file mode 100644 index 6d45206a7..000000000 --- a/examples/updater/components.xml +++ /dev/null @@ -1,409 +0,0 @@ -<Packages> - <ApplicationName>Qt SDK</ApplicationName> - <ApplicationVersion>1.0.0</ApplicationVersion> - <Package> - <Name>com.nokia.ndk</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.2.0</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api.qtmobility</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api.qtmobility.maemo</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.symbian.readme</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.misc.vcredist_x86</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api.qtmobility.simulator2008</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.simulator.qtmingw</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api.qtmobility.simulatormingw</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api.qtmobility.symbian</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api.qtmobility.symbian.462</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.2.0</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation.qmake</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation.qt</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation.qtcreator</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation.qtdesigner</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation.qtlinguist</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation.qtmobility</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.documentation.simulator</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.misc</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.misc.examples</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.3</Version> - <LastUpdateDate>2010-03-30</LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.misc.examples.46</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.4</Version> - <LastUpdateDate>2010-03-30</LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.misc.mingw</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>4.4.0</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.misc.qtsources</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.misc.qtsources.462</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.qtcreator.application</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>1.3.80</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.linguist</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>4.7.0</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.maemo</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.maemo.462</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.maemo.readme</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.maemo.usbdriver</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.qtcreator</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.4</Version> - <LastUpdateDate>2010-03-30</LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.qtcreator.gdb</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.qtcreator.jom</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.8.0</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.simulator</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.simulator.application</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.3</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.simulator.qt2008</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.symbian</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.symbian.462</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.symbian.462.devicefiles</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.1</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.symbian.462.gcce</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>4.3.3</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.symbian.462.sdk</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.tools.maemo.462.madde</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.5.0</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> - <Package> - <Name>com.nokia.ndk.api.qtmobility.maemo.462</Name> - <Pixmap></Pixmap> - <Title></Title> - <Description></Description> - <Version>0.0.2</Version> - <LastUpdateDate></LastUpdateDate> - <InstallDate>2010-03-29</InstallDate> - </Package> -</Packages> diff --git a/examples/updater/config.xml b/examples/updater/config.xml deleted file mode 100644 index c024c941e..000000000 --- a/examples/updater/config.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<Installer> - <Name>Qt SDK</Name> - <Version>0.9.0</Version> - <Title>Qt SDK</Title> - <MaintenanceTitle>Maintain Qt SDK</MaintenanceTitle> - <Publisher>Nokia</Publisher> - <Logo>logo.png</Logo> - <LogoSmall>logo-small.png</LogoSmall> - <Icon>logo-small</Icon> - <License>license.txt</License> - <Watermark>watermark.png</Watermark> - <RunProgram></RunProgram> - <StartMenuDir>Qt SDK - Release Candidate</StartMenuDir> - <UninstallerName>SDKMaintenanceTool</UninstallerName> - - <!-- @homeDir@ and @rootDir@ are some of the supported vars --> - <TargetDir>@homeDir@/NokiaQtSDK</TargetDir> - - <RemoteRepositories> - <Repository> -<!-- - <Url>http://schnappie.nokia.troll.no/alpha/onlinendk</Url> ---> - <Url>http://hegel.europe.nokia.com/projects/ndk/installers/linux/x64/online_nokiaqtsdk_repo</Url> - <Required>true</Required> - </Repository> - </RemoteRepositories> -</Installer> diff --git a/examples/updater/main.cpp b/examples/updater/main.cpp deleted file mode 100644 index 687ef7855..000000000 --- a/examples/updater/main.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#include <QApplication> -#include <QStringList> - -#include "updater.h" -#include "common/utils.h" - -int main( int argc, char* argv[] ) -{ - bool checkonly = false; - { - QCoreApplication app( argc, argv ); - checkonly = app.arguments().contains( QLatin1String( "--check-only" ) ); - QInstaller::setVerbose( app.arguments().contains( QLatin1String( "--verbose" ) ) ); - } - - if( checkonly ) - { - QCoreApplication app( argc, argv ); - Updater u; - return u.checkForUpdates( true ) ? 0 : 1; - } - else - { - QApplication app( argc, argv ); - Updater u; - return u.checkForUpdates( false ) ? 0 : 1; - } -} diff --git a/examples/updater/updater.cpp b/examples/updater/updater.cpp deleted file mode 100644 index c5a75ebbb..000000000 --- a/examples/updater/updater.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#include "updater.h" - -#include <QDateTime> -#include <QDomDocument> -#include <QProgressDialog> - -#include "common/binaryformat.h" -#include "common/binaryformatenginehandler.h" -#include "common/errors.h" - -#include "componentselectiondialog.h" -#include "qinstaller.h" -#include "qinstallercomponent.h" -#include "qinstallercomponentmodel.h" -#include "updatesettings.h" -#include "init.h" - -#include <KDUpdater/Application> -#include <KDUpdater/PackagesInfo> - -#include <KDToolsCore/KDAutoPointer> - -#include <iostream> - -using namespace QInstaller; - -class Updater::Private -{ -public: - KDUpdater::Application updaterapp; - Installer installer; -}; - -Updater::Updater( QObject* parent ) - : QObject( parent ) -{ - QInstaller::init(); -} - -Updater::~Updater() -{ -} - -bool Updater::checkForUpdates( bool checkonly ) -{ - d->installer.setLinearComponentList( true ); - - std::auto_ptr< QInstallerCreator::BinaryFormatEngineHandler > handler( new QInstallerCreator::BinaryFormatEngineHandler( QInstallerCreator::ComponentIndex() ) ); - handler->setComponentIndex( QInstallerCreator::ComponentIndex() ); - - UpdateSettings settings; - KDAutoPointer< ComponentSelectionDialog > dialog( checkonly ? 0 : new ComponentSelectionDialog( &d->installer ) ); - if( !checkonly ) - dialog->show(); - - ComponentModel::setVirtualComponentsVisible( true ); - - try - { - KDAutoPointer< QProgressDialog > progress( checkonly ? 0 : new QProgressDialog( dialog.get() ) ); - if( !checkonly ) - { - progress->setLabelText( tr( "Checking for updates..." ) ); - progress->setRange( 0, 0 ); - progress->show(); - } - - settings.setLastCheck( QDateTime::currentDateTime() ); - d->installer.setRemoteRepositories( settings.repositories() ); - d->installer.setValue( QLatin1String( "TargetDir" ), QFileInfo( d->updaterapp.packagesInfo()->fileName() ).absolutePath() ); - } - catch( const Error& error ) - { - if( !checkonly ) - QMessageBox::critical( dialog.get(), tr( "Check for Updates" ), tr( "Error while checking for updates:\n%1" ).arg( error.what() ) ); - settings.setLastResult( tr( "Software Update failed." ) ); - return false; - } - catch( ... ) - { - if( !checkonly ) - QMessageBox::critical( dialog.get(), tr( "Check for Updates" ), tr( "Unknown error while checking for updates." ) ); - settings.setLastResult( tr( "Software Update failed." ) ); - return false; - } - - const QList< Component* > components = d->installer.components( true ); - - // no updates for us - if( components.isEmpty() && !checkonly ) - { - QMessageBox::information( dialog.get(), tr( "Check for Updates" ), tr( "There are currently no updates available for you." ) ); - return false; - } - - if( checkonly ) - { - QDomDocument doc; - QDomElement root = doc.createElement( QLatin1String( "updates" ) ); - doc.appendChild( root ); - for( QList< Component* >::const_iterator it = components.begin(); it != components.end(); ++it ) - { - QDomElement update = doc.createElement( QLatin1String( "update" ) ); - update.setAttribute( QLatin1String( "name" ), (*it)->value( QLatin1String( "DisplayName" ) ) ); - update.setAttribute( QLatin1String( "version" ), (*it)->value( QLatin1String( "Version" ) ) ); - update.setAttribute( QLatin1String( "size" ), (*it)->value( QLatin1String( "UncompressedSize" ) ) ); - root.appendChild( update ); - } - std::cout << doc.toString( 4 ).toStdString() << std::endl; - return true; - } - - if( dialog->exec() == QDialog::Rejected ) - return false; - - try - { - QProgressDialog dialog; - dialog.setRange( 0, 100 ); - dialog.show(); - connect( &dialog, SIGNAL( canceled() ), &d->installer, SLOT( interrupt() ) ); - connect( &d->installer, SIGNAL( installationProgressTextChanged( QString ) ), &dialog, SLOT( setLabelText( QString ) ) ); - connect( &d->installer, SIGNAL( installationProgressChanged( int ) ), &dialog, SLOT( setValue( int ) ) ); - d->installer.installSelectedComponents(); - } - catch( const Error& error ) - { - QMessageBox::critical( dialog.get(), tr( "Check for Updates" ), tr( "Error while installing updates:\n%1" ).arg( error.what() ) ); - d->installer.rollBackInstallation(); - settings.setLastResult( tr( "Software Update failed." ) ); - return false; - } - catch( ... ) - { - QMessageBox::critical( dialog.get(), tr( "Check for Updates" ), tr( "Unknown error while installing updates." ) ); - d->installer.rollBackInstallation(); - settings.setLastResult( tr( "Software Update failed." ) ); - return false; - } - - return true; -} diff --git a/examples/updater/updater.h b/examples/updater/updater.h deleted file mode 100644 index e4e42059b..000000000 --- a/examples/updater/updater.h +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#ifndef UPDATER_H -#define UPDATER_H - -#include <QtCore/QObject> -#include <KDToolsCore/pimpl_ptr.h> - -class Updater : public QObject -{ -public: - explicit Updater( QObject* parent = 0 ); - ~Updater(); - - bool checkForUpdates( bool checkonly = false ); - -private: - class Private; - kdtools::pimpl_ptr< Private > d; -}; - -#endif diff --git a/examples/updater/updater.pro b/examples/updater/updater.pro deleted file mode 100644 index c4662b3fd..000000000 --- a/examples/updater/updater.pro +++ /dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -TARGET = Updater - -include( ../../installerbuilder/libinstaller/libinstaller.pri ) -LIBS = -L$$OUT_PWD/../../installerbuilder/lib -linstaller $$LIBS - -QT += gui - -CONFIG += uitools - -SOURCES += main.cpp -RESOURCES += updater.qrc diff --git a/examples/updater/updater.qrc b/examples/updater/updater.qrc deleted file mode 100644 index 962b28d51..000000000 --- a/examples/updater/updater.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/metadata/installer-config"> - <file>config.xml</file> - </qresource> -</RCC> diff --git a/examples/updaterplugin/Updater.pluginspec b/examples/updaterplugin/Updater.pluginspec deleted file mode 100644 index f5c5206bd..000000000 --- a/examples/updaterplugin/Updater.pluginspec +++ /dev/null @@ -1,9 +0,0 @@ -<plugin name="Updater" version="0.0.1" compatVersion="0.0.1"> - <vendor>KDAB</vendor> - <copyright>(C) 2009 Klarälvdalens Datakonsult AB</copyright> - <license>We're not licensing that stuff at all :-)</license> - <description>Updater for Qt Creator and plugins</description> - <url>http://qt.nokia.com</url> - <dependencyList> - </dependencyList> -</plugin> diff --git a/examples/updaterplugin/config.xml b/examples/updaterplugin/config.xml deleted file mode 100644 index 1ed83b993..000000000 --- a/examples/updaterplugin/config.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0"?> -<Installer> - <Name>Qt Creator</Name> - <Version>1</Version> - <Title>Qt Creator</Title> - <Publisher>Nokia</Publisher> - <ProductUrl>http://qt.nokia.com</ProductUrl> - - <RemoteRepositories> - <Repository> - <Url>http://www.kdab.com/~christoph/qtcreator/</Url> - <Required>true</Required> - </Repository> - </RemoteRepositories> -</Installer> diff --git a/examples/updaterplugin/config/config.xml b/examples/updaterplugin/config/config.xml deleted file mode 100644 index 4bd742565..000000000 --- a/examples/updaterplugin/config/config.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0"?> -<Installer> - <Name>Qt Creator</Name> - <Version>1</Version> - <Title>Qt Creator</Title> - <Publisher>Nokia</Publisher> - <ProductUrl>http://qt.nokia.com</ProductUrl> - - <!-- @homeDir@ and @rootDir@ are some of the supported vars --> - <TargetDir>@homeDir@/testinstall</TargetDir> - <RemoteRepositories> - <Repository> - <Url>http://www.kdab.com/~christoph/qtcreator/</Url> - <Required>true</Required> - </Repository> - </RemoteRepositories> -</Installer> diff --git a/examples/updaterplugin/packages/com.nokia.qtcreator/meta/installscript.js b/examples/updaterplugin/packages/com.nokia.qtcreator/meta/installscript.js deleted file mode 100644 index d8f4a1572..000000000 --- a/examples/updaterplugin/packages/com.nokia.qtcreator/meta/installscript.js +++ /dev/null @@ -1,50 +0,0 @@ -function Component() -{ - if( installer.value( "os" ) == "win" ) - { - component.addDownloadableArchive( "bin.7z" ); - component.addDownloadableArchive( "installer.dll" ); - component.addDownloadableArchive( "KDToolsCore2.dll" ); - component.addDownloadableArchive( "KDUpdater2.dll" ); - component.addDownloadableArchive( "lib.7z" ); - component.addDownloadableArchive( "LICENSE" ); - component.addDownloadableArchive( "Qt Creator.url" ); - component.addDownloadableArchive( "share.7z" ); - component.addDownloadableArchive( "uninst.exe" ); - component.addDownloadableArchive( "Updater.dll" ); - component.addDownloadableArchive( "Updater.pluginspec" ); - } - else if( installer.value( "os" ) == "mac" ) - { - component.addDownloadableArchive( "libUpdater.dylib" ); - component.addDownloadableArchive( "Updater.pluginspec" ); - component.addDownloadableArchive( "Qt Creator.app.7z" ); - } -} - -Component.prototype.createOperations = function( archive ) -{ - if( installer.value( "os" ) == "win" ) - { - component.createOperationsForArchive( "bin.7z" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/installer.dll", "@TargetDir@/bin/installer.dll" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/KDToolsCore2.dll", "@TargetDir@/bin/KDToolsCore2.dll" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/KDUpdater2.dll", "@TargetDir@/bin/KDUpdater2.dll" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/LICENSE", "@TargetDir@/LICENSE" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/Qt Creator.url", "@TargetDir@/Qt Creator.url" ); - component.createOperationsForArchive( "lib.7z" ); - component.createOperationsForArchive( "share.7z" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/uninst.exe", "@TargetDir@/uninst.exe" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/Updater.dll", "@TargetDir@/lib/qtcreator/plugins/Nokia/Updater.dll" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/Updater.pluginspec", "@TargetDir@/lib/qtcreator/plugins/Nokia/Updater.pluginspec" ); - } - else if( installer.value( "os" ) == "mac" ) - { - component.createOperationsForArchive( "Qt Creator.app.7z" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/libUpdater.dylib", "@TargetDir@/Qt Creator.app/Contents/PlugIns/Nokia/libUpdater.dylib" ); - component.addOperation( "Copy", "installer://com.nokia.qtcreator/Updater.pluginspec", "@TargetDir@/Qt Creator.app/Contents/PlugIns/Nokia/Updater.pluginspec" ); - } - - if( installer.isUpdater() ) - component.addOperation( "SelfRestart" ); -} diff --git a/examples/updaterplugin/packages/com.nokia.qtcreator/meta/package.xml b/examples/updaterplugin/packages/com.nokia.qtcreator/meta/package.xml deleted file mode 100644 index 21f06857b..000000000 --- a/examples/updaterplugin/packages/com.nokia.qtcreator/meta/package.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0"?> -<Package> - <DisplayName>Qt Creator</DisplayName> - <Description>Installs Qt Creator.</Description> - <Version>1</Version> - <ReleaseDate>2009-12-03</ReleaseDate> - <Name>com.nokia.qtcreator</Name> - <Script>installscript.js</Script> -</Package> diff --git a/examples/updaterplugin/updaterplugin.cpp b/examples/updaterplugin/updaterplugin.cpp deleted file mode 100644 index 37ac72023..000000000 --- a/examples/updaterplugin/updaterplugin.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#include "updaterplugin.h" - -#include <QAbstractButton> -#include <QApplication> -#include <QFileInfo> -#include <QMessageBox> -#include <QProgressDialog> -#include <QStringList> -#include <QtPlugin> - -#include "componentselectiondialog.h" -#include "updateagent.h" -#include "updatesettings.h" -#include "updatesettingsdialog.h" - -#include "common/binaryformat.h" -#include "common/binaryformatenginehandler.h" -#include "common/errors.h" -#include "common/installersettings.h" -#include "init.h" -#include "qinstaller.h" -#include "updatersettingspage.h" - -#include <coreplugin/actionmanager/actionmanager.h> -#include <coreplugin/coreconstants.h> -#include <coreplugin/icore.h> - -#include <KDUpdater/Application> -#include <KDUpdater/PackagesInfo> - -#include <KDToolsCore/KDAutoPointer> -#include <KDToolsCore/KDSelfRestarter> - -using namespace Updater; -using namespace Updater::Internal; -using namespace QInstaller; - -class UpdaterPlugin::Private -{ -public: - Private( UpdaterPlugin* qq ) - : q( qq ), - agent( 0 ) - { - QInstaller::init(); - } - -private: - UpdaterPlugin* const q; - -public: - void checkForUpdates() - { - std::auto_ptr< QInstallerCreator::BinaryFormatEngineHandler > handler( new QInstallerCreator::BinaryFormatEngineHandler( QInstallerCreator::ComponentIndex() ) ); - handler->setComponentIndex( QInstallerCreator::ComponentIndex() ); - - UpdateSettings settings; - - try - { - settings.setLastCheck( QDateTime::currentDateTime() ); - installer.setRemoteRepositories( settings.repositories() ); - - // no updates for us - if( installer.components().isEmpty() ) - { - QMessageBox::information( qApp->activeWindow(), tr( "Check for Updates" ), tr( "There are currently no updates available for you." ) ); - return; - } - - // set the target directory to the actual one - installer.setValue( QLatin1String( "TargetDir" ), QFileInfo( updaterapp.packagesInfo()->fileName() ).absolutePath() ); - - // this will automatically mork components as to get installed - ComponentSelectionDialog componentSelection( &installer ); - if( componentSelection.exec() == QDialog::Rejected ) - return; - - QProgressDialog dialog; - dialog.setRange( 0, 100 ); - dialog.show(); - connect( &dialog, SIGNAL( canceled() ), &installer, SLOT( interrupt() ) ); - connect( &installer, SIGNAL( installationProgressTextChanged( QString ) ), &dialog, SLOT( setLabelText( QString ) ) ); - connect( &installer, SIGNAL( installationProgressChanged( int ) ), &dialog, SLOT( setValue( int ) ) ); - installer.installSelectedComponents(); - updatesInstalled(); - } - catch( const QInstaller::Error& error ) - { - QMessageBox::critical( qApp->activeWindow(), tr( "Check for Updates" ), tr( "Error while installing updates:\n%1" ).arg( error.what() ) ); - installer.rollBackInstallation(); - settings.setLastResult( tr( "Software Update failed." ) ); - } - catch( ... ) - { - QMessageBox::critical( qApp->activeWindow(), tr( "Check for Updates" ), tr( "Unknown error while installing updates." ) ); - installer.rollBackInstallation(); - settings.setLastResult( tr( "Software Update failed." ) ); - } - } - - void updatesAvailable() - { - KDAutoPointer< QMessageBox > box( new QMessageBox( qApp->activeWindow() ) ); - box->setWindowTitle( tr( "Updates Available" ) ); - box->setText( tr( "Software updates are available for your computer. Do you want to install them?" ) ); - box->setStandardButtons( QMessageBox::Yes | QMessageBox::No ); - box->button( QMessageBox::Yes )->setText( tr( "Continue" ) ); - box->button( QMessageBox::No )->setText( tr( "Not Now" ) ); - box->exec(); - if ( !box ) - return; - if ( box->clickedButton() == box->button( QMessageBox::Yes ) ) - checkForUpdates(); - } - - void updatesInstalled() - { - // only ask that dumb question if a SelfUpdateOperation was executed - if( !KDSelfRestarter::restartOnQuit() ) - { - QMessageBox::information( qApp->activeWindow(), tr( "Updates Installed" ), tr( "Installation complete." ) ); - return; - } - - KDAutoPointer< QMessageBox > box( new QMessageBox( qApp->activeWindow() ) ); - box->setWindowTitle( tr( "Updates Installed" ) ); - box->setText( tr( "Installation complete, you need to restart the application for the changes to take effect." ) ); - box->setStandardButtons( QMessageBox::Yes | QMessageBox::No ); - box->button( QMessageBox::Yes )->setText( tr( "Restart Now" ) ); - box->button( QMessageBox::No )->setText( tr( "Restart Later" ) ); - box->exec(); - if ( !box ) - return; - if ( box->clickedButton() == box->button( QMessageBox::Yes ) ) - QCoreApplication::quit(); - else - KDSelfRestarter::setRestartOnQuit( false ); - } - - void configureUpdater() - { - UpdateSettingsDialog dialog( qApp->activeWindow() ); - connect( &dialog, SIGNAL( checkForUpdates() ), q, SLOT( checkForUpdates() ), Qt::QueuedConnection ); - dialog.exec(); - } - - KDUpdater::Application updaterapp; - Installer installer; - UpdateAgent* agent; -}; - -UpdaterPlugin::UpdaterPlugin() - : d( new Private( this ) ) -{ - if( !KDSelfRestarter::hasInstance() ) - { - const KDSelfRestarter* const restarter = new KDSelfRestarter; - Q_UNUSED( restarter ) - } -} - -UpdaterPlugin::~UpdaterPlugin() -{ -} - -/*! - \reimpl -*/ -bool UpdaterPlugin::initialize( const QStringList& arguments, QString* error_message ) -{ - Q_UNUSED( arguments ) - - try - { - InstallerSettings::fromFileAndPrefix( QLatin1String( ":/metadata/installer-config/config.xml" ), QLatin1String( ":/metadata/installer-config/" ) ); - } - catch ( const Error& e ) - { - if( error_message ) - *error_message = e.message(); - return false; - } - - - Core::ActionManager* const am = Core::ICore::instance()->actionManager(); - Core::ActionContainer* const ac = am->actionContainer( Core::Constants::M_FILE ); - - UpdateSettings::setSettingsSource( Core::ICore::instance()->settings() ); - - d->agent = new UpdateAgent( this ); - - QAction* const checkForUpdates = ac->menu()->addAction( tr( "Check for Updates" ), this, SLOT( checkForUpdates() ) ); - checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole ); - - QAction* const updateSettings = ac->menu()->addAction( tr( "Updater Settings" ), this, SLOT( configureUpdater() ) ); - updateSettings->setMenuRole( QAction::ApplicationSpecificRole ); - - UpdaterSettingsPage* const page = new UpdaterSettingsPage; - connect( page, SIGNAL( checkForUpdates() ), this, SLOT( checkForUpdates() ) ); - addAutoReleasedObject( page ); - - if( error_message ) - error_message->clear(); - return true; -} - -/*! - \reimpl -*/ -void UpdaterPlugin::shutdown() -{ -} - -/*! - \reimpl -*/ -void UpdaterPlugin::extensionsInitialized() -{ -} - -#include "moc_updaterplugin.cpp" - -Q_EXPORT_PLUGIN( UpdaterPlugin ) diff --git a/examples/updaterplugin/updaterplugin.h b/examples/updaterplugin/updaterplugin.h deleted file mode 100644 index e3c3a69b0..000000000 --- a/examples/updaterplugin/updaterplugin.h +++ /dev/null @@ -1,61 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#ifndef UPDATERPLUGIN_H -#define UPDATERPLUGIN_H - -#include <extensionsystem/iplugin.h> - -#include <KDToolsCore/pimpl_ptr.h> - -namespace Updater -{ -namespace Internal -{ -class UpdaterPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - UpdaterPlugin(); - ~UpdaterPlugin(); - -protected: - // implementation of ExtensionSystem::IPlugin - bool initialize( const QStringList& arguments, QString* error_message ); - void shutdown(); - void extensionsInitialized(); - -private: - Q_PRIVATE_SLOT( d, void checkForUpdates() ) - Q_PRIVATE_SLOT( d, void configureUpdater() ) - - class Private; - kdtools::pimpl_ptr< Private > d; -}; -} -} - -#endif diff --git a/examples/updaterplugin/updaterplugin.pro b/examples/updaterplugin/updaterplugin.pro deleted file mode 100644 index 14af657fa..000000000 --- a/examples/updaterplugin/updaterplugin.pro +++ /dev/null @@ -1,37 +0,0 @@ -TEMPLATE = lib -TARGET = Updater - -include( ../../installerbuilder/libinstaller/libinstaller.pri ) - -# maybe wo should not build a static plugin for Qt Creator -CONFIG -= static -CONFIG -= staticlib -CONFIG += shared - -#PROVIDER = KDAB -IDE_PLUGIN_PATH = PlugInst - -IDE_BUILD_TREE = "$$(QTCREATOR_SOURCE_PATH)" -include($$(QTCREATOR_SOURCE_PATH)/src/qtcreatorplugin.pri) -include($$(QTCREATOR_SOURCE_PATH)/src/libs/extensionsystem/extensionsystem.pri) -include($$(QTCREATOR_SOURCE_PATH)/src/plugins/coreplugin/coreplugin.pri) - -QT += gui - -CONFIG += uitools - -LIBS = -L../../installerbuilder/lib -linstaller $$LIBS - -DEST=$$DESTDIR/libUpdater.dylib -# this will make sure we are using the Qt from the QtCreater.app bundle -ddlib="$"$lib -macx:QMAKE_POST_LINK = for lib in `otool -L \"$${DEST}\" | sed -ne \'s,.*\\(libQt[^ ]*\\).*,\1,p\'`; do install_name_tool -change $$[QT_INSTALL_LIBS]/$${ddlib} @executable_path/../Frameworks/$${ddlib} \"$${DEST}\"; done; -macx:QMAKE_POST_LINK += ../../installerbuilder/bin/binarycreator -p packages -c config -t ../../installerbuilder/bin/installerbase -e com.nokia.qtcreator QtCreatorInstaller.app com.nokia.qtcreator ; - -SOURCES += updaterplugin.cpp updatersettingspage.cpp - -HEADERS += updaterplugin.h updatersettingspage.h - -RESOURCES += updaterplugin.qrc - -OTHER_FILES += Updater.pluginspec diff --git a/examples/updaterplugin/updaterplugin.qrc b/examples/updaterplugin/updaterplugin.qrc deleted file mode 100644 index 962b28d51..000000000 --- a/examples/updaterplugin/updaterplugin.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/metadata/installer-config"> - <file>config.xml</file> - </qresource> -</RCC> diff --git a/examples/updaterplugin/updatersettingspage.cpp b/examples/updaterplugin/updatersettingspage.cpp deleted file mode 100644 index bf8ae9344..000000000 --- a/examples/updaterplugin/updatersettingspage.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#include "updatersettingspage.h" - -#include "updatesettingswidget.h" - -#include <KDToolsCore/KDAutoPointer> - -using namespace QInstaller; - -class UpdaterSettingsPage::Private -{ -public: - Private() - : widget( 0 ) - { - } - - KDAutoPointer< UpdateSettingsWidget > widget; -}; - -UpdaterSettingsPage::UpdaterSettingsPage( QObject* parent ) - : Core::IOptionsPage( parent ) -{ -} - -UpdaterSettingsPage::~UpdaterSettingsPage() -{ -} - -/*! - \reimpl -*/ -QString UpdaterSettingsPage::id() const -{ - return QLatin1String( "UpdaterSettings" ); -} - -/*! - \reimpl -*/ -QString UpdaterSettingsPage::trName() const -{ - return tr( "Updater Settings" ); -} - -/*! - \reimpl -*/ -QString UpdaterSettingsPage::category() const -{ - return QLatin1String( "General" ); -} - -/*! - \reimpl -*/ -QString UpdaterSettingsPage::trCategory() const -{ - return displayCategory(); -} - -/*! - \reimpl - */ -QString UpdaterSettingsPage::displayCategory() const -{ - return tr( "General" ); -} - -/*! - \reimpl -*/ -QWidget* UpdaterSettingsPage::createPage( QWidget* parent ) -{ - d->widget.reset( new UpdateSettingsWidget( parent ) ); - connect( d->widget.get(), SIGNAL( checkForUpdates() ), this, SIGNAL( checkForUpdates() ) ); - return d->widget.get(); -} - -/*! - \reimpl -*/ -void UpdaterSettingsPage::apply() -{ - d->widget->accept(); -} - -/*! - \reimpl -*/ -void UpdaterSettingsPage::finish() -{ - d->widget.reset(); -} diff --git a/examples/updaterplugin/updatersettingspage.h b/examples/updaterplugin/updatersettingspage.h deleted file mode 100644 index c9bfce65c..000000000 --- a/examples/updaterplugin/updatersettingspage.h +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt SDK** -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* -** -** Contact: Nokia Corporation qt-info@nokia.com** -** -** GNU Lesser General Public License Usage -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you are unsure which license is appropriate for your use, please contact -** (qt-info@nokia.com). -** -**************************************************************************/ -#ifndef UPDATERSETTINGSPAGE_H -#define UPDATERSETTINGSPAGE_H - -#include <coreplugin/dialogs/ioptionspage.h> - -#include <KDToolsCore/pimpl_ptr.h> - -class UpdaterSettingsPage : public Core::IOptionsPage -{ - Q_OBJECT -public: - explicit UpdaterSettingsPage( QObject* parent = 0 ); - ~UpdaterSettingsPage(); - - QString id() const; - QString trName() const; - QString category() const; - QString displayCategory() const; - QString trCategory() const; - - QWidget* createPage( QWidget* parent ); - - void apply(); - void finish(); - -Q_SIGNALS: - void checkForUpdates(); - -private: - class Private; - kdtools::pimpl_ptr< Private > d; -}; - -#endif |