# HG changeset patch # User jld # Date 1047050063 0 # Node ID 7617ab51641ec75a081fe33ef3348bb8ea9198f6 # Parent 215c4f8f224602eef23210ef984ec89ec3281636 * standalone/wxwin/appsettings.cpp: Look in the right place for the eCos repository location under Linux. * standalone/wxwin/admindlg.cpp: Allow addition of EPKs with no pkgadd.txt since this file should be optional. diff --git a/host/tools/configtool/ChangeLog b/host/tools/configtool/ChangeLog --- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,3 +1,11 @@ +2003-03-07 John Dallaway + + * standalone/wxwin/appsettings.cpp: Look in the right place for the + eCos repository location under Linux. + + * standalone/wxwin/admindlg.cpp: Allow addition of EPKs with no + pkgadd.txt since this file should be optional. + 2003-03-06 John Dallaway * appsettings.cpp: Disable use of "make -j" for eCos builds in diff --git a/host/tools/configtool/standalone/wxwin/admindlg.cpp b/host/tools/configtool/standalone/wxwin/admindlg.cpp --- a/host/tools/configtool/standalone/wxwin/admindlg.cpp +++ b/host/tools/configtool/standalone/wxwin/admindlg.cpp @@ -145,7 +145,7 @@ void ecAdminDialog::OnInitDialog(wxInitD } // populate the package tree - + if (!PopulatePackageTree (m_strRepository)) { m_strRepository = wxT(""); @@ -242,7 +242,7 @@ void ecAdminDialog::OnAdd(wxCommandEvent // get an eCos package distribution file // extract the licence file - + wxString strCommand; strCommand.Printf(wxT("add %s --extract_license"), (const wxChar*) strPathName); strCommand.Replace(wxT("\\"), wxT("/")); // backslashes -> forward slashes for Tcl_EvalFile @@ -251,11 +251,11 @@ void ecAdminDialog::OnAdd(wxCommandEvent wxString strLicenseFile = m_strRepository + wxString(wxFILE_SEP_PATH) + wxT("pkgadd.txt"); #ifdef __WXMSW__ strLicenseFile.Replace (wxT("/"), wxT("\\")); // forward slashes -> backslashes for Win32 -#endif +#endif // read the license file - + wxFile fileLicenseFile; - if (fileLicenseFile.Open (strLicenseFile, wxFile::read)) + if (fileLicenseFile.Exists (strLicenseFile) && fileLicenseFile.Open (strLicenseFile, wxFile::read)) { //TRACE (_T("License file found at %s\n"), strLicenseFile); const off_t dwLicenseLength = fileLicenseFile.Length (); diff --git a/host/tools/configtool/standalone/wxwin/appsettings.cpp b/host/tools/configtool/standalone/wxwin/appsettings.cpp --- a/host/tools/configtool/standalone/wxwin/appsettings.cpp +++ b/host/tools/configtool/standalone/wxwin/appsettings.cpp @@ -534,9 +534,9 @@ bool ecSettings::LoadConfig() // Load current repository from eCos Configuration Tool/Paths/RepositoryDir { - wxConfig eCosConfig(wxT("eCos Configuration Tool"), wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE|wxCONFIG_USE_LOCAL_FILE); + wxConfig eCosConfig(wxGetApp().GetSettings().GetConfigAppName(), wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE|wxCONFIG_USE_LOCAL_FILE); wxConfigPathChanger path(& config, wxT("/Repository/")); - + //if (!eCosConfig.Read(wxT("Folder"), & m_strRepository)) if (!eCosConfig.Read(wxT("/Paths/RepositoryDir"), & m_strRepository)) { @@ -635,7 +635,7 @@ bool ecSettings::SaveConfig() config.Write(_("/Paths/BuildToolsDir"), m_buildToolsDir); config.Write(_("/Build/Make Options"), m_strMakeOptions); - + // Find dialog settings config.Write(_("/Find/Text"), m_findText); config.Write(_("/Find/MatchWholeWord"), m_findMatchWholeWord); @@ -716,11 +716,11 @@ ecFileName ecSettings::m_strDefaultExter int ecSettings::GetRepositoryRegistryClues(wxArrayString& arstr, const wxString& pszPrefix) { arstr.Clear(); - + #ifdef __WXMSW__ wxConfig config(wxT("Windows"), wxT("Microsoft"), wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE); config.SetPath(wxT("/CurrentVersion/App Paths")); - + wxString key(wxT("")); long index; bool bMore = config.GetFirstGroup(key, index);