summaryrefslogtreecommitdiffstats
path: root/release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs
diff options
context:
space:
mode:
Diffstat (limited to 'release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs')
-rw-r--r--release-tools/configurations/pkg_beta/qt.sdk.desktop.500_beta.msvc2010_64/meta/installscript.qs56
1 files changed, 56 insertions, 0 deletions
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 );
}