Merge commit RCL_2_4
authorEd Swartz <ed.swartz@nokia.com>
Tue, 27 Apr 2010 11:57:26 -0500
branchRCL_2_4
changeset 1300 dd0c4e59db51
parent 1299 c6abac939087 (current diff)
parent 1298 8aac8dbed773 (diff)
child 1305 68114c404585
Merge commit
--- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_connection_wizard.htm	Tue Apr 27 10:40:15 2010 -0500
+++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/wnd_new_connection_wizard.htm	Tue Apr 27 11:57:26 2010 -0500
@@ -44,7 +44,6 @@
     <td><p>Displays COM Port, Baud Rate, IP Addresss, Channel and Port settings according to the chosen connection type.</p>
       <ul>
         <li>Bluetooth - select which serial COM port to use </li>
-        <li>PlatSim - select Platsim executable and instance to use </li>
         <li>Serial - select which serial COM port and baud rate to use. </li>
         <li>TPC IP - enter your IP address, Musti channel, Port number </li>
         <li>USB - select which serial COM port to use</li>
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetsPage.java	Tue Apr 27 10:40:15 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetsPage.java	Tue Apr 27 11:57:26 2010 -0500
@@ -227,6 +227,8 @@
 		});
 		filterCheckbox.setData(UID, "filterCheckbox"); //$NON-NLS-1$
         
+		addOtherControls(parent);
+		
 		Link fLink = new Link(parent, SWT.WRAP);
 		fLink.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		fLink.setText(Messages.getString("BuildTargetsPage.Select_Filtering_Prefs_Link")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -249,8 +251,6 @@
 
 		});
 		
-		addOtherControls(parent);
-		
 		setPageComplete(validatePage());
 	}
 	
--- a/qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtSDKUtils.java	Tue Apr 27 10:40:15 2010 -0500
+++ b/qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtSDKUtils.java	Tue Apr 27 11:57:26 2010 -0500
@@ -53,14 +53,16 @@
 		public String incPath;
 	}
 	
-	/** Qt bin folder for internal SDK installs - epocroot relative */
-	private static final String QT_SDK_BIN_PATH = "epoc32/tools/qt";
+	/** Qt bin folder for internal SDK installs - epocroot relative - the deprecated internal location */
+	private static final String OLD_QT_SDK_BIN_PATH = "epoc32/tools/qt";
+	/** Qt bin folder for internal SDK installs - epocroot relative - the new internal location so that qmake is on the normal developer path with a subst'ed kit */
+	private static final String QT_SDK_PATH = "epoc32/tools/";
 	/** Qt include folder for internal SDK installs - epocroot relative */
 	private static final String QT_SDK_INC_PATH = "epoc32/include/mw";
 	
 	/** qt subfolder under QT_INC_FOLDER */
-	private static final String QT_FOLDER = "qt";
-	private static final String QT_MKSPECS = "mkspecs";
+	//private static final String QT_FOLDER = "qt";
+	//private static final String QT_MKSPECS = "mkspecs";
 	private static final String QT_QMAKE_WIN32 = "qmake.exe";
 	private static final String QT_QMAKE_UNIX = "qmake";
 	
@@ -72,24 +74,14 @@
 	private static final String QTVERSION = "com.trolltech.qtcppproject.properties.qtversion";
 	
 	/**
-	 * For the given Symbian SDK, test whether or not it qualifies for have Qt internally built.
+	 * For the given Symbian SDK, test whether or not it has Qt internally built.
+	 * Qualification relies on locating the qmake executable and the Qt include directory
 	 * @param sdk - The Symbian SDK or source base to test
 	 * @return - true if Qt is internally installed
 	 */
 	static private boolean isQtInternallyInstalled(ISymbianSDK sdk){
-		
-		String epocRoot = sdk.getEPOCROOT();
-		if (new File(epocRoot + QT_SDK_BIN_PATH).exists() && 
-			new File(epocRoot + QT_SDK_INC_PATH).exists() &&
-			new File(epocRoot + QT_SDK_INC_PATH + File.separator + QT_FOLDER).exists() &&
-			new File(epocRoot + QT_SDK_BIN_PATH + File.separator + QT_MKSPECS).exists() ) 
-		{
-			if (HostOS.IS_WIN32 && new File(epocRoot + QT_SDK_BIN_PATH + File.separator + QT_QMAKE_WIN32).exists()){
-				return true;
-			} else if (HostOS.IS_UNIX && new File(epocRoot + QT_SDK_BIN_PATH + File.separator + QT_QMAKE_UNIX).exists()){
-				return true;
-			}
-		}
+		if (getQmakeInstallationPath(sdk) != null && getQtIncludeDirectory(sdk) != null)
+			return true;
 		
 		return false;
 	}
