Change title of first menu in Mac OS

Hi List,

currently I’m experimenting with wxRuby. I’m want to create a multi-
platform application which feels native on all three systems (OS X,
Linux, Windows). Currently one small thing is bohering me on Mac OS.
My applications first menu is alway called “ruby”. I would like my
applications name to be the first menu-name like in every other OS X
application. I tried setting app_name, vendor_name, class_name of my
App class, but it doen’t help.

Any ideas?

Regards,
Timo

Hello Timo,

This has been discussed before. The reason for the problem, is that Mac
OS
X uses executable bundle name for the first entry, so if you want to
change
the name, you need to make a copy of the ruby interpreter, and rename it
as
your App name, then create a script, to actually execute it.

Example: Application name is Rudle

[[email protected]: ~/Rudle] cp /usr/bin/ruby .
[[email protected]: ~/Rudle] mv ruby Rudle
[[email protected]: ~/Rudle] echo “Rudle app/rudle.rb” rudle
[[email protected]: ~/Rudle] chmod a+x rudle

Hi,

thanks for the quick answer. Before I wrote to the list I was
searching for this “problem” bt I couldn’t find the mentioned
discussion. Do you have a link?

Regards,
Timo

Am 23.10.2009 um 23:57 schrieb Mario S.:

Mario S. wrote:

This has been discussed before. The reason for the problem, is that
Mac OS X uses executable bundle name for the first entry, so if you
want to change the name, you need to make a copy of the ruby
interpreter, and rename it as your App name, then create a script, to
actually execute it.

Just to add to what Mario said - if it’s a “bare” compiled executable on
OS X, then the filename of the executable (eg “ruby”) is automatically
the name of the application menu, as you’ve found. You can change the
name of the executable.

I think it should also be possible to do this by bundling the whole lot
into a “proper” Mac OS application bundle, which is a special sort of
directory with a properties list. Have a look for searches on this list
which discuss “Platypus”, and perhaps something here on wxPython:

http://wiki.wxpython.org/Optimizing%20for%20Mac%20OS%20X

also have a look at this work by Daniel Zepeda, wihch generalised some
things I’d done to get a completely native-feeling GUI app on OS X
(dealing with things like icon etc).

http://www.ruby-forum.com/topic/184701

cheers
alex

Hi Alex,

Am 24.10.2009 um 13:08 schrieb Alex F.:

You can change the name of the executable.
Thanks for pointing me into the right direction. I’ll take a look into
this later. First the application has to be written…

also have a look at this work by Daniel Zepeda, wihch generalised
some things I’d done to get a completely native-feeling GUI app on
OS X (dealing with things like icon etc).

http://www.ruby-forum.com/topic/184701

This sound very interesting, but the git url in the announcement
doesn’t work anymore. Any idea where I can get wxRubyTemplate from?

Regards,
Timo

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs