From 307d5a66db6f5f0d7dc22cad5854fee677aabe7f Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 11 Jan 2017 17:05:02 +0100 Subject: [PATCH] [platform] Windows restarter version info --- native/WinRestarter/CMakeLists.txt | 7 +++++- native/WinRestarter/restarter.c | 2 +- native/WinRestarter/restarter.rc | 35 ++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 native/WinRestarter/restarter.rc diff --git a/native/WinRestarter/CMakeLists.txt b/native/WinRestarter/CMakeLists.txt index 3450638889ef..79d95050eeeb 100644 --- a/native/WinRestarter/CMakeLists.txt +++ b/native/WinRestarter/CMakeLists.txt @@ -5,6 +5,11 @@ if(NOT WIN32) message(FATAL_ERROR "Windows only.") endif() +set(BUILD_NUMBER $ENV{BUILD_NUMBER}) +string(TIMESTAMP YEAR "%Y") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") -add_executable(restarter restarter.c) \ No newline at end of file +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/restarter.rc ${CMAKE_CURRENT_BINARY_DIR}/restarter.rc @ONLY) + +add_executable(restarter restarter.c ${CMAKE_CURRENT_BINARY_DIR}/restarter.rc) \ No newline at end of file diff --git a/native/WinRestarter/restarter.c b/native/WinRestarter/restarter.c index 3cd35585d74e..478a484b6fc7 100644 --- a/native/WinRestarter/restarter.c +++ b/native/WinRestarter/restarter.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/native/WinRestarter/restarter.rc b/native/WinRestarter/restarter.rc new file mode 100644 index 000000000000..f095dff16e8d --- /dev/null +++ b/native/WinRestarter/restarter.rc @@ -0,0 +1,35 @@ +#define VERSION 1,3,0,@BUILD_NUMBER@ +#define VERSION_STR "1.3.0.@BUILD_NUMBER@\0" +#define FILE_NAME "restarter.exe" +#define COPYRIGHT "Copyright 2000-@YEAR@ JetBrains s.r.o." + +#pragma code_page(65001) + +1 VERSIONINFO + FILEVERSION VERSION + PRODUCTVERSION VERSION + FILEFLAGSMASK 0x0L + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0000fde9" + BEGIN + VALUE "CompanyName", "JetBrains" + VALUE "FileDescription", "IDE update and restart helper" + VALUE "FileVersion", VERSION_STR + VALUE "InternalName", FILE_NAME + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", FILE_NAME + VALUE "ProductName", "IntelliJ Platform" + VALUE "ProductVersion", VERSION_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0, 0xfde9 + END +END \ No newline at end of file