comparison host/tools/configtool/standalone/wxwin/appsettings.cpp @ 797:d834d1945648

* standalone/wxwin/appsettings.cpp, standalone/wxwin/mainwin.cpp: Rationalise the treatment of the build tools directory during startup and when using the build tools dialog. * standalone/wxwin/configtool.cpp: Wait for the installation of platform definitions to complete on Linux.
author jld
date Thu, 17 Apr 2003 14:16:11 +0000
parents e37ef190e2be
children f3f125e938f4
comparison
equal deleted inserted replaced
796:d11d25c40632 797:d834d1945648
329 if (gnutools.DirExists()) // we've found the gnutools 329 if (gnutools.DirExists()) // we've found the gnutools
330 m_buildToolsDir = gnutools.GetFullPath(); 330 m_buildToolsDir = gnutools.GetFullPath();
331 } 331 }
332 } 332 }
333 333
334 // look for bin/*-objcopy under the build tools directory 334 // look for *objcopy in and under the build tools directory
335 wxArrayString objcopyFiles; 335 if (! m_buildToolsDir.IsEmpty())
336 wxString objcopyFileSpec(wxT("-objcopy")); 336 {
337 #ifdef __WXMSW__ 337 wxArrayString objcopyFiles;
338 objcopyFileSpec += wxT(".exe"); 338 wxString objcopyFileSpec(wxT("objcopy"));
339 #endif 339 #ifdef __WXMSW__
340 size_t objcopyCount = wxDir::GetAllFiles(m_buildToolsDir, &objcopyFiles, wxT("*") + objcopyFileSpec, wxDIR_FILES | wxDIR_DIRS); 340 objcopyFileSpec += wxT(".exe");
341 for (int count=0; count < objcopyCount; count++) 341 #endif
342 { 342 size_t objcopyCount = wxDir::GetAllFiles(m_buildToolsDir, &objcopyFiles, wxT("*") + objcopyFileSpec, wxDIR_FILES | wxDIR_DIRS);
343 wxFileName file (objcopyFiles [count]); 343 for (int count=0; count < objcopyCount; count++)
344 m_arstrBinDirs.Set(file.GetFullName().Left (file.GetFullName().Find(objcopyFileSpec)), file.GetPath(wxPATH_GET_VOLUME)); 344 {
345 wxFileName file (objcopyFiles [count]);
346 wxString new_prefix (file.GetFullName().Left (file.GetFullName().Find(objcopyFileSpec)));
347 if ((! new_prefix.IsEmpty()) && ('-' == new_prefix.Last()))
348 new_prefix = new_prefix.Left (new_prefix.Len() - 1); // strip off trailing hyphen
349 m_arstrBinDirs.Set(new_prefix, file.GetPath(wxPATH_GET_VOLUME));
350 }
345 } 351 }
346 352
347 if (!config.Read(_("/Build/Make Options"), & m_strMakeOptions)) 353 if (!config.Read(_("/Build/Make Options"), & m_strMakeOptions))
348 { 354 {
349 #ifdef __WXMSW__ 355 #ifdef __WXMSW__