Mercurial > ecos-v2_0-branch
changeset 763:7617ab51641e ecos-v2_0b1-release
* 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.
| author | jld |
|---|---|
| date | Fri, 07 Mar 2003 15:14:23 +0000 |
| parents | 215c4f8f2246 |
| children | 4e6a156dfada |
| files | host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/admindlg.cpp host/tools/configtool/standalone/wxwin/appsettings.cpp |
| diffstat | 3 files changed, 18 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,3 +1,11 @@ +2003-03-07 John Dallaway <jld@ecoscentric.com> + + * 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 <jld@ecoscentric.com> * appsettings.cpp: Disable use of "make -j<n>" for eCos builds in
--- 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 ();
--- 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);
