Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code signature timestamping URL-s #91

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.7.1
version: 6.7.2
arch: win64_msvc2019_64
- name: Setup dev env
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install WiX
run: |
dotnet tool install -g wix --version 5.0.0
wix extension -g add WixToolset.UI.wixext/5.0.0
dotnet tool install -g wix --version 5.0.1
wix extension -g add WixToolset.UI.wixext/5.0.1
- name: Build
run: |
cmake -S . -B build `
Expand Down
23 changes: 16 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ if( APPLE )
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "ee.ria.${PROJECT_NAME}"
)
target_link_libraries(${PROJECT_NAME} ${XAR}
"-framework Cocoa -framework PreferencePanes -framework CryptoTokenKit -framework Security"
"-framework Cocoa"
"-framework PreferencePanes"
"-framework CryptoTokenKit"
"-framework Security"
)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND cp $<TARGET_FILE:id-updater-helper> $<TARGET_BUNDLE_CONTENT_DIR:${PROJECT_NAME}>/Resources )
Expand Down Expand Up @@ -131,9 +134,15 @@ else()
INTERPROCEDURAL_OPTIMIZATION YES
INTERPROCEDURAL_OPTIMIZATION_DEBUG NO
)
target_compile_definitions(${PROJECT_NAME} PRIVATE WIN32_LEAN_AND_MEAN UNICODE CONFIG_URL="${CONFIG_URL}" COMMON_STATIC NO_CACHE)
target_compile_definitions(${PROJECT_NAME} PRIVATE
WIN32_LEAN_AND_MEAN
UNICODE
CONFIG_URL="${CONFIG_URL}"
COMMON_STATIC
NO_CACHE
)
target_link_libraries(${PROJECT_NAME} Qt6::Widgets Qt6::Network OpenSSL::Crypto
msi Mstask Userenv wintrust Crypt32 taskschd comsupp ws2_32 Setupapi winscard Wtsapi32
msi wintrust Crypt32 taskschd comsupp Setupapi winscard Wtsapi32
)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand All @@ -151,7 +160,7 @@ else()
get_target_property(qtCore_install_prefix Qt6::qmake IMPORTED_LOCATION)
get_filename_component(qtCore_install_prefix ${qtCore_install_prefix} DIRECTORY)
add_custom_target(installer DEPENDS ${PROJECT_NAME}
COMMAND "wix.exe" build -nologo
COMMAND wix.exe build -nologo
-arch ${PLATFORM}
-ext WixToolset.UI.wixext
-bv WixUIDialogBmp=${CMAKE_SOURCE_DIR}/cmake/modules/dlgbmp.bmp
Expand All @@ -165,20 +174,20 @@ else()
${CMAKE_SOURCE_DIR}/idupdater.wxs
${CMAKE_SOURCE_DIR}/cmake/modules/WelcomeDlg.wxs
${CMAKE_SOURCE_DIR}/cmake/modules/WixUI_Minimal.wxs
-o "${MSI_FILE}.msi"
-o ${MSI_FILE}.msi
)
if(SIGNCERT)
if(CROSSSIGNCERT)
target_link_options(${PROJECT_NAME} PRIVATE "/INTEGRITYCHECK")
endif()
list(APPEND SIGNCMD signtool.exe sign /a /v /s MY /n "${SIGNCERT}" /fd SHA256
/du http://installer.id.ee /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256)
/du http://installer.id.ee /tr http://timestamp.digicert.com /td SHA256)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${SIGNCMD} "$<$<BOOL:${CROSSSIGNCERT}>:/ph;/ac;${CROSSSIGNCERT}>" $<TARGET_FILE:${PROJECT_NAME}>
COMMAND_EXPAND_LISTS
)
add_custom_command(TARGET installer POST_BUILD
COMMAND ${SIGNCMD} "${MSI_FILE}.msi"
COMMAND ${SIGNCMD} ${MSI_FILE}.msi
)
endif()
endif()
2 changes: 1 addition & 1 deletion cmake
2 changes: 1 addition & 1 deletion common
2 changes: 0 additions & 2 deletions idupdater.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
</Component>
<File Source="$(var.VCPATH)\msvcp140$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\vcruntime140$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\msvcp140_1$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\msvcp140_2$(var.qt_suffix).dll" />
<?if $(sys.BUILDARCH) != x86 ?>
<File Source="$(var.VCPATH)\vcruntime140_1$(var.qt_suffix).dll" />
<?endif?>
Expand Down