]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - tools/src/tools/configtool/standalone/wxwin/configtool.cpp
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / tools / src / tools / configtool / standalone / wxwin / configtool.cpp
index baba57c1c4f88ad0255cd842248e5435d3f75d34..84f7c92457e3903458a86ef8c9b73d3e7c05b7f8 100644 (file)
@@ -161,6 +161,9 @@ bool ecApp::OnInit()
 {
     wxLog::SetTimestamp(NULL);
 
+    CeCosSocket::Init();
+    CeCosTestPlatform::Load();
+
     wxHelpProvider::Set(new wxSimpleHelpProvider);
     //wxHelpProvider::Set(new wxHelpControllerHelpProvider(& m_helpController));
 
@@ -190,32 +193,6 @@ 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(), wxEXEC_SYNC);
-    }
-#endif
-
-    CeCosSocket::Init();
-    CeCosTestPlatform::Load();
-
     // Load resources from binary resources archive, or failing that, from
     // Windows resources or plain files
     LoadResources();
@@ -269,7 +246,7 @@ bool ecApp::OnInit()
         wxLog::SetActiveTarget(new wxLogStderr);
 #endif
         wxString msg;
-        msg.Printf(wxT("eCos Configuration Tool (c) Red Hat, 2001 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
+        msg.Printf(wxT("eCos Configuration Tool (c) Red Hat, 2001 Version %.2f, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
         wxLogMessage(msg);
         return FALSE;
     }
@@ -511,7 +488,7 @@ bool ecApp::OnInit()
                     wxString msg;
                     msg.Printf(wxT("Sorry, there was a problem compiling the help index."));
                     wxMessageBox(msg, wxGetApp().GetSettings().GetAppName(), wxICON_EXCLAMATION|wxOK);
-                    return FALSE;
+                    return FALSE;                   
                 }
             }
             else
@@ -519,7 +496,7 @@ bool ecApp::OnInit()
                 wxString msg;
                 msg.Printf(wxT("Sorry, there was no current document when compiling the help index."));
                 wxMessageBox(msg, wxGetApp().GetSettings().GetAppName(), wxICON_EXCLAMATION|wxOK);
-                return FALSE;
+                return FALSE;                   
             }
 
             // Return FALSE in order to quit the application
@@ -528,21 +505,6 @@ bool ecApp::OnInit()
     }
     else
     {
-        if (GetSettings().m_strRepository.IsEmpty()) // first invocation by this user
-        {
-            // we have no clues as to the location of the repository so
-            // test for ../../packages relative to the configtool location
-            wxFileName repository = wxFileName (m_appDir, wxEmptyString);
-            repository.Normalize(); // remove trailing "./" if present
-            repository.RemoveDir (repository.GetDirCount()-1);
-            repository.RemoveDir (repository.GetDirCount()-1);
-            repository.AppendDir (wxT("packages"));
-            if (repository.DirExists()) // we've found a repository
-            {
-                repository.RemoveDir (repository.GetDirCount()-1);
-                GetSettings().m_strRepository = repository.GetFullPath();
-            }
-        }
         m_docManager->CreateDocument(wxString(""), wxDOC_NEW);
     }
 
@@ -681,7 +643,7 @@ bool ecApp::VersionStampSplashScreen()
         // Bottom left of area to start drawing at
 
         wxString verString;
-        verString.Printf("%s", ecCONFIGURATION_TOOL_VERSION);
+        verString.Printf("%.2f", ecCONFIGURATION_TOOL_VERSION);
 
         int x = 339; int y = 231;
 #ifdef __WXMSW__
@@ -887,7 +849,7 @@ void ecApp::Log(const wxString& msg)
         if ((msg == wxEmptyString) || (msg.Last() != wxT('\n')))
             frame->GetOutputWindow()->AppendText(wxT("\n"));
 
-//        frame->GetOutputWindow()->ShowPosition(frame->GetOutputWindow()->GetLastPosition());
+        frame->GetOutputWindow()->ShowPosition(frame->GetOutputWindow()->GetLastPosition());
     }
 }
 
@@ -1271,7 +1233,7 @@ void ecApp::CygMount(wxChar c)
         wxString strCmd;
         String strOutput;
         
-        strCmd.Printf(wxT("mount -t -u %c: /ecos-%c"),c,c);
+        strCmd.Printf(wxT("mount %c: /ecos-%c"),c,c);
         CSubprocess sub;
         sub.Run(strOutput,strCmd);
     }
@@ -1495,7 +1457,7 @@ bool ecPipedProcess::HasInput()
     bool hasInput = FALSE;
 
     wxInputStream& is = *GetInputStream();
-    if ( IsInputAvailable() )
+    if ( !is.Eof() )
     {
         wxTextInputStream tis(is);
 
@@ -1509,7 +1471,7 @@ bool ecPipedProcess::HasInput()
     }
 
     wxInputStream& es = *GetErrorStream();
-    if ( IsErrorAvailable() )
+    if ( !es.Eof() )
     {
         wxTextInputStream tis(es);