Skip to content

Commit

Permalink
add missing version info for Win builds
Browse files Browse the repository at this point in the history
  • Loading branch information
donovaly authored and wwmayer committed Feb 14, 2020
1 parent e97336f commit 4a6656d
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ set(PACKAGE_VERSION_NAME "Vulcan")
set(PACKAGE_VERSION_MAJOR "0")
set(PACKAGE_VERSION_MINOR "19")
set(PACKAGE_VERSION_PATCH "16100")
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
set(FREECAD_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)

set(FREECAD_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
Expand Down
4 changes: 3 additions & 1 deletion src/Main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#add_defintions(-D_FC_GUI_ENABLED_)
#add_defintions(-DFREECADMAINPY)

configure_file(freecad.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/freecad.rc)

if(BUILD_GUI)
include_directories(
${Boost_INCLUDE_DIRS}
Expand All @@ -24,7 +26,7 @@ endif(BUILD_GUI)
if(BUILD_GUI)

SET(FreeCAD_SRCS
freecad.rc
${CMAKE_CURRENT_BINARY_DIR}/freecad.rc
icon.ico
MainGui.cpp
)
Expand Down
31 changes: 31 additions & 0 deletions src/Main/freecad.rc
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
/////////////////////////////////////////////////////////////////////////////
// For nfo about the file structrure see
// https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource
// and
// https://docs.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block

// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON DISCARDABLE "icon.ico"

// File info for the FreeCAD.exe
//
1 VERSIONINFO
FILEVERSION ${PACKAGE_VERSION_MAJOR},${PACKAGE_VERSION_MINOR},${FREECAD_VERSION_PATCH},${PACKAGE_VERSION_PATCH}
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0" // 409 stands for US English
BEGIN
VALUE "CompanyName", "${PROJECT_NAME} Team"
VALUE "FileDescription", "${PROJECT_NAME} main executable"
VALUE "InternalName", "FreeCAD.exe"
VALUE "LegalCopyright", "Copyright (C) 2020"
VALUE "OriginalFilename", "FreeCAD.exe"
VALUE "ProductName", "${PROJECT_NAME}"
VALUE "${FREECAD_VERSION}.${PACKAGE_VERSION_SUFFIX}"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200 //US English, Unicode
END
END
35 changes: 35 additions & 0 deletions src/Main/freecad.rc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/////////////////////////////////////////////////////////////////////////////
// For nfo about the file structrure see
// https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource
// and
// https://docs.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block

// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON DISCARDABLE "icon.ico"

// File info for the FreeCAD.exe
//
1 VERSIONINFO
FILEVERSION ${PACKAGE_VERSION_MAJOR},${PACKAGE_VERSION_MINOR},${FREECAD_VERSION_PATCH},${PACKAGE_VERSION_PATCH}
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0" // 409 stands for US English
BEGIN
VALUE "CompanyName", "${PROJECT_NAME} Team"
VALUE "FileDescription", "${PROJECT_NAME} main executable"
VALUE "InternalName", "FreeCAD.exe"
VALUE "LegalCopyright", "Copyright (C) 2020"
VALUE "OriginalFilename", "FreeCAD.exe"
VALUE "ProductName", "${PROJECT_NAME}"
VALUE "ProductVersion", "${FREECAD_VERSION}.${FREECAD_VERSION_PATCH}${PACKAGE_VERSION_SUFFIX}"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200 //US English, Unicode
END
END

0 comments on commit 4a6656d

Please sign in to comment.