From d11bf43fd7df4c1198df6ee28c998e687f457092 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 24 Mar 2019 10:28:49 +0500 Subject: [PATCH] UI: Improve .rc --- src/common/version.h | 6 ++++- src/ui/FortFirewall.rc | 61 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/src/common/version.h b/src/common/version.h index 85dcabc8..99f7f06b 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -1,9 +1,13 @@ #ifndef VERSION_H #define VERSION_H -#define APP_NAME "Fort Firewall" +#define APP_VERSION_MAJOR 2 +#define APP_VERSION_MINOR 6 +#define APP_VERSION_PATCH 0 #define APP_VERSION_STR "2.6.0" #define APP_VERSION 0x020600 + +#define APP_NAME "Fort Firewall" #define APP_UPDATES_URL "https://github.com/tnodir/fort/releases" #define APP_UPDATES_API_URL "https://api.github.com/repos/tnodir/fort/releases/latest" diff --git a/src/ui/FortFirewall.rc b/src/ui/FortFirewall.rc index dbaaa992..ab263540 100644 --- a/src/ui/FortFirewall.rc +++ b/src/ui/FortFirewall.rc @@ -1 +1,60 @@ -IDI_ICON1 ICON DISCARDABLE FortFirewall.ico \ No newline at end of file +#define WIN32_LEAN_AND_MEAN +#include + +#include "../common/version.h" + +#define VER_FILEVERSION APP_VERSION_MAJOR,APP_VERSION_MINOR,APP_VERSION_PATCH,0 +#define VER_FILEVERSION_STR APP_VERSION_STR +#define VER_PRODUCTVERSION VER_FILEVERSION +#define VER_PRODUCTVERSION_STR APP_VERSION_STR + +#define VER_COMPANYNAME_STR "Open Source Developer, Nodir Temirkhodjaev" +#define VER_FILEDESCRIPTION_STR "Fort Firewall" +#define VER_INTERNALNAME_STR "FortFirewall" +#define VER_LEGALCOPYRIGHT_STR "Copyright 2015 Nodir Temirkhodjaev" +#define VER_LEGALTRADEMARKS1_STR "" +#define VER_LEGALTRADEMARKS2_STR "" +#define VER_ORIGINALFILENAME_STR "FortFirewall.exe" +#define VER_PRODUCTNAME_STR "Fort Firewall" + +#ifdef _DEBUG +#define VER_DEBUG (VS_FF_PRIVATEBUILD|VS_FF_PRERELEASE|VS_FF_DEBUG) +#else +#define VER_DEBUG 0 +#endif + + +IDI_ICON1 ICON DISCARDABLE FortFirewall.ico + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_FILEVERSION +PRODUCTVERSION VER_PRODUCTVERSION + +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +FILEFLAGS VER_DEBUG +FILEOS VOS__WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE 0x0L + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", VER_COMPANYNAME_STR + VALUE "FileDescription", VER_FILEDESCRIPTION_STR + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "InternalName", VER_INTERNALNAME_STR + VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR + VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR + VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR + VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR + VALUE "ProductName", VER_PRODUCTNAME_STR + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END