mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 23:25:41 +00:00
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:
@@ -34,7 +34,7 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QString hash = lit(GIT_COMMIT_HASH);
|
||||
QString hash = QString::fromLatin1(GitVersionHash);
|
||||
|
||||
if(hash[0] == QLatin1Char('N') && hash[1] == QLatin1Char('O'))
|
||||
{
|
||||
@@ -43,11 +43,10 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->version->setText(
|
||||
QFormatStr("Version %1 (built from <a href='%2'>%3</a>)")
|
||||
.arg(lit(FULL_VERSION_STRING))
|
||||
.arg(lit("https://github.com/baldurk/renderdoc/commit/" GIT_COMMIT_HASH))
|
||||
.arg(lit(GIT_COMMIT_HASH).left(8)));
|
||||
ui->version->setText(QFormatStr("Version %1 (built from <a href='%2'>%3</a>)")
|
||||
.arg(lit(FULL_VERSION_STRING))
|
||||
.arg(lit("https://github.com/baldurk/renderdoc/commit/%1").arg(hash))
|
||||
.arg(hash.left(8)));
|
||||
}
|
||||
|
||||
#if defined(DISTRIBUTION_VERSION)
|
||||
|
||||
Reference in New Issue
Block a user