Adding Timestamps in Applications at time of Export

Hi all,

I was hoping this might be quite an easy one. but haven’t been able to find an answer.
When exporting an application in processing4 , does anybody know an easy way to store the time at export into the code without manually having to enter it into the code itself.

Thanks in advance.

Lee

Hi @pyronox,

What you can do is to write a build script (.bat or .sh) which replaces a tag (ie. #TIMESTAMP#) in your code and afterwards call processing-java for the export.
Run processing-java --help to see which params needs to be used …

Cheers
— mnse

Hi @mnse,

Thats a good idea - and I will look into it. Thank you @mnse.

Thanks

Hi @pyronox,

but better make it with a special file for it, not .pde itself…
ie:

|-MyPrj
  |-MyPrj.pde (load version.txt and ie. display it)
  |-data
    |-version.txt (file with version)

in the script than…ie (sh):

#!/bin/bash
date "+%Y-%m-%d %H:%M:%S" > data/version.txt
processing-java ... --export ...

Cheers
— mnse