From: Jeremy O'D. <je...@o-...> - 2008-04-10 14:13:00
Attachments:
wxwidgets2.8.7.patch.gz
|
Hi all, Attached is a (zipped) preliminary set of patches for wxWidgets 2.8.7 support. Some notes to help. - wxWidgets 2.8.7 was compiled from source using Visual Studio 2008 (i.e. on Windows) with the following options: - WXWIN_COMPATIBILITY_2_4 0 - WXWIN_COMPATIBILITY_2_6 0 - wxUSE_UNICODE 1 - wxUSE_MEDIACTRL 1 - wxUSE_XML 1 - wxUSE_GLCANVAS 1 - wxUSE_ODBC 1 Styled text control was also built. I think this means that I've enabled all of the current things we support in wxHaskell. The whole thing was built as a static library. - Compiled on top of both 0.10.3 rc1 (tagged) and the released version (head). Tested against most of the samples/wx directory using rc1 (Windows only). - Main changes are: - (wxc) Changes in managed.cpp for some of the const objects. Previous code does not compile on VS2008. - (wxc) Factored some functions into wxTopLevelWindow - (wx) Added TopLevelWindow.hs, which mainly removes some functionality from Frame.hs. The general approach I've taken, as agreed with Eric when I discussed this patch, is to shoot for wxcore API which is as close as possible to wxWidgets 2.8. This breaks source compatibility in places, but has some advantages: - Possible to refer to wxWidgets documentation for wxcore functions. - Not always clear what is the 'best' way to maintain compatibility with more complex changes e.g. wxTopLevelWindow introduction. I'm sure that not all will agree with the approach, but the attached is a start for wxWidgets 2.8 support. Best regards Jeremy |
From: shelarcy <she...@gm...> - 2008-04-10 17:48:56
|
Hi Jeremy, On Thu, 10 Apr 2008 23:12:50 +0900, Jeremy O'Donoghue <je...@o-...> wrote: > Attached is a (zipped) preliminary set of patches for wxWidgets 2.8.7 > support. Some notes to help. > > - wxWidgets 2.8.7 was compiled from source using Visual Studio 2008 I tested your patch on PowerPC Mac OS X. And I found below part causes compile error. > [Preliminary wxWidgets 2.8.7 support > jer...@gm...**20080410112559] { > (snip) > hunk ./wxc/src/eljvalidator.cpp 136 > (snip) > +#ifdef wxUSE_UNICODE > + items_copy[i] = _wcsdup(items.Item(i).GetData()); > +#else > + items_copy[i] = strdup(items.Item(i).GetData()); > +#endif _wcsdup is Visual Studio (2005 or higher)'s specific function. And wxchar has portable wxStrdup function. So, I think we should use wxStrdup function instead. > - Compiled on top of both 0.10.3 rc1 (tagged) and the released version > (head). Tested > against most of the samples/wx directory using rc1 (Windows only). I checked those are also working on PowerPC Mac OS X platform. Some sample cause problem. But anyway we have working code now. That is sounds great! > The general approach I've taken, as agreed with Eric when I discussed > this patch, is to shoot for wxcore API which is as close as possible to > wxWidgets 2.8. This breaks source compatibility in places, but has some > advantages: I don't check that yet. I'll check that this and/or next week. Best Regards, -- shelarcy <shelarcy hotmail.co.jp> http://page.freett.com/shelarcy/ |
From: Eric Y. K. <eri...@gm...> - 2008-04-11 08:29:55
|
On Thu, Apr 10, 2008 at 15:12:50 +0100, Jeremy O'Donoghue wrote: > - wxWidgets 2.8.7 was compiled from source using Visual Studio 2008 > (i.e. on Windows) Great! Thanks! ... but I get this compile error on MacIntel g++ -c wxc/src/eljvalidator.cpp -o dist/wxc/eljvalidator.o -MD -DwxcREFUSE_MEDIACTRL -DwxcREFUSE_OPENGL -I/usr/local/lib/wx/include/mac-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -fPIC -Iwxc/include wxc/src/eljvalidator.cpp: In function ‘void* wxTextValidator_GetIncludes(void*, int*)’: wxc/src/eljvalidator.cpp:159: error: ‘_wcsdup’ was not declared in this scope wxc/src/eljvalidator.cpp: In function ‘void* wxTextValidator_GetExcludes(void*, int*)’: wxc/src/eljvalidator.cpp:192: error: ‘_wcsdup’ was not declared in this scope make: *** [dist/wxc/eljvalidator.o] Error 1 > with the following options: > - WXWIN_COMPATIBILITY_2_4 0 > - WXWIN_COMPATIBILITY_2_6 0 > - wxUSE_UNICODE 1 > - wxUSE_MEDIACTRL 1 > - wxUSE_XML 1 > - wxUSE_GLCANVAS 1 > - wxUSE_ODBC 1 How do I get the same listing? -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9 |
From: Jeremy O'D. <je...@o-...> - 2008-04-11 10:04:15
|
On Fri, 11 Apr 2008 09:29:48 +0100, "Eric Y. Kow" <eri...@gm...> said: > On Thu, Apr 10, 2008 at 15:12:50 +0100, Jeremy O'Donoghue wrote: > > - wxWidgets 2.8.7 was compiled from source using Visual Studio 2008 > > (i.e. on Windows) > > Great! Thanks! > > ... but I get this compile error on MacIntel > > g++ -c wxc/src/eljvalidator.cpp -o dist/wxc/eljvalidator.o -MD > -DwxcREFUSE_MEDIACTRL -DwxcREFUSE_OPENGL > -I/usr/local/lib/wx/include/mac-unicode-release-2.8 > -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES > -D__WXMAC__ -fPIC -Iwxc/include > wxc/src/eljvalidator.cpp: In function ‘void* > wxTextValidator_GetIncludes(void*, int*)’: wxc/src/eljvalidator.cpp:159: > error: ‘_wcsdup’ was not declared in this scope > wxc/src/eljvalidator.cpp: In function ‘void* > wxTextValidator_GetExcludes(void*, int*)’: wxc/src/eljvalidator.cpp:192: > error: ‘_wcsdup’ was not declared in this scope > make: *** [dist/wxc/eljvalidator.o] Error 1 Shelarcy got this one for me... we need to replace _wcsdup with wxStrdup(). _wcsdup() is Microsoft specific. > > with the following options: > > - WXWIN_COMPATIBILITY_2_4 0 > > - WXWIN_COMPATIBILITY_2_6 0 > > - wxUSE_UNICODE 1 > > - wxUSE_MEDIACTRL 1 > > - wxUSE_XML 1 > > - wxUSE_GLCANVAS 1 > > - wxUSE_ODBC 1 > > How do I get the same listing? I'm afraid this one was manual copy and paste. It would be very easy to create a script to do it, though, and we should probably consider (as we could then do autoconfig of wxHaskell build for Windows). All you need to do is search wx/setup.h for the wxWidgets install in path. The most important of the features above that we should consider further is WXWIN_COMPATIBILITY_2_6 (which I disabled) - I could see (given packaging time for e.g. Debian) a benefit in trying to support the current and previous releases of wxWidgets. At the same time, I think it's very important to maintain a close link between wxcore and wxWidgets library itself - otherwise we would need to fully document wxcore (at present the wxWidgets docs are quite useable as documentation for wxcore, but if we don't keep up, they become less so over time. Regards Jeremy |