Monday 27 October 2008

MacBookPro Matte Display Petition

http://www.PetitionOnline.com/38djhak2/petition.html

Probably won't have any effect but give it a go.

Sunday 12 October 2008

Ftp Server / Servlet for cocoa

Before I got interested in Lighttpd I had been working on an Ftp Server for my projects.

I've decided that lighttpd is to complex for me to incorporate at the moment, so I'm releasing my source code to my server and hope that people might find it useful.

I'd also be very glad if people help make it better.

You can find it at http://code.google.com/p/diddyftpserver/


upload/download works from filezilla and transmit. i havent implemented all of ftp's commands yet

I've opened a google group for discussing the server code you can find it here
http://groups.google.com/group/diddyftpserver

Saturday 11 October 2008

Finding Shared libraries

Have you ever wished you could work out what program uses which libraries. On os x the tool is otool.



I found the information here and its been a great help Al Hoangs blog

Friday 10 October 2008

Compiling lighttpd for iphone

After writing my own ftp server for my app, I decided that webdav was a way better solution as so many have found out.  Using the instructions at http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html
and with the help of Alice at http://gothcandy.com/alice/2007/09/05/81/porting-lighttpd-to-the-iphone/   I think I have it compiling, but after all that, I wonder if its actually useful to me....
doh!
anyway here's the shell script to compile..
you also need to copy in 2 header files from the simulator to let it compile..
these are 

/bzlib.h and crt_externs.h

If anyone has some advice how I could incorporate this into an app, do let me know.
cheers


#/bin/bash

export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS2.1.sdk
export SIMROOT=/Developer/Platforms/iPhoneSimulator.platform

# Save relevant environment
U_CC=$CC
U_CFLAGS=$CFLAGS
U_LD=$LD
U_LDFLAGS=$LDFLAGS
U_CPP=$CPP
U_CPPFLAGS=$CPPFLAGS

export CPPFLAGS="-I$SDKROOT/usr/lib/gcc/arm-apple-darwin9/4.0.1/include/ -I$SDKROOT/usr/include/"
# -I$SIMROOT/Developer/SDKs/iPhoneSimulator2.1.sdk/usr/include/"
export CFLAGS="$CPPFLAGS -arch armv6 -pipe -no-cpp-precomp -isysroot $SDKROOT"
export CPP="/usr/bin/cpp $CPPFLAGS"

# dynamic library location generated by the Unix package
#LIBPATH=src/.libs/.dylib
#LIBNAME=`basename $LIBPATH`
#,-dylib_install_name,@executable_path/$LIBNAME"
export LDFLAGS="-L$SDKROOT/usr/lib/ -Wl,-dylib_install_name,@executable_path/$LIBNAME"


echo $CPPFLAGS
echo $LDFLAGS
read -p "Press a key"

# static library that will be generated
LIBPATH_static=src/.libs/lighttpd.a
LIBNAME_static=`basename $LIBPATH_static`

./configure CC=$DEVROOT/usr/bin/arm-apple-darwin9-gcc-4.0.1 LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin -without-pcre

# --libdir=$SDKROOT/usr/lib/ --includedir=$SDKROOTk/usr/include/
make



#mkdir -p lnsout
#cp $LIBPATH_static lnsout/$LIBNAME_static.arm
exit