a24c390318
I.e., use CFBundleShortVersionString instead of CFBundleVersion on OS X and ProductVersion instead of FileVersion on Windows. This is generally more useful (although slightly lower granularity) than the machine-readable version number.
19 lines
559 B
C++
19 lines
559 B
C++
#include "common/application_info.h"
|
|
|
|
#include "base/file_version_info.h"
|
|
#include "base/memory/scoped_ptr.h"
|
|
#include "base/utf_string_conversions.h"
|
|
|
|
namespace brightray {
|
|
|
|
std::string GetApplicationName() {
|
|
auto info = make_scoped_ptr(FileVersionInfo::CreateFileVersionInfoForModule(GetModuleHandle(nullptr)));
|
|
return UTF16ToUTF8(info->product_name());
|
|
}
|
|
|
|
std::string GetApplicationVersion() {
|
|
auto info = make_scoped_ptr(FileVersionInfo::CreateFileVersionInfoForModule(GetModuleHandle(nullptr)));
|
|
return UTF16ToUTF8(info->product_version());
|
|
}
|
|
|
|
}
|