changeset 613:f83ca6359915

* configtool/standalone/wxwin/admindlg.cpp, configtool/standalone/wxwin/configtooldoc.cpp, configtool/standalone/wxwin/configtool.cpp, configtool/standalone/wxwin/mainwin.cpp, configtool/standalone/wxwin/appsettings.cpp: Look for all persistent application settings under "HKEY_CURRENT_USER\Software\eCos Configuration Tool\" for consistency. * configtool/standalone/wxwin/appsettings.cpp: Board 'reset type' is determined at run-time and no longer persistent. * configtool/standalone/wxwin/configtooldoc.cpp: Determine board reset type by looking for "cyg_test_is_simulator=1" rather than just "cyg_test_is_simulator" since "cyg_test_simulator=0" is also possible. * configtool/standalone/wxwin/mainwin.cpp: Supress obsolete menu items. * configtool/standalone/wxwin/platformeditordialog.cpp: Replace LF (rather than CRLF) with ';' when storing GDB commands. * ecostest/common/eCosTestPlatform.cpp: Look for all persistent application settings under "HKEY_CURRENT_USER\Software\eCos Configuration Tool\" for consistency.
author jld
date Thu, 13 Feb 2003 16:23:38 +0000
parents 71096094815a
children e667cd96ec0e
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/admindlg.cpp host/tools/configtool/standalone/wxwin/appsettings.cpp host/tools/configtool/standalone/wxwin/configtool.cpp host/tools/configtool/standalone/wxwin/configtooldoc.cpp host/tools/configtool/standalone/wxwin/mainwin.cpp host/tools/configtool/standalone/wxwin/platformeditordlg.cpp host/tools/ecostest/ChangeLog host/tools/ecostest/common/eCosTestPlatform.cpp
diffstat 9 files changed, 73 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -1,3 +1,28 @@
+2003-02-13  John Dallaway  <jld@ecoscentric.com>
+
+	* standalone/wxwin/admindlg.cpp,
+	  standalone/wxwin/configtooldoc.cpp,
+	  standalone/wxwin/configtool.cpp,
+	  standalone/wxwin/mainwin.cpp,
+	  standalone/wxwin/appsettings.cpp:
+	Look for all persistent application settings under
+        "HKEY_CURRENT_USER\Software\eCos Configuration Tool\"
+	for consistency.
+
+	* standalone/wxwin/appsettings.cpp:
+	Board 'reset type' is determined at run-time and no longer persistent.
+
+	* standalone/wxwin/configtooldoc.cpp:
+	Determine board reset type by looking for "cyg_test_is_simulator=1"
+	rather than just "cyg_test_is_simulator" since "cyg_test_simulator=0"
+	is also possible.
+
+	* standalone/wxwin/mainwin.cpp:
+	Supress obsolete menu items.
+
+	* standalone/wxwin/platformeditordialog.cpp:
+	Replace LF (rather than CRLF) with ';' when storing GDB commands.
+
 2003-02-10  John Dallaway  <jld@ecoscentric.com>
 
 	* standalone/wxwin/runtestsdlg.cpp,
--- a/host/tools/configtool/standalone/wxwin/admindlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/admindlg.cpp
@@ -2,6 +2,7 @@
 //
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
@@ -27,7 +28,7 @@
 //===========================================================================
 //#####DESCRIPTIONBEGIN####
 //
-// Author(s):   julians
+// Author(s):   julians,jld
 // Contact(s):  julians
 // Date:        2000/09/28
 // Version:     $Id: admindlg.cpp,v 1.6 2001/08/22 16:50:32 julians Exp $
