/***************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the release tools of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** $QT_END_LICENSE$ ** *****************************************************************************/ // constructor function Component() { installer.valueChanged.connect( this, Component.prototype.reactOnTargetDirChange ); Component.prototype.reactOnTargetDirChange("TargetDir", installer.value("TargetDir")); } Component.prototype.reactOnTargetDirChange = function(key, value) { if (key == "TargetDir") { var path = value + "/Tools/mingw44_32"; path = path.replace("/\//g", "\\"); installer.setValue("MINGW44_DIR", path); } } Component.prototype.createOperations = function() { // Call the base createOperations component.createOperations(); if (installer.value("SDKToolBinary") == "") { print("Error! Unable to register toolchain: " + component.name + " - SDKToolBinary not set?"); return; } var tcId = "ProjectExplorer.ToolChain.Mingw:" + component.name; component.addOperation("Execute", ["{0,2}", "@SDKToolBinary@", "addTC", "--id", tcId, "--name", "MinGW 4.4 32bit", "--path", "@MINGW44_DIR@\\bin\\g++.exe", "--abi", "x86-windows-msys-pe-32bit", "--supportedAbis", "x86-windows-msys-pe-32bit"]); installer.setValue("MinGW44ToolChainId", tcId); }