mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 21:03:10 +00:00
client/windows: init PACKAGE_VERSION
in windows, we set PACKAGE_VERSION to the binary version since we don't have config.h as generated by linux configure
This commit is contained in:
parent
04595c74ad
commit
31358b640b
@ -50,6 +50,8 @@
|
||||
|
||||
#define strcasecmp stricmp
|
||||
|
||||
extern const char* PACKAGE_VERSION;
|
||||
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <X11/X.h>
|
||||
|
||||
@ -38,7 +38,7 @@ static void init_winsock()
|
||||
}
|
||||
}
|
||||
|
||||
char* version_string = "???";
|
||||
const char* PACKAGE_VERSION = "???";
|
||||
static char _version_string[40];
|
||||
|
||||
static void init_version_string()
|
||||
@ -63,7 +63,7 @@ static void init_version_string()
|
||||
file_info->dwFileVersionMS & 0x0ffff,
|
||||
file_info->dwFileVersionLS >> 16,
|
||||
file_info->dwFileVersionLS & 0x0ffff);
|
||||
version_string = _version_string;
|
||||
PACKAGE_VERSION = _version_string;
|
||||
}
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInstance,
|
||||
@ -79,7 +79,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
|
||||
init_version_string();
|
||||
pthread_win32_process_attach_np();
|
||||
init_winsock();
|
||||
exit_val = Application::main(__argc, __argv, version_string);
|
||||
exit_val = Application::main(__argc, __argv, PACKAGE_VERSION);
|
||||
LOG_INFO("Spice client terminated (exitcode = %d)", exit_val);
|
||||
} catch (Exception& e) {
|
||||
LOG_ERROR("unhandle exception: %s", e.what());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user