Story build date/time and inform build?

I’m trying to rewrite the banner text to give a more detailed build description during the development phase. Specifically I’m trying to replace

“Release 1 / Serial number 150322 / Inform 7 build 6L38 (I6/v6.33 lib 6/12N) SD”
with something more like
“Test Build 2015-03-22 13:20 / Inform 7 build 6L38 (I6/v6.33 lib 6/12N) SD”

with a fuller timestamp and not calling it a ‘release’. I can replace the banner just fine, but I’m having a hell of a time trying to find the build time, or Inform versions. Could someone help me out?

This text is generated by the I6 Banner() routine (which starts by invoking the printing the banner activity).

The code that prints that line is:

        VM_Describe_Release();
        print " / Inform 7 build ", (PrintI6Text) NI_BUILD_COUNT, " ";
        print "(I6/v"; inversion;
        print " lib ", (PrintI6Text) LibRelease, ") ";
        #Ifdef STRICT_MODE;
        print "S";
        #Endif; ! STRICT_MODE
        #Ifdef DEBUG;
        print "D";
        #Endif; ! DEBUG
	new_line;

You’d have to write similar I6 code, or replace the VM_Describe_Release() routine.

You can give some of those I7 wrappers to make it a bit easier.

To say I7 version:
    (- PrintI6Text(NI_BUILD_COUNT); -).
To say I6 library version:
    (- PrintI6Text(LibRelease); -).
To say I6 compiler version:
    (- inversion; -).

The release and serial number are a bit more complicated, but for Glulx you can do it this way.

Include (-
[ GetReleaseNumber i;
    @aloads ROM_GAMERELEASE 0 i;
    return i;
];

[ PrintSerialNumber i;
    for (i=0 : i<6 : i++) print (char) ROM_GAMESERIAL->i;
];
-).

To decide what number is the release version:
    (- GetReleaseNumber() -).

To say serial number:
    (- PrintSerialNumber(); -).

It looks like I can get what I want by just overriding VM_Describe_Release (because that’s not ‘evil’ at all!), but it doesn’t look like Inform (either of them :stuck_out_tongue:) has equivalents to the C preprocessor’s DATE and TIME? That makes life a bit harder… still possible, of course, at absolute worst I can write a wrapper around ni.exe, but harder. :neutral_face:

That’s correct.

Do you think it’s worth adding? (To Inform 6.) It would be fairly easy. Would more projects use it?

…now that I think about it, it would be only medium-easy. :slight_smile: They would be string constants, but we’d have to make sure they did not occupy compiled string space in game files that did not actually use them.

I have a feeling I’m pretty weird for wanting every individual build to be easily distinguishable, even when I’m doing dozens a day. Most people only care about the publicly released ones, and if you’re doing those more than once a day without incrementing the release number you’re probably doing something wrong.

There is also a checksum that you can use to distinguish individual builds.

Sure, but having to checksum the file and look at a list isn’t particularly ‘easy’ :stuck_out_tongue: