changeset 796:d11d25c40632

* 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.
author jld
date Wed, 16 Apr 2003 18:36:17 +0000
parents db69ea2c9293
children d834d1945648
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/configtool.cpp
diffstat 2 files changed, 33 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-16  John Dallaway  <jld@ecoscentric.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@ecoscentric.com>
 
 	* standalone/wxwin/ecutils.cpp, standalone/wxwin/ecutils.h: Create
--- a/host/tools/configtool/standalone/wxwin/configtool.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtool.cpp
@@ -161,9 +161,6 @@ bool ecApp::OnInit()
 {
     wxLog::SetTimestamp(NULL);
 
-    CeCosSocket::Init();
-    CeCosTestPlatform::Load();
-
     wxHelpProvider::Set(new wxSimpleHelpProvider);
     //wxHelpProvider::Set(new wxHelpControllerHelpProvider(& m_helpController));
 
@@ -193,6 +190,32 @@ bool ecApp::OnInit()
         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();
@@ -1248,7 +1271,7 @@ void ecApp::CygMount(wxChar c)
         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);
     }