This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
eCos Configuration Tool update
- From: John Dallaway <jld at ecoscentric dot com>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Wed, 13 Aug 2008 10:38:27 +0100
- Subject: eCos Configuration Tool update
This patch allows the eCos Configuration Tool to build against recent
versions of Cygwin and wxWidgets. Checked-in.
John Dallaway
eCosCentric Limited
Index: tools/configtool/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.68
diff -u -5 -r1.68 ChangeLog
--- tools/configtool/ChangeLog 27 Mar 2008 08:53:54 -0000 1.68
+++ tools/configtool/ChangeLog 13 Aug 2008 09:18:41 -0000
@@ -1,5 +1,38 @@
+2008-08-13 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/configitem.cpp: Fix assert on ecDoubleEditorCtrl
+ option type. Initialise wxSpinCtrl with valid integer value. Do not
+ end editing when clicking within value window.
+
+ * standalone/wxwin/configtool.cpp: Move Tcl and wxMenu initialisation
+ from class contructor to OnInit() method for compatibility with recent
+ wxWidgets. Tweak host tool directory path calculation for compatibility
+ with recent wxWidgets under Cygwin.
+
+ * standalone/wxwin/configtooldoc.cpp: Suppress copying of MLT files.
+
+ * standalone/wxwin/configtree.cpp: Always end editing when clicking
+ elsewhere in the value window.
+
+ * standalone/wxwin/configtree.cpp, standalone/wxwin/configtree.h: Do
+ not handle EVT_PAINT, EVT_TREE_ITEM_EXPANDED and EVT_TREE_ITEM_COLLAPSED
+ events unless strictly necessary.
+
+ * standalone/wxwin/settingsdlg.cpp: Use GetClientSize() to size the
+ wxNotebook.
+
+ * standalone/wxwin/appsettings.cpp: Use the internal documentation
+ browser by default.
+
+2008-03-25 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/ecutils.cpp: Use PATH_MAX instead of MAXPATHLEN
+ for compatibility with recent Cygwin headers.
+ * standalone/wxwin/appsettings.cpp: Omit hardware packages in the
+ packages dialog and use TCP port 9000 for remote debugging by default.
+
2008-03-03 John Dallaway <jld@ecoscentric.com>
* standalone/wxwin/configitem.cpp: Do not delete the package item
object before unloading a package.
* standalone/wxwin/configtooldoc.cpp,
@@ -9,25 +42,49 @@
2008-02-11 John Dallaway <jld@ecoscentric.com>
* standalone/wxwin/configitem.cpp: Fix memory leak when unloading a
package. [ Bugzilla 1000072 ]
+2008-02-05 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/configtree.cpp: Disable "Unload Package" context
+ menu item for hardware packages. [ Bugzilla 1000260 ]
+
+ * standalone/wxwin/propertywin.cpp: Fix presentation of multiple
+ properties of the same type.
+
+2008-01-30 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/mainwin.cpp: Disable the horizontal scroll bar
+ in the configuration tree on Windows to avoid infinite redraw of
+ scroll bars.
+
2007-10-25 Gary Thomas <gary@mlbassoc.com>
* standalone/wxwin/propertywin.h: Remove class qualifier - not
legal with GCC-4.x
2006-09-06 John Dallaway <jld@ecoscentric.com>
* standalone/wxwin/configitem.cpp: Allow full 32-bit signed integer
range when editing CDL items using the ecIntegerEditorCtrl.
+2006-08-08 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/configtool.h, standalone/wxwin/configtool.cpp:
+ Eliminate ecApp::CygMount() and ecApp::CygMountText().
+
2006-07-11 John Dallaway <jld@ecoscentric.com>
* standalone/wxwin/configtool.cpp: Workaround an exception handling
issue with Cygwin 1.5.20.
+2006-07-10 Bart Veer <bartv@ecoscentric.com>
+
+ * standalone/common/ecosconfig.cxx: add early C++ exception throw to
+ work around a cygwin issue.
+
2006-05-01 Andy Jackson <andy@xylanta.com>
* standalone/wxwin/admindlg.cpp,
standalone/wxwin/appsettings.cpp,
standalone/wxwin/configitem.cpp,
@@ -52,15 +109,79 @@
standalone/wxwin/platformsdlg.cpp,
standalone/wxwin/platformsdlg.h,
standalone/wxwin/splittree.cpp: Changes to allow building
against current wxWidgets version (2.6.x).
+2006-04-25 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/docsystem.cpp (IndexDocs): Revert workaround for
+ HTML indexing bug in WxGTK 2.4.0. Indexer apparently OK in WxGTK 2.4.2.
+
+2006-01-16 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/reposdlg.cpp: "Default package" relabelled
+ to "Packages template".
+ * configtool/standalone/wxwin/mainwin.cpp: Update copyright notice.
+
+2005-11-04 John Dallaway <jld@ecoscentric.com>
+
+ * common/common/build.cxx,
+ standalone/common/cdl_exec.cxx,
+ standalone/common/ecosconfig.cxx,
+ standalone/wxwin/configtool.cpp,
+ standalone/wxwin/configtooldoc.cpp,
+ standalone/wxwin/filename.cpp: Eliminate /ecos-x text mode
+ mount points which are no longer necessary with modern GNU
+ tools and rationalise the conversion of DOS file paths to
+ POSIX-style paths.
+
+2005-07-11 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/configtool.cpp: Remove "tty" from CYGWIN
+ environment variable if present. It causes ecosadmin.tcl to
+ report failure when adding new packages.
+
2005-07-09 Bart Veer <bartv@ecoscentric.com>
* common/common/build.cxx: add support for C++ files that use a
.cpp suffix
+2005-06-15 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/appsettings.cpp: Implement "make -j<n>" on
+ Linux hosts.
+
+2005-06-10 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/makefile.gnu: Build for Cygwin using the
+ "-D__USE_W32_SOCKETS" compiler switch.
+
+2005-06-03 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/settingsdlg.cpp: Use "/dev/ttyS*" notation
+ for serial port names and a combo box to accommodate non-
+ standard names.
+
+ * standalone/wxwin/appsettings.cpp: Use "/dev/ttyS0" as default
+ serial port name.
+
+2005-05-23 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/configtooldoc.cpp (AddAllItems): Call
+ DeleteItems() to clear down the items list before regenerating
+ the list of items.
+
+2005-04-27 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/packagesdlg.cpp: Use an EVT_CHOICE handler for
+ ecID_PACKAGES_DIALOG_VERSION.
+
+2004-12-03 John Dallaway <jld@ecoscentric.com>
+
+ * standalone/wxwin/docsystem.cpp: Add the RedBoot User's Guide to
+ the generated index.
+
2004-01-16 John Dallaway <jld@ecoscentric.com>
* configtool/standalone/wxwin/configtool.cpp: Prompt to save eCos
Configuration as necessary before building eCos.
Index: tools/configtool/common/common/build.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/common/common/build.cxx,v
retrieving revision 1.18
diff -u -5 -r1.18 build.cxx
--- tools/configtool/common/common/build.cxx 9 Jul 2005 16:14:56 -0000 1.18
+++ tools/configtool/common/common/build.cxx 13 Aug 2008 09:18:41 -0000
@@ -1,10 +1,11 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 2003 Bart Veer
// Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+// Copyright (C) 2005 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -56,15 +57,15 @@
#endif
#include "flags.hxx"
#include "build.hxx"
// Two methods of generating Cygwin filenames
-// ECOS_USE_CYGDRIVE = 0: use e.g. //c/, but this is deprecated in new versions of Cygwin
+// ECOS_USE_CYGDRIVE = 0: use cygwin_conv_to_posix_path() - Cygwin-hosted builds only
// ECOS_USE_CYGDRIVE = 1: use e.g. /cygdrive/c/
// ECOS_USE_CYGDRIVE = 2: use e.g. c:/ notation
// ECOS_USE_CYGDRIVE = 3: use e.g. /ecos-x notation where x is a drive name.
-#define ECOS_USE_CYGDRIVE 3
+#define ECOS_USE_CYGDRIVE 0
// Use registry functions to find out location of /cygdrive
#define ECOS_USE_REGISTRY 1
std::string makefile_header = "# eCos makefile\n\n# This is a generated file - do not edit\n\n";
@@ -160,14 +161,12 @@
#if defined(_WIN32) || defined(__CYGWIN__)
// remove spaces from the DOS filepath
const std::string path = nospace_path (input);
std::string output;
- // convert the DOS filepath to Cygwin notation - using Cygwin if available
- // 2001-10-15: should now do the same thing under Cygwin as under VC++, namely
- // use the /ecos-x form.
-#if 0 // def __CYGWIN__
+ // convert the DOS filepath to Cygwin notation using Cygwin if available
+#if defined(__CYGWIN__) && (ECOS_USE_CYGDRIVE == 0)
char buffer [MAX_PATH + 1];
cygwin_conv_to_posix_path (path.c_str (), buffer);
output = buffer;
#else
@@ -269,19 +268,11 @@
#endif
}
// create a directory
bool create_directory (const std::string directory) {
-// We take advantage of wxWindows' recursive wxFileName::Mkdir function
-// to workaround a bug in Tcl on Windows 9x
-#if defined(__WXMSW__)
- if (wxDirExists(directory.c_str()))
- return TRUE;
- return wxFileName::Mkdir(directory.c_str(), 0777, TRUE);
-#else
return eval_tcl_command ("file mkdir \"" + directory + "\"");
-#endif
}
// copy a file
bool copy_file (const std::string file, const std::string destination) {
return eval_tcl_command ("file copy \"" + file + "\" \"" + destination + "\"");
@@ -373,11 +364,11 @@
// generate the header
fprintf (stream, makefile_header.c_str ());
// generate the global variables
- fprintf (stream, "export PREFIX := %s\n", cygpath (install_tree).c_str ());
+ fprintf (stream, "export PREFIX := %s\n", install_tree.c_str ());
fprintf (stream, "export COMMAND_PREFIX := %s\n", command_prefix.c_str ());
fprintf (stream, "export CC := $(COMMAND_PREFIX)gcc\n");
fprintf (stream, "export OBJCOPY := $(COMMAND_PREFIX)objcopy\n");
#if defined(_WIN32) || defined(__CYGWIN__)
fprintf (stream, "export HOST := CYGWIN\n");
@@ -388,11 +379,11 @@
// generate the package variables
#if ECOS_USE_CYGDRIVE == 1
fprintf (stream, "export REPOSITORY := %s\n", cygpath (nativepath (info.repository)).c_str()); // double conversion to force /cygdrive/c format
#else
- fprintf (stream, "export REPOSITORY := %s\n", cygpath (info.repository).c_str());
+ fprintf (stream, "export REPOSITORY := %s\n", info.repository.c_str());
#endif
fprintf (stream, "PACKAGE := %s\n", info.directory.c_str ());
fprintf (stream, "OBJECT_PREFIX := %s\n", object_prefix.c_str ());
fprintf (stream, "CFLAGS := %s\n", get_flags (config, &info, "CFLAGS").c_str ());
fprintf (stream, "LDFLAGS := %s\n", get_flags (config, &info, "LDFLAGS").c_str ());
@@ -546,11 +537,11 @@
#if defined(_WIN32) || defined(__CYGWIN__)
fprintf (stream, "export HOST := CYGWIN\n");
#else
fprintf (stream, "export HOST := UNIX\n");
#endif
- fprintf (stream, "export PREFIX := %s\n", cygpath (install_tree).c_str ());
+ fprintf (stream, "export PREFIX := %s\n", install_tree.c_str ());
fprintf (stream, "export COMMAND_PREFIX := %s\n", command_prefix.c_str ());
fprintf (stream, "export CC := $(COMMAND_PREFIX)gcc\n");
fprintf (stream, "export OBJCOPY := $(COMMAND_PREFIX)objcopy\n");
fprintf (stream, "export AR := $(COMMAND_PREFIX)ar\n\n");
Index: tools/configtool/standalone/common/cdl_exec.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/common/cdl_exec.cxx,v
retrieving revision 1.15
diff -u -5 -r1.15 cdl_exec.cxx
--- tools/configtool/standalone/common/cdl_exec.cxx 2 Jan 2006 21:14:22 -0000 1.15
+++ tools/configtool/standalone/common/cdl_exec.cxx 13 Aug 2008 09:18:42 -0000
@@ -1,8 +1,9 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
+// Copyright (C) 2005 eCosCentric Limited
// Copyright (C) 2005 Bart Veer
// Copyright (C) 2003 John Dallaway
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
//
// This program is part of the eCos host tools.
@@ -484,50 +485,13 @@
char cwd [_MAX_PATH + 1];
#else
char cwd [PATH_MAX + 1];
#endif
getcwd (cwd, sizeof cwd);
-#ifdef __CYGWIN__
- char cwd_win32 [MAXPATHLEN + 1];
- cygwin_conv_to_win32_path (cwd, cwd_win32);
- generate_build_tree (config, cwd_win32, install_prefix);
-#else
generate_build_tree (config, cwd, install_prefix);
-#endif
config->generate_config_headers (install_prefix.empty () ? "install/include/pkgconf" : install_prefix + "/include/pkgconf");
status = true;
-#ifdef __CYGWIN__
- char buf[100];
- strcpy(buf, "mount.exe -f -t -u x: /ecos-x");
- //printf("Cwd_win32: %s\n", cwd_win32);
-
- if ( cwd_win32[1] == ':' )
- {
- buf[19] = tolower(cwd_win32[0]);
- buf[28] = tolower(cwd_win32[0]);
- system(buf);
- }
-
- //printf("Repository: %s\n", repository.c_str());
-
- if ( repository[1] == ':' )
- {
- buf[19] = tolower(repository[0]);
- buf[28] = tolower(repository[0]);
- system(buf);
- }
- if ( !install_prefix.empty() )
- {
- //printf("Install prefix: %s\n", install_prefix.c_str());
- if ( install_prefix[1] == ':' )
- {
- buf[19] = tolower(install_prefix[0]);
- buf[28] = tolower(install_prefix[0]);
- system(buf);
- }
- }
-#endif
} else {
printf("\nUnable to generate build tree, this configuration still contains conflicts.\n");
printf("Either resolve the conflicts or use --ignore-errors\n");
}
} catch (CdlStringException exception) {
Index: tools/configtool/standalone/common/ecosconfig.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/common/ecosconfig.cxx,v
retrieving revision 1.15
diff -u -5 -r1.15 ecosconfig.cxx
--- tools/configtool/standalone/common/ecosconfig.cxx 11 Jul 2006 09:56:14 -0000 1.15
+++ tools/configtool/standalone/common/ecosconfig.cxx 13 Aug 2008 09:18:42 -0000
@@ -51,11 +51,11 @@
#endif
#include "cdl_exec.hxx"
#include "ecosconfig.hxx"
#define TOOL_VERSION "2.net"
-#define TOOL_COPYRIGHT "Copyright (c) 2002 Red Hat, Inc.\nCopyright (c) 2004-2006 eCosCentric Limited"
+#define TOOL_COPYRIGHT "Copyright (c) 2002 Red Hat, Inc.\nCopyright (c) 2004-2008 eCosCentric Limited"
#define DEFAULT_SAVE_FILE "ecos.ecc"
static char* tool = "ecosconfig";
int main (int argc, char * argv []) {
Index: tools/configtool/standalone/wxwin/appsettings.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/appsettings.cpp,v
retrieving revision 1.15
diff -u -5 -r1.15 appsettings.cpp
--- tools/configtool/standalone/wxwin/appsettings.cpp 26 Mar 2008 13:15:44 -0000 1.15
+++ tools/configtool/standalone/wxwin/appsettings.cpp 13 Aug 2008 09:18:42 -0000
@@ -1,10 +1,11 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 2003 John Dallaway
+// Copyright (C) 2005, 2006, 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -68,11 +69,10 @@
#include "appsettings.h"
#include "configtree.h"
#include "outputwin.h"
#include "shortdescrwin.h"
#include "mainwin.h"
-#include "filename.h"
// For SystemInfo
#ifdef __WXMSW__
#include <windows.h>
#include "wx/msw/winundef.h"
@@ -113,11 +113,11 @@
m_showMacroNames = FALSE;
m_bUseCustomViewer = FALSE;
m_bUseExternalBrowser = FALSE;
- m_eUseCustomBrowser = ecAssociatedExternal;
+ m_eUseCustomBrowser = ecInternal;
m_bHex = FALSE;
m_nRuleChecking = Immediate|Deferred|SuggestFixes ;
#ifdef __WXMSW__
m_strViewer = wxT("notepad");
@@ -132,11 +132,11 @@
m_findDialogPos = wxPoint(-1, -1);
m_editSaveFileOnly = FALSE;
// Packages dialog settings
- m_omitHardwarePackages = FALSE;
+ m_omitHardwarePackages = TRUE;
m_matchPackageNamesExactly = FALSE;
}
// Copy constructor
ecSettings::ecSettings(const ecSettings& settings)
@@ -355,10 +355,14 @@
{
#ifdef __WXMSW__
SYSTEM_INFO SystemInfo;
GetSystemInfo(&SystemInfo);
m_strMakeOptions.Printf(_T("-j%d"),SystemInfo.dwNumberOfProcessors);
+#else
+ long lProcessors;
+ lProcessors = sysconf(_SC_NPROCESSORS_ONLN);
+ m_strMakeOptions.Printf(_T("-j%ld"),lProcessors < 1 ? 1l : lProcessors);
#endif
}
// Set default build tools binary directories as specified by the installer
ecFileName strDefaultBuildToolsPath;
@@ -908,13 +912,13 @@
m_nDownloadTimeout(120),
m_nTimeoutType(TIMEOUT_AUTOMATIC),
m_nDownloadTimeoutType(TIMEOUT_SPECIFIED),
m_bRemote(FALSE),
m_bSerial(TRUE),
- m_strPort(wxT("COM1")),
+ m_strPort(wxT("/dev/ttyS0")),
m_nBaud(38400),
- m_nLocalTCPIPPort(1),
+ m_nLocalTCPIPPort(9000),
m_nReset(RESET_MANUAL),
m_nResourcePort(1),
m_nRemotePort(1),
m_bFarmed(TRUE),
m_strRemoteHost(wxT("")),
Index: tools/configtool/standalone/wxwin/configitem.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configitem.cpp,v
retrieving revision 1.5
diff -u -5 -r1.5 configitem.cpp
--- tools/configtool/standalone/wxwin/configitem.cpp 27 Mar 2008 08:53:55 -0000 1.5
+++ tools/configtool/standalone/wxwin/configitem.cpp 13 Aug 2008 09:18:43 -0000
@@ -615,11 +615,11 @@
}
else if (window->IsKindOf(CLASSINFO(ecDoubleEditorCtrl)))
{
ecDoubleEditorCtrl* win = (ecDoubleEditorCtrl*) window;
- wxASSERT ( GetOptionType() == ecString );
+ wxASSERT ( GetOptionType() == ecDouble );
// TODO: do checking
doc->SetValue(*this, atof(win->GetValue()));
}
else if (window->IsKindOf(CLASSINFO(ecEnumEditorCtrl)))
@@ -1424,11 +1424,11 @@
IMPLEMENT_CLASS(ecIntegerEditorCtrl, wxSpinCtrl)
ecIntegerEditorCtrl::ecIntegerEditorCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style):
- wxSpinCtrl(parent, id, wxEmptyString, pos, size, style, INT_MIN, INT_MAX, 0)
+ wxSpinCtrl(parent, id, "0", pos, size, style, INT_MIN, INT_MAX, 0)
{
}
void ecIntegerEditorCtrl::OnEnter(wxCommandEvent& event)
{
@@ -1471,12 +1471,18 @@
event.Skip();
}
void ecEnumEditorCtrl::OnKillFocus(wxFocusEvent& event)
{
- ecValueWindow* parent = (ecValueWindow*) GetParent();
- parent->EndEditing();
+ /* event may result from drop down of menu on wxGTK so
+ check that the mouse is outside the window */
+ wxPoint mouse = ScreenToClient(::wxGetMousePosition());
+ wxSize size = GetSize();
+ if (mouse.x < 0 || mouse.x > size.x || mouse.y < 0 || mouse.y > size.y) {
+ ecValueWindow* parent = (ecValueWindow*) GetParent();
+ parent->EndEditing();
+ }
}
/*
* ecEditStringDialog
* Pops up to make it easier to edit large string values
@@ -1508,11 +1514,11 @@
//// Event handlers
void ecEditStringDialog::OnOK(wxCommandEvent& event)
{
- wxDialog::OnOK(event);
+ event.Skip();
}
//// Operations
void ecEditStringDialog::CreateControls(wxWindow* parent)
{
Index: tools/configtool/standalone/wxwin/configtool.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.cpp,v
retrieving revision 1.21
diff -u -5 -r1.21 configtool.cpp
--- tools/configtool/standalone/wxwin/configtool.cpp 26 Mar 2008 13:15:44 -0000 1.21
+++ tools/configtool/standalone/wxwin/configtool.cpp 13 Aug 2008 09:18:44 -0000
@@ -1,11 +1,11 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 2003 John Dallaway
-// Copyright (C) 2004, 2005, 2006 eCosCentric Limited
+// Copyright (C) 2004, 2005, 2006, 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -136,21 +136,15 @@
ecApp::ecApp()
{
m_docManager = NULL;
m_mainFrame = NULL;
m_currentDoc = NULL;
- m_whatsThisMenu = new wxMenu;
- m_whatsThisMenu->Append(ecID_WHATS_THIS, _("&What's This?"));
m_helpFile = wxEmptyString;
m_splashScreen = NULL;
m_pipedProcess = NULL;
m_valuesLocked = 0;
m_helpController = NULL;
- m_fileSystem = new wxFileSystem;
-#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
- m_zipHandler = new wxZipFSHandler;
-#endif
}
ecApp::~ecApp()
{
delete m_whatsThisMenu;
@@ -165,12 +159,23 @@
try {
throw int(42);
} catch(...) { };
#endif
+ // Mandatory initialisation for Tcl 8.4
+ Tcl_FindExecutable(argv[0]);
+
wxLog::SetTimestamp(NULL);
+ m_whatsThisMenu = new wxMenu;
+ m_whatsThisMenu->Append(ecID_WHATS_THIS, _("&What's This?"));
+
+ m_fileSystem = new wxFileSystem;
+#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
+ m_zipHandler = new wxZipFSHandler;
+#endif
+
wxHelpProvider::Set(new wxSimpleHelpProvider);
//wxHelpProvider::Set(new wxHelpControllerHelpProvider(& m_helpController));
wxImage::AddHandler(new wxPNGHandler);
wxImage::AddHandler(new wxGIFHandler);
@@ -178,13 +183,10 @@
// 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"));
@@ -226,10 +228,20 @@
// Load resources from binary resources archive, or failing that, from
// Windows resources or plain files
LoadResources();
+ // remove "tty" from CYGWIN environment variable to allow correct
+ // execution of cygwin command-line tools from this application
+#ifdef __WXMSW__
+ wxString strCygwin = wxGetenv(wxT("CYGWIN"));
+ strCygwin = wxT(" ") + strCygwin;
+ strCygwin.Replace(wxT(" tty"), wxEmptyString);
+ strCygwin.Trim(false);
+ wxSetEnv(wxT("CYGWIN"), strCygwin);
+#endif
+
wxGetEnv(wxT("PATH"), & m_strOriginalPath);
// Create a document manager
m_docManager = new wxDocManager;
@@ -605,11 +617,11 @@
if (!bitmap.Ok())
bitmap.LoadFile(filename, wxBITMAP_TYPE_BMP_RESOURCE);
#endif
if (!bitmap.Ok() && wxFileExists(GetFullAppPath(filename)))
- bitmap.LoadFile(GetFullAppPath(filename), bitmapType);
+ bitmap.LoadFile(GetFullAppPath(filename), (wxBitmapType) bitmapType);
if (bitmap.Ok() && addToMemoryFS)
wxMemoryFSHandler::AddFile(filename, bitmap, bitmapType);
@@ -1127,12 +1139,12 @@
strUserBinDir = GetSettings().m_userToolsDir;
}
if ( !strUserBinDir.IsEmpty() )
{
// calculate the directory of the host tools from this application's module name
- ecFileName strHostToolsBinDir(this->argv[0]);
- strHostToolsBinDir = strHostToolsBinDir.Head ();
+ const wxFileName strConfigtoolFile(this->argv[0]);
+ const ecFileName strHostToolsBinDir(strConfigtoolFile.GetPath(wxPATH_GET_VOLUME, wxPATH_DOS));
// tools directories are in the order host-tools, user-tools, comp-tools, install/bin (if present), contrib-tools (if present) on the path
const ecFileName strContribBinDir(strUserBinDir, wxT("..\\contrib\\bin"));
ecFileName strUsrBinDir(strUserBinDir, wxT("..\\usr\\bin"));
const ecFileName strInstallBinDir(pDoc->GetInstallTree (), wxT("bin"));
@@ -1167,18 +1179,10 @@
wxUnsetEnv(wxT("GDBTK_LIBRARY"));
wxUnsetEnv(wxT("GCC_EXEC_PREFIX"));
// Useful for ecosconfig
wxSetEnv(wxT("ECOS_REPOSITORY"), pDoc->GetPackagesDir());
-
- // Mount /ecos-x so we can access these in text mode
- if (! pDoc->GetBuildTree().IsEmpty() && wxIsalpha(pDoc->GetBuildTree()[0]))
- CygMount(pDoc->GetBuildTree()[0]);
- if (! pDoc->GetInstallTree().IsEmpty() && wxIsalpha(pDoc->GetInstallTree()[0]))
- CygMount(pDoc->GetInstallTree()[0]);
- if (! pDoc->GetRepository().IsEmpty() && wxIsalpha(pDoc->GetRepository()[0]))
- CygMount(pDoc->GetRepository()[0]);
}
}
}
}
return rc;
@@ -1272,91 +1276,10 @@
}
return rc;
#endif
}
-void ecApp::CygMount(wxChar c)
-{
- // May not be alpha if it's e.g. a UNC network path
- if (!wxIsalpha(c))
- return;
-
- c = wxTolower(c);
-
- if(!sm_arMounted[c-_TCHAR('a')])
- {
- sm_arMounted[c-wxChar('a')]=true;
- wxString strCmd;
- String strOutput;
-
- strCmd.Printf(wxT("mount -t -u %c: /ecos-%c"),c,c);
- CSubprocess sub;
- sub.Run(strOutput,strCmd);
- }
-
-
- // Doing it with wxExecute results in a flashing DOS box unfortunately
-#if 0
- wxASSERT(wxIsalpha(c));
- c = wxTolower(c);
- if(!sm_arMounted[c-wxChar('a')])
- {
- sm_arMounted[c-wxChar('a')] = TRUE;
- wxString strCmd;
-
- strCmd.Printf(wxT("mount.exe %c: /%c"),c,c);
-
- wxExecute(strCmd, TRUE);
- }
-#endif
-}
-
-// Fiddling directly with the registry DOESN'T WORK because Cygwin mount tables
-// get out of synch with the registry
-void ecApp::CygMountText(wxChar c)
-{
- wxASSERT(wxIsalpha(c));
- c = wxTolower(c);
-// if(!sm_arMounted[c-wxChar('a')])
- {
-// sm_arMounted[c-wxChar('a')] = TRUE;
-
-#if 0
- wxString strCmd;
-
- strCmd.Printf(wxT("mount.exe %c: /ecos-%c"),c,c);
-
- wxExecute(strCmd, TRUE);
-#else
- wxString key, value;
- key.Printf(wxT("/ecos-%c"), c);
- value.Printf(wxT("%c:"), c);
-
- // Mount by fiddling with registry instead, so we don't see ugly flashing windows
-#ifdef __WXMSW__
- HKEY hKey = 0;
- if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Cygnus Solutions\\Cygwin\\mounts v2",
- 0, KEY_READ, &hKey))
- {
- DWORD disposition;
- HKEY hSubKey = 0;
-
- if (ERROR_SUCCESS == RegCreateKeyEx(hKey, key, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS,
- NULL, & hSubKey, & disposition))
- {
- RegSetValueEx(hSubKey, "native", 0, REG_SZ, (unsigned char*) (const wxChar*) value, value.Length() + 1);
- RegCloseKey(hSubKey);
- }
-
- RegCloseKey(hKey);
- }
-#endif
-
-#endif
- }
-}
-
void ecApp::Build(const wxString &strWhat /*=wxT("")*/ )
{
if (m_pipedProcess)
return;
Index: tools/configtool/standalone/wxwin/configtool.h
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.h,v
retrieving revision 1.7
diff -u -5 -r1.7 configtool.h
--- tools/configtool/standalone/wxwin/configtool.h 21 Jan 2003 11:20:34 -0000 1.7
+++ tools/configtool/standalone/wxwin/configtool.h 13 Aug 2008 09:18:45 -0000
@@ -1,9 +1,10 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2005, 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -53,11 +54,11 @@
#include "wx/wx.h"
#include "wx/help.h"
#include "wx/docview.h"
#include "wx/process.h"
#include "wx/timer.h"
-#include "splittree.h"
+#include "wx/gizmos/splittree.h"
#include "appsettings.h"
class ecValueWindow;
class ecMainFrame;
@@ -98,11 +99,12 @@
#if defined(__WXMSW__) && defined(__WXDEBUG__)
#define ecUSE_EXPERIMENTAL_CODE 1
#endif
-class WXDLLEXPORT wxZipFSHandler;
+//class WXDLLEXPORT wxZipFSHandler;
+#include "wx/fs_zip.h"
class WXDLLEXPORT wxFileSystem;
// Define a new application type, each program should derive a class from wxApp
class ecApp : public wxApp
{
@@ -127,15 +129,10 @@
bool PrepareEnvironment(bool bWithBuildTools = TRUE, wxString* cmdLine = NULL);
// Fire off a subprocess to build the library or tests
void Build(const wxString& strWhat = wxEmptyString) ;
- // Mount drive e.g. /c
- static void CygMount(wxChar c);
- // Mount in text mode e.g. /ecos-c
- static void CygMountText(wxChar c);
-
bool InitializeHelpController();
void SetStatusText(const wxString& text, bool clearFailingRulesPane = TRUE);
//// Helpers
Index: tools/configtool/standalone/wxwin/configtooldoc.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtooldoc.cpp,v
retrieving revision 1.17
diff -u -5 -r1.17 configtooldoc.cpp
--- tools/configtool/standalone/wxwin/configtooldoc.cpp 27 Mar 2008 08:53:55 -0000 1.17
+++ tools/configtool/standalone/wxwin/configtooldoc.cpp 13 Aug 2008 09:18:45 -0000
@@ -1,11 +1,11 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 2003 John Dallaway
-// Copyright (C) 2008 eCosCentric Limited
+// Copyright (C) 2005, 2006, 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -317,11 +317,11 @@
}
else if (GenerateHeaders() && CopyMLTFiles())
{
// in each case errors already emitted
// copy new MLT files to the build tree as necessary
- rc=generate_build_tree (GetCdlConfig(), ecUtils::UnicodeToStdStr(m_strBuildTree), ecUtils::UnicodeToStdStr(m_strInstallTree));
+ rc=generate_build_tree (GetCdlConfig(), ecUtils::UnicodeToStdStr(m_strBuildTree.CygPath()), ecUtils::UnicodeToStdStr(m_strInstallTree.CygPath()));
rc = TRUE;
}
}
else
{
@@ -383,11 +383,11 @@
}
else if (GenerateHeaders() && CopyMLTFiles())
{
// in each case errors already emitted
// copy new MLT files to the build tree as necessary
- bool rc = generate_build_tree (GetCdlConfig(), ecUtils::UnicodeToStdStr(m_strBuildTree), ecUtils::UnicodeToStdStr(m_strInstallTree));
+ bool rc = generate_build_tree (GetCdlConfig(), ecUtils::UnicodeToStdStr(m_strBuildTree.CygPath()), ecUtils::UnicodeToStdStr(m_strInstallTree.CygPath()));
rc = TRUE;
}
}
else
@@ -483,10 +483,11 @@
ecConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetTreeCtrl();
// Ensure there's no dangling pointer
wxGetApp().GetMainFrame()->GetPropertyListWindow()->Fill(NULL);
treeCtrl->DeleteAllItems();
+ DeleteItems();
m_strMemoryLayoutFolder = wxT("");
m_strLinkerScriptFolder = wxT("");
// Add the root item
@@ -2069,10 +2070,11 @@
#endif
}
bool ecConfigToolDoc::CopyMLTFiles()
{
+#if ecUSE_MLT
wxString sep(wxFILE_SEP_PATH);
// copy default MLT files for the selected target/platform from the repository if they do not already exist
// TRACE (_T("Looking for MLT files at %s\n"), PackagesDir() + m_strMemoryLayoutFolder + _T("include\\pkgconf\\mlt_*.*"));
@@ -2123,10 +2125,13 @@
}
bLastFile = ffFileFind.GetNext(& fileName);
}
}
return rc; //FIXME
+#else
+ return TRUE;
+#endif
}
const wxString ecConfigToolDoc::CurrentMemoryLayout ()
{
const ecConfigItem * pItem = Find (wxT("CYGHWR_MEMORY_LAYOUT"));
Index: tools/configtool/standalone/wxwin/configtree.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtree.cpp,v
retrieving revision 1.3
diff -u -5 -r1.3 configtree.cpp
--- tools/configtool/standalone/wxwin/configtree.cpp 27 Mar 2008 08:53:55 -0000 1.3
+++ tools/configtool/standalone/wxwin/configtree.cpp 13 Aug 2008 09:18:45 -0000
@@ -100,16 +100,13 @@
*/
IMPLEMENT_CLASS(ecConfigTreeCtrl, wxRemotelyScrolledTreeCtrl)
BEGIN_EVENT_TABLE(ecConfigTreeCtrl, wxRemotelyScrolledTreeCtrl)
- EVT_PAINT(ecConfigTreeCtrl::OnPaint)
EVT_MOUSE_EVENTS(ecConfigTreeCtrl::OnMouseEvent)
EVT_CHAR(ecConfigTreeCtrl::OnKeyDown)
EVT_TREE_SEL_CHANGED(-1, ecConfigTreeCtrl::OnSelChanged)
- EVT_TREE_ITEM_EXPANDED(-1, ecConfigTreeCtrl::OnCollapseExpand)
- EVT_TREE_ITEM_COLLAPSED(-1, ecConfigTreeCtrl::OnCollapseExpand)
EVT_HELP(-1, ecConfigTreeCtrl::OnHelp)
END_EVENT_TABLE()
ecConfigTreeCtrl::ecConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt,
const wxSize& sz, long style):
@@ -167,138 +164,20 @@
m_iconDB.AddInfo("Enumerated", wxICON(enumerated), 0, TRUE);
m_iconDB.AddInfo("Enumerated", wxICON(enumerated_dis), 0, FALSE);
m_iconDB.AddInfo("Integer", wxICON(integer), 0, TRUE);
m_iconDB.AddInfo("Integer", wxICON(integer_dis), 0, FALSE);
-
-#if 0
- // Add some dummy items
- ecConfigItem* item = NULL;
- wxTreeItemId rootId = AddRoot(_(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(NULL, _("Configuration"), ecContainer)));
-
- item->SetTreeItem(rootId);
- item->UpdateTreeItem(* this);
-
- wxTreeItemId childId1 = AppendItem(rootId, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("My Package"), ecPackage, ecFlavorData, ecString)));
- item->SetTreeItem(childId1);
- item->GetValue() = _("v1_4_1");
- item->UpdateTreeItem(* this);
-
- wxTreeItemId childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 1"), ecOption, ecFlavorData, ecString)));
- item->SetTreeItem(childId2);
- item->GetValue() = _("The value for this option");
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 2"), ecOption, ecFlavorData, ecLong)));
- item->SetTreeItem(childId2);
- item->GetValue() = (long) 176343;
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId2, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 3"), ecOption, ecFlavorBool, ecOptionTypeNone, TRUE, TRUE, ecHintCheck)));
- item->SetTreeItem(childId2);
- item->GetValue() = (bool) TRUE;
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 4"), ecOption, ecFlavorBool, ecOptionTypeNone, TRUE, FALSE, ecHintCheck)));
- item->SetTreeItem(childId2);
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 5"), ecOption, ecFlavorBool, ecOptionTypeNone, TRUE, TRUE, ecHintRadio)));
- item->SetTreeItem(childId2);
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 6"), ecOption, ecFlavorBool, ecOptionTypeNone, TRUE, FALSE, ecHintRadio)));
- item->SetTreeItem(childId2);
- item->GetValue() = (bool) TRUE ;
- item->UpdateTreeItem(* this);
-
- // Another branch
- childId1 = AppendItem(rootId, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("My Container"), ecContainer)));
- item->SetTreeItem(childId1);
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 1"), ecOption, ecFlavorData, ecString, FALSE)));
- item->SetTreeItem(childId2);
- item->GetValue() = _("The value for this option");
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 2"), ecOption, ecFlavorData, ecLong, FALSE)));
- item->SetTreeItem(childId2);
- item->GetValue() = (long) 176343;
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 3"), ecOption, ecFlavorBool, ecOptionTypeNone, FALSE, TRUE, ecHintCheck)));
- item->SetTreeItem(childId2);
- item->GetValue() = (bool) TRUE;
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 4"), ecOption, ecFlavorBool, ecOptionTypeNone, FALSE, FALSE, ecHintCheck)));
- item->SetTreeItem(childId2);
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 5"), ecOption, ecFlavorBool, ecOptionTypeNone, FALSE, TRUE, ecHintRadio)));
- item->SetTreeItem(childId2);
- item->UpdateTreeItem(* this);
-
- childId2 = AppendItem(childId1, _(""), -1, -1, new ecTreeItemData(item = new ecConfigItem(item, _("Option 6"), ecOption, ecFlavorBool, ecOptionTypeNone, FALSE, FALSE, ecHintRadio)));
- item->SetTreeItem(childId2);
- item->GetValue() = (bool) TRUE ;
- item->UpdateTreeItem(* this);
-
- Expand(rootId);
-#endif
}
ecConfigTreeCtrl::~ecConfigTreeCtrl()
{
delete m_propertiesMenu;
SetImageList(NULL);
delete m_imageList;
}
-// Draw the lines on top of the tree
-void ecConfigTreeCtrl::OnPaint(wxPaintEvent& event)
-{
- wxPaintDC dc(this);
-
- wxTreeCtrl::OnPaint(event);
-
- // Reset the device origin since it may have been set
- dc.SetDeviceOrigin(0, 0);
-
- wxSize sz = GetClientSize();
-
-#if wxCHECK_VERSION(2, 6, 0)
- wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
-#else
- wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
-#endif
- dc.SetPen(pen);
- dc.SetBrush(* wxTRANSPARENT_BRUSH);
-
- wxSize clientSize = GetClientSize();
- wxRect itemRect;
- int cy=0;
- wxTreeItemId h, lastH;
- for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
- {
- if (GetBoundingRect(h, itemRect))
- {
- cy = itemRect.GetTop();
- dc.DrawLine(0, cy, clientSize.x, cy);
- lastH = h;
- }
- }
-
- if (lastH && lastH.IsOk() && GetBoundingRect(lastH, itemRect))
- {
- cy = itemRect.GetBottom();
- dc.DrawLine(0, cy, clientSize.x, cy);
- }
-}
-
void ecConfigTreeCtrl::OnSelChanged(wxTreeEvent& event)
{
ecConfigToolDoc* doc = wxGetApp().GetConfigToolDoc();
if (doc)
{
@@ -406,16 +285,10 @@
{
event.Skip();
}
}
-void ecConfigTreeCtrl::OnCollapseExpand(wxTreeEvent& event)
-{
- if (GetCompanionWindow())
- GetCompanionWindow()->Refresh();
-}
-
// show help for this window
void ecConfigTreeCtrl::OnHelp(wxHelpEvent& event)
{
wxPoint pt = ScreenToClient(event.GetPosition());
int flags = 0;
@@ -440,11 +313,10 @@
*/
IMPLEMENT_CLASS(ecValueWindow, wxTreeCompanionWindow)
BEGIN_EVENT_TABLE(ecValueWindow, wxTreeCompanionWindow)
- EVT_PAINT(ecValueWindow::OnPaint)
EVT_MOUSE_EVENTS(ecValueWindow::OnMouseEvent)
EVT_SCROLLWIN(ecValueWindow::OnScroll)
EVT_TREE_ITEM_EXPANDED(-1, ecValueWindow::OnExpand)
EVT_TREE_ITEM_COLLAPSED(-1, ecValueWindow::OnExpand)
END_EVENT_TABLE()
@@ -475,65 +347,21 @@
m_editWindow = NULL;
m_configItem = NULL;
}
-void ecValueWindow::OnPaint(wxPaintEvent& event)
-{
- wxPaintDC dc(this);
-
- if (!m_treeCtrl)
- return;
-
-#if wxCHECK_VERSION(2, 6, 0)
- wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
-#else
- wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
-#endif
- dc.SetPen(pen);
- dc.SetBrush(* wxTRANSPARENT_BRUSH);
- wxFont font(GetFont());
- dc.SetFont(font);
- //dc.SetTextForeground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT));
- dc.SetBackgroundMode(wxTRANSPARENT);
-
- wxSize clientSize = GetClientSize();
- wxRect itemRect;
- int cy=0;
- wxTreeItemId h, lastH;
- for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
- {
- if (m_treeCtrl->GetBoundingRect(h, itemRect))
- {
- cy = itemRect.GetTop();
- wxRect drawItemRect(0, cy, clientSize.x, itemRect.GetHeight());
-
- lastH = h;
-
- // Draw the actual item
- DrawItem(dc, h, drawItemRect);
- dc.DrawLine(0, cy, clientSize.x, cy);
- }
- }
- if (lastH && lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
- {
- cy = itemRect.GetBottom();
- dc.DrawLine(0, cy, clientSize.x, cy);
- }
-}
-
// Returns the rectangle which will enclose the value for this tree item
wxRect ecValueWindow::GetItemRect(ecConfigItem* item)
{
if (!m_treeCtrl)
return wxRect(0, 0, 0, 0);
wxSize clientSize = GetClientSize();
wxRect itemRect;
int cy=0;
wxTreeItemId h;
- for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
+ for(h=m_treeCtrl->GetFirstVisibleItem();h.IsOk() && m_treeCtrl->IsVisible(h);h=m_treeCtrl->GetNextVisible(h))
{
ecTreeItemData* data = (ecTreeItemData*) m_treeCtrl->GetItemData(h);
if (data->GetConfigItem() == item)
{
if (m_treeCtrl->GetBoundingRect(h, itemRect))
@@ -559,11 +387,13 @@
if (item.IsOk())
{
m_treeCtrl->SelectItem(item);
ecConfigItem* configItem = ((ecTreeItemData*) m_treeCtrl->GetItemData(item))->GetConfigItem();
if (configItem->CanEdit())
- BeginEditing(configItem);
+ BeginEditing(configItem);
+ else if (m_configItem)
+ EndEditing();
}
}
else if (event.RightDown())
{
// Find if this corresponds to a tree item
@@ -573,10 +403,13 @@
if (item.IsOk())
#else
if (item != 0)
#endif
{
+ if (m_configItem)
+ EndEditing();
+
ecConfigItem* configItem = ((ecTreeItemData*) m_treeCtrl->GetItemData(item))->GetConfigItem();
m_treeCtrl->SelectItem(item);
((ecConfigTreeCtrl*) m_treeCtrl)->GetPropertiesMenu()->SetClientData((void*) TRUE);
PopupMenu(((ecConfigTreeCtrl*) m_treeCtrl)->GetPropertiesMenu(), event.GetX(), event.GetY());
}
@@ -1100,11 +933,13 @@
if (id != 0)
#endif
{
ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
- event.Enable( item->IsPackage() );
+ event.Enable( item->IsPackage() &&
+ !wxGetApp().GetConfigToolDoc()->GetCdlPkgData()->
+ is_hardware_package (ecUtils::UnicodeToStdStr (item->GetMacro())));
}
}
bool ecSplitterScrolledWindow::IsChanged(wxTreeItemId id, bool bRecurse)
{
Index: tools/configtool/standalone/wxwin/configtree.h
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtree.h,v
retrieving revision 1.1
diff -u -5 -r1.1 configtree.h
--- tools/configtool/standalone/wxwin/configtree.h 1 Jun 2001 22:16:30 -0000 1.1
+++ tools/configtool/standalone/wxwin/configtree.h 13 Aug 2008 09:18:46 -0000
@@ -1,9 +1,10 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -49,11 +50,11 @@
#ifdef __GNUG__
#pragma interface "configtree.h"
#endif
#include "wx/wx.h"
-#include "splittree.h"
+#include "wx/gizmos/splittree.h"
#include "configitem.h"
#define wxMAX_ICON_STATES 4
/*
@@ -190,14 +191,12 @@
ecConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
~ecConfigTreeCtrl();
//// Event handlers
- void OnPaint(wxPaintEvent& event);
void OnMouseEvent(wxMouseEvent& event);
void OnSelChanged(wxTreeEvent& event);
- void OnCollapseExpand(wxTreeEvent& event);
void OnHelp(wxHelpEvent& event);
void OnKeyDown(wxKeyEvent& event);
//// Accessors
wxIconStateInfoDB& GetIconDB() { return m_iconDB; }
@@ -230,11 +229,10 @@
//// Overrides
virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect);
//// Events
- void OnPaint(wxPaintEvent& event);
void OnMouseEvent(wxMouseEvent& event);
void OnScroll(wxScrollWinEvent& event);
void OnExpand(wxTreeEvent& event);
//// Accessors
Index: tools/configtool/standalone/wxwin/docsystem.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/docsystem.cpp,v
retrieving revision 1.5
diff -u -5 -r1.5 docsystem.cpp
--- tools/configtool/standalone/wxwin/docsystem.cpp 26 Mar 2008 13:15:44 -0000 1.5
+++ tools/configtool/standalone/wxwin/docsystem.cpp 13 Aug 2008 09:18:46 -0000
@@ -1,10 +1,11 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 2003 John Dallaway
+// Copyright (C) 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -485,11 +486,11 @@
Full-text search=Yes\n" <<
// Index file=" << keywordFile << "\n
"Language=0x409 English (United States)\n\
-Title=eCos\n";
+Title=eCos Documentation\n";
stream <<
"[WINDOWS]\n\
mainwin=\"eCos Documentation\",\"eCos.hhc\",,,\"index.html\",\"http://sources.redhat.com/ecos/\",\"Net Release\",\"http://www.redhat.com/products/ecos/\",\"eCos Product\",0x40060420,,0xc287e,[0,0,762,400],,,,,,,0\n\
\n\
@@ -997,17 +998,12 @@
AddIndexByList(TranslateTutorialDirectory(tutorial), tutorialRelativePath, tutorialRelativePath);
}
// AddEndSection();
AddIndexByList(wxT("User Guide"), wxT("user-guide/ecos-user-guide.html"), wxT("user-guide/ecos-user-guide.html"));
-// AddIndexByList(wxT("RedBoot User's Guide"), wxT("redboot/redboot.html"), wxT("redboot/redboot.html"));
-#ifdef __WXGTK__
- // FIXME: wxHtmlParser (version 2.4.0) doesn't like the eCos Reference HTML on Linux so just index the initial page for now
- AddIndexItem(wxT("eCos Reference"), wxT("ref/ecos-ref.html"));
-#else
+ AddIndexByList(wxT("RedBoot Guide"), wxT("redboot-guide/redboot-guide.html"), wxT("redboot-guide/redboot-guide.html"));
AddIndexByList(wxT("eCos Reference"), wxT("ref/ecos-ref.html"), wxT("ref/ecos-ref.html"));
-#endif
AddIndexByList(wxT("Component Writer's Guide"), wxT("cdl-guide/cdl-guide.html"), wxT("cdl-guide/cdl-guide.html"));
// AddIndexByList(wxT("eCos-EL/IX Compatibility Guide"), wxT("ecos-elix/elix-compatibility.html"), wxT("ecos-elix/elix-compatibility.html"));
//// TOOLCHAIN REFERENCE MANUALS
// AddStartSection(wxT("GNUPro Toolkit Reference Manual"));
Index: tools/configtool/standalone/wxwin/ecutils.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/ecutils.cpp,v
retrieving revision 1.7
diff -u -5 -r1.7 ecutils.cpp
--- tools/configtool/standalone/wxwin/ecutils.cpp 26 Mar 2008 13:15:44 -0000 1.7
+++ tools/configtool/standalone/wxwin/ecutils.cpp 13 Aug 2008 09:18:47 -0000
@@ -1,10 +1,11 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 2003 John Dallaway
+// Copyright (C) 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -268,11 +269,11 @@
if (native.IsEmpty())
return native;
else
{
wxString posix;
- cygwin_conv_to_posix_path(native.c_str(), posix.GetWriteBuf(MAXPATHLEN + 1));
+ cygwin_conv_to_posix_path(native.c_str(), posix.GetWriteBuf(PATH_MAX + 1));
posix.UngetWriteBuf();
return posix;
}
#else
return native;
@@ -285,11 +286,11 @@
if (posix.IsEmpty())
return posix;
else
{
wxString native;
- cygwin_conv_to_win32_path(posix.c_str(), native.GetWriteBuf(MAXPATHLEN + 1));
+ cygwin_conv_to_win32_path(posix.c_str(), native.GetWriteBuf(PATH_MAX + 1));
native.UngetWriteBuf();
return native;
}
#else
return posix;
Index: tools/configtool/standalone/wxwin/filename.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/filename.cpp,v
retrieving revision 1.8
diff -u -5 -r1.8 filename.cpp
--- tools/configtool/standalone/wxwin/filename.cpp 26 Mar 2008 13:15:44 -0000 1.8
+++ tools/configtool/standalone/wxwin/filename.cpp 13 Aug 2008 09:18:47 -0000
@@ -1,10 +1,11 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 2003 John Dallaway
+// Copyright (C) 2005 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -33,10 +34,14 @@
#ifdef __BORLANDC__
#pragma hdrstop
#endif
+#ifdef __CYGWIN__
+#include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() */
+#endif
+
#include "wx/filefn.h"
#include "wx/confbase.h" // For wxExpandEnvVars
#include "filename.h"
@@ -548,11 +553,16 @@
}
const ecFileName ecFileName::CygPath () const
{
#ifdef __WXMSW__
- ecFileName rc = ShortName();
+ ecFileName rc = NoSpaceName();
+#ifdef __CYGWIN__
+ char buffer [MAX_PATH + 1];
+ cygwin_conv_to_posix_path (rc.c_str (), buffer);
+ rc = buffer;
+#else
if(wxIsalpha(rc[(size_t)0]) && wxTChar(':')==rc[(size_t)1])
{
// Convert c:\ to /cygdrive/c/
wxString s = wxString(wxT("/cygdrive/")) + wxString(rc[(size_t)0]) + rc.Mid(2);
rc = s;
@@ -561,10 +571,11 @@
for (i = 0; i < rc.Len(); i++)
{
if (rc[i] == wxTChar('\\'))
rc[i] = wxTChar('/');
}
+#endif
#else
const ecFileName& rc = * this;
#endif
return rc;
Index: tools/configtool/standalone/wxwin/mainwin.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/mainwin.cpp,v
retrieving revision 1.20
diff -u -5 -r1.20 mainwin.cpp
--- tools/configtool/standalone/wxwin/mainwin.cpp 26 Mar 2008 13:15:44 -0000 1.20
+++ tools/configtool/standalone/wxwin/mainwin.cpp 13 Aug 2008 09:18:48 -0000
@@ -92,10 +92,16 @@
#include "docsystem.h"
#include "symbols.h"
#ifdef __WXMSW__
#include "wx/msw/winundef.h"
+#if wxCHECK_VERSION(2, 6, 0)
+#include "wx/msw/wrapcctl.h" /* for TVS_NOHSCROLL */
+#else
+#define _WIN32_IE 0x0600 /* assume maximal feature set */
+#include <commctrl.h> /* for TVS_NOHSCROLL */
+#endif
#endif
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
@@ -394,11 +400,15 @@
if (!wxGetApp().GetSettings().m_showToolBar)
GetToolBar()->Show( FALSE );
// Create the status bar
+#ifdef __WXMSW__
CreateStatusBar(4, wxST_SIZEGRIP);
+#else
+ CreateStatusBar(4, 0);
+#endif
int* widths = new int[4];
widths[0] = -1; widths[1] = 100; widths[2] = 40; widths[3] = 80;
SetStatusWidths(4, widths);
delete[] widths;
@@ -418,11 +428,11 @@
m_outputSashWindow = new wxSashLayoutWindow(this, ecID_OUTPUT_SASH_WINDOW, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxCLIP_SIBLINGS);
m_outputSashWindow->SetDefaultSize(stg.m_outputSashSize);
m_outputSashWindow->SetOrientation(wxLAYOUT_HORIZONTAL);
m_outputSashWindow->SetAlignment(wxLAYOUT_BOTTOM);
m_outputSashWindow->SetSashVisible(wxSASH_TOP, TRUE);
- m_outputWindow = new ecOutputWindow(m_outputSashWindow, ecID_OUTPUT_WINDOW, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxCLIP_CHILDREN|wxTE_READONLY|wxTE_RICH);
+ m_outputWindow = new ecOutputWindow(m_outputSashWindow, ecID_OUTPUT_WINDOW, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxCLIP_CHILDREN|wxTE_READONLY|wxTE_RICH|wxSUNKEN_BORDER);
m_outputWindow->SetHelpText(_("The output window displays various warning and informational messages."));
// Sash window for the memory window
m_memorySashWindow = new wxSashLayoutWindow(this, ecID_MEMORY_SASH_WINDOW, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxSW_3D|wxCLIP_SIBLINGS);
m_memorySashWindow->SetDefaultSize(stg.m_memorySashSize);
@@ -471,14 +481,25 @@
// Create a composite widget to represent the scrolling config window
m_scrolledWindow = new ecSplitterScrolledWindow(m_configSashWindow, ecID_SCROLLED_WINDOW, wxDefaultPosition,
wxSize(400, 100), wxNO_BORDER | wxCLIP_CHILDREN | wxVSCROLL);
m_splitter = new wxThinSplitterWindow(m_scrolledWindow, ecID_SPLITTER_WINDOW, wxDefaultPosition,
- wxSize(400, 100), wxSP_3DBORDER | wxCLIP_CHILDREN /* | wxSP_LIVE_UPDATE */);
+ wxSize(400, 100),
+#ifdef __WXMSW__
+ wxSP_3DBORDER |
+#else
+ wxSUNKEN_BORDER |
+#endif
+ wxCLIP_CHILDREN /* | wxSP_LIVE_UPDATE */);
m_splitter->SetSashSize(2);
m_tree = new ecConfigTreeCtrl(m_splitter, ecID_TREE_CTRL, wxDefaultPosition,
- wxSize(200, 100), wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxNO_BORDER );
+ wxSize(200, 100), wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxNO_BORDER | wxTR_ROW_LINES /* | wxALWAYS_SHOW_SB */);
+#ifdef __WXMSW__
+ // disable horizontal scrolling of the config tree control
+ HWND hTree = (HWND) m_tree->GetHandle();
+ SetWindowLong (hTree, GWL_STYLE, GetWindowLong (hTree, GWL_STYLE) | TVS_NOHSCROLL);
+#endif
m_valueWindow = new ecValueWindow(m_splitter, ecID_VALUE_WINDOW, wxDefaultPosition,
wxSize(200, 100), wxNO_BORDER);
m_splitter->SplitVertically(m_tree, m_valueWindow);
m_splitter->SetMinimumPaneSize(100);
//m_splitter->AdjustScrollbars();
@@ -550,11 +571,20 @@
void ecMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
// ecAboutDialog dialog(this, ecID_ABOUT_DIALOG, _("About eCos Configuration Tool"));
// dialog.ShowModal();
wxString msg;
- msg.Printf("eCos Configuration Tool %s (%s %s)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003\nCopyright (c) eCosCentric Limited 2004-2008", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__);
+ int iTclVerMajor, iTclVerMinor, iTclVerPatchLevel;
+ Tcl_GetVersion (&iTclVerMajor, &iTclVerMinor, &iTclVerPatchLevel, NULL);
+ msg.Printf("eCos Configuration Tool %s (%s %s)\n\n"
+ "Copyright (c) Red Hat, Inc. 1998-2002\n"
+ "Copyright (c) John Dallaway 2003\n"
+ "Copyright (c) eCosCentric Limited 2004-2008\n\n"
+ "Using %s %s and Tcl %d.%d.%d",
+ ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__,
+ wxPlatformInfo::Get().GetPortIdName().c_str(), wxVERSION_NUM_DOT_STRING,
+ iTclVerMajor, iTclVerMinor, iTclVerPatchLevel);
wxMessageBox(msg, _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK);
}
void ecMainFrame::OnSize(wxSizeEvent& WXUNUSED(event))
{
@@ -772,11 +802,11 @@
GetToolBar()->Show( ! GetToolBar()->IsShown() );
wxSizeEvent sizeEvent(GetSize(), GetId());
GetEventHandler()->ProcessEvent(sizeEvent);
#ifdef __WXGTK__
- GtkOnSize( GetPosition().x, GetPosition().y, GetSize().x, GetSize().y);
+ GtkOnSize();
#endif
}
void ecMainFrame::OnUpdateToggleToolbar(wxUpdateUIEvent& event)
{
Index: tools/configtool/standalone/wxwin/mainwin.h
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/mainwin.h,v
retrieving revision 1.3
diff -u -5 -r1.3 mainwin.h
--- tools/configtool/standalone/wxwin/mainwin.h 10 Aug 2001 19:27:55 -0000 1.3
+++ tools/configtool/standalone/wxwin/mainwin.h 13 Aug 2008 09:18:48 -0000
@@ -1,9 +1,10 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -51,11 +52,11 @@
#endif
#include "wx/wx.h"
#include "wx/docview.h"
-#include "splittree.h"
+#include "wx/gizmos/splittree.h"
/*
* Status bar panes
*/
Index: tools/configtool/standalone/wxwin/makefile.gnu
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/makefile.gnu,v
retrieving revision 1.12
diff -u -5 -r1.12 makefile.gnu
--- tools/configtool/standalone/wxwin/makefile.gnu 26 Mar 2008 13:15:44 -0000 1.12
+++ tools/configtool/standalone/wxwin/makefile.gnu 13 Aug 2008 09:18:48 -0000
@@ -25,17 +25,17 @@
EXTRALDFLAGS=-L$(TCLDIR)/lib -L$(INSTALLDIR)/lib -lcdl -lcyginfra -ltcl
ifneq (,$(findstring CYGWIN, $(shell uname)))
PROGRAM=configtool.exe
CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` -D_WIN32 -D__WIN32__ -DSTRICT -D__USE_W32_SOCKETS
- LDFLAGS=`$(WXDIR)/bin/wx-config --libs` -lshlwapi -Wl,--subsystem,windows
+ LDFLAGS=`$(WXDIR)/bin/wx-config --libs std,gizmos` -lshlwapi -Wl,--subsystem,windows
EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o
RCFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
else
PROGRAM=configtool
CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
- LDFLAGS=`$(WXDIR)/bin/wx-config --libs`
+ LDFLAGS=`$(WXDIR)/bin/wx-config --libs std,gizmos`
EXTRAOBJECTS=
RCFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
endif
ifeq "$(DEBUG)" ""
@@ -59,11 +59,10 @@
$(CTBUILDDIR)/configtoolview.o \
$(CTBUILDDIR)/configtree.o \
$(CTBUILDDIR)/conflictsdlg.o \
$(CTBUILDDIR)/conflictwin.o \
$(CTBUILDDIR)/docsystem.o \
- $(CTBUILDDIR)/ecscrolwin.o \
$(CTBUILDDIR)/eCosSerial.o \
$(CTBUILDDIR)/eCosSocket.o \
$(CTBUILDDIR)/eCosStd.o \
$(CTBUILDDIR)/eCosTest.o \
$(CTBUILDDIR)/eCosTestDownloadFilter.o \
@@ -92,11 +91,10 @@
$(CTBUILDDIR)/runtestsdlg.o \
$(CTBUILDDIR)/sectiondlg.o \
$(CTBUILDDIR)/settingsdlg.o \
$(CTBUILDDIR)/shortdescrwin.o \
$(CTBUILDDIR)/solutionswin.o \
- $(CTBUILDDIR)/splittree.o \
$(CTBUILDDIR)/Subprocess.o \
$(CTBUILDDIR)/templatesdlg.o \
$(CTBUILDDIR)/TestResource.o
# Compilers
@@ -168,13 +166,10 @@
$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
$(CTBUILDDIR)/ecutils.o: $(CTDIR)/ecutils.cpp $(CTDIR)/ecutils.h
$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
-$(CTBUILDDIR)/ecscrolwin.o: $(CTDIR)/ecscrolwin.cpp $(CTDIR)/ecscrolwin.h
- $(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
-
$(CTBUILDDIR)/filename.o: $(CTDIR)/filename.cpp $(CTDIR)/filename.h
$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
$(CTBUILDDIR)/finddlg.o: $(CTDIR)/finddlg.cpp $(CTDIR)/finddlg.h
$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
@@ -225,13 +220,10 @@
$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
$(CTBUILDDIR)/solutionswin.o: $(CTDIR)/solutionswin.cpp $(CTDIR)/solutionswin.h
$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
-$(CTBUILDDIR)/splittree.o: $(CTDIR)/splittree.cpp $(CTDIR)/splittree.h
- $(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
-
$(CTBUILDDIR)/templatesdlg.o: $(CTDIR)/templatesdlg.cpp $(CTDIR)/templatesdlg.h
$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
### Common files
Index: tools/configtool/standalone/wxwin/packagesdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/packagesdlg.cpp,v
retrieving revision 1.6
diff -u -5 -r1.6 packagesdlg.cpp
--- tools/configtool/standalone/wxwin/packagesdlg.cpp 26 Mar 2008 13:15:44 -0000 1.6
+++ tools/configtool/standalone/wxwin/packagesdlg.cpp 13 Aug 2008 09:18:48 -0000
@@ -1,11 +1,12 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 2003 John Dallaway
-//
+// Copyright (C) 2005 eCosCentric Limited
+
// This program is part of the eCos host tools.
//
// 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 the Free
// Software Foundation; either version 2 of the License, or (at your option)
@@ -78,11 +79,11 @@
EVT_BUTTON(ecID_PACKAGES_DIALOG_REMOVE, ecPackagesDialog::OnRemove)
EVT_LISTBOX_DCLICK(ecID_PACKAGES_DIALOG_AVAILABLE_LIST, ecPackagesDialog::OnDblClickListBox1)
EVT_LISTBOX_DCLICK(ecID_PACKAGES_DIALOG_USE_LIST, ecPackagesDialog::OnDblClickListBox2)
EVT_LISTBOX(ecID_PACKAGES_DIALOG_AVAILABLE_LIST, ecPackagesDialog::OnClickListBox1)
EVT_LISTBOX(ecID_PACKAGES_DIALOG_USE_LIST, ecPackagesDialog::OnClickListBox2)
- EVT_LISTBOX(ecID_PACKAGES_DIALOG_VERSION, ecPackagesDialog::OnSelectVersion)
+ EVT_CHOICE(ecID_PACKAGES_DIALOG_VERSION, ecPackagesDialog::OnSelectVersion)
EVT_INIT_DIALOG(ecPackagesDialog::OnInitDialog)
EVT_BUTTON(ecID_PACKAGES_DIALOG_CLEAR, ecPackagesDialog::OnClearKeywords)
EVT_CHECKBOX(ecID_PACKAGES_DIALOG_OMIT_HARDWARE, ecPackagesDialog::OnClickOmitHardwarePackages)
EVT_CHECKBOX(ecID_PACKAGES_DIALOG_EXACT_MATCH, ecPackagesDialog::OnClickExactMatch)
EVT_TEXT(ecID_PACKAGES_DIALOG_KEYWORDS, ecPackagesDialog::OnUpdateKeywordText)
Index: tools/configtool/standalone/wxwin/propertywin.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/propertywin.cpp,v
retrieving revision 1.1
diff -u -5 -r1.1 propertywin.cpp
--- tools/configtool/standalone/wxwin/propertywin.cpp 1 Jun 2001 22:16:30 -0000 1.1
+++ tools/configtool/standalone/wxwin/propertywin.cpp 13 Aug 2008 09:18:48 -0000
@@ -1,9 +1,10 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -375,25 +376,14 @@
int ecPropertyListCtrl::SetItem(const wxString& item, const wxString& value, int nInsertAs, int nRepeat)
{
wxASSERT( nInsertAs <= GetItemCount() );
-/*
- LVFINDINFO info;
- info.flags =LVFI_STRING;
- info.psz =pszItem;
- info.vkDirection=VK_DOWN;
- int nIndex=-1;
+ int nIndex = -2;
do {
- nIndex=FindItem(&info,nIndex);
- } while (--nRepeat>0 && nIndex!=-1);
-*/
- // NB: wxListCtrl doesn't support reverse search, so could do it explicitly
- // by iterating through the items.
- // But for now, just ignore the nRepeat flag and find the first one.
- int nIndex = -1;
- nIndex = FindItem(0, /* nIndex */ item);
+ nIndex = FindItem(nIndex+1, item);
+ } while (--nRepeat > 0 && nIndex != -1);
if(-1==nIndex){
nIndex = InsertItem(nInsertAs, item);
}
Index: tools/configtool/standalone/wxwin/reposdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/reposdlg.cpp,v
retrieving revision 1.2
diff -u -5 -r1.2 reposdlg.cpp
--- tools/configtool/standalone/wxwin/reposdlg.cpp 4 Jan 2002 14:13:53 -0000 1.2
+++ tools/configtool/standalone/wxwin/reposdlg.cpp 13 Aug 2008 09:18:49 -0000
@@ -1,9 +1,10 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2006 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -216,11 +217,11 @@
}
info += wxT("</ul><P>");
///////////////////////////////////////////////////
- info += wxT("<b>Default package:</b><P>\n");
+ info += wxT("<b>Packages template:</b><P>\n");
info += wxT("<ul>");
if (doc)
{
Index: tools/configtool/standalone/wxwin/runtestsdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/runtestsdlg.cpp,v
retrieving revision 1.8
diff -u -5 -r1.8 runtestsdlg.cpp
--- tools/configtool/standalone/wxwin/runtestsdlg.cpp 14 May 2003 12:20:15 -0000 1.8
+++ tools/configtool/standalone/wxwin/runtestsdlg.cpp 13 Aug 2008 09:18:49 -0000
@@ -266,11 +266,11 @@
wxMessageBox(_("Tests are running. Please press Stop before quitting this dialog."),
wxGetApp().GetSettings().GetAppName(), wxICON_INFORMATION|wxOK, this);
return;
}
- wxDialog::OnOK(event);
+ event.Skip();
}
void ecRunTestsDialog::OnCloseWindow(wxCloseEvent& event)
{
if (ecRunning == m_runStatus)
@@ -451,11 +451,11 @@
{
wxString str;
String str1;
bool bOk=false;
CResetAttributes::ResetResult n=m_info->pSheet->m_pResource->Reset(str1);
- str = str1;
+ str = str1.GetCString();
if(CResetAttributes::RESET_OK!=n){
str += wxT(">>> Could not reset target\n");
}
str += wxT('\n');
Index: tools/configtool/standalone/wxwin/sectiondlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/sectiondlg.cpp,v
retrieving revision 1.1
diff -u -5 -r1.1 sectiondlg.cpp
--- tools/configtool/standalone/wxwin/sectiondlg.cpp 1 Jun 2001 22:16:30 -0000 1.1
+++ tools/configtool/standalone/wxwin/sectiondlg.cpp 13 Aug 2008 09:18:49 -0000
@@ -168,16 +168,16 @@
Centre(wxBOTH);
}
void ecSectionDialog::OnOK(wxCommandEvent& event)
{
- wxDialog::OnOK(event);
+ event.Skip();
}
void ecSectionDialog::OnCancel(wxCommandEvent& event)
{
- wxDialog::OnCancel(event);
+ event.Skip();
}
void ecSectionDialog::OnApply(wxCommandEvent& event)
{
}
Index: tools/configtool/standalone/wxwin/settingsdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/settingsdlg.cpp,v
retrieving revision 1.4
diff -u -5 -r1.4 settingsdlg.cpp
--- tools/configtool/standalone/wxwin/settingsdlg.cpp 20 May 2002 22:19:28 -0000 1.4
+++ tools/configtool/standalone/wxwin/settingsdlg.cpp 13 Aug 2008 09:18:50 -0000
@@ -1,9 +1,10 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2005, 2008 eCosCentric Limited
//
// This program is part of the eCos host tools.
//
// 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 the Free
@@ -121,12 +122,13 @@
int dialogHeight = (int)(PROPERTY_DIALOG_HEIGHT * scaleFactor);
SetSize(dialogWidth, dialogHeight);
m_displayOptions = NULL;
+ wxSize clientSize = GetClientSize();
m_notebook = new wxNotebook(this, ecID_SETTINGS_NOTEBOOK,
- wxPoint(2, 2), wxSize(PROPERTY_DIALOG_WIDTH - 4, PROPERTY_DIALOG_HEIGHT - 4));
+ wxPoint(2, 2), wxSize(clientSize.GetWidth() - 4 - 10, clientSize.GetHeight() - 4 - 100));
m_displayOptions = new ecDisplayOptionsDialog(m_notebook);
m_notebook->AddPage(m_displayOptions, wxT("Display"));
m_displayOptions->TransferDataToWindow();
@@ -208,12 +210,12 @@
void ecSettingsDialog::OnOK(wxCommandEvent& event)
{
ecSettings oldSettings(wxGetApp().GetSettings());
- wxDialog::OnOK(event);
-
+ TransferDataFromWindow();
+
if (wxGetApp().GetSettings().m_bHex != oldSettings.m_bHex)
{
// Refresh the values window and currently selected properties
ecConfigToolHint hint(NULL, ecAllSaved);
if (wxGetApp().GetConfigToolDoc())
@@ -224,10 +226,12 @@
{
ecConfigToolHint hint(NULL, ecNameFormatChanged);
if (wxGetApp().GetConfigToolDoc())
wxGetApp().GetConfigToolDoc()->UpdateAllViews (NULL, & hint);
}
+
+ event.Skip();
}
void ecSettingsDialog::OnHelp(wxCommandEvent& event)
{
int sel = m_notebook->GetSelection();
@@ -1076,20 +1080,20 @@
wxStaticText *item18 = new wxStaticText( parent, wxID_STATIC, _("&Port:"), wxDefaultPosition, wxDefaultSize, 0 );
item16->Add( item18, 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5 );
wxString strs19[] =
{
- _("COM1"),
- _("COM2"),
- _("COM3"),
- _("COM4"),
- _("COM5"),
- _("COM6"),
- _("COM7"),
- _("COM8")
+ _("/dev/ttyS0"),
+ _("/dev/ttyS1"),
+ _("/dev/ttyS2"),
+ _("/dev/ttyS3"),
+ _("/dev/ttyS4"),
+ _("/dev/ttyS5"),
+ _("/dev/ttyS6"),
+ _("/dev/ttyS7")
};
- wxChoice *item19 = new wxChoice( parent, ecID_RUN_PROPERTIES_SERIAL_PORT_ADDR, wxDefaultPosition, wxSize(70,-1), 8, strs19, 0 );
+ wxComboBox *item19 = new wxComboBox( parent, ecID_RUN_PROPERTIES_SERIAL_PORT_ADDR, wxEmptyString, wxDefaultPosition, wxSize(110,-1), 8, strs19, wxCB_DROPDOWN );
item16->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 );
wxStaticText *item20 = new wxStaticText( parent, wxID_STATIC, _("&Baud:"), wxDefaultPosition, wxDefaultSize, 0 );
item16->Add( item20, 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5 );
@@ -1109,11 +1113,11 @@
_("57600"),
_("115200"),
_("128000"),
_("256000")
};
- wxChoice *item21 = new wxChoice( parent, ecID_RUN_PROPERTIES_SERIAL_PORT_SPEED, wxDefaultPosition, wxSize(70,-1), 15, strs21, 0 );
+ wxChoice *item21 = new wxChoice( parent, ecID_RUN_PROPERTIES_SERIAL_PORT_SPEED, wxDefaultPosition, wxSize(80,-1), 15, strs21, 0 );
item16->Add( item21, 0, wxALIGN_CENTRE|wxALL, 5 );
item14->Add( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxSizer *item22 = new wxBoxSizer( wxHORIZONTAL );
Index: tools/ecostest/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/ecostest/ChangeLog,v
retrieving revision 1.18
diff -u -5 -r1.18 ChangeLog
--- tools/ecostest/ChangeLog 25 Oct 2007 15:17:49 -0000 1.18
+++ tools/ecostest/ChangeLog 13 Aug 2008 09:18:50 -0000
@@ -1,10 +1,16 @@
2007-10-25 Gary Thomas <gary@mlbassoc.com>
* common/eCosTest.h: Remove class qualifier - no longer legal
in GCC-4.x
+2006-09-06 John Dallaway <jld@ecoscentric.com>
+
+ * common/eCosTestUtils.cpp, common/eCosTestUtils.h,
+ common/eCosTest.h: Further tweaks to function prototypes for
+ recent GCC.
+
2006-07-10 John Dallaway <jld@ecoscentric.com>
* common/eCosTestUtils.cpp, common/eCosTestUtils.h: Tweak function
prototypes for GCC 3.4.4.
Index: tools/ecostest/common/eCosTestUtils.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/ecostest/common/eCosTestUtils.cpp,v
retrieving revision 1.3
diff -u -5 -r1.3 eCosTestUtils.cpp
--- tools/ecostest/common/eCosTestUtils.cpp 11 Jul 2006 09:56:15 -0000 1.3
+++ tools/ecostest/common/eCosTestUtils.cpp 13 Aug 2008 09:18:50 -0000
@@ -56,11 +56,11 @@
}
return (0==pszTail)?pszFile:pszTail+1;
}
// File iterator. Gets next file in directory, avoiding _T(".") and _T("..")
-bool CeCosTestUtils::NextFile (void *pHandle,String &str)
+bool CeCosTestUtils::NextFile (void *&pHandle,String &str)
{
#ifdef _WIN32
WIN32_FIND_DATA fd;
while(FindNextFile((HANDLE)pHandle,&fd)){
LPCTSTR pszName=fd.cFileName;
@@ -76,11 +76,11 @@
}
return false;
}
// Start file iteration and return first file.
-bool CeCosTestUtils::StartSearch (void *pHandle,String &str)
+bool CeCosTestUtils::StartSearch (void *&pHandle,String &str)
{
#ifdef _WIN32
WIN32_FIND_DATA fd;
pHandle=(void *)FindFirstFile (_T("*.*"), &fd);
if(INVALID_HANDLE_VALUE==(HANDLE)pHandle){
@@ -101,11 +101,11 @@
return NextFile(pHandle,str);
#endif
}
// End file iteration
-void CeCosTestUtils::EndSearch (void *pHandle)
+void CeCosTestUtils::EndSearch (void *&pHandle)
{
#ifdef _WIN32
FindClose((HANDLE)pHandle);
#else // UNIX
closedir((DIR *)pHandle);
Index: tools/ecostest/common/eCosTestUtils.h
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/ecostest/common/eCosTestUtils.h,v
retrieving revision 1.3
diff -u -5 -r1.3 eCosTestUtils.h
--- tools/ecostest/common/eCosTestUtils.h 11 Jul 2006 09:56:15 -0000 1.3
+++ tools/ecostest/common/eCosTestUtils.h 13 Aug 2008 09:18:50 -0000
@@ -64,15 +64,15 @@
static bool Exists (LPCTSTR pszFile);
// And is a file? (as opposed to a directory)
static bool IsFile (LPCTSTR pszFile);
// File iterator. Gets next file in directory, avoiding "." and ".."
- static bool NextFile (void *pHandle,String &str);
+ static bool NextFile (void *&pHandle,String &str);
// Start file iteration and return first file.
- static bool StartSearch (void *pHandle,String &str);
+ static bool StartSearch (void *&pHandle,String &str);
// End file iteration
- static void EndSearch (void *pHandle);
+ static void EndSearch (void *&pHandle);
// Get the file name of a "home directory" file
static const String HomeFile (LPCTSTR pszFile);
protected: