summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2012-07-11 20:38:17 +0100
committerattilamolnar <attilamolnar@hush.com>2012-07-27 00:14:43 +0200
commit746932587a11255e098c3b528afc6fcb4fc00902 (patch)
treebdf90455603eeda3e082c91b9797853fa2fb7f41 /win
parent6dbcfc3858cf58fa457bf6990760083c8a051feb (diff)
Don't hard code the branch version.
Diffstat (limited to 'win')
-rw-r--r--win/configure.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/win/configure.cpp b/win/configure.cpp
index ee03b3659..768b68cc5 100644
--- a/win/configure.cpp
+++ b/win/configure.cpp
@@ -275,7 +275,11 @@ void Run()
fclose(fI);
}
else
- strcpy(version, "InspIRCD-Unknown");
+ strcpy(version, "InspIRCd-0.0.0");
+
+ string branch(version);
+ branch.erase(branch.find_last_of('.'));
+
#ifdef WIN64
printf_c("Your operating system is: \033[1;32mwindows_x64 \033[0m\n");
#else
@@ -351,6 +355,7 @@ void Run()
sc(TGREEN); printf(" done\n"); sc(TNORMAL);
printf("Writing inspircd_version.h...");
f = fopen("inspircd_version.h", "w");
+ fprintf(f, "#define BRANCH \"%s\"\n", branch.c_str());
fprintf(f, "#define VERSION \"%s\"\n", version);
fprintf(f, "#define REVISION \"%s\"\n", revision.c_str());
fprintf(f, "#define SYSTEM \"%s\"\n", machine_text);