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 _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
Arthur Wiebe
2005-Dec-30 02:12 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
> > "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. -- <Arthur/> - 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
Alex Fenton
2005-Dec-30 14:55 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
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
Carl Resnikoff
2005-Dec-31 04:21 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
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.
Arthur Wiebe
2005-Dec-31 14:01 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
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 <carl at resnikoff.net> 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 >-- <Arthur/> - 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
Kevin Smith
2005-Dec-31 17:43 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
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 <wx/artprov.h>, 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
Carl Resnikoff
2005-Dec-31 18:41 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
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 <wx/artprov.h>, 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
Kevin Smith
2005-Dec-31 21:03 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
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 <wx/artprov.h>, 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
Carl Resnikoff
2005-Dec-31 23:36 UTC
[Wxruby-users] WxRuby newbie Mac OS 10.4 install questions
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 >>