File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,8 @@ jobs:
330330
331331 # Use cmd to call vcvarsall and then cl
332332 $outName = "win-witr-${{ matrix.arch }}.exe"
333- cmd /c "`"$vcvarsPath`" $vcvarsArch && cl /O2 /Ot /GL /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /Fe:$outName"
333+ $ver = "${{ needs.prepare.outputs.version_number }}"
334+ cmd /c "`"$vcvarsPath`" $vcvarsArch && cl /O2 /Ot /GL /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /DVERSION_NUMBER=\"$ver\" /Fe:$outName"
334335 if ($LASTEXITCODE -ne 0) {
335336 Write-Host "Build failed with exit code $LASTEXITCODE"
336337 Exit $LASTEXITCODE
Original file line number Diff line number Diff line change @@ -94,15 +94,11 @@ Less words to type ;)
9494*/
9595std::string forkAuthor = " " ; // if this is a fork of this project, put your name here! Please be nice and leave my name too :)
9696std::string version = []() {
97- `#ifdef` VERSION_NUMBER
98- return std::string (VERSION_NUMBER);
99- `#else `
100- char buf[256 ];
101- if (GetEnvironmentVariableA (" VERSION_NUMBER" , buf, sizeof (buf)) > 0 ) {
102- return std::string (buf);
103- }
104- return std::string (" v0.1.0" );
105- `#endif`
97+ #ifdef VERSION_NUMBER
98+ return std::string (VERSION_NUMBER); // Release builds only
99+ #else
100+ return std::string (" dev-build" ); // Local builds - no env var check
101+ #endif
106102}();
107103thread_local std::string currentParentExe = " " ; // to store the name of our own parent process for error hints
108104
You can’t perform that action at this time.
0 commit comments