diff host/tools/configtool/standalone/win32/MainFrm.cpp @ 191:678094f34118

Merge from eCos master repository on 2001-10-19-06:43:02-BST
author jlarmour
date Fri, 19 Oct 2001 07:02:26 +0000
parents f2545e5de153
children 74dbf4c3f2e1
line wrap: on
line diff
--- a/host/tools/configtool/standalone/win32/MainFrm.cpp
+++ b/host/tools/configtool/standalone/win32/MainFrm.cpp
@@ -502,6 +502,22 @@ void CMainFrame::Build(const CString &st
       strCmd+=GetApp()->m_strMakeOptions;
     }
 
+    strCmd += _T(" --directory ");
+    
+    // Quoting the name may not mix with the 'sh' command on Unix, so only do it
+    // under Windows where it's more likely there will be spaces needing quoting.
+#ifdef _WINDOWS
+    CString buildDir(pDoc->BuildTree());
+    
+#if 1 // ecUSE_ECOS_X_NOTATION
+    std::string cPath = cygpath(std::string(pDoc->BuildTree()));
+    buildDir = cPath.c_str();
+#endif
+    strCmd += CString(_T("\"")) + buildDir + CString(_T("\""));
+#else
+    strCmd += CString(pDoc->BuildTree()) ;
+#endif
+
     if(PrepareEnvironment()){
       m_strBuildTarget=strWhat;
       SetThermometerMax(250); // This is just a guess.  The thread we are about to spawn will work out the correct answer
@@ -521,8 +537,6 @@ void CMainFrame::Build(const CString &st
 }
 
 
-
-
 CConfigToolApp * CMainFrame::GetApp()
 {
   return (CConfigToolApp *)AfxGetApp();
@@ -1216,14 +1230,17 @@ void CMainFrame::OnUpdateToolsAdministra
 
 void CMainFrame::CygMount(TCHAR c)
 {
-  ASSERT(_istalpha(c));
+  // May not be alpha if it's e.g. a UNC network path
+  if (!_istalpha(c))
+      return;
+
   c=towlower(c);
   if(!m_arMounted[c-_TCHAR('a')]){
     m_arMounted[c-_TCHAR('a')]=true;
     CString strCmd;
     String strOutput;
 
-    strCmd.Format(_T("mount %c: /%c"),c,c);
+    strCmd.Format(_T("mount %c: /ecos-%c"),c,c);
     CSubprocess sub;
     sub.Run(strOutput,strCmd);
   }