Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/cmake-linux-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
container: ubuntu:${{matrix.container}}
strategy:
matrix:
container: ['22.04', '24.04', '24.10', '25.04']
container: ['22.04', '24.04', '25.04']
arch: ['amd64', 'arm64']

steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
GTest_ROOT: ${{ github.workspace }}/gtest-binary
QT_QPA_PLATFORM: offscreen
CMAKE_BUILD_PARALLEL_LEVEL: 3
MACOSX_DEPLOYMENT_TARGET: 12.0
MACOSX_DEPLOYMENT_TARGET: 13.0

jobs:
build:
Expand Down Expand Up @@ -39,16 +39,16 @@ jobs:
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_INSTALL_PREFIX=${GTest_ROOT} \
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_STANDARD=20
cmake --build gtest-build --target install

- name: Build OpenSSL
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone --depth=1 https://github.com/openssl/openssl.git -b openssl-3.0
git clone --depth=1 https://github.com/openssl/openssl.git -b openssl-3.5
cd openssl
for ARCH in x86_64 arm64; do
./Configure darwin64-${ARCH} --prefix=${OPENSSL_ROOT_DIR} no-shared no-module no-tests enable-ec_nistp_64_gcc_128
./Configure darwin64-${ARCH} --prefix=${OPENSSL_ROOT_DIR} no-apps no-shared no-module no-tests enable-ec_nistp_64_gcc_128
MAKEFLAGS=-j1 make -s install_sw
mv ${OPENSSL_ROOT_DIR}{,.${ARCH}}
make distclean
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.7.3
version: 6.9.1
arch: clang_64

- name: Configure
Expand Down
30 changes: 13 additions & 17 deletions .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ env:

jobs:
build:
runs-on: ${{ matrix.image }}
runs-on: windows-2022
strategy:
matrix:
vcver: [142, 143]
include:
- vcver: 142
image: windows-2019
- vcver: 143
image: windows-2022
arch: [x64, arm64]

steps:
- name: Checkout code
Expand All @@ -29,26 +24,26 @@ jobs:
uses: lukka/run-vcpkg@v7
with:
vcpkgArguments: gtest openssl
vcpkgTriplet: x64-windows
vcpkgGitCommitId: 1f619be01b436b796dab797dd1e1721c5676f8ac
vcpkgTriplet: ${{matrix.arch}}-windows
vcpkgGitCommitId: 031ad89ce6c575df35a8e58707ad2c898446c63e

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.7.3
arch: win64_msvc2019_64
version: 6.9.1
arch: ${{ matrix.arch == 'arm64' && 'win64_msvc2022_arm64_cross_compiled' || 'win64_msvc2022_64' }}

- name: Setup MS Visual C++ dev env
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
arch: ${{ matrix.arch == 'arm64' && 'amd64_arm64' || 'amd64' }}

- name: Install WiX
run: |
dotnet tool install --global wix --version 5.0.2
wix extension -g add WixToolset.UI.wixext/5.0.2
wix extension -g add WixToolset.Util.wixext/5.0.2
wix extension -g add WixToolset.BootstrapperApplications.wixext/5.0.2
dotnet tool install --global wix --version 6.0.1
wix extension -g add WixToolset.UI.wixext/6.0.1
wix extension -g add WixToolset.Util.wixext/6.0.1
wix extension -g add WixToolset.BootstrapperApplications.wixext/6.0.1

- name: Configure
run: |
Expand All @@ -63,12 +58,13 @@ jobs:
cmake --build build --config ${env:BUILD_TYPE} --target bundle

