[Interest] x-platform way to pull app version?

Prav pr12og2 at programist.ru
Wed Feb 10 10:12:05 CET 2016


> On Monday 01 February 2016 20:20:51 André Somers wrote:
>> Easiest is to let your buildsystem generate some cpp code with the version
>> numbers in each build. We compiled in version number, git id an time & date
>> with a simple script called from qmake on every build.

> Note that it's a bad idea to embed the time and date. A build from the exact
> same sources should produce the exact same binary.
But  problem  exist  already  many  decades  even if I want to get same
binary I can not!

This is because simple compilation produces DIFFERENT binaries (at least
on Windows) while executing sequentially two times on same machine ...
even for console application with

void main() {}

source code.

Here is the real result:

Comparing files D:\test1.exe and D:\test2.exe
000000E0: 02 08

Here test1.exe   and  test2.exe  are  result  of  building "void main() {}"
source code two times

Funny?! :)




More information about the Interest mailing list