forked from open-eid/DigiDoc4-Client
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge shell extension installer to main installer
IB-7980 Signed-off-by: Raul Metsma <[email protected]>
- Loading branch information
Showing
17 changed files
with
53 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,47 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(digidocshellextension VERSION 3.13.9) | ||
|
||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
include( VersionInfo ) | ||
project(EsteidShellExtension VERSION 3.13.9) | ||
include(VersionInfo) | ||
|
||
if(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
set(MIDL_TARGET "x64") | ||
set(PLATFORM "x64") | ||
else() | ||
set(MIDL_TARGET "win32") | ||
set(PLATFORM "x86") | ||
endif() | ||
|
||
add_custom_command( | ||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/EsteidShellExtension_i.h | ||
${CMAKE_CURRENT_BINARY_DIR}/EsteidShellExtension_i.c | ||
${CMAKE_CURRENT_BINARY_DIR}/EsteidShellExtension_p.c | ||
COMMAND Midl.Exe ${CMAKE_CURRENT_SOURCE_DIR}/EsteidShellExtension.idl | ||
/nologo /no_robust /char signed /Oicf /env ${MIDL_TARGET} | ||
/nologo /char signed /Oicf /env ${MIDL_TARGET} | ||
/target NT100 | ||
/I ${CMAKE_CURRENT_SOURCE_DIR} | ||
/tlb EsteidShellExtension.tlb | ||
/h EsteidShellExtension_i.h | ||
/iid EsteidShellExtension_i.c | ||
/proxy EsteidShellExtension_p.c 2> nul | ||
/iid EsteidShellExtension_i.c 2> nul | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
VERBATIM | ||
) | ||
|
||
add_library(EsteidShellExtension SHARED | ||
add_library(${PROJECT_NAME} SHARED | ||
${CMAKE_CURRENT_BINARY_DIR}/EsteidShellExtension_i.c | ||
dllmain.cpp | ||
EsteidShellExtension.cpp | ||
EsteidShellExtension.def | ||
EsteidShlExt.cpp | ||
stdafx.cpp | ||
EsteidShellExtension.rc | ||
EsteidShellExtension.rgs | ||
EsteidShlExt_x86.rgs | ||
EsteidShlExt_x64.rgs | ||
) | ||
set_target_properties(EsteidShellExtension PROPERTIES | ||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" | ||
COMPILE_DEFINITIONS "_UNICODE;UNICODE;_MERGE_PROXYSTUB;_WINDLL" | ||
COMPILE_OPTIONS "/guard:cf" | ||
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR} | ||
INTERPROCEDURAL_OPTIMIZATION YES | ||
COMPILE_OPTIONS "/guard:cf" | ||
LINK_OPTIONS "/guard:cf" | ||
LINK_LIBRARIES "uxtheme.lib" | ||
SKIP_AUTOMOC ON | ||
) | ||
|
||
add_custom_target(msishellext DEPENDS EsteidShellExtension | ||
COMMAND wix.exe build -nologo | ||
-arch ${PLATFORM} | ||
-d MSI_VERSION=${VERSION} | ||
-d ShellExt=$<TARGET_FILE:EsteidShellExtension> | ||
${CMAKE_CURRENT_SOURCE_DIR}/EsteidShellExtension.wxs | ||
${CMAKE_MODULE_PATH}/WelcomeDlg.wxs | ||
${CMAKE_MODULE_PATH}/WixUI_Minimal.wxs | ||
-ext WixToolset.UI.wixext | ||
-bv WixUIDialogBmp=${CMAKE_MODULE_PATH}/dlgbmp.bmp | ||
-bv WixUIBannerBmp=${CMAKE_MODULE_PATH}/banner.bmp | ||
-o Digidoc_ShellExt-${VERSION}$ENV{VER_SUFFIX}.${PLATFORM}.msi | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
) | ||
|
||
if(SIGNCERT) | ||
if(CROSSSIGNCERT) | ||
target_link_options(EsteidShellExtension PRIVATE "/INTEGRITYCHECK") | ||
endif() | ||
add_custom_command(TARGET EsteidShellExtension POST_BUILD | ||
COMMAND signtool.exe sign /a /v /s MY /n "${SIGNCERT}" /fd SHA256 /du http://installer.id.ee | ||
"$<$<BOOL:${CROSSSIGNCERT}>:/ph;/ac;${CROSSSIGNCERT}>" | ||
/tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 $<TARGET_FILE:EsteidShellExtension> | ||
COMMAND_EXPAND_LISTS | ||
) | ||
add_custom_command(TARGET msishellext POST_BUILD | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND 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 | ||
"${CMAKE_BINARY_DIR}/Digidoc_ShellExt-${VERSION}$ENV{VER_SUFFIX}.${PLATFORM}.msi" | ||
/tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 $<TARGET_FILE:${PROJECT_NAME}> | ||
) | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.