From d6ac547d5db149aafa617c75080798fbab00814b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20Reis?= Date: Wed, 23 Sep 2015 13:33:09 +0100 Subject: [PATCH] build,win: fix node.exe resource version MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When MSBuild invokes rc.exe, it passes NODE_TAG unstringified, but passes it correctly to cl.exe. Hence, this workaround was made to apply only to the resource file. Fixes: https://github.com/nodejs/node/issues/2963 PR-URL: https://github.com/nodejs/node/pull/3053 Reviewed-By: Alexis Campailla Reviewed-By: Johan Bergström --- src/node_version.h | 9 +++++++++ src/res/node.rc | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/node_version.h b/src/node_version.h index 7176779..803314a 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -18,12 +18,21 @@ # else # define NODE_TAG "-pre" # endif +#else +// NODE_TAG is passed without quotes when rc.exe is run from msbuild +# define NODE_EXE_VERSION NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \ + NODE_STRINGIFY(NODE_MINOR_VERSION) "." \ + NODE_STRINGIFY(NODE_PATCH_VERSION) \ + NODE_STRINGIFY(NODE_TAG) #endif # define NODE_VERSION_STRING NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \ NODE_STRINGIFY(NODE_MINOR_VERSION) "." \ NODE_STRINGIFY(NODE_PATCH_VERSION) \ NODE_TAG +#ifndef NODE_EXE_VERSION +# define NODE_EXE_VERSION NODE_VERSION_STRING +#endif #define NODE_VERSION "v" NODE_VERSION_STRING diff --git a/src/res/node.rc b/src/res/node.rc index 587843d..b2f7f30 100644 --- a/src/res/node.rc +++ b/src/res/node.rc @@ -32,8 +32,8 @@ BEGIN VALUE "CompanyName", "Node.js" VALUE "ProductName", "Node.js" VALUE "FileDescription", "Node.js: Server-side JavaScript" - VALUE "FileVersion", "NODE_VERSION_STRING" - VALUE "ProductVersion", "NODE_VERSION_STRING" + VALUE "FileVersion", NODE_EXE_VERSION + VALUE "ProductVersion", NODE_EXE_VERSION VALUE "OriginalFilename", "node.exe" VALUE "InternalName", "node" VALUE "LegalCopyright", "Copyright Node.js contributors. MIT license." -- 2.7.4