summaryrefslogtreecommitdiff
path: root/src/node_version.h
diff options
context:
space:
mode:
authorJoão Reis <reis@janeasystems.com>2015-09-23 13:33:09 +0100
committerJoão Reis <reis@janeasystems.com>2015-10-01 11:50:51 +0100
commita6aab430936c4c2791dbb29d8adec9d9a12f9376 (patch)
treea455d76672ed183bd19f681fa15f0cd5409106cb /src/node_version.h
parentd32363ff2049a5d6f53d3e9ce7255c474838a6d5 (diff)
downloadandroid-node-v8-a6aab430936c4c2791dbb29d8adec9d9a12f9376.tar.gz
android-node-v8-a6aab430936c4c2791dbb29d8adec9d9a12f9376.tar.bz2
android-node-v8-a6aab430936c4c2791dbb29d8adec9d9a12f9376.zip
build,win: fix node.exe resource version
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 <orangemocha@nodejs.org> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'src/node_version.h')
-rw-r--r--src/node_version.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/node_version.h b/src/node_version.h
index dd0f456948..37dee1e5a8 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