[Chandler-dev] Convenient incremental builds and debugging of
widgets on Windows
John Anderson
john at osafoundation.org
Wed Apr 12 14:24:26 PDT 2006
I made a minor change in the wx Makefile for Windows that allows for
easy incremental wxWidgets builds and debugging in Chandler.
Here's how you do it:
Start out by checking out internal, open cygwin and cd to
osaf/internal/wx and type
make realclean
make DEBUG=1
This will build you a fresh copy of wxPython. Now suppose you just want
to make some incremental changes to the C++ files in wxWidgets and
run/debug them in Chandler.
Open wx_osaf.sln in Visual Studio. Build "DLL Unicode Debug" in the IDE.
The first build always builds everything for some reason I don't
understand. However, if you change a file and build again only the
affected piece gets rebuilt and the build is quick.
When you're ready to run in Chandler open cygwin and cd to
osaf/internal/wx and type
make DEBUG=1 installDLLs
make DEBUG=1 snap
make DEBUG=1 drop
Running Chandler debug now uses the widgets dlls build by Visual Studio.
If you run Wing and put a breakpoint somewhere, when it stops you can go
back to Visual Studio and choose Debug menu, Processes. Choose
python_d.exe in the list and click attach. Now you can set a breakpoint
in Visual Studio. Continue in Wing and you'll stop at your breakpoint in
Visual Studio.
Turn around time for changing a file, building and debugging is very
reasonable.
Caveats: the OSAF makefile doesn't handle dependencies to .i files and
neither does clean or realclean, so if you make a change to a .i file,
or if you update your .i files you need delete the dependencies. If you
want to be safe you should delete everything under
internal/wx/wxPython/src/msw (or gtk or mac) and any msw|gtk|mac dirs
under wx/wxPython/contrib, as well as files in wx/wxPython/wx (but not
subdirs)
Also if you make changes to a .i file and need to SWIG, you'll need to
run the OSAF makefile since the Visual Studio project files won't build
them.
More information about the chandler-dev
mailing list