Hi,
Is there a BON Constant to get the Application build time?
I noticed the time is available as a string in my .debug.soar
section but I haven’t found the corresponding constant name nor its symbol.
Additionally, is there a description of the .debug.soar
section?
Thanks in advance.
Hi @medhi.j
You can retrieve the Architecture characteristics on which the Application is running, especially its version using Constants.getString("com.microej.architecture.version")
.
See MicroEJ Runtime — MicroEJ Documentation for more details
About the .debug.soar
section, it is an internal section used by our debug tools. You can find a brief description here: Architectures MCU / Compiler — MicroEJ Documentation
–Frédéric
Hi Frédéric, thanks for the answer.
So there is no way to retrieve the Application build time then?
For reference, here is the beginning of my .debug.soar
section:
Contents of section .debug.soar:
00000 43440e6b 92010000 43440e6b 92010000 CD.k....CD.k....
00010 caed670e 00000000 0001ddcc bbaa0000 ..g.............
00020 00000028 01000023 0a235475 65204f63 ...(...#.#Tue Oc
00030 74203038 2030393a 33353a35 30204345 t 08 09:35:50 CE
00040 53542032 3032340a 706c6174 666f726d ST 2024.platform
I was hoping to retrieve the timestamp stored there.
Best,
Hello
Sorry, you want the application build time.
Unfortunately the string you mention is in fact an unnecessary comment that is generated when a properties file is serialized to the debug infos section. I will file an internal ticket to remove it.
To get the application build time, you can extend your VEE Port to inject a new constant.
-
Goto to the dropins
folder of your configuration project
-
Create folders scripts/init-appconstant
-
Create a file names init.xml
within this folder
-
Add the following content to this file
<?xml version="1.0" encoding="UTF-8"?>
<project>
<import file="${scripts.dir}/extension-init.xml" />
<target name="init/appconstant" extensionOf="init/execution">
<tstamp>
<format property="application.buildLabel" pattern="yyyyMMdd-HHmm"/>
</tstamp>
<augment id="init.constants">
<propertyref name="application.buildLabel" />
</augment>
</target>
</project>
-
Rebuild your VEE Port
Now the build time is available in your Application using Constants.getString("application.buildLabel")
.
You are free to change the format of the timestamp, which follows the Java SimpleDateFormat specification.
1 Like