What I have successfully done so far is to include the following string in my main 
file (the one with PilotMain in it):

const char project_revision[] = "$ProjectRevision: 0.1 $";

This string is automatically updated by the version control software (MKS Source 
Integrity) when I checkpoint the project.

Then, when my application's "about" form is displayed, I use the following function to 
construct a version string to display:

#define ifdigit( x )  ( ( ( x >= '0' ) && ( x <= '9' ) ) ? 1:0 )
void extract_project_revision( char *str, int n )
{
    int i = 0;
    char *pr = ( char * ) project_revision;
    
    MemSet( str, n, 0 );

    while( *pr++ )
    {
        if( ( ( *pr == '.' ) || ( ifdigit( *pr ) ) ) && ( i < n ) )
        {
            str[ i ] = *pr;
            i++;
        }
    }
}

This works fine, but now my application's "about" screen will not agree with the Palm 
info screen when you select the version display, which shows the version of all 
installed applications, unless I manually change the version string for the project in 
the project settings in Constructor. The problem is, adding the project_revision 
string to the resource, which is not ASCII like my source code files, is something I 
don't know how to do. And even if I did, I then need a way to extract just the numeric 
part (0.1) as I did with the above function, and I need to set the extracted value to 
be used for the resource's version string. Is this even possible?

Dave Heil
Preco Electronics
[EMAIL PROTECTED] 
208-322-4288


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to