Skip to content

Commit

Permalink
Remove Gemalto card support and update Qt 6.6.1 (#85)
Browse files Browse the repository at this point in the history
IB-7701, IB-7907

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Jan 24, 2024
1 parent 00d27dd commit 3cbc560
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 30 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: macos-latest
env:
MAKEFLAGS: -j3
MACOSX_DEPLOYMENT_TARGET: 10.15
MACOSX_DEPLOYMENT_TARGET: 11.0
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
Expand All @@ -38,22 +38,21 @@ jobs:
VER_SUFFIX: .VS${{ matrix.vcver }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare vcpkg
uses: lukka/run-vcpkg@v7
id: runvcpkg
with:
vcpkgArguments: openssl
vcpkgGitCommitId: 9b9c2758ece1d8ac0de90589730bb5ccf45c0874
vcpkgGitCommitId: 8161f655436492669adc8eb6f269dc41392ffa70
vcpkgTriplet: x64-windows
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
version: 6.6.1
arch: win64_msvc2019_64
modules: qt5compat
- name: Setup dev env
uses: ilammy/msvc-dev-cmd@v1
with:
Expand Down
16 changes: 5 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,8 @@ else()
file( DOWNLOAD ${RSA_URL} ${CMAKE_CURRENT_BINARY_DIR}/config.rsa )
configure_file( common/config.qrc config.qrc COPYONLY )

find_package( OpenSSL REQUIRED )
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.12.0 REQUIRED COMPONENTS Core Widgets Network LinguistTools)
if(${QT_VERSION} VERSION_LESS "5.15.0")
macro(qt_add_translation)
qt5_add_translation(${ARGN})
endmacro()
endif()
find_package(OpenSSL 3.0.0 REQUIRED)
find_package(Qt6 6.0.0 REQUIRED COMPONENTS Core Widgets Network LinguistTools)

include_directories( ${CMAKE_CURRENT_BINARY_DIR} common/qtsingleapplication/src )

Expand Down Expand Up @@ -135,7 +129,7 @@ else()
INTERPROCEDURAL_OPTIMIZATION_DEBUG NO
)
target_compile_definitions(${PROJECT_NAME} PRIVATE WIN32_LEAN_AND_MEAN UNICODE CONFIG_URL="${CONFIG_URL}" COMMON_STATIC NO_CACHE)
target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network OpenSSL::Crypto
target_link_libraries(${PROJECT_NAME} Qt6::Widgets Qt6::Network OpenSSL::Crypto
msi Mstask Userenv wintrust Crypt32 taskschd comsupp ws2_32 Setupapi winscard Wtsapi32
)

Expand All @@ -151,10 +145,10 @@ else()
get_filename_component(SSL_PATH "${OPENSSL_INCLUDE_DIR}/../bin" ABSOLUTE)
endif()
set(MSI_FILE "ID-Updater-${VERSION}$ENV{VER_SUFFIX}.${PLATFORM}")
get_target_property(qtCore_install_prefix Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION)
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 "$ENV{WIX}bin\\candle.exe" -nologo -arch ${PLATFORM} -dPlatform=${PLATFORM}
COMMAND "$ENV{WIX}bin\\candle.exe" -nologo -arch ${PLATFORM}
-dMSI_VERSION=${VERSION} -dqt_path=${qtCore_install_prefix}
-dqt_suffix=$<$<CONFIG:Debug>:d> -dqtconf=${CMAKE_SOURCE_DIR}/qt.conf -dlibs_path="${SSL_PATH}"
-dupdater_path=$<TARGET_FILE:${PROJECT_NAME}> ${CMAKE_SOURCE_DIR}/idupdater.wxs
Expand Down
21 changes: 8 additions & 13 deletions idupdater.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@

<!--
"%WIX%\bin\candle.exe" idupdater.wxs -dMSI_VERSION=3.9.5
-dqt_path=C:\Qt\5.9.10\msvc2017
-dlibs_path="C:\OpenSSL-Win32\bin"
-dqt_path=C:\Qt\6.6.1\msvc2019
-dlibs_path="C:\OpenSSL-Win64\bin"
-dupdater_path=id-updater.exe
"%WIX%\bin\light.exe" -out idupdater.msi idupdater.wixobj -v -ext WixUIExtension
-->

<?ifndef Platform ?>
<?define Platform="x86" ?>
<?endif ?>

<?if $(var.Platform) = x64 ?>
<?if $(sys.BUILDARCH) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define OpenSSLSuffix = "-x64" ?>
<?else ?>
Expand All @@ -28,15 +24,15 @@
<?endif?>

<?if $(var.qt_suffix) = "d" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\Debug_NonRedist\$(var.Platform)\Microsoft.VC$(var.VCVER).DebugCRT" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\Debug_NonRedist\$(sys.BUILDARCH)\Microsoft.VC$(var.VCVER).DebugCRT" ?>
<?else ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\$(sys.BUILDARCH)\Microsoft.VC$(var.VCVER).CRT" ?>
<?endif ?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="Open-EID Updater" UpgradeCode="d3aa8bd7-e1e6-46d0-97a6-c9b87d2b830b"
Id="*" Language="1033" Version="$(var.MSI_VERSION)" Codepage="1251" Manufacturer="RIA">
<Package Platform="$(var.Platform)" Keywords="Installer" InstallerVersion="405" Compressed="yes" InstallScope="perMachine"/>
<Package Keywords="Installer" InstallerVersion="500" Compressed="yes" InstallScope="perMachine"/>
<MediaTemplate EmbedCab="yes" CompressionLevel="high"/>
<Icon Id="idupdater.exe" SourceFile="$(var.updater_path)"/>
<Property Id="ARPPRODUCTICON" Value="idupdater.exe"/>
Expand All @@ -55,14 +51,14 @@
<File Id="id_updater.exe" Source="$(var.updater_path)" KeyPath='yes'/>
<RegistryValue Root="HKMU" Key="Software\[Manufacturer]\Open-EID"
Name="Installed" Value="[APPLICATIONFOLDER]" Type="string"/>
<?if $(var.Platform) = x64 ?>
<?if $(sys.BUILDARCH) = x64 ?>
<RegistryValue Root="HKMU" Key="Software\Wow6432Node\[Manufacturer]\Open-EID"
Name="Installed" Value="[APPLICATIONFOLDER]" Type="string"/>
<?endif ?>
<?ifdef var.qt_path ?>
<File Source="$(var.VCPATH)\msvcp140$(var.qt_suffix).dll"/>
<File Source="$(var.VCPATH)\vcruntime140$(var.qt_suffix).dll"/>
<?if $(var.Platform) = x64 AND $(env.VisualStudioVersion) != "15.0" ?>
<?if $(sys.BUILDARCH) = x64 AND $(env.VisualStudioVersion) != "15.0" ?>
<File Source="$(var.VCPATH)\msvcp140_1$(var.qt_suffix).dll"/>
<File Source="$(var.VCPATH)\msvcp140_2$(var.qt_suffix).dll"/>
<File Source="$(var.VCPATH)\vcruntime140_1$(var.qt_suffix).dll"/>
Expand All @@ -77,7 +73,6 @@
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\D3DCompiler_47.dll"/>
<File Source="$(var.qt_path)\opengl32sw.dll"/>
<File Source="$(var.qt_path)\Qt6Core5Compat$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll"/>
<?endif?>
</Component>
Expand Down

0 comments on commit 3cbc560

Please sign in to comment.