How to Build and Install wxPython for Microsoft Windows under CygwinIntroductionThis procedure produces a version of wxPython that works These instructions are current as of September 2009 and assume you Step-by-Step Instructions.Feel free to modify this recipe to suit your preferences: (1) Download the wxWidgets and wxPython source code from the wxPython-src link at http://www.wxpython.org/download.php#sources to /usr/src. (2) Unpack the source distribution:cd /usr/src This will create the directory /usr/src/wxPython-src-2.8.10.1. For convenience (especially if you want to put your code somewhere else) I will call this directory $WXDIR in what follows. To makethe commands work as written, run the command export WXDIR=/usr/src/wxPython-src-2.8.10.1(3) Create a build directory: cd $WXDIR Choose any name for your build directory; I use build-local here. (4) Configure wxWidgets: cd $WXDIR/build-local (4a) Apply patches: These instructions apply to release 2.8.10.1. They may or may not be needed
in at the bottom of the page. Apply the patches with cd $WXDIRYou will also need to find the file build-local/lib/wx/include/msw-ansi-release-2.8/wx/setup.h and after the line: #define wxUSE_DATEPICKCTRL 1 add the line: #define wxUSE_DATEPICKCTRL_GENERIC 1(5) Compile and link wxWidgets: cd $WXDIR/build-local You may do make -C contrib/src/gizmos to compile and link
the gizmos package.The gizmos package has some fun tools for developing Python programs but is not required for GNU Radio. (6) Install wxWidgets: cd $WXDIR/build-local This installs the wxWidgets DLLs in /usr/local/lib. If you compiled the gizmos package, install it with make -C contrib/src/gizmos
install . Depending on how you installed Cygwin, you might get an error
like/usr/bin/install -c -d /usr/local/lib You can fix this by changing /usr/local/lib and /usr/local/bin to give you ownership of these directories. See the instructions in hints tips known problems and solutions for Windows. (7) Move the DLLs to /usr/local/bin: mv /usr/local/lib/cygwx*.dll /usr/local/bin Unless /usr/local/lib is in your PATH, it is easier to have the DLLs in /usr/local/bin. (If you know how to make the configure/build process do this for you, please let me know.) (8) Test the build and installation of wxWidgets: cd $WXDIR/build-local/samples/minimal This should produce an empty window to prove that wxWidgets works. (9) Build wxPython: cd $WXDIR/wxPython This builds the Python connection to wxWidgets. If you built gizmos you should omit the BUILD_GIZMOS=0 flag. (10) Install wxPython:cd $WXDIR/wxPython This installs wxPython. If you build gizmos you should omit the BUILD_GIZMOS=0 flag. (11) Test your wxPython installation:cd $WXDIR/wxPython/demo This should present you with a green snake (and a window showing what wxPython can do). If this works, you are done. You should now be able to "import wx", build gr-wxgui, and "import wxgui". If Notes
statbmp.patch - statbmp patch for wxWidgets on Cygwin (1.5 KB) Don Ward, 08/26/2006 01:04 AM config.patch - patch file for wxPython config.py on Cygwin (597 Bytes) Don Ward, 08/26/2006 01:25 AM treelistctrl.cpp.patch - patch for gizmos/wxCode/src/treelistctrl.cpp for wxPython 2.8.0.1 (430 Bytes) Redmine Admin, 12/31/2006 09:58 PM wxPython-2.8.10.1.patch - patches for wxPython-2.8.10.1 (1.5 KB) Redmine Admin, 09/24/2009 05:46 PM 注:How to Build and Install wxPython for Microsoft Windows under Cygwin(原文出处,翻译整理仅供参考!) |