From partizan at tut.by Sun Jun 5 12:00:38 2005 From: partizan at tut.by (Alexander Borovsky) Date: Sun Jun 5 11:53:37 2005 Subject: [Wxruby-users] wxRuby patch for work with wxGtk In-Reply-To: (wxruby-users-request@rubyforge.org's message of "Sun, 05 Jun 2005 00:00:08 -0400") References: Message-ID: I write patch for wxRuby 0.6 for work with wxGTK (in attachment). Known bugs: - You can't use *_PEN, *_BRUSH, *_CURSOR, *_FONT, and color pointer constants before create application object. - Don't work app.end_main_loop function - Tree object causes many DeleteObject errors, but sometimes work. But most of it working! -------------- next part -------------- A non-text attachment was scrubbed... Name: wxruby-2.6.patch.bz2 Type: application/x-bzip2 Size: 5509 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20050605/43f788ce/wxruby-2.6.patch.bin -------------- next part -------------- -- Best regards, Alexander Borovsky AKA Partizan From devel at nicreations.com Tue Jun 7 00:28:45 2005 From: devel at nicreations.com (Nick) Date: Tue Jun 7 00:27:58 2005 Subject: [Wxruby-users] Wx::HtmlWindow.on_link_clicked In-Reply-To: <02859667.20050504004755@ubiz.ru> References: <02859667.20050504004755@ubiz.ru> Message-ID: <42A5227D.10008@nicreations.com> I know this is a month late (I hope to address the reason for this soon), but the patch file you sent wants to patch the RCS files as opposed to the .t files. Is this what you meant to do? Dmitry Morozhnikov wrote: > Hello, wxruby-users. > > This is an addition which implement wrapper for > overloading wxHtmlWindow::OnLinkClicked method. Unfortunately, it was > impossible to make it correctly without ugly hack to wxpp.rb, but i`m > hope it does not broke it. > > Please look at attachment for a patch for htmlwindow.t and wxpp.rb and > additional file htmllinkinfo.t (need to be added to $objs array in > extconf.rb). > > Sample code of fancy about dialog for windows (for windows -- because > of using function from shell32.dll to call favorite email client and > favorite browser): > > ===================================================== > require 'Win32API' > require 'wxruby' > class WrappedHtml < Wx::HtmlWindow > def initialize(*args) > super > @shell = Win32API.new('shell32', 'ShellExecute', 'LPPPPI', 'L') > end > def on_link_clicked(link) > @shell.call 0, 'open', link.get_href, nil, nil, 1 > end > end > class App < Wx::App > def on_init > dialog = Wx::Dialog.new nil, -1, 'About' > sizer = Wx::BoxSizer.new Wx::VERTICAL > dialog.set_sizer sizer > html = WrappedHtml.new dialog, -1 > html.set_page < > > My wife web project
> mail me
> > > EOF > sizer.add html, 1, Wx::EXPAND > dialog.set_size Wx::Size.new(400, 300) > dialog.center_on_screen Wx::BOTH > dialog.show true > dialog.evt_close do exit_main_loop end > end > end > app = App.new > app.main_loop > ===================================================== > > > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From greg.johnstons at comcast.net Mon Jun 20 20:07:32 2005 From: greg.johnstons at comcast.net (Greg Johnston) Date: Mon Jun 20 20:03:16 2005 Subject: [Wxruby-users] Linux Installation Problem Message-ID: <42B75A44.3000107@comcast.net> I've installed wxWidgets on Fedora Core 3 and I'm now trying to install wxRuby. extconf.rb ran correctly, but when I run make, I get the following error: wx.cpp:29: error: new declaration `int wxEntryStart(int&, char**)' /usr/local/include/wx-2.6/wx/init.h:29: error: ambiguates old declaration `boolwxEntryStart(int&, wxChar**)' make: *** [wx.o] Error 1 Any thoughts? From wxruby at qualitycode.com Tue Jun 21 06:18:51 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue Jun 21 06:14:34 2005 Subject: [Wxruby-users] Linux Installation Problem In-Reply-To: <42B75A44.3000107@comcast.net> References: <42B75A44.3000107@comcast.net> Message-ID: <42B7E98B.1090107@qualitycode.com> Greg Johnston wrote: > I've installed wxWidgets on Fedora Core 3 and I'm now trying to install > wxRuby. extconf.rb ran correctly, but when I run make, I get the > following error: > > wx.cpp:29: error: new declaration `int wxEntryStart(int&, char**)' > /usr/local/include/wx-2.6/wx/init.h:29: error: ambiguates old > declaration `boolwxEntryStart(int&, wxChar**)' > make: *** [wx.o] Error 1 > > Any thoughts? Hello. Which version of wxWidgets? Which version of wxRuby? At this time, wxRuby is only compatible with wxWindows 2.4.x, not wxWidgets 2.6.x. I believe some people have had success patching wxRuby and compiling with 2.6.x, but I can't remember for sure. You might search the list archives for hints. Kevin From alex at pressure.to Sun Jun 26 10:01:39 2005 From: alex at pressure.to (alex fenton) Date: Sun Jun 26 09:57:23 2005 Subject: [Wxruby-users] wxruby gems Message-ID: <42BEB543.8040901@pressure.to> Hi Following on from some talk last year of creating gems for wxruby, I've attached a first try at them (for 0.6.0, not wxruby-swig). I mainly made them because I want to ease installation of Weft QDA by adding wxruby (and sqlite) as gem dependencies, but hopefully they will be generally useful. A couple of queries: 1) Who should be listed as author? 2) It doesn't include docs - is there any way Zach's work on the docs can be incorporated 3) It doesn't include the samples I don't think 3) matters so much, particularly for people who just want to run an app that requires wxruby. But it'd be nice to fix 2) Also, I haven't got a compiling environment handy that can complete the source build, but I've run it far enough to verify that it calls 'extconf.rb; make; make install' in the right order. cheers alex -------------- next part -------------- require 'rubygems' WXRUBY_GEMSPEC = Gem::Specification.new do | s | s.name = 'wxruby' s.platform = Gem::Platform::WIN32 s.version = '0.6.0' s.summary = "Ruby interface to the WxWidgets GUI library" s.description = <<-EOF WxRuby provides an interface to the WxWidgets library. It enables the creation of GUI applications with native widgets on platforms including Windows, OS X and Linux. EOF s.files = [ 'wxruby.so' ] s.autorequire = 'wxruby' s.require_path = '.' s.has_rdoc = false s.author = "Alex Fenton" s.email = "alex@pressure.to" s.homepage = "http://wxruby.rubyforge.org/" s.rubyforge_project = "wxruby" end -------------- next part -------------- require 'rubygems' WXRUBY_GEMSPEC = Gem::Specification.new do | s | s.name = 'wxruby' s.version = '0.6.0' s.summary = "Ruby interface to the WxWidgets GUI library" s.description = <<-EOF WxRuby provides an interface to the WxWidgets library. It enables the creation of GUI applications with native widgets on platforms including Windows, OS X and Linux. EOF s.files = Dir[ 'src/*' ] s.autorequire = 'wxruby' s.require_path = 'lib' s.extensions << 'src/extconf.rb' s.has_rdoc = false s.author = "Alex Fenton" s.email = "alex@pressure.to" s.homepage = "http://wxruby.rubyforge.org/" s.rubyforge_project = "wxruby" end From alex at pressure.to Sun Jun 26 10:16:47 2005 From: alex at pressure.to (Alex Fenton) Date: Sun Jun 26 10:12:04 2005 Subject: [Wxruby-users] wxruby + GTK2.0 Message-ID: <42BEB8CF.1070105@pressure.to> I have a newly-installed Ubuntu linux box that I'm planning to use for wxruby development (thanks for the advice on remote desktops from this group). However, turns out that Ubuntu comes with GTK2.0, annd wxwidgets 2.6 is reportedly better and easier to build than 2.4.2 against this. Before I set off on a potentially fruitless compiling journey, I was wondering if anyone had had any success with wxruby (not wx-swig) with GTK2.0? My plan was to: 0) figure out where to find gtk2-dev in the ubuntu repositories 1) compile wx 2.6.1 2) apply Dmitry's patches to allow wxruby to build against 2.6.2 3) build and install wxruby Also, if I build Wx against GTK2.0, using --disable-shared --enable-static etc, will the compiled binary be usable on any Linux system (with suitable glibc), or will it only be usable on ones with GTK2 libraries? thanks alex From jani at iv.ro Mon Jun 27 05:13:35 2005 From: jani at iv.ro (Jani Monoses) Date: Mon Jun 27 05:10:44 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: <42BEB8CF.1070105@pressure.to> References: <42BEB8CF.1070105@pressure.to> Message-ID: Alex Fenton wrote: > I have a newly-installed Ubuntu linux box that I'm planning to use for > wxruby development (thanks for the advice on remote desktops from this > group). However, turns out that Ubuntu comes with GTK2.0, annd > wxwidgets 2.6 is reportedly better and easier to build than 2.4.2 > against this. You can install both gtk+1.2 and gtk2.0 in Ubuntu, and which one is used by various apps is decided at build-time By default wx2.4 is built with gtk+1.2 while wx2.5 against gtk2.0 wx2.5.3 which is the closest to 2.6 in ubuntu since wx2.6 has not yet been packaged for debian, so its not in ubuntu either. apt-cache search wx will list you lots of packages related to wx pick the ones you need to install.Their names are inconsistent and confusing to me at list (wx25, libwxgtk etc.) > Before I set off on a potentially fruitless compiling journey, I was > wondering if anyone had had any success with wxruby (not wx-swig) with > GTK2.0? My plan was to: > > 0) figure out where to find gtk2-dev in the ubuntu repositories it's called libgtk2.0-dev > 1) compile wx 2.6.1 > 2) apply Dmitry's patches to allow wxruby to build against 2.6.2 > 3) build and install wxruby Ah ok so you're building wx2.6 yourself. > Also, if I build Wx against GTK2.0, using --disable-shared > --enable-static etc, will the compiled binary be usable on any Linux > system (with suitable glibc), or will it only be usable on ones with > GTK2 libraries? I don't know, I have never built wx from source. But you may want to disable unicode on that build since with the default 2.5.3 with unicode enabled and gtk2 I could not make wxruby-swig display any string.From what Nick and Kevin said it seems to be a ruby/unicode problem which is not easy to fix in wx. Jani From wxruby at qualitycode.com Mon Jun 27 08:34:04 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon Jun 27 08:30:42 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: References: <42BEB8CF.1070105@pressure.to> Message-ID: <42BFF23C.7080601@qualitycode.com> Jani Monoses wrote: > > You can install both gtk+1.2 and gtk2.0 in Ubuntu, and which one is used > by various apps is decided at build-time > By default wx2.4 is built with gtk+1.2 while wx2.5 against gtk2.0 > wx2.5.3 which is the closest to 2.6 in ubuntu since wx2.6 has not yet > been packaged for debian, so its not in ubuntu either. Thanks for the Ubuntu info. Yes, I would *strongly* recommend sticking to wx 2.4 for now, unless you actually want to be a pioneer who is actually doing the port to 2.6. There should be no problem having GTK+1.2 and GTK+2.0 on your system at the same time. > I don't know, I have never built wx from source. > But you may want to disable unicode on that build since with the default > 2.5.3 with unicode enabled and gtk2 I could not make wxruby-swig display > any string.From what Nick and Kevin said it seems to be a ruby/unicode > problem which is not easy to fix in wx. Correct. As far as I am aware, nobody has successfully gotten wxRuby to work with a unicode build of wx. As a side note, I would like to remind everyone that the wxruby-swig build is the wxruby of the future. As far as I know, the swig version is as stable as 0.6.0, but just doesn't support as many classes. Unless you really need those extra classes, I would prefer to see you using wxruby-swig. Cheers, Kevin From wxruby at qualitycode.com Mon Jun 27 08:39:37 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon Jun 27 08:36:10 2005 Subject: [Wxruby-users] wxruby gems In-Reply-To: <42BEB543.8040901@pressure.to> References: <42BEB543.8040901@pressure.to> Message-ID: <42BFF389.50504@qualitycode.com> alex fenton wrote: > Hi Hi! > Following on from some talk last year of creating gems for wxruby, I've > attached a first try at them (for 0.6.0, not wxruby-swig). I mainly made > them because I want to ease installation of Weft QDA by adding wxruby > (and sqlite) as gem dependencies, but hopefully they will be generally > useful. Very cool. Thanks. > A couple of queries: > 1) Who should be listed as author? Hm. Most of wxruby 0.6.0 was authored by Park Heesob, but years ago, he asked me to remove his name from the project. I don't know how he feels about it today. I have probably written the next-most, but Nick is the current project maintainer. It seems like an error on the part of the gem spec designers to have named it 'author' instead of 'maintainer'. Assuming Nick is ok with it, I would propose something like: "wxruby development team". Folks can check the web site for current and detailed information. > 2) It doesn't include docs - is there any way Zach's work on the docs > can be incorporated > 3) It doesn't include the samples > > I don't think 3) matters so much, particularly for people who just want > to run an app that requires wxruby. But it'd be nice to fix 2) Perhaps there should be separate gems for wxruby-docs and wxruby-samples? > Also, I haven't got a compiling environment handy that can complete the > source build, but I've run it far enough to verify that it calls > 'extconf.rb; make; make install' in the right order. I wish I had time this week to try it out. I really want wxruby to be available as a gem. Especially the wxruby-swig version, since that's the one that will receive any of my available time. Kevin From jani at iv.ro Mon Jun 27 08:46:00 2005 From: jani at iv.ro (Jani Monoses) Date: Mon Jun 27 08:41:52 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: <42BFF23C.7080601@qualitycode.com> References: <42BEB8CF.1070105@pressure.to> <42BFF23C.7080601@qualitycode.com> Message-ID: > > > Correct. As far as I am aware, nobody has successfully gotten wxRuby to > work with a unicode build of wx. > > As a side note, I would like to remind everyone that the wxruby-swig > build is the wxruby of the future. As far as I know, the swig version is > as stable as 0.6.0, but just doesn't support as many classes. Unless you > really need those extra classes, I would prefer to see you using > wxruby-swig. I think issuing a release of wxruby-swig even in this early phase would send this signal stronger to the community and encourage them to use it ;) Jani From alex at pressure.to Mon Jun 27 15:46:34 2005 From: alex at pressure.to (alex fenton) Date: Mon Jun 27 15:42:27 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: <42BFF23C.7080601@qualitycode.com> References: <42BEB8CF.1070105@pressure.to> <42BFF23C.7080601@qualitycode.com> Message-ID: <42C0579A.40809@pressure.to> Kevin Smith wrote: > Thanks for the Ubuntu info. Yes, I would *strongly* recommend sticking > to wx 2.4 for now, unless you actually want to be a pioneer who is > actually doing the port to 2.6. There should be no problem having > GTK+1.2 and GTK+2.0 on your system at the same time. OK, thanks, I'll think I'll go with that. > As a side note, I would like to remind everyone that the wxruby-swig > build is the wxruby of the future. As far as I know, the swig version is > as stable as 0.6.0, but just doesn't support as many classes. Unless you > really need those extra classes, I would prefer to see you using > wxruby-swig. In this case, I do - I'm porting an app that uses quite a few missing classes & methods. Re wxruby-swig, seems that for the time being we're hamstrung by lack of C++ developer time (totally fine, people have real lives...). But please do anyone shpit when that chnages - I'm v happy to do .i files and samples - I have a couple of the former that work on OS X, but have some tricky methods (.i files are a nice way of documenting them) and need testing on Win32 & Linux etc. a From alex at pressure.to Mon Jun 27 17:56:52 2005 From: alex at pressure.to (alex fenton) Date: Mon Jun 27 17:52:40 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: References: <42BEB8CF.1070105@pressure.to> Message-ID: <42C07624.9090305@pressure.to> Jani Monoses wrote: > You can install both gtk+1.2 and gtk2.0 in Ubuntu, and which one is used > by various apps is decided at build-time sorry to ask a stupid question, but how can I find a repository with gtk+1.2(-dev) in it? I've done a good deal of googling but no joy. > it's called libgtk2.0-dev and this one? i have "multiverse" added, but nothing doing. thanks very much a From wxruby at qualitycode.com Mon Jun 27 21:00:34 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon Jun 27 20:57:20 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: <42C07624.9090305@pressure.to> References: <42BEB8CF.1070105@pressure.to> <42C07624.9090305@pressure.to> Message-ID: <42C0A132.8070504@qualitycode.com> alex fenton wrote: > Jani Monoses wrote: > >> You can install both gtk+1.2 and gtk2.0 in Ubuntu, and which one is >> used by various apps is decided at build-time > > > sorry to ask a stupid question, but how can I find a repository with > gtk+1.2(-dev) in it? I've done a good deal of googling but no joy. At least on my ubuntu hoary system, libgtk1.2 is already in the main Libraries section (not universe or multiverse or non-free). Kevin From jani at iv.ro Tue Jun 28 02:24:00 2005 From: jani at iv.ro (Jani Monoses) Date: Tue Jun 28 02:20:23 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: <42C07624.9090305@pressure.to> References: <42BEB8CF.1070105@pressure.to> <42C07624.9090305@pressure.to> Message-ID: alex fenton wrote: > Jani Monoses wrote: > >> You can install both gtk+1.2 and gtk2.0 in Ubuntu, and which one is >> used by various apps is decided at build-time > > > sorry to ask a stupid question, but how can I find a repository with > gtk+1.2(-dev) in it? I've done a good deal of googling but no joy. > >> it's called libgtk2.0-dev > > > and this one? i have "multiverse" added, but nothing doing. > apt-cache search libgtk will list a lot of packages which got something to do with gtk.Among them you'll find libgtk1.2-dev and libgtk2.0-dev. As Kevin said they're in main so no need for the extra repos in this case, but since you'll probably need them for other packages do not forget to enable universe, multiverse is for non-free software. Jani From alex at pressure.to Tue Jun 28 22:43:02 2005 From: alex at pressure.to (alex fenton) Date: Tue Jun 28 22:39:29 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: References: <42BEB8CF.1070105@pressure.to> <42C07624.9090305@pressure.to> Message-ID: <42C20AB6.70807@pressure.to> > apt-cache search libgtk > will list a lot of packages which got something to do with gtk.Among > them you'll find libgtk1.2-dev and libgtk2.0-dev. > As Kevin said they're in main so no need for the extra repos in this > case, but since you'll probably need them for other packages do not > forget to enable universe, multiverse is for non-free software. Great, thanks for all the help Jani, Kevin. I got there in the end (Warty, rather than Hoary). The compounding problem was trying Synaptics package mgr for the first time, which allows you to choose repositories without providing any obvious reminder that you need to do "apt-get update" afterwards ... but it was very easy once i had the right repositories. apt-get install libwxgtk2.4-dev # deals with all the dependencies then set $use_xrc = false in extconf.rb manually copy include/wx/html/htmlproc.h into /usr/include/wx/html/ and all goes well with make, make install. one more question - my wxruby.so seems big, 10MB (compared to about 2MB on windows). anything i can do differently to make it smaller? - I would like to bundle it into a rubyscript2exe executable thanks again alex From wxruby at qualitycode.com Tue Jun 28 23:18:30 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue Jun 28 23:15:21 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: <42C20AB6.70807@pressure.to> References: <42BEB8CF.1070105@pressure.to> <42C07624.9090305@pressure.to> <42C20AB6.70807@pressure.to> Message-ID: <42C21306.1010704@qualitycode.com> alex fenton wrote: > > and all goes well with make, make install. Cool. > one more question - my wxruby.so seems big, 10MB (compared to about 2MB > on windows). anything i can do differently to make it smaller? - I would > like to bundle it into a rubyscript2exe executable It sounds like it may have debugging information. You probably want to strip the library. Um. I don't have the instructions handy at the moment. This looks like a promising web page, but I haven't actually tried it: http://www.faqs.org/docs/linux_scratch/chapter06/aboutdebug.html If you have trouble figuring that out, let me know and I can re-research it for you. I know I did it at one point. Kevin From alex at pressure.to Wed Jun 29 07:20:21 2005 From: alex at pressure.to (alex fenton) Date: Wed Jun 29 07:15:40 2005 Subject: [Wxruby-users] Re: wxruby + GTK2.0 In-Reply-To: <42C21306.1010704@qualitycode.com> References: <42BEB8CF.1070105@pressure.to> <42C07624.9090305@pressure.to> <42C20AB6.70807@pressure.to> <42C21306.1010704@qualitycode.com> Message-ID: <42C283F5.6090007@pressure.to> > It sounds like it may have debugging information. You probably want to > strip the library. Um. I don't have the instructions handy at the > moment. This looks like a promising web page, but I haven't actually > tried it: Perfect, strip --strip-debug wxruby.so reduces it to a much slimmer 1.2Mb. Thanks again a