The Ruby only IDE, linked to from RubyInstallation, can be packaged and used as a regular Mac OS X application. To do this, there are a few steps to follow.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleExecutable</key> <string>nbrubyide</string> <key>CFBundleIconFile</key> <string>icons.icns</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>Base IDE</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>6.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>6.0.0.0.200705021220</string> </dict> </plist>
ln -s nbrubyide/nb6.0/netbeans.icns icons.icns
ln -s ../Resources/nbrubyide/bin/nbrubyide nbrubyide
If everything went well, double clicking the RubyNetBeans icon on your desktop will run the Ruby only IDE.
The Package icon for our new package can now be fixed:
Prior to the May26th build#3, the nbrubyide executable would not correctly show the dock icon when running, but this has been fixed in the latest builds. Should you need to run an earlier version, you can fix the problem manually. Edit the nbrubyide file, in RubyNetBeans.app/Contents/Resources/nbrubyide/bin, and locate the following:
"-J-Xdock:icon=$progdir/../nb6.0/netbeans.icns"/ \
Remove that forward slash. It should now look like:
"-J-Xdock:icon=$progdir/../nb6.0/netbeans.icns" \
Save the file, and that should fix the dock Icon when RubyNetBeans runs
With the above steps completed, the RubyNetBeans.app can be moved to the /Applications folder, or wherever else you feel happy to have it installed. It can then be dragged to the dock, and will act as a regular .app, with a proper icon (a Ruby style icns file would be even better of course), and no multiple icon ugliness.
When the latest Ruby only IDE is released, you can simply unzip it and replace the nbrubyide folder in RubyNetBeans.app/Contents/Resources.
If you need you own custom settings, as I do for UTF-8 encoding, you can set these in
~/Library/Application Support/nbrubyide/dev/etc/nbrubyide.conf
For example:
default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dfile.encoding=UTF-8"
Changes made in your user settings will persist across IDE updates, which is great, but it's worth checking your latest distribution nbrubyide.conf after long periods, in case the options are updated.
| Info.plist | ![]() |
666 bytes |