summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoaijala <johanna.aijala@digia.com>2012-06-20 09:19:25 +0300
committerJason McDonald <jason.mcdonald@nokia.com>2012-06-20 15:50:17 +0200
commitf7e8d3e8324d06687cf5180aff6a7baa8889fcfb (patch)
tree2e19c2514d207beb4af03d36dbcf39dddfa31369
parent1eb3698dc3759afe537d8ff868efe587150c5ce0 (diff)
Added shortcuts for windows components.
Added shortcuts for Uninstall, Assistant, Designer and Linguist. Change-Id: I9b1d728c8244de30b4b085bf246f02e14fa488b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
-rw-r--r--release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010/meta/installscript.qs54
-rw-r--r--release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs56
-rw-r--r--release-tools/configurations/pkg_beta/qt.sdk/meta/package.xml2
3 files changed, 111 insertions, 1 deletions
diff --git a/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010/meta/installscript.qs b/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010/meta/installscript.qs
index db8acd4..5c67c93 100644
--- a/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010/meta/installscript.qs
+++ b/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010/meta/installscript.qs
@@ -19,6 +19,57 @@ checkWhetherStopProcessIsNeeded = function()
{
}
+createShortcuts = function()
+{
+ var qtStringVersion = "%QT_VERSION%";
+ // Create a batch file with the development environment
+ var batchFileName = component_root_path + "/" + "bin" + "/" + "qtenv2.bat";
+ var contentString = "echo off\r\n";
+ contentString += "echo Setting up environment for Qt usage...\r\n";
+ contentString += "set QTDIR=" + component_root_path + "\r\n";
+ contentString += "set PATH=%QTDIR%\\bin;%PATH%\r\n";
+ contentString += "cd /D %QTDIR%\r\n";
+ contentString += "echo Remember to call vcvarsall.bat amd64 to complete environment setup!\r\n";
+ // Dump batch file
+ component.addOperation("AppendFile", batchFileName, contentString);
+
+ var windir = installer.environmentVariable("WINDIR");
+ if (windir == "") {
+ QMessageBox["warning"]( "Error" , "Error", "Could not find windows installation directory");
+ return;
+ }
+
+ var cmdLocation = windir + "\\system32\\cmd.exe";
+ component.addOperation( "CreateShortcut",
+ cmdLocation,
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010/Qt " + qtStringVersion + " for Desktop (MSVC 2010).lnk",
+ "/A /Q /K " + batchFileName);
+ // Assistant
+ component.addOperation( "CreateShortcut",
+ component_root_path + "/bin/assistant.exe",
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010/Assistant.lnk");
+
+ // Designer
+ component.addOperation( "CreateShortcut",
+ component_root_path + "/bin/designer.exe",
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010/Designer.lnk");
+
+ // Linguist
+ component.addOperation( "CreateShortcut",
+ component_root_path + "/bin/linguist.exe",
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010/Linguist.lnk");
+
+ // README
+ //var notePadLocation = windir + "\\notepad.exe";
+ //component.addOperation( "CreateShortcut",
+ // notePadLocation,
+ // "@StartMenuDir@/%QT_VERSION%/MSVC 2010/Linguist.lnk");
+
+ // Examples & Demos
+ //component.addOperation( "CreateShortcut",
+ // component_root_path + "/bin/qtdemo.exe",
+ // "@StartMenuDir@/%QT_VERSION%/MSVC 2010/Examples & Demos.lnk");
+}
Component.prototype.createOperations = function()
{
@@ -44,6 +95,9 @@ Component.prototype.createOperations = function()
try {
// patch Qt binaries
component.addOperation( "QtPatch", "windows", installer.value("TargetDir") + "%TARGET_INSTALL_DIR%" );
+
+ // Create a batch file and shortcuts with the development environment
+ createShortcuts();
} catch( e ) {
print( e );
}
diff --git a/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs b/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs
index db8acd4..dd6e70e 100644
--- a/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs
+++ b/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs
@@ -19,6 +19,59 @@ checkWhetherStopProcessIsNeeded = function()
{
}
+createShortcuts = function()
+{
+ var qtStringVersion = "%QT_VERSION%";
+ // Create a batch file with the development environment
+ component_root_path = installer.value("TargetDir") + "%TARGET_INSTALL_DIR%";
+ var batchFileName = component_root_path + "/" + "bin" + "/" + "qtenv2.bat";
+ var contentString = "echo off\r\n";
+ contentString += "echo Setting up environment for Qt usage...\r\n";
+ contentString += "set QTDIR=" + component_root_path + "\r\n";
+ contentString += "set PATH=%QTDIR%\\bin;%PATH%\r\n";
+ contentString += "cd /D %QTDIR%\r\n";
+ contentString += "echo Remember to call vcvarsall.bat amd64 to complete environment setup!\r\n";
+ // Dump batch file
+ component.addOperation("AppendFile", batchFileName, contentString);
+
+ var windir = installer.environmentVariable("WINDIR");
+ if (windir == "") {
+ QMessageBox["warning"]( "Error" , "Error", "Could not find windows installation directory");
+ return;
+ }
+
+ var cmdLocation = windir + "\\system32\\cmd.exe";
+ component.addOperation( "CreateShortcut",
+ cmdLocation,
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010 (64-bit)/Qt " + qtStringVersion + " 64-bit for Desktop (MSVC 2010).lnk",
+ "/A /Q /K " + batchFileName);
+ // Assistant
+ component.addOperation( "CreateShortcut",
+ component_root_path + "/bin/assistant.exe",
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010 (64-bit)/Assistant.lnk");
+
+ // Designer
+ component.addOperation( "CreateShortcut",
+ component_root_path + "/bin/designer.exe",
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010 (64-bit)/Designer.lnk");
+
+ // Linguist
+ component.addOperation( "CreateShortcut",
+ component_root_path + "/bin/linguist.exe",
+ "@StartMenuDir@/%QT_VERSION%/MSVC 2010 (64-bit)/Linguist.lnk");
+
+ // README
+ //var notePadLocation = windir + "\\notepad.exe";
+ //component.addOperation( "CreateShortcut",
+ // notePadLocation,
+ // "@StartMenuDir@/%QT_VERSION%/MSVC 2010 (64-bit)/Linguist.lnk");
+
+ // Examples & Demos
+ //component.addOperation( "CreateShortcut",
+ // component_root_path + "/bin/qtdemo.exe",
+ // "@StartMenuDir@/%QT_VERSION%/MSVC 2010 (64-bit)/Examples & Demos.lnk");
+
+}
Component.prototype.createOperations = function()
{
@@ -44,6 +97,9 @@ Component.prototype.createOperations = function()
try {
// patch Qt binaries
component.addOperation( "QtPatch", "windows", installer.value("TargetDir") + "%TARGET_INSTALL_DIR%" );
+
+ // Create a batch file and shortcuts with the development environment
+ createShortcuts();
} catch( e ) {
print( e );
}
diff --git a/release-tools/configurations/pkg_beta/qt.sdk/meta/package.xml b/release-tools/configurations/pkg_beta/qt.sdk/meta/package.xml
index efe0824..9532283 100644
--- a/release-tools/configurations/pkg_beta/qt.sdk/meta/package.xml
+++ b/release-tools/configurations/pkg_beta/qt.sdk/meta/package.xml
@@ -8,7 +8,7 @@
<!--<Dependencies></Dependencies>--> <!-- Comma-separated list of dependencies - optional -->
<!--<Default></Default>-->
<!--<AutoSelectOn></AutoSelectOn>-->
- <!--<Script>installscript.qs</Script>--> <!-- File name of a script being loaded - optional. -->
+ <Script>installscript.qs</Script>
<!--<Forced></Forced>-->
<!--<Virtual></Virtual>--> <!-- Set to true if this is a virtual component not showing up in the installer -->
<!--<Important></Important>--> <!-- The package is marked as important. This is relevant for updates found with UpdateAgent. -->