Mercurial > ecos
diff host/tools/configtool/standalone/wxwin/appsettings.cpp @ 951:3021b4922c80
* 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:18:40 +0000 |
| parents | d7c9117adc25 |
| children | 8f4717f85ff4 |
line wrap: on
line diff
--- a/host/tools/configtool/standalone/wxwin/appsettings.cpp +++ b/host/tools/configtool/standalone/wxwin/appsettings.cpp @@ -331,17 +331,23 @@ bool ecSettings::LoadConfig() } } - // look for bin/*-objcopy under the build tools directory - wxArrayString objcopyFiles; - wxString objcopyFileSpec(wxT("-objcopy")); + // look for *objcopy in and under the build tools directory + if (! m_buildToolsDir.IsEmpty()) + { + wxArrayString objcopyFiles; + wxString objcopyFileSpec(wxT("objcopy")); #ifdef __WXMSW__ - objcopyFileSpec += wxT(".exe"); + objcopyFileSpec += wxT(".exe"); #endif - size_t objcopyCount = wxDir::GetAllFiles(m_buildToolsDir, &objcopyFiles, wxT("*") + objcopyFileSpec, wxDIR_FILES | wxDIR_DIRS); - for (int count=0; count < objcopyCount; count++) - { - wxFileName file (objcopyFiles [count]); - m_arstrBinDirs.Set(file.GetFullName().Left (file.GetFullName().Find(objcopyFileSpec)), file.GetPath(wxPATH_GET_VOLUME)); + size_t objcopyCount = wxDir::GetAllFiles(m_buildToolsDir, &objcopyFiles, wxT("*") + objcopyFileSpec, wxDIR_FILES | wxDIR_DIRS); + for (int count=0; count < objcopyCount; count++) + { + wxFileName file (objcopyFiles [count]); + wxString new_prefix (file.GetFullName().Left (file.GetFullName().Find(objcopyFileSpec))); + if ((! new_prefix.IsEmpty()) && ('-' == new_prefix.Last())) + new_prefix = new_prefix.Left (new_prefix.Len() - 1); // strip off trailing hyphen + m_arstrBinDirs.Set(new_prefix, file.GetPath(wxPATH_GET_VOLUME)); + } } if (!config.Read(_("/Build/Make Options"), & m_strMakeOptions))
