summaryrefslogtreecommitdiff
path: root/infrastructure/msvc
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-10-16 23:08:13 +0000
committerChris Wilson <chris+github@qwirx.com>2006-10-16 23:08:13 +0000
commitac19a2d757e850964718a5b3b6fe9032feb20f4d (patch)
treef67e7f473f552fb46969d2c738ead66480961b5b /infrastructure/msvc
parenta9badc2ab3f243402c3a7638bd7942021ea1f6cc (diff)
Added a script to determine the build version on Win32 MSVC. (refs #3)
Diffstat (limited to 'infrastructure/msvc')
-rw-r--r--infrastructure/msvc/getversion.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/infrastructure/msvc/getversion.pl b/infrastructure/msvc/getversion.pl
new file mode 100644
index 00000000..12554d01
--- /dev/null
+++ b/infrastructure/msvc/getversion.pl
@@ -0,0 +1,19 @@
+#!perl
+
+$basedir = $0;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+-d $basedir or die "$basedir: $!";
+chdir $basedir or die "$basedir: $!";
+
+require "$basedir\\infrastructure\\BoxPlatform.pm.in";
+
+open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h"
+ or die "BoxVersion.h: $!";
+print VERSIONFILE "#define BOX_VERSION \"$BoxPlatform::product_version\"\n";
+close VERSIONFILE;
+
+exit 0;