This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Install per-user platform data on first invocation of configtool


ndex: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.50
diff -u -5 -r1.50 ChangeLog
--- ChangeLog	11 Apr 2003 10:22:36 -0000	1.50
+++ ChangeLog	16 Apr 2003 18:25:20 -0000
@@ -1,5 +1,11 @@
+2003-04-16  John Dallaway  <jld at ecoscentric dot com>
+
+	* standalone/wxwin/configtool.cpp: Install default platform definitions
+	on initial invocation. Generate Cygwin text-mode mounts explicitly since
+	text-mode is no longer the default mount type.
+
 2003-04-11  John Dallaway  <jld at ecoscentric dot com>

 	* standalone/wxwin/ecutils.cpp, standalone/wxwin/ecutils.h: Create
 	wxString wrappers for cygwin_conv_to_*_path().

Index: standalone/wxwin/configtool.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.cpp,v
retrieving revision 1.15
diff -u -5 -r1.15 configtool.cpp
--- standalone/wxwin/configtool.cpp	25 Mar 2003 11:47:51 -0000	1.15
+++ standalone/wxwin/configtool.cpp	16 Apr 2003 18:25:35 -0000
@@ -159,13 +159,10 @@
 // 'Main program' equivalent: the program execution "starts" here
 bool ecApp::OnInit()
 {
     wxLog::SetTimestamp(NULL);
 
-    CeCosSocket::Init();
-    CeCosTestPlatform::Load();
-
     wxHelpProvider::Set(new wxSimpleHelpProvider);
     //wxHelpProvider::Set(new wxHelpControllerHelpProvider(& m_helpController));
 
     wxImage::AddHandler(new wxPNGHandler);
     wxImage::AddHandler(new wxGIFHandler);
@@ -191,10 +188,36 @@
         (m_appDir.Right(13).CmpNoCase("RELEASESTABLE") == 0)
         )
         m_appDir = wxPathOnly(m_appDir);
 #endif

+// Install default platform definitions if no platforms defined
+#ifdef __WXMSW__
+    wxConfig config (wxGetApp().GetSettings().GetConfigAppName());
+    if (! config.Exists (wxT("Platforms")))
+    {
+        wxFileName platforms (m_appDir, wxT("platforms.reg"));
+        platforms.Normalize();
+        if (platforms.FileExists())
+            wxExecute (wxT("regedit /s \"") + platforms.GetFullPath() + wxT("\""), wxEXEC_SYNC);
+    }
+#endif
+#ifdef __WXGTK__
+    wxFileName config (wxFileName::GetHomeDir(), wxEmptyString);
+    config.AppendDir(wxT(".eCosPlatforms"));
+    if (! config.DirExists())
+    {
+        wxFileName platforms (m_appDir, wxT("platforms.tar"));
+        platforms.Normalize();
+        if (platforms.FileExists())
+            wxExecute (wxT("tar -C ") + wxFileName::GetHomeDir() + wxT(" -xf ") + platforms.GetFullPath());
+    }
+#endif
+
+    CeCosSocket::Init();
+    CeCosTestPlatform::Load();
+
     // Load resources from binary resources archive, or failing that, from
     // Windows resources or plain files
     LoadResources();
 
     wxGetEnv(wxT("PATH"), & m_strOriginalPath);
@@ -1246,11 +1269,11 @@
     {
         sm_arMounted[c-wxChar('a')]=true;
         wxString strCmd;
         String strOutput;

-        strCmd.Printf(wxT("mount %c: /ecos-%c"),c,c);
+        strCmd.Printf(wxT("mount -t -u %c: /ecos-%c"),c,c);
         CSubprocess sub;
         sub.Run(strOutput,strCmd);
     }

 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]