@@ -102,7 +94,8 @@
 	static public String getQtSDKNameForSymbianSDK(ISymbianSDK sdk){
 		
 		String epocRoot = sdk.getEPOCROOT();
-		File qtBinPath = new File (epocRoot + QT_SDK_BIN_PATH);
+		File oldQtBinPath = new File (epocRoot + OLD_QT_SDK_BIN_PATH);
+		File newQtBinPath = new Path(epocRoot).append(QT_SDK_PATH).toFile();
 		File qtIncPath = new File (epocRoot + QT_SDK_INC_PATH);
 		
 		refreshQtStoredSDKs();
@@ -115,9 +108,10 @@
 			File currBinPath = new File(qtSDK.binPath);
 			File currIncPath = new File(qtSDK.incPath);
 			
-			if (currBinPath.equals(qtBinPath) && currIncPath.equals(qtIncPath)){
-				return qtSDK.name;
-			}
+			if ( (currBinPath.equals(oldQtBinPath) && currIncPath.equals(qtIncPath)) ||
+				 (currBinPath.equals(newQtBinPath) && currIncPath.equals(qtIncPath))){
+					return qtSDK.name;
+				}
 		}
 		
 		return null;
@@ -133,9 +127,7 @@
 		
 		refreshQtStoredSDKs();
 		if ((getQtSDKNameForSymbianSDK(sdk) == null) && isQtInternallyInstalled(sdk)){
-			IPath binPath = new Path(sdk.getEPOCROOT() + QT_SDK_BIN_PATH);
-			IPath incPath = new Path(sdk.getEPOCROOT() + QT_SDK_INC_PATH);
-			addQtSDK(sdk.getUniqueId(), binPath, incPath, makeDefault);
+			addQtSDK(sdk.getUniqueId(), getQmakeInstallationPath(sdk), getQtIncludeDirectory(sdk), makeDefault);
 		}
 	}
 	
@@ -227,6 +219,38 @@
 		return project.getPersistentProperty(new QualifiedName("", QTVERSION));
 	}
 	
+	/**
+	 * Retrieve the directory where qmake resides for a given SDK.
+	 * @param sdk - The sdk to search
+	 * @return The IPath where qmake resides, null if qmake cannot be found
+	 */
+	public static IPath getQmakeInstallationPath(ISymbianSDK sdk){
+		String epocRoot = sdk.getEPOCROOT();
+		String qmakeExecutable = HostOS.IS_WIN32 ? QT_QMAKE_WIN32 : QT_QMAKE_UNIX;
+		
+		// Test the new location first, where /epoc32/tools/ is normally on the %PATH%
+		// else test the old location
+		if (new Path(epocRoot).append(QT_SDK_PATH).append(qmakeExecutable).toFile().exists())
+			return new Path(epocRoot + QT_SDK_PATH);
+		else if (new Path(epocRoot).append(OLD_QT_SDK_BIN_PATH).append(qmakeExecutable).toFile().exists())
+			return new Path(epocRoot).append(OLD_QT_SDK_BIN_PATH);
+
+		return null;
+	}
+	
+	/**
+	 * Retrieve the qt include directory for a given SDK.
+	 * @param sdk - The sdk to search
+	 * @return The IPath if the include directory exists, null if the Qt include directory cannot be found
+	 */
+	public static IPath getQtIncludeDirectory(ISymbianSDK sdk){
+		String epocRoot = sdk.getEPOCROOT();
+		if (new File(epocRoot + QT_SDK_INC_PATH).exists() )
+			return new Path(epocRoot + QT_SDK_INC_PATH);
+			
+		return null;
+	}
+	
 }