From 02a2c12ceece8c8071aeb8cc64ee1eee1afd3e9f Mon Sep 17 00:00:00 2001 From: Ryan Lucia Date: Mon, 28 Jan 2019 16:43:36 -0500 Subject: [PATCH] Enable version.ps1 on windows version.ps1 itself still has to be modified to support out-of-tree builds --- build/meson.build | 6 +++++- build/version.ps1 | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build/meson.build b/build/meson.build index df569be2c..0240f4671 100644 --- a/build/meson.build +++ b/build/meson.build @@ -1,4 +1,8 @@ -version_sh = find_program('./version.sh') +if host_machine.system() == 'windows' + version_sh = find_program('.\\version.ps1') +else + version_sh = find_program('./version.sh') +endif version_inc = include_directories('.') version_h = custom_target('git_version.h', command : [version_sh, meson.source_root()], diff --git a/build/version.ps1 b/build/version.ps1 index 8a1769356..caea09f02 100644 --- a/build/version.ps1 +++ b/build/version.ps1 @@ -1,3 +1,4 @@ +#!/usr/bin/env powershell $lastSvnRevision = 6962 $lastSvnHash = '16cd907fe7482cb54a7374cd28b8501f138116be' $defineNumberMatch = [regex] '^#define\s+(\w+)\s+(\d+)$' @@ -86,4 +87,4 @@ $gitVersionXml = [xml]@' $gitVersionXml.Project.PropertyGroup.GitVersionNumber = $gitRevision.ToString() $gitVersionXml.Project.PropertyGroup.GitVersionString = $gitVersionString -$gitVersionXml.Save($gitVersionXmlPath) \ No newline at end of file +$gitVersionXml.Save($gitVersionXmlPath)