- name: Test
if: ${{ matrix.arch == 'x64' }}
run: ctest -V -C ${env:BUILD_TYPE} --test-dir build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: web-eid-app-windows-build-VC${{matrix.vcver}}-${{github.run_number}}
name: web-eid-app-windows-build-${{matrix.arch}}-${{github.run_number}}
path: |
build/src/app/*.msi
build/src/app/*.exe
Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ elseif($ENV{CI_PIPELINE_IID})
else()
set(BUILD_NUMBER 0)
endif()
project(web-eid VERSION 2.7.0.${BUILD_NUMBER})
project(web-eid VERSION 2.8.0.${BUILD_NUMBER})

set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION_TWEAK})
Expand All @@ -33,8 +33,6 @@ set(CROSSSIGNCERT "" CACHE STRING "Common name of certificate to used cross sign
set(SAFARI_PROVISIONPROFILE "" CACHE STRING "Provision profile to include in application (macOS)")

find_package(Qt6 6.2.0 REQUIRED COMPONENTS Core Widgets Network Test LinguistTools SvgWidgets)
get_target_property(qtCore_install_prefix Qt6::qmake IMPORTED_LOCATION)
get_filename_component(qtCore_install_prefix ${qtCore_install_prefix} DIRECTORY)

add_subdirectory(lib/libelectronic-id)

Expand Down
2 changes: 1 addition & 1 deletion install/English.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"SU_TITLE" = "Web eID Software";
"SU_ERROR" = "Error";
"SU_12" = "macOS version needs to be 12.0 or newer.";
"SU_13" = "macOS version needs to be 13.0 or newer.";
"SU_BASE" = "Base components";
"SU_FIREFOX" = "Firefox authentication and signing support";
"SU_CHROME" = "Chrome authentication and signing support";
2 changes: 1 addition & 1 deletion install/cs.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"SU_TITLE" = "Web eID Software";
"SU_ERROR" = "Chyba";
"SU_12" = "verze macOS musí být 12.0 nebo novější.";
"SU_13" = "verze macOS musí být 13.0 nebo novější.";
"SU_BASE" = "Základní komponenty";
"SU_FIREFOX" = "Podpora ověřování a podepisování Firefoxu";
"SU_CHROME" = "Podpora ověřování a podepisování Chrome";
4 changes: 2 additions & 2 deletions install/distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/I
<script>
<![CDATA[
function pm_install_check() {
if(system.compareVersions(system.version.ProductVersion, '12.0') < 0) {
if(system.compareVersions(system.version.ProductVersion, '13.0') < 0) {
my.result.title = system.localizedString('SU_ERROR');
my.result.message = system.localizedString('SU_12');
my.result.message = system.localizedString('SU_13');
my.result.type = 'Fatal';
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion install/et.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"SU_TITLE" = "Web eID tarkvara";
"SU_ERROR" = "Viga";
"SU_12" = "macOS'i versioon peab olema 12.0 või uuem.";
"SU_13" = "macOS'i versioon peab olema 13.0 või uuem.";
"SU_BASE" = "Baaskomponendid";
"SU_FIREFOX" = "Firefoxi autentimise ja allkirjastamise tugi";
"SU_CHROME" = "Chrome'i autentimise ja allkirjastamise tugi";
2 changes: 1 addition & 1 deletion install/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"SU_TITLE" = "Web eID Software";
"SU_ERROR" = "Error";
"SU_12" = "macOS version needs to be 12.0 or newer.";
"SU_13" = "macOS version needs to be 13.0 or newer.";
"SU_BASE" = "Base components";
"SU_FIREFOX" = "Поддержка аутентиф. и подпис. в Firefox";
"SU_CHROME" = "Поддержка аутентиф. и подпис. в Chrome";
2 changes: 1 addition & 1 deletion install/sk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"SU_TITLE" = "Web eID Software";
"SU_ERROR" = "Chyba";
"SU_12" = "verzia macOS musí byť 12.0 alebo novšia.";
"SU_13" = "verzia macOS musí byť 13.0 alebo novšia.";
"SU_BASE" = "Základné komponenty";
"SU_FIREFOX" = "Podpora overovania a podpisovania Firefoxu";
"SU_CHROME" = "Podpora overovania a podpisovania Chrome";
26 changes: 10 additions & 16 deletions install/web-eid.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<?define VCVER = "142" ?>
<?endif?>

<?if $(sys.BUILDARCH) = x64 ?>
<?define ssl_suffix = "-x64" ?>
<?else?>
<?if $(sys.BUILDARCH) = x86 ?>
<?define ssl_suffix = "" ?>
<?else?>
<?define ssl_suffix = "-$(sys.BUILDARCH)" ?>
<?endif?>

<?if $(var.qt_suffix) = "d" ?>
Expand Down Expand Up @@ -85,21 +85,15 @@
<File Source="$(var.qt_path)\Qt6Network$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Svg$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
<?if $(sys.BUILDARCH) != arm64 ?>
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
<File Source="$(var.qt_path)\opengl32sw.dll" />
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
<Directory Id="platforms" Name="platforms">
<File Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
</Directory>
<Directory Id="styles" Name="styles">
<File Source="$(var.qt_path)\..\plugins\styles\qmodernwindowsstyle$(var.qt_suffix).dll" />
</Directory>
<Directory Id="imageformats" Name="imageformats">
<File Source="$(var.qt_path)\..\plugins\imageformats\qsvg$(var.qt_suffix).dll" />
</Directory>
<Directory Id="tls" Name="tls">
<File Source="$(var.qt_path)\..\plugins\tls\qopensslbackend$(var.qt_suffix).dll" />
</Directory>
<?endif?>
<File Subdirectory="platforms" Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
<File Subdirectory="styles" Source="$(var.qt_path)\..\plugins\styles\qmodernwindowsstyle$(var.qt_suffix).dll" />
<File Subdirectory="imageformats" Source="$(var.qt_path)\..\plugins\imageformats\qsvg$(var.qt_suffix).dll" />
<File Subdirectory="tls" Source="$(var.qt_path)\..\plugins\tls\qopensslbackend$(var.qt_suffix).dll" />
<?endif?>
<Component Id="ChromeEdge" Transitive="yes" Condition="(CHROMEINSTALL = 1 OR EDGEINSTALL = 1)">
<File Source="$(var.json)" />
Expand Down
17 changes: 6 additions & 11 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,15 @@ set_property(SOURCE web-eid.rc APPEND PROPERTY COMPILE_DEFINITIONS
target_link_libraries(web-eid controller ui pcsc)

if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PLATFORM x64)
else()
set(PLATFORM x86)
endif()
if(OPENSSL_ROOT_DIR)
set(SSL_PATH "${OPENSSL_ROOT_DIR}/bin")
else()
get_filename_component(SSL_PATH "${OPENSSL_INCLUDE_DIR}/../bin" ABSOLUTE)
endif()
set(WEBEID_PATH web-eid.exe)
set(BASE_FILE $<TARGET_NAME:web-eid>_${PROJECT_VERSION}.${PLATFORM})
set(BASE_FILE $<TARGET_NAME:web-eid>_${PROJECT_VERSION}.$ENV{PLATFORM})
set(WIX_CMD wix.exe build -nologo
-arch ${PLATFORM}
-arch $ENV{PLATFORM}
-ext WixToolset.UI.wixext
-bv WixUIDialogBmp=${CMAKE_SOURCE_DIR}/install/dlgbmp.bmp
-d ssl_path="${SSL_PATH}"
Expand All @@ -45,7 +40,7 @@ if(WIN32)
add_custom_target(installer DEPENDS web-eid
COMMAND ${WIX_CMD} -o "${BASE_FILE}.msi"
#Build MSI with QT
COMMAND ${WIX_CMD} -d qt_path=${qtCore_install_prefix} -o "${BASE_FILE}.qt.msi"
COMMAND ${WIX_CMD} -d qt_path=${Qt6_DIR}/../../../bin -o "${BASE_FILE}.qt.msi"
WORKING_DIRECTORY $<TARGET_FILE_DIR:web-eid>
)
add_custom_target(bundle DEPENDS installer
Expand Down Expand Up @@ -93,7 +88,7 @@ elseif(APPLE)
install(FILES ${CMAKE_SOURCE_DIR}/install/ncibgoaomkmdpilpocfeponihegamlic.json COMPONENT chrome
DESTINATION "/Library/Application Support/Google/Chrome/External Extensions")
add_custom_target(macdeployqt DEPENDS web-eid
COMMAND ${qtCore_install_prefix}/macdeployqt $<TARGET_BUNDLE_DIR:web-eid>
COMMAND Qt6::macdeployqt $<TARGET_BUNDLE_DIR:web-eid>
)
add_custom_target(installer-native DEPENDS macdeployqt
COMMAND rm -rf root_native
Expand Down Expand Up @@ -153,7 +148,7 @@ else()
option(BUNDLE_XPI "Download and bundle the Firefox extension" OFF)
include(GNUInstallDirs)
if (BUNDLE_XPI)
file(DOWNLOAD ${FIREFOX_URL} ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi)
file(DOWNLOAD ${FIREFOX_URL} ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi)
endif()
set(WEBEID_PATH ${CMAKE_INSTALL_FULL_BINDIR}/web-eid)
install(TARGETS web-eid DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand All @@ -177,7 +172,7 @@ else()
install(FILES ${CMAKE_SOURCE_DIR}/install/web-eid.desktop
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
if (BUNDLE_XPI)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi
DESTINATION ${CMAKE_INSTALL_DATADIR}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384})
endif()
foreach(RES 16 32 128 256 512)
Expand Down
2 changes: 0 additions & 2 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

int main(int argc, char* argv[])
{
Q_INIT_RESOURCE(web_eid_resources);

Application app(argc, argv, QStringLiteral("web-eid"));

try {
Expand Down
22 changes: 22 additions & 0 deletions src/controller/utils/observer_ptr.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* Copyright (c) 2020-2024 Estonian Information System Authority
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

// Non-owning observing pointer.
Expand Down
2 changes: 1 addition & 1 deletion src/mac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ add_custom_command(TARGET web-eid-safari POST_BUILD
)

add_custom_target(macdeployqt-safari DEPENDS web-eid-safari
COMMAND ${qtCore_install_prefix}/macdeployqt $<TARGET_BUNDLE_DIR:web-eid-safari>
COMMAND Qt6::macdeployqt $<TARGET_BUNDLE_DIR:web-eid-safari> -appstore-compliant
)

# Installer
Expand Down
2 changes: 0 additions & 2 deletions src/mac/main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ void showSafariSettings() final

int main(int argc, char* argv[])
{
Q_INIT_RESOURCE(web_eid_resources);

SafariApplication app(argc, argv, QStringLiteral("web-eid-safari"));
auto appPtr = &app;

Expand Down
22 changes: 9 additions & 13 deletions src/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@ add_library(ui STATIC
ui.cpp
webeiddialog.cpp
webeiddialog.hpp
web-eid-resources.qrc
dialog.ui
)
qt_add_translations(ui TS_FILES
translations/en.ts
translations/et.ts
translations/fi.ts
translations/hr.ts
translations/ru.ts
translations/de.ts
translations/fr.ts
translations/nl.ts
translations/cs.ts
translations/sk.ts
RESOURCE_PREFIX /translations
file(GLOB IMAGES images/*.svg)
file(GLOB FONTS fonts/*.ttf)
qt_add_resources(ui resources BASE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX / FILES
../../install/appicon_128.png
dark.qss
${IMAGES}
${FONTS}
)
file(GLOB TRANSLATIONS translations/*.ts)
qt_add_translations(ui TS_FILES ${TRANSLATIONS} RESOURCE_PREFIX /translations)
set_target_properties(ui PROPERTIES
AUTORCC ON
AUTOUIC ON
Expand Down
Loading
Loading