Remove global GIT_COMMIT_HASH define, use GitVersionHash global var

* On windows, the change in a global GIT_COMMIT_HASH define in each
  project needing it meant a full rebuild every time the commit changed.
* Ideally we'd set the define only on one file in each project, but
  MSBuild doesn't seem to support that. Instead we make a new tiny
  project that compiles a single cpp exporting a global var, and
  reference that global var in each other project.
This commit is contained in:
baldurk
2018-01-16 20:17:53 +00:00
parent 654fa1bb6c
commit dea21b20a0
18 changed files with 158 additions and 39 deletions
+4 -2
View File
@@ -873,7 +873,9 @@ void MainWindow::SetTitle(const QString &filename)
if(RENDERDOC_STABLE_BUILD)
text += lit(FULL_VERSION_STRING);
else
text += tr("Unstable release (%1 - %2)").arg(lit(FULL_VERSION_STRING)).arg(lit(GIT_COMMIT_HASH));
text += tr("Unstable release (%1 - %2)")
.arg(lit(FULL_VERSION_STRING))
.arg(QString::fromLatin1(GitVersionHash));
if(QString::fromLatin1(RENDERDOC_GetVersionString()) != lit(MAJOR_MINOR_VERSION_STRING))
text += tr(" - !! VERSION MISMATCH DETECTED !!");
@@ -2181,7 +2183,7 @@ void MainWindow::on_action_Send_Error_Report_triggered()
QVariantMap json;
json[lit("version")] = lit(FULL_VERSION_STRING);
json[lit("gitcommit")] = lit(GIT_COMMIT_HASH);
json[lit("gitcommit")] = QString::fromLatin1(GitVersionHash);
json[lit("replaycrash")] = 1;
json[lit("report")] = (QString)report;