U++ framework
Do not panic. Ask here before giving up.

Home » Community » U++ Webs: Functioning, Layout , Design, Features and Structure of these forums, homepage etc. » Automatically embedding Git version information during compilation in TheIDE
Automatically embedding Git version information during compilation in TheIDE [message #62032] Fri, 03 July 2026 13:34
nikitha_k is currently offline  nikitha_k
Messages: 9
Registered: July 2023
Location: Banglore
Promising Member
Hi everyone,

I am developing an application using U++ and building it with TheIDE on Debian.
I would like to automatically embed version information into my executable at compile time, similar to how the compiler provides the predefined macros __DATE__ and __TIME__.

My goal is to include information such as:
* Git tag (e.g. v1.4.0)
* Git commit hash
* Build date and time

so that the application can display it, for example:
App --version
App --git
App --build

or from within the application's About dialog.

I would prefer to embed this information during compilation so that the executable contains the version information even when Git is not available on the target system.
Is there a built-in mechanism in TheIDE to execute a command before compilation or define custom compile-time macros from the output of a command (for example, `git describe --tags` or `git rev-parse --short HEAD`)?

If not, what is the recommended U++ approach for automatically embedding Git version information into an executable?

Thank you.

[Updated on: Fri, 03 July 2026 13:35]

Report message to a moderator

Previous Topic: Wikipedia - name change
Goto Forum:
  


Current Time: Sun Jul 12 19:48:19 GMT+2 2026

Total time taken to generate the page: 0.00497 seconds