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]

Eliminate Cygwin configtool console window and strip CRs


Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.46
diff -u -5 -r1.46 ChangeLog
--- ChangeLog	31 Mar 2003 18:11:01 -0000	1.46
+++ ChangeLog	6 Apr 2003 20:43:27 -0000
@@ -1,5 +1,13 @@
+2003-04-05  John Dallaway  <jld at ecoscentric dot com>
+
+	* standalone/wxwin/makefile.gnu: Build Cygwin hosted configtool with
+	"--subsystem windows" to eliminate the console window.
+
+	* standalone/wxwin/admindlg.cpp: Strip CR characters from the license
+	text on Linux.
+
 2003-03-28  John Dallaway  <jld at ecoscentric dot com>

 	* standalone/common/ecosconfig.cxx, standalone/wxwin/symbols.h:
 	Use a generic 2.net version string by default.
 
Index: standalone/wxwin/admindlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/admindlg.cpp,v
retrieving revision 1.6
diff -u -5 -r1.6 admindlg.cpp
--- standalone/wxwin/admindlg.cpp	7 Mar 2003 15:09:06 -0000	1.6
+++ standalone/wxwin/admindlg.cpp	6 Apr 2003 20:43:31 -0000
@@ -143,11 +143,11 @@
         path = path + wxString(wxPATH_SEP) + m_strUserTools;
         wxSetEnv(wxT("PATH"), path);
     }
     
     // populate the package tree
-    
+
     if (!PopulatePackageTree (m_strRepository))
     {
         m_strRepository = wxT("");
         // TODO
         // OnPkgadminRepository (); // prompt the user for the repository location
@@ -240,22 +240,22 @@
             {

                 // get an eCos package distribution file

                 // 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
                 EvalTclFile (3, strCommand, _("Adding package"));
 
                 wxString strLicenseFile = m_strRepository + wxString(wxFILE_SEP_PATH) + wxT("pkgadd.txt");
 #ifdef __WXMSW__
                 strLicenseFile.Replace (wxT("/"), wxT("\\")); // forward slashes -> backslashes for Win32
-#endif                
+#endif
                 // read the license file
-
+
                 wxFile fileLicenseFile;
                 if (fileLicenseFile.Exists (strLicenseFile) && fileLicenseFile.Open (strLicenseFile, wxFile::read))
                 {
                     //TRACE (_T("License file found at %s\n"), strLicenseFile);
                     const off_t dwLicenseLength = fileLicenseFile.Length ();
@@ -267,13 +267,15 @@
                     wxString strLicenseText (pszBuffer); // copy into a wxString to convert to Unicode
                     delete [] pszBuffer;
 #ifdef __WXMSW__
                     if (-1 == strLicenseText.Find (wxT("\r\n"))) // if the file has LF line endings...
                         strLicenseText.Replace (_T("\n"), _T("\r\n")); // ... replace with CRLF line endings
-#endif                    
+#else
+                    strLicenseText.Replace (_T("\r"), wxEmptyString); // remove CR characters
+#endif
                     // display the license text
-
+
                     ecLicenseDialog dlgLicense (strLicenseText, this, ecID_LICENSE_DIALOG, strPathName + _(" - Add Packages"));
                     if (wxID_OK != dlgLicense.ShowModal ()) // if license not accepted by user
                         continue; // try the next file
                 }

Index: standalone/wxwin/makefile.gnu
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/makefile.gnu,v
retrieving revision 1.8
diff -u -5 -r1.8 makefile.gnu
--- standalone/wxwin/makefile.gnu	26 Mar 2003 12:08:38 -0000	1.8
+++ standalone/wxwin/makefile.gnu	6 Apr 2003 20:43:35 -0000
@@ -25,11 +25,11 @@
 EXTRALDFLAGS=-L$(TCLDIR)/lib -L$(INSTALLDIR)/lib -lcdl -lcyginfra -ltcl

 ifeq "$(OSTYPE)" "cygwin"
   PROGRAM=configtool.exe
   CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` -D_WIN32 -D__WIN32__ -DSTRICT
-  LDFLAGS=`$(WXDIR)/bin/wx-config --libs` -lshlwapi
+  LDFLAGS=`$(WXDIR)/bin/wx-config --libs` -lshlwapi -Wl,--subsystem,windows
   EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o
 else
   PROGRAM=configtool
   CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
   LDFLAGS=`$(WXDIR)/bin/wx-config --libs`


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