diff --git a/CMakeModules/BuildSteps/WriteVersionHeader.cmake b/CMakeModules/BuildSteps/WriteVersionHeader.cmake index c9add10375..052d6178ef 100644 --- a/CMakeModules/BuildSteps/WriteVersionHeader.cmake +++ b/CMakeModules/BuildSteps/WriteVersionHeader.cmake @@ -38,6 +38,14 @@ if( CMAKE_MATCH_COUNT EQUAL 2 ) set( KICAD_MAJOR_MINOR_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}" ) set( KICAD_MAJOR_MINOR_VERSION_TUPLE "{ ${CMAKE_MATCH_1}, ${CMAKE_MATCH_2} }" ) set( KICAD_MAJOR_VERSION "${CMAKE_MATCH_1}" ) + set( KICAD_MINOR_VERSION "${CMAKE_MATCH_2}" ) + + if( KICAD_MINOR_VERSION STREQUAL "99" ) + set( KICAD_IS_NIGHTLY "1" ) + else() + set( KICAD_IS_NIGHTLY "0" ) + endif() + set( KICAD_WIN32_RC_FILEVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.0.${KICAD_GIT_REV}\\0" ) set( KICAD_WIN32_RC_FILEVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, 0, ${KICAD_GIT_REV}" ) set( KICAD_WIN32_RC_PRODVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}\\0" ) @@ -58,6 +66,8 @@ set( _wvh_new_version_text #define KICAD_VERSION_FULL \"${KICAD_VERSION_FULL}\" #define KICAD_SEMANTIC_VERSION \"${KICAD_SEMANTIC_VERSION}\" #define KICAD_MAJOR_VERSION \"${KICAD_MAJOR_VERSION}\" +#define KICAD_MINOR_VERSION \"${KICAD_MINOR_VERSION}\" +#define KICAD_IS_NIGHTLY ${KICAD_IS_NIGHTLY} #define KICAD_MAJOR_MINOR_VERSION \"${KICAD_MAJOR_MINOR_VERSION}\" #define KICAD_MAJOR_MINOR_VERSION_TUPLE ${KICAD_MAJOR_MINOR_VERSION_TUPLE} #define KICAD_WIN32_RC_PRODVER ${KICAD_WIN32_RC_PRODVER} diff --git a/resources/msw/kicad.rc b/resources/msw/kicad.rc index eca2e28d73..73c2f2cabc 100644 --- a/resources/msw/kicad.rc +++ b/resources/msw/kicad.rc @@ -1,4 +1,10 @@ +#include + +#if KICAD_IS_NIGHTLY +icon_kicad ICON "../bitmaps_png/icons/icon_kicad_nightly.ico" +#else icon_kicad ICON "../bitmaps_png/icons/icon_kicad.ico" +#endif #define RC_VER_FILE_DESCRIPTION "KiCad EDA " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "kicad"