diff --git a/CMakeModules/BuildSteps/WriteVersionHeader.cmake b/CMakeModules/BuildSteps/WriteVersionHeader.cmake index 75d3df5ccc..92256bef9f 100644 --- a/CMakeModules/BuildSteps/WriteVersionHeader.cmake +++ b/CMakeModules/BuildSteps/WriteVersionHeader.cmake @@ -37,6 +37,10 @@ if( CMAKE_MATCH_COUNT EQUAL 2 ) # Match slot 0 is the full string, so we want slots 1 & 2 set( KICAD_MAJOR_MINOR_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}" ) set( KICAD_MAJOR_VERSION "${CMAKE_MATCH_1}" ) + set( KICAD_WIN32_RC_FILEVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.0.0\\0" ) + set( KICAD_WIN32_RC_FILEVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, 0, 0" ) + set( KICAD_WIN32_RC_PRODVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}\\0" ) + set( KICAD_WIN32_RC_PRODVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, 0, 0" ) else() message( FATAL_ERROR "Unable to extract major and minor version string" ) endif() @@ -54,6 +58,10 @@ set( _wvh_new_version_text #define KICAD_SEMANTIC_VERSION \"${KICAD_SEMANTIC_VERSION}\" #define KICAD_MAJOR_VERSION \"${KICAD_MAJOR_VERSION}\" #define KICAD_MAJOR_MINOR_VERSION \"${KICAD_MAJOR_MINOR_VERSION}\" +#define KICAD_WIN32_RC_PRODVER ${KICAD_WIN32_RC_PRODVER} +#define KICAD_WIN32_RC_PRODVER_STR \"${KICAD_WIN32_RC_PRODVER_STR}\" +#define KICAD_WIN32_RC_FILEVER ${KICAD_WIN32_RC_FILEVER} +#define KICAD_WIN32_RC_FILEVER_STR \"${KICAD_WIN32_RC_FILEVER_STR}\" #endif /* __KICAD_VERSION_H__ */ " ) diff --git a/bitmap2component/bitmap2component.rc b/bitmap2component/bitmap2component.rc index ed8a87598d..e403ec8016 100644 --- a/bitmap2component/bitmap2component.rc +++ b/bitmap2component/bitmap2component.rc @@ -1,3 +1,6 @@ icon_bitmap2component ICON "../bitmaps_png/icons/icon_bitmap2component.ico" +#define RC_VER_FILE_DESCRIPTION "KiCad Image Converter" +#define RC_VER_INTERNALNAME "bitmap2component" +#define RC_VER_ORIGINALFILENAME "bitmap2component.exe" #include "kiwin32.rc" diff --git a/eeschema/eeschema.rc b/eeschema/eeschema.rc index 6a3cc69a86..881150ee65 100644 --- a/eeschema/eeschema.rc +++ b/eeschema/eeschema.rc @@ -1,3 +1,7 @@ icon_eeschema ICON "../bitmaps_png/icons/icon_eeschema.ico" +#define RC_VER_FILE_DESCRIPTION "KiCad Schematic Editor" +#define RC_VER_INTERNALNAME "eeschema" +#define RC_VER_ORIGINALFILENAME "eeschema.exe" + #include "kiwin32.rc" diff --git a/gerbview/gerbview.rc b/gerbview/gerbview.rc index 352e724a0d..2c3bfe6001 100644 --- a/gerbview/gerbview.rc +++ b/gerbview/gerbview.rc @@ -1,3 +1,6 @@ icon_gerbview ICON "../bitmaps_png/icons/icon_gerbview.ico" +#define RC_VER_FILE_DESCRIPTION "KiCad Gerber Viewer" +#define RC_VER_INTERNALNAME "gerbview" +#define RC_VER_ORIGINALFILENAME "gerbview.exe" #include "kiwin32.rc" diff --git a/kicad/kicad.rc b/kicad/kicad.rc index ce1a18a8ba..5d3354277c 100644 --- a/kicad/kicad.rc +++ b/kicad/kicad.rc @@ -1,3 +1,6 @@ icon_kicad ICON "../bitmaps_png/icons/icon_kicad.ico" +#define RC_VER_FILE_DESCRIPTION "KiCad EDA" +#define RC_VER_INTERNALNAME "kicad" +#define RC_VER_ORIGINALFILENAME "kicad.exe" #include "kiwin32.rc" diff --git a/pagelayout_editor/pl_editor.rc b/pagelayout_editor/pl_editor.rc index ef394934f7..402e4d20b1 100644 --- a/pagelayout_editor/pl_editor.rc +++ b/pagelayout_editor/pl_editor.rc @@ -1,3 +1,6 @@ icon_pagelayout_editor ICON "../bitmaps_png/icons/icon_pagelayout_editor.ico" +#define RC_VER_FILE_DESCRIPTION "KiCad Drawing Sheet Editor" +#define RC_VER_INTERNALNAME "pl_editor" +#define RC_VER_ORIGINALFILENAME "pl_editor.exe" #include "kiwin32.rc" diff --git a/pcb_calculator/pcb_calculator.rc b/pcb_calculator/pcb_calculator.rc index 0bfdb74df0..d73533eefe 100644 --- a/pcb_calculator/pcb_calculator.rc +++ b/pcb_calculator/pcb_calculator.rc @@ -1,3 +1,6 @@ icon_pcbcalculator ICON "../bitmaps_png/icons/icon_pcbcalculator.ico" +#define RC_VER_FILE_DESCRIPTION "KiCad PCB Calculator" +#define RC_VER_INTERNALNAME "pcb_calculator" +#define RC_VER_ORIGINALFILENAME "pcb_calculator.exe" #include "kiwin32.rc" diff --git a/pcbnew/pcbnew.rc b/pcbnew/pcbnew.rc index 5d7c800161..4d61a98ac8 100644 --- a/pcbnew/pcbnew.rc +++ b/pcbnew/pcbnew.rc @@ -1,3 +1,6 @@ icon_pcbnew ICON "../bitmaps_png/icons/icon_pcbnew.ico" +#define RC_VER_FILE_DESCRIPTION "KiCad PCB Editor" +#define RC_VER_INTERNALNAME "pcbnew" +#define RC_VER_ORIGINALFILENAME "pcbnew.exe" #include "kiwin32.rc" diff --git a/resources/msw/kiwin32.rc b/resources/msw/kiwin32.rc index 3921c3e53c..19542d57ed 100644 --- a/resources/msw/kiwin32.rc +++ b/resources/msw/kiwin32.rc @@ -1,6 +1,8 @@ // Turn off wxWidgets attempting to use its own manifests #define wxUSE_NO_MANIFEST 1 #include "wx/msw/wx.rc" +#include +#include #ifdef ISOLATION_AWARE_ENABLED #define MANIFEST_ID ISOLATIONAWARE_MANIFEST_RESOURCE_ID @@ -29,4 +31,44 @@ #endif MANIFEST_ID RT_MANIFEST MANIFEST_FILE + + +#ifndef DEBUG +#define VER_DEBUG 0 +#else +#define VER_DEBUG VS_FF_DEBUG +#endif + +VS_VERSION_INFO VERSIONINFO +FILEVERSION KICAD_WIN32_RC_FILEVER +PRODUCTVERSION KICAD_WIN32_RC_PRODVER +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +FILEFLAGS (VER_DEBUG) +FILEOS VOS__WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + // this gets dispalyed in the windows 10 task manager + VALUE "FileDescription", RC_VER_FILE_DESCRIPTION + VALUE "FileVersion", KICAD_WIN32_RC_FILEVER_STR + //original filename without extension + VALUE "InternalName", RC_VER_INTERNALNAME + VALUE "LegalCopyright", "Copyright (C) 2021 KiCad Developers" + // the exe name + VALUE "OriginalFilename", RC_VER_ORIGINALFILENAME + // name of distributed package + VALUE "ProductName", "KiCad EDA" + VALUE "ProductVersion", KICAD_WIN32_RC_PRODVER_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + //RESOURCE FILES MUST CONTAIN A BLANK LINE AT THE END