diff options
author | Yaniv Kamay <ykamay@redhat.com> | 2010-01-10 20:14:52 +0200 |
---|---|---|
committer | Yaniv Kamay <ykamay@redhat.com> | 2010-01-10 20:16:32 +0200 |
commit | 54535ba04e65e7815f572b7335713089907c7656 (patch) | |
tree | d7055e0369aca80ae50cf5370f36bfac624297b0 /client | |
parent | 884beed580aab5a3609473e9c9291e7f4c8d2e7c (diff) | |
download | spice-54535ba04e65e7815f572b7335713089907c7656.tar.gz spice-54535ba04e65e7815f572b7335713089907c7656.tar.xz spice-54535ba04e65e7815f572b7335713089907c7656.zip |
add patch id and distro name to version string
Diffstat (limited to 'client')
-rw-r--r-- | client/x11/main.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/client/x11/main.cpp b/client/x11/main.cpp index de920f9b..63b1134c 100644 --- a/client/x11/main.cpp +++ b/client/x11/main.cpp @@ -24,7 +24,22 @@ static void cleanup() log4cpp::Category::shutdown(); } -const char * version_str = VERSION; +static std::string full_version_str; + +static void init_version_str() +{ + full_version_str += VERSION; + + if (strlen(PATCHID)) { + full_version_str += "-"; + full_version_str += PATCHID; + } + + if (strlen(DISTRIBUTION)) { + full_version_str += "."; + full_version_str += DISTRIBUTION; + } +} int main(int argc, char** argv) { @@ -32,7 +47,8 @@ int main(int argc, char** argv) atexit(cleanup); try { - exit_val = Application::main(argc, argv, version_str); + init_version_str(); + exit_val = Application::main(argc, argv, full_version_str.c_str()); LOG_INFO("Spice client terminated (exitcode = %d)", exit_val); } catch (Exception& e) { LOG_ERROR("unhandle exception: %s", e.what()); |