torsdag 16 december 2010

Androids, Androids everywhere

So, app number one has been yelled at in the market for some week and app number two is ready to be delivered. I'm almost a REAL android hacker now, who could have believed ?

To be honest, app number one was a simple try to get to know the procedure. I mean, nobody really needed an app that wrote and told them random insults. But it was fun to play with, and I learned a lot from it. My intention is to write a tutorial about it, the hard parts (expect for the speech, that was actually a little tricky with the localization) were the ads. Well, I settled for admob and adwhirl, but to actually generate some money, you'll need more networks for sure.

Anyway, I plan to release a BeerSweeper game, hopefully I'll manage to get adsense network in that but who knows...

torsdag 2 december 2010

Getting started with an amazing Android app

Well, there's two things in the universe that a pragmatic programmer needs to deal with today to be future-proof, the cloud and mobile apps. I've already played with googles appengine and Microsofts Azure so it's time to play with mobile apps. (To be honest, I've cheated with it before but never built anything worth mentioning).

Since I'm the owner of a HTC Desire I will build a small android app, create a market account, get some ads in it (perhaps it might be enough revenue to get a saturday pizza?) and publish it for the world to admire.

To get going, there are some things needed. The gurus recommends eclipse for development, so I need that one. I need to spice it up with the android plugins, that means adding https://dl-ssl.google.com/android/eclipse/ as an update site and get everything offered. I also need the android-sdk and the tools that come with it.

That would do to get started, but there a lot of other tools. I highly recommend DroidDraw for designing the GUI, the others I haven't used.. yet.

måndag 29 november 2010

PHP? Me?

It is kind of weird, I have probably made "hello world" - alike applications in almost every weird language out there. However, I haven't touched PHP since version 3x and I never made anything seious with it. I went on to Java, Python and Ruby. I admit, I actually didn't like PHP that much, putting code and HTML in the same file was not a nice way to do it. And with PHP 3x .. you could forget all about OOP.

However, it looks like I might end up doing some PHP in my "bread and butter" coding, so I started to peek at it again. I found some OOP tutorials over at KillerPHP and well, I don't feel like vomiting just yet..

söndag 14 november 2010

Gorm & ProjectCenter

Long day today, and since it's fathers day and I happen to be one, there hasn't been much time playing with GNUstep. Howeverm I concluded that most of the documentation and turorial isn't realy up to date. Most of them won't actually work at all, so my hope is that old apple/xcode documentation might be useful.

Anyway, this short instruction video seem to work, better try that out when the kids hit the bed. 

lördag 13 november 2010

Hello Objective-C

No solution to the evil Gorm association in ProjectCenter so far. However, I use WindowMaker and Gvim and do some GNUstep/Objective-C coding anyway.

Just to make sure that everything is working, here's some nice GNUstep code to display a panelalert.

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>

int 
main (void)
{
  NSAutoreleasePool *pool;
  
  pool = [NSAutoreleasePool new];
  
  [NSApplication sharedApplication];
  
  NSRunAlertPanel (@"Test", @"Hello from the GNUstep AppKit", 
                   nil, nil, nil);

  return 0;
}
To build this one in the terminal, you better write a GNUmakefile. That's actually the name you have to give it. (you can read all about it here )
the content for now should be

include $(GNUSTEP_MAKEFILES)/common.make
APP_NAME = FirstApp
FirstApp_OBJC_FILES = source.m
include $(GNUSTEP_MAKEFILES)/application.make
Simply type "make" and there's your .app. Run it with "openapp ./FirstApp.app".
If "make" gives you a headache, make sure you have the GNUstep-dev package installed if you went the app-get path, and check your variables with "env | grep GNU". (ignore the old GNU_ROOT.. variables though)

fredag 12 november 2010

Daily struggle and PDFKit

This day I have two problems to solve. I would like to get my WindowManager to look better, move away not needed components (since I run Gwortkspace) and persist a better resolution.
More important, I need to be able to open Project-Centers .gorm files with Gorm so that I can build the worlds most fashionable Objective-C application upon the face of the earth,

