From carl at resnikoff.net Thu Dec 29 20:21:55 2005 From: carl at resnikoff.net (Carl Resnikoff) Date: Thu, 29 Dec 2005 17:21:55 -0800 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions Message-ID: Hi. Forgive me if I am asking questions that have already been answered a million times, but there doesn't seem to be an easy way to search the wxruby-users archives, so... I tried to install wxruby for the Mac by downloading the latest Mac package installer from rubyforge.org/frs/download.php/1985/wxruby-0.6.0-osx-panther.dmg and tried to run some of the wxruby-0.6.0/samples from the unix command line. At first none of the examples would run, but then I figured out that the wxruby installer was creating a /usr/lib/ruby/1.6 directory and putting files there instead of the standard /usr/lib/ruby/1.8 directory that comes with Mac OS 10.4. (I am running 10.4.3). After hand copying the wxruby.bundle into /usr/lib/ruby/1.8/powerpc-darwin8.0 I could then run most of the examples, with two problems. 1) Dozens of messages on startup of the form: /usr/lib/ruby/1.8/powerpc-darwin8.0/wxruby.bundle: warning: defining Wx::XX.allocate is deprecated; use rb_define_alloc_func() 2) Non of the examples that use Menus seem to work, all I see is a single "ruby" menu. As far as number 2), I see that README.osx has a paragraph that says "Applications under OS X require resource bundles. Most side effects of this have been minimized as much as possible, but Without the wxMac resource files, the wxMenuBar does not work properly." Unfortunately, I'm not quite sure what this means. What are the wxMac resource files, where do I get them, and how would I make a command-line invocation of Ruby know about them. thanks for any light anyone can shed... Carl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20051229/bb4c9fcb/attachment.htm From artooro at gmail.com Thu Dec 29 21:12:05 2005 From: artooro at gmail.com (Arthur Wiebe) Date: Fri, 30 Dec 2005 02:12:05 +0000 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: References: Message-ID: > > "Applications under OS X require resource bundles. Most side effects > of this have been minimized as much as possible, but Without the wxMac > resource files, the wxMenuBar does not work properly." > > Unfortunately, I'm not quite sure what this means. What are the wxMac > resource files, where do I get them, and how would I make a command-line > invocation of Ruby know about them. > > thanks for any light anyone can shed... > Carl > > This means your ruby application needs to be inside an application bundle. This is a directory structure containing special files. You can see examples by right+clicking on any app and choosing "Show Package Contents". For more specific help on how to build bundles for ruby scripts, I cannot help yet. -- - http://sourceforge.net/users/artooro/ - http://artooro.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20051230/bef7f210/attachment.htm From alex at pressure.to Fri Dec 30 09:55:12 2005 From: alex at pressure.to (Alex Fenton) Date: Fri, 30 Dec 2005 14:55:12 +0000 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: References: Message-ID: <43B54A50.1090402@pressure.to> Arthur Wiebe wrote: > "Applications under OS X require resource bundles. > > This means your ruby application needs to be inside an application > bundle. This is a directory structure containing special files. You > can see examples by right+clicking on any app and choosing "Show > Package Contents". > > For more specific help on how to build bundles for ruby scripts, I > cannot help yet. This message from this list might be of interest: http://rubyforge.org/pipermail/wxruby-users/2004-December/001065.html I haven't tried the procedure myself, but I'd be interested to hear how it goes. As a side note, if you're on OS X you might consider trying wxruby2. It's based on WxWidgets 2.6 which included improved support for OS X over 2.4. You'd have to compile 2.6 and wxruby2 yourself, or I probably have a recent wxruby2.bundle somewhere. alex From carl at resnikoff.net Fri Dec 30 23:21:35 2005 From: carl at resnikoff.net (Carl Resnikoff) Date: Fri, 30 Dec 2005 20:21:35 -0800 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: <43B54A50.1090402@pressure.to> References: <43B54A50.1090402@pressure.to> Message-ID: At 2:55 PM +0000 12/30/05, Alex Fenton wrote: > > >http://rubyforge.org/pipermail/wxruby-users/2004-December/001065.html > >I haven't tried the procedure myself, but I'd be interested to hear how >it goes. > >As a side note, if you're on OS X you might consider trying wxruby2. >It's based on WxWidgets 2.6 which included improved support for OS X >over 2.4. You'd have to compile 2.6 and wxruby2 yourself, or I probably >have a recent wxruby2.bundle somewhere. > >alex > Thanks Alex, that looks like it will do the trick, I will try it as soon as I finish compiling everything. I was able to compile WxWidgets 2.6 and wxMac-2.6.2 on OS X 10.4.3 successfully , but I am getting a compilation error building wxruby2 from the latest source. A lot of files do compile, but when trying to compile RubyConstants.cpp, I get multiple errors of the form src/RubyConstants.cpp: In function 'void Init_wxRubyConstants()': src/RubyConstants.cpp:2601: error: 'wxART_TOOLBAR_C' was not declared in this scope. I've been poking through the code, but I can't figure out where the wxART_XX_C symbols were supposed to have been defined and why they are not. Can anybody help? thanks, Carl g++ -c -I/usr/local/lib/wx/include/mac-ansi-release-2.6 -I/usr/local/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -arch i386 -arch ppc -Os -pipe -fno-common -arch i386 -arch ppc -pipe -pipe -fno-common -x objective-c++ -I /usr/local/src/ruby-1.8.2 -I /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/bin -I /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib -I /usr/lib/ruby/site_ruby/1.8 -I /usr/lib/ruby/site_ruby/1.8/powerpc-darwin8.0 -I /usr/lib/ruby/site_ruby -I /usr/lib/ruby/1.8 -I /usr/lib/ruby/1.8/powerpc-darwin8.0 -I . -o obj/RubyConstants.o src/RubyConstants.cpp src/RubyConstants.cpp: In function 'void Init_wxRubyConstants()': src/RubyConstants.cpp:2601: error: 'wxART_TOOLBAR_C' was not declared in this scope src/RubyConstants.cpp:2602: error: 'wxART_MENU_C' was not declared in this scope src/RubyConstants.cpp:2603: error: 'wxART_FRAME_ICON_C' was not declared in this scope src/RubyConstants.cpp:2604: error: 'wxART_CMN_DIALOG_C' was not declared in this scope etc. From artooro at gmail.com Sat Dec 31 09:01:23 2005 From: artooro at gmail.com (Arthur Wiebe) Date: Sat, 31 Dec 2005 14:01:23 +0000 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: References: <43B54A50.1090402@pressure.to> Message-ID: I got the same error when building awhile ago. If I recall correctly simply removing the lines from RubyConstants.cpp starting at 2601 fixes the problem temporarily. Although it's quite the ugly fix. On 12/31/05, Carl Resnikoff wrote: > > At 2:55 PM +0000 12/30/05, Alex Fenton wrote: > > > > > >http://rubyforge.org/pipermail/wxruby-users/2004-December/001065.html > > > >I haven't tried the procedure myself, but I'd be interested to hear how > >it goes. > > > >As a side note, if you're on OS X you might consider trying wxruby2. > >It's based on WxWidgets 2.6 which included improved support for OS X > >over 2.4. You'd have to compile 2.6 and wxruby2 yourself, or I probably > >have a recent wxruby2.bundle somewhere. > > > >alex > > > Thanks Alex, that looks like it will do the trick, I will try it as soon > as I finish compiling everything. > I was able to compile WxWidgets 2.6 and wxMac-2.6.2 on OS X 10.4.3successfully , > but I am getting a compilation error building > wxruby2 from the latest source. A lot of files do compile, but when > trying > to compile RubyConstants.cpp, I get multiple errors of the form > > src/RubyConstants.cpp: In function 'void Init_wxRubyConstants()': > src/RubyConstants.cpp:2601: error: 'wxART_TOOLBAR_C' was not declared in > this scope. > > I've been poking through the code, but I can't figure out where the > wxART_XX_C symbols were supposed to have been defined and why they are > not. > Can anybody help? > thanks, Carl > > > > g++ -c -I/usr/local/lib/wx/include/mac-ansi-release-2.6-I/usr/local/include/wx- > 2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES > -DNO_GCC_PRAGMA -arch i386 -arch ppc -Os -pipe -fno-common -arch i386 > -arch ppc -pipe -pipe -fno-common -x objective-c++ -I /usr/local/src/ruby- > 1.8.2 -I /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/bin -I > /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib -I /usr/lib/ruby/site_ruby/1.8 > -I /usr/lib/ruby/site_ruby/1.8/powerpc-darwin8.0 -I > /usr/lib/ruby/site_ruby -I /usr/lib/ruby/1.8 -I /usr/lib/ruby/1.8/powerpc- > darwin8.0 -I . -o obj/RubyConstants.o src/RubyConstants.cpp > src/RubyConstants.cpp: In function 'void Init_wxRubyConstants()': > src/RubyConstants.cpp:2601: error: 'wxART_TOOLBAR_C' was not declared in > this scope > src/RubyConstants.cpp:2602: error: 'wxART_MENU_C' was not declared in this > scope > src/RubyConstants.cpp:2603: error: 'wxART_FRAME_ICON_C' was not declared > in this scope > src/RubyConstants.cpp:2604: error: 'wxART_CMN_DIALOG_C' was not declared > in this scope > etc. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- - http://sourceforge.net/users/artooro/ - http://artooro.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20051231/905746d1/attachment-0001.htm From wxruby at qualitycode.com Sat Dec 31 12:43:59 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sat, 31 Dec 2005 12:43:59 -0500 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: References: <43B54A50.1090402@pressure.to> Message-ID: <43B6C35F.9080107@qualitycode.com> Carl Resnikoff wrote: > I was able to compile WxWidgets 2.6 and wxMac-2.6.2 on OS X 10.4.3 successfully , > but I am getting a compilation error building > wxruby2 from the latest source. A lot of files do compile, but when trying > to compile RubyConstants.cpp, I get multiple errors of the form > > src/RubyConstants.cpp: In function 'void Init_wxRubyConstants()': > src/RubyConstants.cpp:2601: error: 'wxART_TOOLBAR_C' was not declared in this scope. > > I've been poking through the code, but I can't figure out where the > wxART_XX_C symbols were supposed to have been defined and why they are not. > Can anybody help? That is odd. Those are (sort of) defined in , but I don't think that's the problem. The relevant lines in my srx/RubyConstants.cpp have "wxART_TOOLBAR_C" inside quotes, which would prevent the error you are seeing. That leads me to believe that you may be using a different version of swig. What version of swig are you using? Can you paste in your RubyConstants.cpp line 2601 so I can see it? Also, you might try deleting the "_C" from each of the relevant constants in swig/RubyConstants.i. Finally, deleting those constants entirely (as suggested by someone else) should be completely safe. It would just prevent you from using those ArtProvider related features in your wxruby apps. Cheers, Kevin From carl at resnikoff.net Sat Dec 31 13:41:32 2005 From: carl at resnikoff.net (Carl Resnikoff) Date: Sat, 31 Dec 2005 10:41:32 -0800 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: <43B6C35F.9080107@qualitycode.com> References: <43B54A50.1090402@pressure.to> <43B6C35F.9080107@qualitycode.com> Message-ID: Hi Kevin. I'm using swig 1.3.27, and the offending lines in RubyConstants.cpp all look like: rb_define_const(mWxRubyConstants,"ART_MENU", rb_str_new2(wxART_TOOLBAR_C)); Carl At 12:43 PM -0500 12/31/05, Kevin Smith wrote: >Carl Resnikoff wrote: >> I was able to compile WxWidgets 2.6 and wxMac-2.6.2 on OS X 10.4.3 successfully , >> but I am getting a compilation error building >> wxruby2 from the latest source. A lot of files do compile, but when trying >> to compile RubyConstants.cpp, I get multiple errors of the form >> >> src/RubyConstants.cpp: In function 'void Init_wxRubyConstants()': >> src/RubyConstants.cpp:2601: error: 'wxART_TOOLBAR_C' was not declared in this scope. >> >> I've been poking through the code, but I can't figure out where the >> wxART_XX_C symbols were supposed to have been defined and why they are not. >> Can anybody help? > >That is odd. Those are (sort of) defined in , but I don't >think that's the problem. > >The relevant lines in my srx/RubyConstants.cpp have "wxART_TOOLBAR_C" >inside quotes, which would prevent the error you are seeing. That leads >me to believe that you may be using a different version of swig. > >What version of swig are you using? > >Can you paste in your RubyConstants.cpp line 2601 so I can see it? > >Also, you might try deleting the "_C" from each of the relevant >constants in swig/RubyConstants.i. > >Finally, deleting those constants entirely (as suggested by someone >else) should be completely safe. It would just prevent you from using >those ArtProvider related features in your wxruby apps. > >Cheers, > >Kevin >_______________________________________________ >wxruby-users mailing list >wxruby-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/wxruby-users From wxruby at qualitycode.com Sat Dec 31 16:03:34 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sat, 31 Dec 2005 16:03:34 -0500 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: References: <43B54A50.1090402@pressure.to> <43B6C35F.9080107@qualitycode.com> Message-ID: <43B6F226.9040600@qualitycode.com> Ok. That probably explains it. I'm using 1.3.24 myself. Apparently the newer version handles this differently: %constant const char * ART_TOOLBAR = wxART_TOOLBAR_C; Regardless of that, can you try removing the _C from each of those problem constants in swig/RubyConstants.i and see if that fixes it? Thanks, Kevin Carl Resnikoff wrote: > Hi Kevin. > I'm using swig 1.3.27, and the offending lines in RubyConstants.cpp all look like: > > rb_define_const(mWxRubyConstants,"ART_MENU", rb_str_new2(wxART_TOOLBAR_C)); > > Carl > > At 12:43 PM -0500 12/31/05, Kevin Smith wrote: > >>Carl Resnikoff wrote: >> >>>I was able to compile WxWidgets 2.6 and wxMac-2.6.2 on OS X 10.4.3 successfully , >>>but I am getting a compilation error building >>>wxruby2 from the latest source. A lot of files do compile, but when trying >>>to compile RubyConstants.cpp, I get multiple errors of the form >>> >>>src/RubyConstants.cpp: In function 'void Init_wxRubyConstants()': >>>src/RubyConstants.cpp:2601: error: 'wxART_TOOLBAR_C' was not declared in this scope. >>> >>>I've been poking through the code, but I can't figure out where the >>>wxART_XX_C symbols were supposed to have been defined and why they are not. >>>Can anybody help? >> >>That is odd. Those are (sort of) defined in , but I don't >>think that's the problem. >> >>The relevant lines in my srx/RubyConstants.cpp have "wxART_TOOLBAR_C" >>inside quotes, which would prevent the error you are seeing. That leads >>me to believe that you may be using a different version of swig. >> >>What version of swig are you using? >> >>Can you paste in your RubyConstants.cpp line 2601 so I can see it? >> >>Also, you might try deleting the "_C" from each of the relevant >>constants in swig/RubyConstants.i. >> >>Finally, deleting those constants entirely (as suggested by someone >>else) should be completely safe. It would just prevent you from using >>those ArtProvider related features in your wxruby apps. >> >>Cheers, >> >>Kevin >>_______________________________________________ >>wxruby-users mailing list >>wxruby-users at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wxruby-users > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From carl at resnikoff.net Sat Dec 31 18:36:30 2005 From: carl at resnikoff.net (Carl Resnikoff) Date: Sat, 31 Dec 2005 15:36:30 -0800 Subject: [Wxruby-users] WxRuby newbie Mac OS 10.4 install questions In-Reply-To: <43B6F226.9040600@qualitycode.com> References: <43B54A50.1090402@pressure.to> <43B6C35F.9080107@qualitycode.com> <43B6F226.9040600@qualitycode.com> Message-ID: Removing the '_C' from the constants in swig/RubyConstants.i make the compile work. thanks, Carl At 4:03 PM -0500 12/31/05, Kevin Smith wrote: >Ok. That probably explains it. I'm using 1.3.24 myself. Apparently the >newer version handles this differently: > > %constant const char * ART_TOOLBAR = wxART_TOOLBAR_C; > >Regardless of that, can you try removing the _C from each of those >problem constants in swig/RubyConstants.i and see if that fixes it? > >Thanks, > >Kevin > > >Carl Resnikoff wrote: >> Hi Kevin. >> I'm using swig 1.3.27, and the offending lines in RubyConstants.cpp all look like: >> >> rb_define_const(mWxRubyConstants,"ART_MENU", rb_str_new2(wxART_TOOLBAR_C)); >> > > Carl >>