This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Building the configtool against Tcl 8.4
- From: John Dallaway <jld at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Wed, 19 Feb 2003 09:38:07 +0000
- Subject: Building the configtool against Tcl 8.4
- Organization: eCosCentric Limited
The appended patch provide various minor fixes to permit building of the
wxWindows configtool against Tcl 8.4.
John Dallaway
eCosCentric Limited
--cut here--
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.33
diff -u -5 -r1.33 ChangeLog
--- ChangeLog 17 Feb 2003 17:05:22 -0000 1.33
+++ ChangeLog 19 Feb 2003 09:18:53 -0000
@@ -1,5 +1,16 @@
+2003-02-19 John Dallaway <jld at ecoscentric dot com>
+
+ * standalone/wxwin/makefile.gnu:
+ Use libtcl.a rather than libcygtcl83.a for Cygwin build
+
+ * standalone/wxwin/admindlg.cpp:
+ Accommodate const char * returned by Tcl_SetVar() and
+ Tcl_GetStringResult() in Tcl 8.4.
+
+ * standalone/wxwin/configtool.cpp: Call Tcl_FindExecutable().
+
2003-02-17 John Dallaway <jld at ecoscentric dot com>
* standalone/wxwin/mainwin.cpp: Update path to configtool HTML docs.
2003-02-13 John Dallaway <jld at ecoscentric dot com>
Index: standalone/wxwin/admindlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/admindlg.cpp,v
retrieving revision 1.4
diff -u -5 -r1.4 admindlg.cpp
--- standalone/wxwin/admindlg.cpp 13 Feb 2003 16:23:38 -0000 1.4
+++ standalone/wxwin/admindlg.cpp 19 Feb 2003 09:18:53 -0000
@@ -527,16 +527,16 @@
#ifdef __WXMSW__
Tcl_Channel outchan = Tcl_OpenFileChannel (interp, "nul", "a+", 777);
Tcl_SetStdChannel (outchan, TCL_STDOUT); // direct standard output to NUL:
#endif
- char * pszStatus = Tcl_SetVar (interp, "argv0", (char*) argv0.c_str(), 0);
+ const char * pszStatus = Tcl_SetVar (interp, "argv0", (char*) argv0.c_str(), 0);
pszStatus = Tcl_SetVar (interp, "argv", (char*) argv.c_str(), 0);
pszStatus = Tcl_SetVar (interp, "argc", (char*) argc.c_str(), 0);
pszStatus = Tcl_SetVar (interp, "gui_mode", "1", 0); // return errors in result string
int nStatus = Tcl_EvalFile (interp, (char*) argv0.c_str());
- char* result = Tcl_GetStringResult (interp);
+ const char* result = Tcl_GetStringResult (interp);
#ifdef __WXMSW__
Tcl_SetStdChannel (NULL, TCL_STDOUT);
Tcl_UnregisterChannel (interp, outchan);
#endif
Index: standalone/wxwin/configtool.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.cpp,v
retrieving revision 1.12
diff -u -5 -r1.12 configtool.cpp
--- standalone/wxwin/configtool.cpp 13 Feb 2003 16:23:38 -0000 1.12
+++ standalone/wxwin/configtool.cpp 19 Feb 2003 09:18:59 -0000
@@ -161,21 +161,24 @@
{
wxLog::SetTimestamp(NULL);
CeCosSocket::Init();
CeCosTestPlatform::Load();
-
+
wxHelpProvider::Set(new wxSimpleHelpProvider);
//wxHelpProvider::Set(new wxHelpControllerHelpProvider(& m_helpController));
wxImage::AddHandler(new wxPNGHandler);
wxImage::AddHandler(new wxGIFHandler);
// Required for advanced HTML help
#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
wxFileSystem::AddHandler(m_zipHandler);
#endif
+
+ // Mandatory initialisation for Tcl 8.4
+ Tcl_FindExecutable(argv[0]);
wxString currentDir = wxGetCwd();
// Use argv to get current app directory
m_appDir = wxFindAppPath(argv[0], currentDir, wxT("CONFIGTOOLDIR"));
Index: standalone/wxwin/makefile.gnu
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/makefile.gnu,v
retrieving revision 1.2
diff -u -5 -r1.2 makefile.gnu
--- standalone/wxwin/makefile.gnu 22 Jan 2003 13:29:08 -0000 1.2
+++ standalone/wxwin/makefile.gnu 19 Feb 2003 09:19:01 -0000
@@ -19,22 +19,21 @@
-I$(INSTALLDIR)/include \
-I$(ECOSSRCDIR)/tools/configtool/common/common \
-I$(ECOSSRCDIR)/tools/Utils/common \
-I$(ECOSSRCDIR)/tools/ecostest/common \
-DecUSE_EXPERIMENTAL_CODE=$(USEEXPERIMENTALCODE)
+EXTRALDFLAGS=-L$(INSTALLDIR)/lib -lcdl -lcyginfra -ltcl
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
- EXTRALDFLAGS=-L$(INSTALLDIR)/lib -lcdl -lcyginfra -lcygtcl83
EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o
else
PROGRAM=configtool
- CPPFLAGS=-I$(WXDIR)/include -I$(WXDIR)/lib/wx/include -DGTK_NO_CHECK_CASTS -D__WXGTK__
+ CPPFLAGS=-I$(WXDIR)/include -I$(WXDIR)/lib/wx/include -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D__USE_WXCONFIG__
LDFLAGS=-L$(WXDIR)/lib -L/usr/lib -L/usr/X11R6/lib -lwx_gtk -lgtk -lgdk -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -lXi -lXext -lX11 -lm
- EXTRALDFLAGS=-L$(INSTALLDIR)/lib -lcdl -lcyginfra -ltcl
EXTRAOBJECTS=
endif
ifneq "$(LEVEL)" "debug"
CPPDEBUGOPTIONS=-O2