#!/usr/bin/perl

$major="0";
$minor="00";

if(open(file,"version.strings") )
{
	while(<file>)
	{
		if( /\"Version\"\s*\=\s*\"(\d+)\.(\d+)\"\;/)
		{
			$major=$1;
			$minor=$2+1;
		}
	}
	close(file);
}
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time());

open(file,">version.strings") || die "can't write version.strings";
	printf file "\"Version\" = \"%d.%d%d%d\";\n", $major,$minor/100,($minor/10)%10,$minor%10;
	printf file "\"VersionDate\" = \"Version: %d.%d%d%d    Date: %d.%d.%2d    Time:%2d.%d%d\";\n",$major,$minor/100,($minor/10)%10,$minor%10,$mday,$mon+1,$year,$hour,$min/10,$min%10;

close(file);
 
