Curt Hibbs
2003-Dec-31 11:00 UTC
[Wxruby-users] Whoo Hoo! I got a working Windows Build of wxRuby
I finally got a working native windows build of wxRuby (using a static build of wxWindows so everything is in a single dll -- wxruby.so)! Two things contributed to my success: 1) building wxWindows with the vc++ makefiles (instead of the vc++ projects), and 2) very careful attention to compiler/linker flags specified in extconf.rb. Kevin, I had to modify app.cpp, depend, extconf.rb, and wx.h. I have attached patch files. Let me know when you have integrated these into cvs and I will then refresh my source tree and do another build. I still need to write the mswin readme and create a window''s installer. I''m going to create an installer for both debug and release builds. However, in the debug build, there are still the annoying wxWindows assert dialogs resulting from our use of wxDefaultDateTime (which is an alias for wxInvalidDateTime). I don''t want to turn off wxWindows asserts because they provide tremendous value. Could you modify our date/time object to initialize with a valid value to avoid this assert? If not, then I am going to hack wxWindows to remove the asserts for invalid wxDateTime. Below I copied the console log from running a couple sample apps so that you can see these asserts (the main problem is that each assert generates both a console log line *and* pop-up dialog box). Curt E:\Dev\RubyDev\wxruby\samples\minimal> E:\Dev\RubyDev\wxruby\samples\minimal>ruby nothing.rb 08:51:44: Debug: E:\Dev\RubyDev\wx/include\wx/datetime.h(1445): assert "t1.IsVal id() && t2.IsValid()" failed: invalid wxDateTime 08:51:53: Debug: E:\Dev\RubyDev\wx\include\wx/datetime.inl(136): assert "IsValid ()" failed: invalid wxDateTime 08:51:54: Debug: E:\Dev\RubyDev\wx\include\wx/datetime.inl(136): assert "IsValid ()" failed: invalid wxDateTime E:\Dev\RubyDev\wxruby\samples\controls>cd ..\calendar E:\Dev\RubyDev\wxruby\samples\calendar>ruby calendar.rb 08:54:56: Debug: E:\Dev\RubyDev\wx/include\wx/datetime.h(1445): assert "t1.IsVal id() && t2.IsValid()" failed: invalid wxDateTime 08:54:57: Debug: E:\Dev\RubyDev\wx\include\wx/datetime.inl(136): assert "IsValid ()" failed: invalid wxDateTime 08:54:58: Debug: E:\Dev\RubyDev\wx\include\wx/datetime.inl(136): assert "IsValid ()" failed: invalid wxDateTime 08:54:58: Debug: E:\Dev\RubyDev\wx/include\wx/datetime.h(1445): assert "t1.IsVal id() && t2.IsValid()" failed: invalid wxDateTime 08:54:59: Debug: E:\Dev\RubyDev\wx\include\wx/datetime.inl(136): assert "IsValid ()" failed: invalid wxDateTime 08:55:16: Debug: E:\Dev\RubyDev\wx/include\wx/datetime.h(1445): assert "t1.IsVal id() && t2.IsValid()" failed: invalid wxDateTime 08:55:20: Debug: E:\Dev\RubyDev\wx\include\wx/datetime.inl(136): assert "IsValid ()" failed: invalid wxDateTime -------------- next part -------------- A non-text attachment was scrubbed... Name: app,cpp.patch Type: application/octet-stream Size: 214 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20031231/5cdcd0ef/appcpp.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: depend.patch Type: application/octet-stream Size: 231 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20031231/5cdcd0ef/depend.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: extconf.rb.patch Type: application/octet-stream Size: 2647 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20031231/5cdcd0ef/extconf.rb.obj
Kevin Smith
2004-Jan-01 15:52 UTC
[Wxruby-users] Whoo Hoo! I got a working Windows Build of wxRuby
Curt Hibbs wrote:> I finally got a working native windows build of wxRuby (using a static build > of wxWindows so everything is in a single dll -- wxruby.so)!That''s really excellent!!!> Kevin, I had to modify app.cpp, depend, extconf.rb, and wx.h. I have > attached patch files. Let me know when you have integrated these into cvs > and I will then refresh my source tree and do another build.Done and checked in to CVS. Let me know if there is anything else.> However, in the debug build, there are still the annoying wxWindows assert > dialogs resulting from our use of wxDefaultDateTime (which is an alias for > wxInvalidDateTime). I don''t want to turn off wxWindows asserts because they > provide tremendous value. Could you modify our date/time object to > initialize with a valid value to avoid this assert? If not, then I am going > to hack wxWindows to remove the asserts for invalid wxDateTime.I completely agree. I think we still need to initialize the invalid constants to invalid values, to match the native wxWindows behavior. But I think we can avoid those needless asserts. I have checked in code that *hopefully* will solve the problem. You should only see the asserts now if you actually do something that deserves them, like comparing a date that has not been initialized. Let me know if it works. Thanks, Kevin
Gour
2004-Jan-01 17:00 UTC
[Wxruby-users] Whoo Hoo! I got a working Windows Build of wxRuby
Curt Hibbs (curt@hibbs.com) wrote:> I finally got a working native windows build of wxRuby (using a static build > of wxWindows so everything is in a single dll -- wxruby.so)!Hey, that''s GREAT! Congratulations! I''d be happy to be able to do the same with MinGW/MSYS. Anyway, your success is great inspiration to try harder :-) Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493
Kevin Smith wrote:> > Curt Hibbs wrote: > > However, in the debug build, there are still the annoying > wxWindows assert > > dialogs resulting from our use of wxDefaultDateTime (which is > an alias for > > wxInvalidDateTime). I don''t want to turn off wxWindows asserts > because they > > provide tremendous value. Could you modify our date/time object to > > initialize with a valid value to avoid this assert? If not, > then I am going > > to hack wxWindows to remove the asserts for invalid wxDateTime. > > I completely agree. I think we still need to initialize the invalid > constants to invalid values, to match the native wxWindows behavior. But > I think we can avoid those needless asserts. I have checked in code that > *hopefully* will solve the problem. You should only see the asserts now > if you actually do something that deserves them, like comparing a date > that has not been initialized. > > Let me know if it works.Yes, it works beautifully -- thanks! Curt