Author: rjek
Date: Tue May 22 14:48:59 2007
New Revision: 3302
URL:
http://svn.semichrome.net?rev=3D3302&view=3Drev
Log:
Change version string format and include source to slotsize tool in autobui=
lder
Added:
trunk/netsurfbuild/slotsize2.c
Modified:
trunk/netsurfbuild/autobuild.pl
Modified: trunk/netsurfbuild/autobuild.pl
URL:
http://svn.semichrome.net/trunk/netsurfbuild/autobuild.pl?rev=3D3302&r=
1=3D3301&r2=3D3302&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/netsurfbuild/autobuild.pl (original)
+++ trunk/netsurfbuild/autobuild.pl Tue May 22 14:48:59 2007
@@ -16,17 +16,12 @@
my $root =3D (command("pwd"))[0];
chomp $root;
=
-# determine build date time
-my $date =3D (command("date -u '+%d %b %Y %H:%M'"))[0];
-chomp $date;
-my $version =3D "2.0 (Development) ($date)";
-my $pkg_version =3D (command("date -u '+0.%Y.%m.%d.%H%M'"))[0];
-chomp $pkg_version;
-
# update from repository
chdir "$root/netsurf";
my @update =3D command("svn update --non-interactive");
chdir $root;
+my @revlines =3D grep / revision /, @update;
+my ($revno) =3D ($revlines[0] =3D~ /(\d+)/); # get revison for version=
later
@update =3D grep !/^At revision/, @update;
=
# continue only if there were updates
@@ -34,6 +29,13 @@
print LOG "no updates\n";
exit;
}
+
+# determine build date time and version
+my $date =3D (command("date -u '+%d %b %Y %H:%M'"))[0];
+chomp $date;
+my $version =3D "2.0 TEST r$revno";
+my $pkg_version =3D (command("date -u '+0.%Y.%m.%d.%H%M'"))[0];
+chomp $pkg_version;
=
# this is a real run: make a real log
command('mv --verbose autobuild_try.log autobuild.log');
Added: trunk/netsurfbuild/slotsize2.c
URL:
http://svn.semichrome.net/trunk/netsurfbuild/slotsize2.c?rev=3D3302&vi=
ew=3Dauto
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/netsurfbuild/slotsize2.c (added)
+++ trunk/netsurfbuild/slotsize2.c Tue May 22 14:48:59 2007
@@ -1,0 +1,52 @@
+#include <stdio.h>
+
+struct header {
+ unsigned int decompress;
+ unsigned int selfreloc;
+ unsigned int zeroinit;
+ unsigned int entry;
+ unsigned int exit;
+ unsigned int rosize;
+ unsigned int rwsize;
+ unsigned int dbsize;
+ unsigned int zisize;
+ unsigned int dbtype;
+ unsigned int base;
+ unsigned int wkspace;
+};
+
+int main(int argc, char **argv)
+{
+ FILE *f;
+ struct header header;
+ unsigned int file_size;
+
+ if (argc !=3D 2)
+ return 1;
+
+ f =3D fopen(argv[1], "rb");
+ if (!f)
+ return 1;
+
+ fread((void*)&header, sizeof(struct header), 1, f);
+
+ fseek(f, 0, SEEK_END);
+ file_size =3D ftell(f);
+
+ fclose(f);
+
+ if ((header.entry >> 24) !=3D 0xEB)
+ return 1;
+
+ if (header.rosize + header.rwsize + header.dbsize !=3D file_size)
+ if ((header.decompress >> 24) !=3D 0xEB)
+ return 1;
+
+ file_size =3D header.rosize + header.rwsize + =
+ header.dbsize + header.zisize + =
+ 0x8000 /* 32k of scratch space */;
+
+ printf("%d", (file_size / 1024));
+
+ return 0;
+}