@@ -360,7 +361,7 @@ bool ecAdminDialog::FindUserToolsPath()
 {
 #ifdef __WXMSW__
     HKEY hKey;
-    if (ERROR_SUCCESS != RegOpenKeyEx (HKEY_CURRENT_USER, _T("Software\\Red Hat\\eCos\\Configuration Tool\\User Tools"), 0, KEY_READ, &hKey))
+    if (ERROR_SUCCESS != RegOpenKeyEx (HKEY_CURRENT_USER, _T("Software\\eCos Configuration Tool\\Paths\\UserToolsDir"), 0, KEY_READ, &hKey))
         return FALSE;
     
     TCHAR szBuffer [MAX_PATH + 1];
--- a/host/tools/configtool/standalone/wxwin/appsettings.cpp
+++ b/host/tools/configtool/standalone/wxwin/appsettings.cpp
@@ -2,6 +2,7 @@
 //
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
@@ -27,7 +28,7 @@
 //===========================================================================
 //#####DESCRIPTIONBEGIN####
 //
-// Author(s):   julians
+// Author(s):   julians, jld
 // Contact(s):  julians
 // Date:        2000/08/29
 // Version:     $Id: appsettings.cpp,v 1.27 2001/12/14 17:34:03 julians Exp $
@@ -239,7 +240,7 @@ wxString ecSettings::GenerateFilename(co
 // Load config info
 bool ecSettings::LoadConfig()
 {
-    wxConfig config(wxGetApp().GetSettings().GetConfigAppName(), wxT("Red Hat"));
+    wxConfig config(wxGetApp().GetSettings().GetConfigAppName());
     
     config.Read(_("/Window Status/FrameStatus"), & m_frameStatus);
     config.Read(_("/Window Status/ShowToolBar"), (bool*) & m_showToolBar);
@@ -330,7 +331,7 @@ bool ecSettings::LoadConfig()
     {
         // This should look in HKEY_LOCAL_MACHINE
 
-        wxConfig config2(wxT("eCos"), wxT("Red Hat"), wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE|wxCONFIG_USE_LOCAL_FILE);
+        wxConfig config2(wxT("eCos"), wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE|wxCONFIG_USE_LOCAL_FILE);
 
         wxString versionKey = GetInstallVersionKey();
         wxConfigPathChanger path(& config2, wxString(wxT("/")) + versionKey + wxT("/"));
@@ -530,13 +531,13 @@ bool ecSettings::LoadConfig()
         }
     }
     
-    // Load current repository from eCos/Common/Repository/Folder
+    // Load current repository from eCos Configuration Tool/Paths/RepositoryDir
     {
-        wxConfig eCosConfig(wxT("eCos"), wxT("Red Hat"), wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE|wxCONFIG_USE_LOCAL_FILE);
-        wxConfigPathChanger path(& config, wxT("/Common/Repository/"));
+        wxConfig eCosConfig(wxT("eCos Configuration Tool"), 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("/Common/Repository/Folder"), & m_strRepository))
+        if (!eCosConfig.Read(wxT("/Paths/RepositoryDir"), & m_strRepository))
         {
 #ifdef __WXMSW__
             // If we can't find the current folder, look for clues in the registry.
@@ -587,7 +588,7 @@ bool ecSettings::LoadConfig()
 // Save config info
 bool ecSettings::SaveConfig()
 {
-    wxConfig config(wxGetApp().GetSettings().GetConfigAppName(), wxT("Red Hat"));
+    wxConfig config(wxGetApp().GetSettings().GetConfigAppName());
     
     config.Write(_("/Files/LastFile"), m_lastFilename);
     
@@ -647,18 +648,16 @@ bool ecSettings::SaveConfig()
     config.Write(_("/Packages/OmitHardwarePackages"), m_omitHardwarePackages);
     config.Write(_("/Packages/MatchPackageNamesExactly"), m_matchPackageNamesExactly);
 
-    // Save current repository to eCos/Common/Repository/Folder
+    // Save current repository to eCos Configuration Tool/Paths/RepositoryDir
     // UNLESS it was overridden by ECOS_REPOSITORY
     {
-        wxConfig eCosConfig(wxT("eCos"), wxT("Red Hat"));
-        
         wxString envVarValue = wxGetenv(wxT("ECOS_REPOSITORY"));
         if (m_strRepository == envVarValue)
         {
             // Don't override the value in the local settings
         }
         else
-            eCosConfig.Write(wxT("/Common/Repository/Folder"), m_strRepository);
+            config.Write(wxT("/Paths/RepositoryDir"), m_strRepository);
     }
     
     // Run tests settings
@@ -788,7 +787,7 @@ wxString ecSettings::GetInstallVersionKe
 #define MAX_PATH 1024
 #endif
 
-    wxString strKey = wxT("SOFTWARE\\Red Hat\\eCos");
+    wxString strKey = wxT("SOFTWARE\\eCos");
     wxString strVersionKey = wxT("");
     wxString rc = wxT("");
     wxChar pszBuffer [MAX_PATH + 1];
@@ -875,7 +874,8 @@ bool ecRunTestsSettings::LoadConfig(wxCo
     config.Read(_("/Run Tests/Baud"), & m_nBaud);
     config.Read(_("/Run Tests/LocalTCPIPHost"), & m_strLocalTCPIPHost);
     config.Read(_("/Run Tests/LocalTCPIPPort"), & m_nLocalTCPIPPort);
-    config.Read(_("/Run Tests/ResetType"), & m_nReset);
+//  Reset type is determined at run-time for standalone configtool
+//    config.Read(_("/Run Tests/ResetType"), & m_nReset);
     config.Read(_("/Run Tests/ResetString"), & m_strReset);
     config.Read(_("/Run Tests/ResourceHost"), & m_strResourceHost);
     config.Read(_("/Run Tests/ResourcePort"), & m_nResourcePort);
--- a/host/tools/configtool/standalone/wxwin/configtool.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtool.cpp
@@ -769,7 +769,7 @@ int ecApp::OnExit(void)
     m_settings.SaveConfig();
 
     {
-        wxConfig config(wxGetApp().GetSettings().GetConfigAppName(), wxT("Red Hat"));
+        wxConfig config(wxGetApp().GetSettings().GetConfigAppName());
         if (config.HasGroup(wxT("FileHistory")))
             config.DeleteGroup(wxT("FileHistory"));
 	config.SetPath(wxT("FileHistory/"));
--- a/host/tools/configtool/standalone/wxwin/configtooldoc.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtooldoc.cpp
@@ -2,6 +2,7 @@
 //
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
@@ -27,8 +28,8 @@
 //===========================================================================
 //#####DESCRIPTIONBEGIN####
 //
-// Author(s):   julians
-// Contact(s):  julians
+// Author(s):   julians, jld
+// Contact(s):  julians, jld
 // Date:        2000/10/05
 // Version:     $Id: configtooldoc.cpp,v 1.43 2002/02/13 13:58:18 julians Exp $
 // Purpose:
@@ -1187,7 +1188,7 @@ wxString ecConfigToolDoc::GetDefaultHard
 {
 #ifdef __WXMSW__
     // get the greatest eCos version subkey
-    wxConfig config(wxT("eCos"), wxT("Red Hat"), wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE);
+    wxConfig config(wxT("eCos"), wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_GLOBAL_FILE);
 
     wxString versionKey(wxT(""));
     wxString key(wxT(""));
@@ -2268,7 +2269,7 @@ void ecConfigToolDoc::RunTests()
     const CeCosTestPlatform * etPlatform = CeCosTestPlatform::Get(strTarget);
     wxASSERT (NULL != etPlatform);
 
-    if (-1 != wxString (etPlatform->GdbCmds ()).Find (wxT("cyg_test_is_simulator")))
+    if (-1 != wxString (etPlatform->GdbCmds ()).Find (wxT("cyg_test_is_simulator=1")))
     {   // if a simulator target, disable 'reset hardware' message box
         wxGetApp().GetSettings().GetRunTestsSettings().m_nReset = RESET_NONE ;
     }
--- a/host/tools/configtool/standalone/wxwin/mainwin.cpp
+++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp
@@ -283,7 +283,7 @@ ecMainFrame::ecMainFrame(wxDocManager *m
     wxGetApp().GetDocManager()->FileHistoryUseMenu(fileMenu);
     // Load file history
     {
-        wxConfig config(wxGetApp().GetSettings().GetConfigAppName(), wxT("Red Hat"));
+        wxConfig config(wxGetApp().GetSettings().GetConfigAppName());
 	config.SetPath(wxT("FileHistory/"));
         wxGetApp().GetDocManager()->FileHistoryLoad(config);
     }
@@ -371,8 +371,8 @@ ecMainFrame::ecMainFrame(wxDocManager *m
     webMenu->AppendSeparator();
     webMenu->Append(ecID_REDHAT_WEB_UITRON, _("µ&ITRON"), _("Opens the µITRON specification page"));
     
-    helpMenu->Append(ecID_REDHAT_WEB, _("&Red Hat on the Web"), webMenu);
-    helpMenu->AppendSeparator();
+//    helpMenu->Append(ecID_REDHAT_WEB, _("&Red Hat on the Web"), webMenu);
+//    helpMenu->AppendSeparator();
     helpMenu->Append(ecID_REPOSITORY_INFO, _("Repository &Information...\tCtrl+I"), _("Displays information about the current repository"));
     helpMenu->Append(wxID_ABOUT, _("&About the Configuration Tool..."), _("Displays program information, version and copyright"));
     
--- a/host/tools/configtool/standalone/wxwin/platformeditordlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/platformeditordlg.cpp
@@ -2,6 +2,7 @@
 //
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
@@ -27,7 +28,7 @@
 //===========================================================================
 //#####DESCRIPTIONBEGIN####
 //
-// Author(s):   julians
+// Author(s):   julians, jld
 // Contact(s):  julians
 // Date:        2000/09/06
 // Version:     $Id: platformeditordlg.cpp,v 1.4 2001/07/05 10:42:16 julians Exp $
@@ -72,11 +73,11 @@
 #include "wx/msw/winundef.h"
 #endif
 
-#ifdef __WXMSW__
-static const wxChar* g_NewLineToReplace = wxT("\r\n");
-#else
+//#ifdef __WXMSW__
+//static const wxChar* g_NewLineToReplace = wxT("\r\n");
+//#else
 static const wxChar* g_NewLineToReplace = wxT("\n");
-#endif
+//#endif
 
 BEGIN_EVENT_TABLE(ecPlatformEditorDialog, ecDialog)
     EVT_BUTTON(wxID_OK, ecPlatformEditorDialog::OnOK)
--- a/host/tools/ecostest/ChangeLog
+++ b/host/tools/ecostest/ChangeLog
@@ -1,3 +1,10 @@
+2003-02-13  John Dallaway  <jld@ecoscentric.com>
+
+	* common/eCosTestPlatform.cpp:
+	Look for all persistent application settings under
+        "HKEY_CURRENT_USER\Software\eCos Configuration Tool\"
+	for consistency.
+
 2003-02-05  John Dallaway  <jld@ecoscentric.com>
 
 	* common/eCosTest.cpp (CygPath): Get the cygdrive prefix from
--- a/host/tools/ecostest/common/eCosTestPlatform.cpp
+++ b/host/tools/ecostest/common/eCosTestPlatform.cpp
@@ -2,6 +2,7 @@
 //                                                                          
 // ----------------------------------------------------------------------------
 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
 //
 // This program is part of the eCos host tools.
 //
@@ -152,12 +153,12 @@ bool CeCosTestPlatform::Load()
 #ifdef _WIN32
 
   // get target info from the registry
-  String strPlatformsKey = _T("Software\\Red Hat\\eCos\\");
-  strPlatformsKey += GetGreatestSubkey (_T("Software\\Red Hat\\eCos"));
-  strPlatformsKey += _T("\\Platforms");
+  String strPlatformsKey = _T("Software\\eCos Configuration Tool\\Platforms");
+//  strPlatformsKey += GetGreatestSubkey (_T("Software\\eCos"));
+//  strPlatformsKey += _T("\\Platforms");
 
   HKEY hKey;
-  bool rc=ERROR_SUCCESS==RegOpenKeyEx (HKEY_LOCAL_MACHINE, strPlatformsKey, 0L, KEY_READ, &hKey);
+  bool rc=ERROR_SUCCESS==RegOpenKeyEx (HKEY_CURRENT_USER, strPlatformsKey, 0L, KEY_READ, &hKey);
   DWORD dwSubKeys=0;
   if(rc){
     // Found the given key.
@@ -236,11 +237,11 @@ bool CeCosTestPlatform::Save()
   const String strDir(CeCosTestUtils::HomeFile(_T(".eCosPlatforms")));
 #ifdef _WIN32
   if(!CeCosTestUtils::Exists(strDir)){
-    String strPlatformsKey = _T("Software\\Red Hat\\eCos\\");
-    strPlatformsKey += GetGreatestSubkey (_T("Software\\Red Hat\\eCos"));
-    strPlatformsKey += _T("\\Platforms");
+    String strPlatformsKey = _T("Software\\eCos Configuration Tool\\Platforms");
+//    strPlatformsKey += GetGreatestSubkey (_T("Software\\eCos"));
+//    strPlatformsKey += _T("\\Platforms");
 
-    return SaveToRegistry(HKEY_LOCAL_MACHINE,strPlatformsKey);
+    return SaveToRegistry(HKEY_CURRENT_USER,strPlatformsKey);
   }
 #endif
   return SaveToDir(strDir);