Skip to content

Commit

Permalink
Also set file description and version for Windows
Browse files Browse the repository at this point in the history
Because otherwise SignPath doesn't pick up on the product name and
version correctly.
  • Loading branch information
askmeaboutlo0m committed Nov 6, 2024
1 parent b2221cd commit 58de00f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/edit-pe-metadata.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
if(NOT PRODUCT_NAME OR NOT PRODUCT_VERSION OR NOT SEARCH_PATHS)
message(FATAL_ERROR "PRODUCT_NAME, PRODUCT_VERSION and SEARCH_PATHS are required")
if(NOT FILE_DESCRIPTION OR NOT FILE_VERSION OR NOT PRODUCT_NAME OR NOT PRODUCT_VERSION OR NOT SEARCH_PATHS)
message(FATAL_ERROR "FILE_DESCRIPTION, FILE_VERSION, PRODUCT_NAME, PRODUCT_VERSION and SEARCH_PATHS are required")
endif()

find_program(RCEDIT_COMMAND rcedit REQUIRED)
Expand All @@ -17,6 +17,8 @@ foreach(pe_path IN LISTS pe_paths)
COMMAND
${RCEDIT_COMMAND}
"${pe_path}"
--set-version-string FileDescription "${FILE_DESCRIPTION}"
--set-version-string FileVersion "${FILE_VERSION}"
--set-version-string ProductName "${PRODUCT_NAME}"
--set-version-string ProductVersion "${PRODUCT_VERSION}"
COMMAND_ECHO STDOUT
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ jobs:
- name: Set PE metadata of dependencies on Windows
run: >
cmake
"-DFILE_DESCRIPTION=Drawpile client"
"-DPRODUCT_NAME=Drawpile client"
"-DFILE_VERSION=$env:WINDOWS_PRODUCT_VERSION"
"-DPRODUCT_VERSION=$env:WINDOWS_PRODUCT_VERSION"
"-DSEARCH_PATHS=${{ matrix.cross_os && format('{0};', steps.cross-deps.outputs.path) }}${{ steps.deps.outputs.path }}"
-P ".github/scripts/edit-pe-metadata.cmake"
Expand Down Expand Up @@ -569,7 +571,9 @@ jobs:
- name: Set PE metadata built files on Windows
run: >
cmake
"-DFILE_DESCRIPTION=Drawpile client"
"-DPRODUCT_NAME=Drawpile client"
"-DFILE_VERSION=$env:WINDOWS_PRODUCT_VERSION"
"-DPRODUCT_VERSION=$env:WINDOWS_PRODUCT_VERSION"
"-DSEARCH_PATHS=build"
-P ".github/scripts/edit-pe-metadata.cmake"
Expand Down

0 comments on commit 58de00f

Please sign in to comment.