comparison host/tools/ecostest/common/eCosTestPlatform.cpp @ 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 36f23a513952
children ed7f4b86af78
comparison
equal deleted inserted replaced
612:71096094815a 613:f83ca6359915
1 //####COPYRIGHTBEGIN#### 1 //####COPYRIGHTBEGIN####
2 // 2 //
3 // ---------------------------------------------------------------------------- 3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. 4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5 // Copyright (C) 2003 John Dallaway
5 // 6 //
6 // This program is part of the eCos host tools. 7 // This program is part of the eCos host tools.
7 // 8 //
8 // This program is free software; you can redistribute it and/or modify it 9 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free 10 // under the terms of the GNU General Public License as published by the Free
150 srand( (unsigned)time( NULL ) ); 151 srand( (unsigned)time( NULL ) );
151 152
152 #ifdef _WIN32 153 #ifdef _WIN32
153 154
154 // get target info from the registry 155 // get target info from the registry
155 String strPlatformsKey = _T("Software\\Red Hat\\eCos\\"); 156 String strPlatformsKey = _T("Software\\eCos Configuration Tool\\Platforms");
156 strPlatformsKey += GetGreatestSubkey (_T("Software\\Red Hat\\eCos")); 157 // strPlatformsKey += GetGreatestSubkey (_T("Software\\eCos"));
157 strPlatformsKey += _T("\\Platforms"); 158 // strPlatformsKey += _T("\\Platforms");
158 159
159 HKEY hKey; 160 HKEY hKey;
160 bool rc=ERROR_SUCCESS==RegOpenKeyEx (HKEY_LOCAL_MACHINE, strPlatformsKey, 0L, KEY_READ, &hKey); 161 bool rc=ERROR_SUCCESS==RegOpenKeyEx (HKEY_CURRENT_USER, strPlatformsKey, 0L, KEY_READ, &hKey);
161 DWORD dwSubKeys=0; 162 DWORD dwSubKeys=0;
162 if(rc){ 163 if(rc){
163 // Found the given key. 164 // Found the given key.
164 // Subkeys' names are the target image names: 165 // Subkeys' names are the target image names:
165 // Subkeys's values are: 166 // Subkeys's values are:
234 bool CeCosTestPlatform::Save() 235 bool CeCosTestPlatform::Save()
235 { 236 {
236 const String strDir(CeCosTestUtils::HomeFile(_T(".eCosPlatforms"))); 237 const String strDir(CeCosTestUtils::HomeFile(_T(".eCosPlatforms")));
237 #ifdef _WIN32 238 #ifdef _WIN32
238 if(!CeCosTestUtils::Exists(strDir)){ 239 if(!CeCosTestUtils::Exists(strDir)){
239 String strPlatformsKey = _T("Software\\Red Hat\\eCos\\"); 240 String strPlatformsKey = _T("Software\\eCos Configuration Tool\\Platforms");
240 strPlatformsKey += GetGreatestSubkey (_T("Software\\Red Hat\\eCos")); 241 // strPlatformsKey += GetGreatestSubkey (_T("Software\\eCos"));
241 strPlatformsKey += _T("\\Platforms"); 242 // strPlatformsKey += _T("\\Platforms");
242 243
243 return SaveToRegistry(HKEY_LOCAL_MACHINE,strPlatformsKey); 244 return SaveToRegistry(HKEY_CURRENT_USER,strPlatformsKey);
244 } 245 }
245 #endif 246 #endif
246 return SaveToDir(strDir); 247 return SaveToDir(strDir);
247 } 248 }
248 249