Skip to content

Commit 6256e00

Browse files
Update main.cpp
k
1 parent 1e7279a commit 6256e00

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

main.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ This is kept as a bunch of strings to be easier to call than a dictionary, map,
5353
Less words to type ;)
5454
*/
5555
std::string forkAuthor = ""; // if this is a fork of this project, put your name here! Please be nice and leave my name too :)
56-
std::string version = "v0.1.0"; // Version of this Windows port
56+
#define STRINGIZE2(x) #x
57+
#define STRINGIZE(x) STRINGIZE2(x)
58+
std::string version = []() {
59+
#ifdef VERSION_NUMBER
60+
return std::string(STRINGIZE(VERSION_NUMBER)); // Release builds only
61+
#else
62+
return std::string("dev-build"); // Local builds - no env var check
63+
#endif
64+
}();
5765
thread_local std::string currentParentExe = ""; // to store the name of our own parent process for error hints
5866

5967
std::string WideToString(const std::wstring& wstr);

0 commit comments

Comments
 (0)