Showing posts with label OS X. Show all posts
Showing posts with label OS X. Show all posts

Friday, May 2, 2008

Intellij IDEA, OS X Leopard Spaces, Fixed with J2SE 6

Looks like the Java 1.6 update finally fixes the Java Swing/Spaces issues that have been so annoying for the last 10 months or so. Yay.

Saturday, November 3, 2007

OS X Leopard - Improved Terminal (almost perfect)

Sorry iTerm, my long friend. I may be giving you up now that Leopard's terminal has tabs and an over-all improved UI. Terminal starts up fast and is pretty dang stable. One gripe - "Why can't I name the tabs!" Ugh, this seems so obvious a feature. Yeah, you can use AppleScript to set the name of the overall window but that isn't all that helpful when you have multiple tabs open. Come on, this has got to be a two-day feature (one to implement, one to test).

Weird thing is that somewhere in Apple-land there is a small team that is responsible for maintaining Terminal. And they are programmers so you'd think that they'd make the shell as nice as possible and think of these features on their own.

Anyway, bravo for the improvements that did make it in but a small "boo" for my couple of wasted hours trying to figure out how to ActionScript custom tab names. Oh Apple, when you fall short, it really hurts.

Java 6 on OS X

Hey Apple, please be more vocal with your plans for Java. I love my mac and want to continue using it as my main development machine. I don't doubt good things are happening - just would like more (good) buzz out there. I've seen many Java developers be converted to mac (me included - now I own three macs and an iPhone) and then go on to spread the good word.

13949712720901ForOSX

Friday, March 16, 2007

Groovy on OS X and MacPorts

Update Note: This is still the case with Groovy 1.6.x and Leopard the same fix still works.

The default MacPorts install of groovy didn't work out of the box. When I ran groovy from the prompt I got a nasty java.lang.SecurityException.

The problem ended up being that my Java CLASSPATH included classes.jar.

The solution ended up clearing out the CLASSPATH system variable altogether before invoking groovy. You can do this with a command line switch but the easiest way to do it was to edit the startGroovy file (found in the /bin directory of the groovy installation). A fast way to find this is using Spotlight

I simply added CLASSPATH= as the first thing in the file:

...
##
## $Revision: 4298 $
## $Date: 2006-12-04 02:39:45 +0100 (Mo, 04 Dez 2006) $
##

CLASSPATH=

PROGNAME=`basename "$0"`
...

Thursday, January 25, 2007

Notes on getting Ruby on Rails working on my Powerbook 15

Used darwin ports to install ruby and rb-rubygems

I’m using z-shell so I needed to edit the

'~/Library/init/zsh/environment'

file to make sure that

'/opt/local/bin'

was the first folder on my path. Then I simply did a

gem install rake
gem install rails

This sounds simple but it only took 5 hours of digging to get right!

Come on Apple. If you are going to include Ruby then make sure you install it correctly.

ze environment is ze file to configure ze shell

Bad french aside, here are my notes for configuring the z-shell to find the Darwin Ports version of programs first.

~/Library/init/zsh

This path points to where the “environment” is set.

Edit this file and make sure that your /opt/local/bin folder comes first

prependPath PATH /usr/local/sbin
prependPath PATH /usr/local/bin
prependPath PATH ~/bin/powerpc-apple-darwin
prependPath PATH ~/bin
prependPath PATH /opt/local/bin

appendPath PATH /usr/local/mysql/bin
appendPath PATH /usr/bin
appendPath PATH /bin
appendPath PATH /usr/sbin
appendPath PATH /sbino
appendPath PATH /Developer/Tools

Note that prependPath and appendPath are functions defined earlier in the “environment” file.

Darwin Ports Notes

Warning: These notes are mostly plagarized from some other website but I wanted them on mine for easy lookup.,

sudo port selfupdate                   
sudo port upgrade
sudo port install vile
port search 'vile'

The search facility uses standard regular expression syntax, so you can also do much more complex searches. Additional Steps: fetch, configure, build, destroot, install

Once the port has been installed, you may want to delete all the intermediate files that DarwinPorts has created while building the port. To do this, simply use the clean option:

port clean vile
port clean --all vile

Getting Information about a Port

port info vim
port search '.+'
port list
port installed
port installed
port outdated
port contents vile

Variants and Dependencies

Before you install a port, you may want to check what variations of that port are available to use. Variants provide additional configuration options for a port. To see what variations a port has, use the variants option: port variants vile

You also may want to see what dependencies a port has. You can use the deps option to check: port deps vile

If you want to find out which ports depends on a port you have installed, use: port dependents gettext

For more information you should look at the port manpage by entering: man port. The portindex command

Most of the time you won’t need to use this command as it is used to build the index of all the available ports, but sometimes the index you have is out of date or innacurate for some reason. When this occurs you will get an error message like ‘port search failed: expected integer but got “PortIndex”’. You can fix problem by moving to the dports directory (/Users/mike/darwinports/dports in our examples) and executing: portindex. This will go through all the available ports in the dport directory and build an index file called PortIndex.

Removing ports

Ports are removed using the port command described above, simply execute the command: sudo port uninstall vile

Upgrading ports

You can check if a port is outdated with the following command: port outdated gnome

To check if you have any outdated ports: port outdated

To upgrade a port execute: sudo port upgrade gnome

This will deactivate the old version and install the new, and also install the newer versions of the dependencies of the port.

If you would like to upgrade the port, but not the dependencies of the port, you can: sudo port -n upgrade gnome

To upgrade all installed ports simply do: sudo port upgrade installed

If you dont like that upgrade just deactivates the old version of the port, you can get it to uninstall the old version by using the -u option: sudo port -u upgrade gnome

Using force

While upgrading you can run into cases when you have to use force (-f). This is especially true if you are upgrading a port that wants to install a file that another port allready has installed, or if you use the -u option to upgrade (and uninstall) a port that could be installed as a dependency. Allways remember to use the -f option with caution.