A note, a helpful member of the GNUstep mailinglist hinted that the following instructions might have helped PDFKit
./configure --with-freetype2-includes=/usr/include/freetype2
--with-freetype2-library=/usr/lib
I will definietly try that out next build! 

So stupid...

Sometimes, everything moves to fast.
GWorkspace is a GNUstep app. You don't run GNUstep apps like ./ appname. You run GNUstep apps with "openapp GWorkspace" .. and yes, everything worked fine so far.
Now I'm heading off having some "be ashamed" drinks..

Troublesome workspace

So far this day is not a huge success. I noticed that Gworkspace needed PDFKit to work at it's best. Well, at least to be able to display PDF metadata in the fileviewer. However, I never managed to get PDFKit to compile since it kept babbling about old freetype2 headers. I compiled and installed GWorkspace anyway, and it didn't complain. Until i tried to start it, all I got was ugly
GWorkspace: error while loading shared libraries: libFSNode.so.0: cannot open shared object
In my face. No clue about that, and since I was unsure about whenever I would get one, I simply went on with my windowmaker session. Now windowmaker never was a favorite of mine, but it's fast.

So, not sure wether or not I should go for Gworkspace again or simply build my GNUstep apps and run it on wmaker. I could, of course, head for Etoile also.. Better play with Gorm and think about it.

torsdag 11 november 2010

Installing GNUstep

So, I have this clean Ubuntu 10.04 installation. Now, all I need are some GNUstep, but which path should a young apprentice walk? There are gnustep packages in the Debian/Ubuntu repository, but after consulting the gnustep mailinglist I'm advised to only install dependencies and then get the GNUstep-core form subversion.

An "up to date" dependency listy wasn't easy to find, but I googled my way and learned that these ones were needed for the 8.04 release so I apt-getted those for starters.


subversion (for downloading GNUstep from svn repository)
gobjc
libxmu-dev
libcairo2-dev (cairo backend)
libart-2.0-dev (art backend)
libxslt1.dev
libtiff4-dev
libgif-dev
libssl-dev
libgmp3-dev
libffcall1-dev
libaspell-dev
libcups2-dev



I then headed over to the subversion repos and checked out the core module
svn co http://svn.gna.org/svn/gnustep/modules/core core
After that, the INSTALL file tells me that I need to run the good old "./configure, make, make install" on the different packages. (make, base, gui, back). So, here I can relax and watch the magic as sourcecode transforms into applications on my screen.. poetry... and nothing for the impatient.
If there are any complains from configure about missing packages, install them . I for example had to throw in libffi to keep him satisfied.
The first major problem came with the installation of the gui package when it complained about libgnustep-base. It seem that you really need to be root here, and have the right environment variables setup. I did this to keep going
$ sudo su
$ . /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
$ make install
Thats it, next time I'll try to get a default desktop. GWorkspace  is the first candidate.

History of GNUstep

While I'm waiting for a new install and update of Ubuntu 10.04 (yes I'm a chicken, I go with the old ubuntu software - think it's better for GNUstep dependencies) I read Chisnalls old article about the GNUstep history. Interesting reading, highly recommended.

Going GNUstep

I've always had a thing for Linux. Ever since I installed a fresh Red Hat 5.0 and spent a week getting KDE pre 1.0 and sound to work. It was great, nothing is like firing up bash and do some serious scripting, that's for sure.
However, work has driven me from the linux playground and I only fire up a virtual machine now and then just for the joy of it.
But maybe that's about to change. The success of Mac & iPhone has made obscure programming languages like Objective-C kind of "hot" again. and since I always need to now something about everything (especially "hot" stuff) I need to play around with Objective-C. I am not keen about buying a mac yet though, so I thought I will go the free route. That means, install a fresh Ubuntu and try to get old GNUstep installed with some nice theme. (Grey sucks). Stay tuned for more info,...