Friday, March 30, 2007

Customizing the executable

I'm currently working on an NetBeans RCP based app, spending a huge
amount of my time on the platform. I got around to customizing the
application that I'm working on, and I did recall Geertjan's post about cleaning up
the app from the NetBeans specific stuff. Geertjan did mention that
you could fix the executable icon (on Windows) by using the resource
editor on the built zip file. Well, the altenative is to make a copy
of the executable from your ${harness.dir}/launchers/app.exe to your
local project dir, edit the executable resources by using the Resource
Hacker that Geertjan recommended, and modify the build script to use
the modified executable to use your updated executable for building
your app. So, the changes to my harness build file are as described
below. It is indeed a bit of a hack, as one I'd imagine that it
wouldn't be advisable to edit the global build scripts (that build for
all projects); however, it seems that this is a more universal need
for platform developers - one should be able to totally customize the
branding of the application. While the majority of the work is
possible to be done within NetBeans (with the excellent support of the
platform modules), the ability to customize the icon on the executable
is a very important one as well.

in the body of the build-launchers target ($platform_dir/harness/suite.xml):

right after :

<mkdir dir="${build.launcher.dir}/etc"/>
<mkdir dir="${build.launcher.dir}/bin"/>

Add the following :

<available file="branding/launcher/${}.exe" property="local.launcher.found" />
<antcall target="make-local-launcher" inheritall="true"/>

then, add a new target in the same file

<target name="make-local-launcher" unless="local.launcher.found">
<mkdir dir="branding/launcher" />
<copy file="${harness.dir}/launchers/app.exe"
tofile="branding/launcher/${}.exe" overwrite="false"/>

Monday, March 26, 2007

Vanished "Sun Smart Ticket" demo app

I'm in the process of scrambling some resources together for my thesis project which has to do with J2ME and video delivery. Now, I've been working on this project (on and off) for the last 1.5 years, so it's been a while since I went back to look at all the resources that I had used at the very beginning.

So, one of the excellent resource that I used from the beginning was the Sun Smart Ticket J2ME & J2EE demo application. I used it to learn the "best practices" when I was getting started, and to a large degree I used it as a template for the first prototype that I built. So, I was quite surprised to find out that the application in question has just vanished from the internet : it was not on the Sun site, it was NOWHERE !!! It was mentioned on a couple of Sun publications, it was in Michael Yuan's excellent Enterprise J2ME book.. but the actual source to the server and j2me client has just vanished.. Evidently, it used to be a part of what the "Wireless Blueprints", which is no more, with nothing to replace it...

Well, to sum it up, I found a copy on a borland site, so I thought I'd give it a mention, just in case somebody else is scrambling to dig up this prescious resource. This just makes me wonder though, why is Sun trying to bury this demo... It was an excellent demo, with some pretty outstanding design ideas (which are a little complex, but after getting over the initial learning curve, they're sheer brilliance).. Well, that's a question that I should probably ask some of the J2ME people... it's open source now, right...