Archive for the ‘Mac’ Category
Import photos from iPhone without iPhoto
So how do you transfer your photos from the iPhone 3G to your laptop running OS X if you don’t have iPhoto app? — Easy, just use the buit in app called Image Capture.
The app can be run from: Finder -> Applications -> Image Capture

Now, you can either download some or all photos by clicking on either one of the bottons as shown in the screenshot. Remember that you should have the iPhone connected to your copmuter, otherwise you would see the message saying the no device found or connected.
Apache 2 Config File
I’ve been using Apache httpd on and off on my PowerBook for various purposes including school assignments. The httpd version that comes with the PowerBook by default is 1.3.33 and I need to use the version 2.*. So, I installed the Apache 2 via Fink.
After having successfully installed Apache 2, we need to make some changes to the config file (usually, it is the httpd.conf file.) Guess what? I totally forgot where that file resides. The only thing I could remember is that we can find that information out very easily by giving the -v option to the httpd. So, I tried it and this is what I got:
$ ./httpd -v
Server version: Apache/2.0.55
Server built: Mar 13 2006 12:44:02
Ahhh… that’s not what I wanted to know. I scratched my head, and and this time I try it with the -V option:
$ ./httpd -V
Server version: Apache/2.0.55
Server built: Mar 13 2006 12:44:02
Server’s Module Magic Number: 20020903:11
Architecture: 32-bit
Server compiled with….
-D APACHE_MPM_DIR=”server/mpm/worker”
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT=”/sw/var/apache2″
-D SUEXEC_BIN=”/sw/var/apache2/bin/suexec”
-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”
-D DEFAULT_ERRORLOG=”logs/error_log”
-D AP_TYPES_CONFIG_FILE=”/sw/etc/apache2/mime.types”
-D SERVER_CONFIG_FILE=”/sw/etc/apache2/httpd.conf”
The correct option is -V (capital V), and the path to the configuration file is:
/sw/etc/apache2/httpd.conf.
LBreakout2 for Mac OS X
LBreakout2 is another multi-platform game written by the same programmer as LBreakout. The new features of the games include more than 50 levels, level editor and networking, which enables user to play on-line by connecting to LBreakout2 server. I haven't tried that yet though. You can find more info at the LBreakout2 homepage.
Let's check out the screen-shot:

A tip to compile this game for Mac OS X is to configure the source with the nls disable. I'm not very sure what nls is either if you ask me what it is. Anyway, if you wanna compile it for your Mac OS X, you need to get/do the following:
- SDL, SDL Mixer, SDL Net, and PNG installed first
- Get the source code of the game: lbreakout2-2.6beta-5.tar.gz
- Untar it,
$ tar -xzvf lbreakout2-2.6beta-5.tar.gz - Configure the source:
$ ./configure --disable-nls $ make(like usual, it'll take awhile)$ sudo make install- To run the game, type
$ lbreakout2
For Mac OS X users, there is already a pre-compiled game, nicely packed for you for LBreakout2. If compiling game is not your cup of tea, get the dmg file here: breakout2-2.5beta-3.dmg
Enjoy!
Compiling libpng for Mac OS X
I thought Mac OS X comes with libpng pre-installed. It's pretty clear that I was wrong after I failed to compile a game that uses libpng. The good thing about OS X is that, you can just use fink to easily install Unix/Linux binaries. However, the weird thing is, the game configuration still complains that libpng could not be found.
So I decided to install libpng from the source code. In case anyone of you out there who may face the same problem as me, you could do as what I describe below.
- Download the library source code from libpng.org.
- Untar it:
$ tar -xjvf libpng-1.2.8.tar.bz2 - Go into the libpng-1.2.8 directory, and copy the makefile.darwin out
$ cd libpng-1.2.8
$ cp scripts/makefile.darwin makefile - Run make:
$ make(It's gonna take a while) - Install the compiled library into appropriate place:
$ make install - Clean up the
messobject files:
$ make clean
That's it. The requirement, of which I should have mentioned earlier, to compile libpng is the zlib. I hope you have zlib installed first.
Using Java 5 on Mac OS X Tiger
Mac OS X Tiger still uses the J2SE 1.4 as default Java virtual machine and compiler. If you need to upgrade to JDK 5, you have to download it from Apple download site.
After you install it, you need to change a symlink to point to the JDK 5:
$ cd /System/Library/Frameworks/JavaVM.framework/Versions/
$ sudo mv Current Current.old
$ ln -s 1.5 Current
$ mv CurrentJDK CurrentJDK.old
$ ln -s 1.5 CurrentJDK
Now, let's check if you have Java 5:
$ java -version
java version "1.5.0_05"Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83)Java HotSpot(TM) Client VM (build 1.5.0_05-48, mixed mode, sharing)
Credit: Jeff Mesnil's Weblog