diff --git a/.gitignore b/.gitignore index a85f1ca..e1d77d3 100644 --- a/.gitignore +++ b/.gitignore @@ -202,3 +202,6 @@ Packaging/*.exe *.msix *.appxbundle *.msixbundle + +# Auto-generated per-build version counter (BuildCounter.txt is committed) +version_build.h diff --git a/BuildCounter.txt b/BuildCounter.txt new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/BuildCounter.txt @@ -0,0 +1 @@ +4 diff --git a/TaskbarCalculator.rc b/TaskbarCalculator.rc index de76033745ca6ca49e3bad035663602788e659d6..abf31f1c4c30521662d6905df7377a590c01eeb9 100644 GIT binary patch delta 63 zcmdntalmRr0_)}nJZ*xLugHo`4&YQ_En-M!Fq-^R)^zhUxos?yzcGqTUM9ddIgV3| R9W2G5G?|fk`Q&%XUI5}f63HwGUDM+SF>U*a9|n-|$_$wdX$&b0sSIfh z3JmcKE)1>=P7I+8?qFGjLlGuHOfY1qhZ&H{ki$^SkV-&<0o=k=hCGH8u(couAgu6b z2!=Y(guws|O`v)ZYC;$y83GtwLF#lEDj19~6a+JbGB`0HDPyQ$FktYRe4kZX+lj%4 z!Joky912Pd!3-q~MGTn?c?{_cZVZ_WISi=`o(y>mX$<)cN|UA8wB=FN8!#Z8mBe7c zpfuT#O?0vbo7`jtE)MlD21f=ThETB6lo*^D@)>d&3K$X@@)#-^{1_4$av4$?lo)g- z3v$acDorlrlhsGn0ds*1Ln=ctLo(Q91q>w&nGE?1d0?H2ocfc?_#~{c>w_mvn0f{U z1|p`wgMAhxX zkjjt_)(7%&0YfF&-RTS&3?(2pgWZ5BqrjlS;LM=Opuk`Rj%Gs!T` + + + $(MSBuildProjectDirectory)\BuildCounter.txt + $(MSBuildProjectDirectory)\version_build.h + + + + + + <_OldBuildCounter>@(_BuildCounterLines) + <_OldBuildCounter Condition="'$(_OldBuildCounter)' == ''">0 + <_NewBuildCounter>$([MSBuild]::Add($(_OldBuildCounter), 1)) + + + + + diff --git a/version.h b/version.h new file mode 100644 index 0000000..82b8edc --- /dev/null +++ b/version.h @@ -0,0 +1,14 @@ +#pragma once + +// Semantic version — edit these by hand (NOT in the VS resource editor). +#define VER_MAJOR 3 +#define VER_MINOR 0 +#define VER_BUILD 1 + +// Per-build counter. version_build.h is regenerated on every build by the +// IncrementBuildCounter MSBuild target (BeforeTargets="ResourceCompile"), so it +// always exists at resource-compile time. The #ifndef is a safety fallback. +#include "version_build.h" +#ifndef VER_BUILDNUM +# define VER_BUILDNUM 0 +#endif