[wxPython] Building from CVS

I'm trying to build wxWindows/wxPython from current CVS
again (WinNT4.0, VC++6, Python2.1).

Building wxWindows Final version worked fine, and demo
programs work fine. When I try to build wxPython (using
build_ext --inplace), though, I get the following errors. I
tried both current, and the wxPy_B4_UNICODE tag, with no
notable difference. (Sorry about the ugly line-wrapping.)

creating build\temp.win32-2.1\Release\src\msw
D:\Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX
-DWIN32 -D__WIN32__
-D_WINDOWS -D__WINDOWS__ -DWINVER=0x0400 -D__WIN95__
-DSTRICT -D__WXMSW__ -DWXUS
INGDLL=1 -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1
-Isrc -Id:\wxWindows\l
ib\mswdll -Id:\wxWindows\include -ID:\Python21\Include
/TpD:\wxWindows\wxPython\
src\msw\wx.cpp
/Fobuild\temp.win32-2.1\Release\src\msw\wx.obj
wx.cpp
D:\wxWindows\wxPython\src\msw\wx.cpp(381) : warning C4101:
'obj' : unreferenced
local variable
D:\Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX
-DWIN32 -D__WIN32__
-D_WINDOWS -D__WINDOWS__ -DWINVER=0x0400 -D__WIN95__
-DSTRICT -D__WXMSW__ -DWXUS
INGDLL=1 -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1
-Isrc -Id:\wxWindows\l
ib\mswdll -Id:\wxWindows\include -ID:\Python21\Include
/TpD:\wxWindows\wxPython\
src\msw\windows.cpp
/Fobuild\temp.win32-2.1\Release\src\msw\windows.obj
windows.cpp
D:\wxWindows\wxPython\src\msw\windows.cpp(9618) : error
C2664: 'wxMenuItem::wxMe
nuItem' : cannot convert parameter 5 from 'bool' to 'enum
wxItemKind'
        Conversion to enumeration type requires an explicit
cast (static_cast, C
-style cast or function-style cast)
error: command '"D:\Visual Studio\VC98\BIN\cl.exe"' failed
with exit status 2

Any ideas what's up here? It's probably just me doing
something stupid again, but...

Jeff Shannon
Technician/Programmer
Credit International

C2664: 'wxMenuItem::wxMe
nuItem' : cannot convert parameter 5 from 'bool' to 'enum
wxItemKind'
        Conversion to enumeration type requires an explicit
cast (static_cast, C
-style cast or function-style cast)
error: command '"D:\Visual Studio\VC98\BIN\cl.exe"' failed
with exit status 2

The wxMenuItem constructor changed signature earlier today. I just checked
in the changes needed to fix this less than an hour ago. Update and try
again.

You'll also get a related error when building the xrc module, but I havn't
checked in a change for it yet. It's probably something that Vaclav needs
to address since the meaning of the parameter has changed. But here is a
temporary fix that will let you compile (watch out for wrapped lines):

Index: xh_menu.cpp

···

===================================================================
RCS file: /home/wxcvs/wxWindows/contrib/src/xrc/xh_menu.cpp,v
retrieving revision 1.5
diff -u -4 -w -r1.5 xh_menu.cpp
--- xh_menu.cpp 15 Feb 2002 19:41:43 -0000 1.5
+++ xh_menu.cpp 18 Mar 2002 22:39:30 -0000
@@ -74,9 +74,10 @@
             if (!accel.IsEmpty())
                 fullLabel << wxT("\t") << accel;

             wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel,
- GetText(wxT("help")),
checkable);
+ GetText(wxT("help")),
+ checkable ? wxItem_Check :
wxItem_Normal);

#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__)
                 if (HasParam(wxT("bitmap")))
                     mitem->SetBitmap(GetBitmap(wxT("bitmap")));

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Robin Dunn wrote:

The wxMenuItem constructor changed signature earlier today. I just checked
in the changes needed to fix this less than an hour ago. Update and try
again.

Great! I now seem to have a fully working build. :slight_smile:

Now... just one more nagging little question. I'd like to install this CVS
version on several different machines here, but it would be awkward to install
Visual Studio on each of them. I tried using the standard distutils 'python
setup.py bdist_wininst', which seems to work after a fashion, but it doesn't
seem to install everything (notably, no demo, no docs). Is there an easy way
to grab everything? I can live without the start menu, etc, entries, but
having the demo and docs available on the other machines would be a big plus.

Thanks for all your help, Robin!

Jeff Shannon
Technician/Programmer
Credit International

Now... just one more nagging little question. I'd like to install this

CVS

version on several different machines here, but it would be awkward to

install

Visual Studio on each of them. I tried using the standard distutils

'python

setup.py bdist_wininst', which seems to work after a fashion, but it

doesn't

seem to install everything (notably, no demo, no docs). Is there an easy

way

to grab everything? I can live without the start menu, etc, entries, but
having the demo and docs available on the other machines would be a big

plus.

Take a look at wxPython/distrib/make_installer.py. This is the script I run
to generate on the fly the script for InnoSetup, it then runs Inno to build
the installed exe.

You need the "InnoSetup Extensions" version of InnoSetup since I use a
little bit of Pascal scripting in the setup. You can get it here:
Home | Alles op de rit | Beedr. I have a fairly old version, 2.06 or something
like that.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!