Mercurial > ecos-v2_0-branch
changeset 768:261830f283c6
* Merge patches to build configtool against wxWindows 2.4.0 using
Cygwin GCC from the trunk.
| author | jld |
|---|---|
| date | Thu, 20 Mar 2003 09:44:44 +0000 |
| parents | c043b17d4bec |
| children | 13900f830106 |
| files | host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/appsettings.cpp host/tools/configtool/standalone/wxwin/configtool.cpp host/tools/configtool/standalone/wxwin/configtool.rc host/tools/configtool/standalone/wxwin/configtooldoc.cpp host/tools/configtool/standalone/wxwin/ecpch.h host/tools/configtool/standalone/wxwin/filename.cpp host/tools/configtool/standalone/wxwin/mainwin.cpp host/tools/configtool/standalone/wxwin/makefile.gnu |
| diffstat | 9 files changed, 63 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,3 +1,29 @@ +2003-03-19 John Dallaway <jld@ecoscentric.com> + + * standalone/wxwin/appsettings.cpp, + standalone/wxwin/configtooldoc.cpp, + standalone/wxwin/ecpch.h, + standalone/wxwin/filename.cpp, + standalone/wxwin/configtool.rc, + standalone/wxwin/makefile.gnu: Allow configtool to build against + wxWindows 2.4.0 using Cygwin GCC. + +2003-03-18 John Dallaway <jld@ecoscentric.com> + + * standalone/wxwin/appsettings.cpp, + standalone/wxwin/configtool.cpp: Look for a default repository + at ../../packages relative to the configtool location as a last + resort. + + * standalone/wxwin/configtool.cpp: Eliminate scroll bar jitter in + the output pane during eCos builds. + + * standalone/wxwin/configtool.cpp (HasInput), + standalone/wxwin/mainwin.cpp, + standalone/wxwin/configtool.rc, + standalone/wxwin/makefile.gnu: Allow configtool to build and run + against wxWindows 2.4.0. + 2003-03-07 John Dallaway <jld@ecoscentric.com> * standalone/wxwin/appsettings.cpp: Look in the right place for the
--- a/host/tools/configtool/standalone/wxwin/appsettings.cpp +++ b/host/tools/configtool/standalone/wxwin/appsettings.cpp @@ -75,7 +75,7 @@ #ifdef __WXMSW__ #include <windows.h> #include "wx/msw/winundef.h" -#if defined(GetTempPath) && !defined(__CYGWIN__) +#ifdef GetTempPath #undef GetTempPath #endif #endif @@ -771,8 +771,8 @@ wxString ecSettings::FindLatestVersion() cont = dir.GetNext(& filename); } } - if (latestDir.IsEmpty()) - latestDir = wxGetCwd(); +// if (latestDir.IsEmpty()) +// latestDir = wxGetCwd(); return latestDir; #else wxMessageBox(wxT("FindLatestVersion() is only implemented for Unix."));
--- a/host/tools/configtool/standalone/wxwin/configtool.cpp +++ b/host/tools/configtool/standalone/wxwin/configtool.cpp @@ -488,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 @@ -496,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 @@ -505,6 +505,21 @@ 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); } @@ -849,7 +864,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()); } } @@ -1457,7 +1472,7 @@ bool ecPipedProcess::HasInput() bool hasInput = FALSE; wxInputStream& is = *GetInputStream(); - if ( !is.Eof() ) + if ( IsInputAvailable() ) { wxTextInputStream tis(is); @@ -1471,7 +1486,7 @@ bool ecPipedProcess::HasInput() } wxInputStream& es = *GetErrorStream(); - if ( !es.Eof() ) + if ( IsErrorAvailable() ) { wxTextInputStream tis(es);
--- a/host/tools/configtool/standalone/wxwin/configtool.rc +++ b/host/tools/configtool/standalone/wxwin/configtool.rc @@ -44,5 +44,4 @@ text ICON "bitmaps/t text_dis ICON "bitmaps/text_dis.ico" #include "wx/msw/wx.rc" -#include "wx/html/msw/wxhtml.rc"
--- a/host/tools/configtool/standalone/wxwin/configtooldoc.cpp +++ b/host/tools/configtool/standalone/wxwin/configtooldoc.cpp @@ -73,7 +73,7 @@ #include <shlobj.h> #endif #include "wx/msw/winundef.h" -#if defined(CreateDirectory) && !defined(__CYGWIN__) +#ifdef CreateDirectory #undef CreateDirectory #endif #endif
--- a/host/tools/configtool/standalone/wxwin/ecpch.h +++ b/host/tools/configtool/standalone/wxwin/ecpch.h @@ -51,9 +51,12 @@ #endif // include winsock2.h early to eliminate fd_set warning -#ifdef __CYGWIN__ -#include <winsock2.h> -#endif +// FIXME: including winsock2.h early causes build failures +// relating to the CreateDialog macro defined in the w32api. +// Need to find a better point to #include <winsock2.h> +//#ifdef __CYGWIN__ +//#include <winsock2.h> +//#endif #include "wx/wx.h" #include "wx/splitter.h"
--- a/host/tools/configtool/standalone/wxwin/filename.cpp +++ b/host/tools/configtool/standalone/wxwin/filename.cpp @@ -48,7 +48,6 @@ #include <shlwapi.h> #include "wx/msw/winundef.h" -#ifndef __CYGWIN__ #ifdef CreateDirectory #undef CreateDirectory #endif @@ -64,7 +63,6 @@ #ifdef GetTempPath #undef GetTempPath #endif -#endif #else
--- a/host/tools/configtool/standalone/wxwin/mainwin.cpp +++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp @@ -549,7 +549,7 @@ void ecMainFrame::OnAbout(wxCommandEvent { // ecAboutDialog dialog(this, ecID_ABOUT_DIALOG, _("About eCos Configuration Tool")); // dialog.ShowModal(); - wxMessageBox(_("eCos Configuration Tool 2.12.net (eCos 2.0b1)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003"), _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK); + wxMessageBox(_("eCos Configuration Tool 2.13.net (eCos 2.0)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003"), _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK); } void ecMainFrame::OnSize(wxSizeEvent& WXUNUSED(event)) @@ -1329,7 +1329,7 @@ bool ecMainFrame::ProcessEvent(wxEvent& if (& event == s_lastEvent) return FALSE; - if (event.IsCommandEvent()) + if (event.IsCommandEvent() && !event.IsKindOf(CLASSINFO(wxChildFocusEvent))) { s_lastEvent = & event;
--- a/host/tools/configtool/standalone/wxwin/makefile.gnu +++ b/host/tools/configtool/standalone/wxwin/makefile.gnu @@ -27,13 +27,13 @@ EXTRALDFLAGS=-L$(TCLDIR)/lib -L$(INSTALL ifeq "$(OSTYPE)" "cygwin" PROGRAM=configtool.exe - CPPFLAGS=-I$(WXDIR)/include -I$(WXDIR)/lib/wx/include -DSTRICT -DWINVER=0x0400 -D_WIN32 -D__GNUWIN32__ -D__WIN95__ -D__WIN32__ -D_X86_=1 -DWIN32 - LDFLAGS=-L$(WXDIR)/lib -lwx -lstdc++ -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32 -lglu32 -lgdi32 -lcomdlg32 -lole32 -luuid -lshlwapi -lpng -lzlib + CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` -D_WIN32 -D__WIN32__ -DSTRICT + LDFLAGS=`$(WXDIR)/bin/wx-config --libs` -lshlwapi EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o else PROGRAM=configtool - CPPFLAGS=-I$(WXDIR)/include -I$(WXDIR)/lib/wx/include -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D__USE_WXCONFIG__ - LDFLAGS=-L$(WXDIR)/lib -L/usr/X11R6/lib -lwx_gtk -lgtk -lgdk -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -lXi -lXext -lX11 -lm + CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` + LDFLAGS=`$(WXDIR)/bin/wx-config --libs` EXTRAOBJECTS= endif @@ -118,7 +118,7 @@ install: $(CTBUILDDIR)/$(PROGRAM) $(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $< $(CTBUILDDIR)/configtoolres.o: $(CTDIR)/configtool.rc - $(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" --include-dir $(WXDIR)/include --include-dir $(CTDIR) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__ + $(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" --include-dir $(WXDIR)/include --include-dir $(CTDIR) --define __GNUWIN32__ clean: rm -f $(CTBUILDDIR)/$(PROGRAM) $(CTBUILDDIR)/*.o
