changeset 3217:10a2004b0d31

* standalone/wxwin/admindlg.cpp: Pass POSIX-style paths to ecosadmin.tcl for recent versions of Cygwin. [ Bugzilla 1001798 ] * standalone/wxwin/mainwin.cpp, standalone/wxwin/configtool.cpp: Update copyright strings.
author jld
date Mon, 18 Mar 2013 08:52:46 +0000
parents f35f92c0b860
children 1f92f3f7cf61
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/admindlg.cpp host/tools/configtool/standalone/wxwin/configtool.cpp host/tools/configtool/standalone/wxwin/mainwin.cpp
diffstat 4 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-15  John Dallaway  <john@dallaway.org.uk>
+
+	* standalone/wxwin/admindlg.cpp: Pass POSIX-style paths to
+	ecosadmin.tcl for recent versions of Cygwin. [ Bugzilla 1001798 ]
+	* standalone/wxwin/mainwin.cpp, standalone/wxwin/configtool.cpp:
+	Update copyright strings.
+
 2012-06-22  John Dallaway  <john@dallaway.org.uk>
 
 	* standalone/wxwin/makefile.gnu: Update linker flags for recent
--- a/host/tools/configtool/standalone/wxwin/admindlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/admindlg.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.      
+// Copyright (C) 1998, 1999, 2000, 2003, 2013 Free Software Foundation, Inc.      
 //
 // This program is free software; you can redistribute it and/or modify     
 // it under the terms of the GNU General Public License as published by     
@@ -240,8 +240,7 @@ void ecAdminDialog::OnAdd(wxCommandEvent
                 // extract the licence file
 
                 wxString strCommand;
-                strCommand.Printf(wxT("add %s --extract_license"), (const wxChar*) strPathName);
-                strCommand.Replace(wxT("\\"), wxT("/")); // backslashes -> forward slashes for Tcl_EvalFile
+                strCommand.Printf(wxT("add %s --extract_license"), (const wxChar*) ecUtils::NativeToPosixPath(strPathName));
                 EvalTclFile (3, strCommand, _("Adding package"));
 
                 wxString strLicenseFile = m_strRepository + wxString(wxFILE_SEP_PATH) + wxT("pkgadd.txt");
@@ -277,8 +276,7 @@ void ecAdminDialog::OnAdd(wxCommandEvent
                 
                 // add the contents of the package distribution file
                 
-                strCommand.Printf (wxT("add %s --accept_license"), (const wxChar*) strPathName);
-                strCommand.Replace (wxT("\\"), wxT("/")); // backslashes -> forward slashes for Tcl_EvalFile
+                strCommand.Printf (wxT("add %s --accept_license"), (const wxChar*) ecUtils::NativeToPosixPath(strPathName));
                 if (! EvalTclFile (3, strCommand, _("Adding package")))  // if not successful
                 {
                     // try the next file
@@ -521,14 +519,14 @@ bool ecAdminDialog::EvalTclFile(int narg
 
     wxString strArgc;
     strArgc.Printf (wxT("%d"), nargc);
-    std::string argv0 = ecUtils::UnicodeToStdStr (m_strRepository) + "/ecosadmin.tcl";
+    std::string argv0 = ecUtils::UnicodeToStdStr (ecUtils::NativeToPosixPath (m_strRepository)) + "/ecosadmin.tcl";
     std::string argv = ecUtils::UnicodeToStdStr (Argv);
     std::string argc = ecUtils::UnicodeToStdStr (strArgc);
 
     Tcl_Interp * interp = Tcl_CreateInterp ();
 
 #ifdef __WXMSW__
-    Tcl_Channel outchan = Tcl_OpenFileChannel (interp, "nul", "a+", 777);
+    Tcl_Channel outchan = Tcl_OpenFileChannel (interp, "/dev/null", "a+", 777);
     Tcl_SetStdChannel (outchan, TCL_STDOUT); // direct standard output to NUL:
 #endif
 
--- a/host/tools/configtool/standalone/wxwin/configtool.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtool.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify     
 // it under the terms of the GNU General Public License as published by     
@@ -284,7 +284,7 @@ bool ecApp::OnInit()
         wxLog::SetActiveTarget(new wxLogStderr);
 #endif
         wxString msg;
-        msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2012 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
+        msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2013 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__);
         wxLogMessage(msg);
         return FALSE;
     }
--- a/host/tools/configtool/standalone/wxwin/mainwin.cpp
+++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp
@@ -1,7 +1,7 @@
 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
 // -------------------------------------------                              
 // This file is part of the eCos host tools.                                
-// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify     
 // it under the terms of the GNU General Public License as published by     
@@ -571,7 +571,7 @@ void ecMainFrame::OnAbout(wxCommandEvent
 	int iTclVerMajor, iTclVerMinor, iTclVerPatchLevel;
 	Tcl_GetVersion (&iTclVerMajor, &iTclVerMinor, &iTclVerPatchLevel, NULL);
 	msg.Printf("eCos Configuration Tool %s (%s %s)\n\n"
-		"Copyright (c) Free Software Foundation, Inc. 1998-2012\n\n"
+		"Copyright (c) Free Software Foundation, Inc. 1998-2013\n\n"
 		"Using %s %s and Tcl %d.%d.%d",
 		ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__,
 		wxPlatformInfo::Get().GetPortIdName().c_str(), wxVERSION_NUM_DOT_STRING,