Skip to content

Implement build version/commit hash display to identify exact build version #1010

@xezon

Description

@xezon

Currently our build does not say what version it is.

Our build is compatible with Retail Generals 1.08, Zero Hour 1.04, so we will not change the game version that is displayed in the Options Menu and saved into Replays.

Instead we show a new custom build info.

In OmniBlade's unassemblize we have reference code that can create a revision number and commit hash in cmake builds.

We can then use that to build a string like

r100 ~c0de123 by The Super Hackers

Ideally we also say what compiler it was made with. I do not know how to get that info.

And then we can append that to the Window Title. Or print it in a corner in the Main Menu. Or in the Options Menu.

Cmake

set(GIT_PRE_CONFIGURE_FILE "gitinfo.cpp.in")
set(GIT_POST_CONFIGURE_FILE "${CMAKE_CURRENT_BINARY_DIR}/gitinfo.cpp")

Cpp

https://github.com/xezon/unassemblize/blob/develop/gitinfo.cpp.in
https://github.com/xezon/unassemblize/blob/develop/gitinfo.h
https://github.com/xezon/unassemblize/blob/develop/src/version.cpp

Metadata

Metadata

Assignees

Labels

BuildAnything related to building, compilingMinorSeverity: Minor < Major < Critical < Blocker

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions