"Matt Disher (TiBook)" <[EMAIL PROTECTED]> wrote in message
news:81107@palm-dev-forum...
>
> I'm looking for a quick and dirty (read simple) method to include a
'build'
> version into an application. That I can display in the about box.
This can
> be as simple as date/time.
>
> I would like for this to be modified on the fly as CW builds my
project.
I don't have an automated script that will update for every build, but
for the SXSW schedule application, we had an interesting technique.
We were generating PDBs that had the schedule data and embedding them
into the application using resources. We did this using a Rez resource
file, which looked like
====
/* MergeDBs.r
*
* merge all the resource DBs for the panels, films, bands
* into the Palm OS executable
*/
read 'iPDB' (1000) "band_info.pdb";
read 'iPDB' (1001) "band_time.pdb";
read 'iPDB' (1002) "panel_info.pdb";
read 'iPDB' (1003) "panel_time.pdb";
read 'iPDB' (1004) "film_info.pdb";
read 'iPDB' (1005) "film_time.pdb";
resource 'tSTR' (1000) {
$$Date
};
resource 'tSTR' (1001) {
$$Time
};
====
So, whenever any of our PDBs would change, this file would get
recompiled, and we would get fresh string resources embedded in the
application with the date and time of the build. We could also force an
update by touching this file in the project window.
You could do this with C source code too, using the __DATE__ and
__TIME__ macros. As for version number, we just updated that in
Constructor manually when there was a code change, and had code in out
about box read back that resource and use it in the display.
Some people have used the Perl plugin for CodeWarrior to do this on
every build, and at least one person has written a compiler plugin to
handle updating build numbers, but I don't have anything to distribute
right now.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/