Skip to content

Commit

Permalink
Add revision: v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GovernikusAusweisApp2 committed Jul 4, 2024
1 parent e1a76dc commit 7e84e66
Show file tree
Hide file tree
Showing 1,089 changed files with 19,461 additions and 13,652 deletions.
47 changes: 47 additions & 0 deletions .qmllint.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[General]
DisableDefaultImports=false

[Warnings]
AccessSingletonViaObject=warning
BadSignalHandlerParameters=warning
CompilerWarnings=disable
Deprecated=warning
DuplicatePropertyBinding=warning
DuplicatedName=warning
ImportFailure=warning
IncompatibleType=info
InheritanceCycle=warning
InvalidLintDirective=warning
LintPluginWarnings=warning
MissingProperty=info
MissingType=warning
MultilineStrings=warning
NonListProperty=warning
PrefixedImportType=warning
PropertyAliasCycles=warning
ReadOnlyProperty=warning
RequiredProperty=info
RestrictedType=warning
TopLevelComponent=warning
UncreatableType=warning
UnqualifiedAccess=info
UnresolvedType=warning
UnusedImports=info
UseProperFunction=warning
VarUsedBeforeDeclaration=warning
WithStatement=warning

# Quick
Anchors=info
AttachedPropertyReuse=info
AttachedPropertyType=info
ControlsAttachedPropertyReuse=warning
ControlsNativeCustomize=warning
LayoutsPositioning=info
PropertyChangesParsed=info
UnexpectedVarType=warning

# Qt 6.5 duplicated categories
Quick.attached-property-type=info
Quick.layout-positioning=info
Quick.property-changes-parsed=info
81 changes: 48 additions & 33 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,29 @@ if(UNIX AND NOT IOS)
set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0 CACHE STRING "Required macOS version")
endif()

project(AusweisApp VERSION 2.1.1 LANGUAGES ${LANGUAGES})
if(CMAKE_BUILD_TYPE)
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
else()
set(CMAKE_BUILD_TYPE "DEBUG" CACHE STRING "build type configuration" FORCE)
endif()

get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(isMultiConfig)
if(NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
endif()

list(LENGTH CMAKE_CONFIGURATION_TYPES multiConfigCount)
if(NOT multiConfigCount EQUAL 1)
message(FATAL_ERROR "Multi-Config builds are not supported: QTBUG-123340")
endif()
endif()

project(AusweisApp VERSION 2.2.0 LANGUAGES ${LANGUAGES})

if(ANDROID AND NOT GOVERNIKUS_TOOLCHAIN_FILE)
message(FATAL_ERROR "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_DIR}/android.toolchain.cmake is required")
endif()

# Set TWEAK if not defined in PROJECT_VERSION above to
# have a valid tweak version without propagating it
Expand All @@ -29,10 +51,6 @@ if(APPLE AND NOT tools.only)
enable_language(OBJCXX)
endif()

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND (IOS OR ANDROID))
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/dist" CACHE PATH "default install path" FORCE)
endif()

option(BUILD_SHARED_LIBS "Enable build of shared libraries")
option(INTEGRATED_SDK "Build platform specific SDK" OFF)
option(CONTAINER_SDK "Build container specific SDK" OFF)
Expand Down Expand Up @@ -83,12 +101,6 @@ if("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}" AND NOT FORCE_SOURCE
message(FATAL_ERROR "in tree building is not supported!")
endif()

if(CMAKE_BUILD_TYPE)
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
else()
set(CMAKE_BUILD_TYPE "DEBUG" CACHE STRING "build type configuration" FORCE)
endif()

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

Expand All @@ -97,12 +109,16 @@ set(TEST_DIR ${PROJECT_SOURCE_DIR}/test)
set(DOCS_DIR ${PROJECT_SOURCE_DIR}/docs)
set(RESOURCES_DIR ${PROJECT_SOURCE_DIR}/resources)
set(PACKAGING_DIR ${RESOURCES_DIR}/packaging)
set(COPYRIGHT_TEXT "2014-2023 ${VENDOR}")
set(COPYRIGHT_TEXT "2014-2024 ${VENDOR}")
if(APPLE)
string(REPLACE " \& " " \& " COPYRIGHT_TEXT ${COPYRIGHT_TEXT})
endif()
set(BUNDLE_IDENTIFIER com.governikus.ausweisapp2)

if(NOT CONTAINER_SDK)
include(CTest)
endif()

include(Tools)
include(DVCS)
add_subdirectory(docs)
Expand All @@ -114,28 +130,10 @@ if(tools.only)
return()
endif()

if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND NOT CONTAINER_SDK)
set(VALGRIND_SUPPRESSIONS "${CMAKE_PREFIX_PATH}/test/valgrind.supp")
if(NOT EXISTS "${VALGRIND_SUPPRESSIONS}")
set(VALGRIND_SUPPRESSIONS "${CMAKE_SOURCE_DIR}/libs/test/valgrind.supp")
endif()
message(STATUS "Using valgrind suppressions: ${VALGRIND_SUPPRESSIONS}")
set(VALGRIND_COMMAND_OPTIONS "--tool=memcheck --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1 --gen-suppressions=all --suppressions=${VALGRIND_SUPPRESSIONS}")

include(CTest)
configure_file("${CMAKE_DIR}/CTestCustom.cmake.in" "${CMAKE_BINARY_DIR}/CTestCustom.cmake" @ONLY)

set(SONAR_CACHE_DIR ${CMAKE_BINARY_DIR}/../cache)
if(NOT EXISTS "${SONAR_CACHE_DIR}")
set(SONAR_CACHE_DIR ${CMAKE_BINARY_DIR})
endif()
get_filename_component(SONAR_CACHE_DIR ${SONAR_CACHE_DIR} ABSOLUTE)
configure_file("${RESOURCES_DIR}/sonar-project.properties.in" "${CMAKE_BINARY_DIR}/sonar-project.properties" @ONLY)
endif()

option(USE_SMARTEID "Enable Smart-eID" OFF)

include(Libraries)
include(PoliciesQt)
include(Tools.Libraries)
include(CompilerFlags)

Expand All @@ -145,8 +143,7 @@ endif()

add_subdirectory(resources)
add_subdirectory(src)

if(TARGET ${Qt}::Test AND NOT IOS)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

Expand All @@ -156,5 +153,23 @@ endif()

include(Packaging)

if(BUILD_TESTING)
set(VALGRIND_SUPPRESSIONS "${CMAKE_PREFIX_PATH}/test/valgrind.supp")
if(NOT EXISTS "${VALGRIND_SUPPRESSIONS}")
set(VALGRIND_SUPPRESSIONS "${CMAKE_SOURCE_DIR}/libs/test/valgrind.supp")
endif()
message(STATUS "Using valgrind suppressions: ${VALGRIND_SUPPRESSIONS}")
set(VALGRIND_COMMAND_OPTIONS "--tool=memcheck --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1 --gen-suppressions=all --suppressions=${VALGRIND_SUPPRESSIONS}")

configure_file("${CMAKE_DIR}/CTestCustom.cmake.in" "${CMAKE_BINARY_DIR}/CTestCustom.cmake" @ONLY)

set(SONAR_CACHE_DIR ${CMAKE_BINARY_DIR}/../cache)
if(NOT EXISTS "${SONAR_CACHE_DIR}")
set(SONAR_CACHE_DIR ${CMAKE_BINARY_DIR})
endif()
get_filename_component(SONAR_CACHE_DIR ${SONAR_CACHE_DIR} ABSOLUTE)
configure_file("${RESOURCES_DIR}/sonar-project.properties.in" "${CMAKE_BINARY_DIR}/sonar-project.properties" @ONLY)
endif()

include(FeatureSummary)
FEATURE_SUMMARY(WHAT ALL)
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION=3.19
ARG ALPINE_VERSION=3.20

FROM alpine:$ALPINE_VERSION as builder
# Install development stuff
Expand Down Expand Up @@ -52,7 +52,7 @@ COPY --from=builder /usr/local/share /usr/local/share
COPY --from=builder /usr/local/bin/AusweisApp /usr/local/bin/AusweisApp

RUN apk --no-cache upgrade -a && \
apk --no-cache add tini pcsc-lite pcsc-lite-libs ccid pcsc-cyberjack acsccid eudev-libs doas && \
apk --no-cache add tini libstdc++ pcsc-lite-libs eudev-libs doas && \
echo 'permit nopass :wheel' > /etc/doas.d/wheel.conf && \
adduser ausweisapp -G wheel -s /bin/sh -D && \
mkdir -p /home/ausweisapp/.config && chown ausweisapp: /home/ausweisapp/.config
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.officially.txt
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,12 @@ Die verwendeten Open-Source-Bibliotheken unterliegen den folgenden Nutzungsbedin

OpenSSL
Lizenz: Apache 2.0
Version: 3.1.5
Version: 3.3.1
Adresse: https://www.openssl.org/

Qt
Lizenz: LGPL v3
Version: 6.5.3
Version: 6.7.2
Adresse: https://www.qt.io/

http_parser
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ Die verwendeten Open-Source-Bibliotheken unterliegen den folgenden Nutzungsbedin

OpenSSL
Lizenz: Apache 2.0
Version: 3.1.5
Version: 3.3.1
Adresse: https://www.openssl.org/

Qt
Lizenz: LGPL v3
Version: 6.5.3
Version: 6.7.2
Adresse: https://www.qt.io/

http_parser
Expand Down
21 changes: 14 additions & 7 deletions cmake/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_FOREACH)
add_definitions(-DQT_NO_KEYWORDS)
add_definitions(-DQT_NO_EXCEPTIONS)

if(NOT MSVC AND NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC" AND QT5)
add_definitions(-DQT_STRICT_ITERATORS)
endif()
add_definitions(-DQT_NO_CONTEXTLESS_CONNECT)

if(QT_VENDOR STREQUAL "Governikus")
add_definitions(-DGOVERNIKUS_QT)
Expand Down Expand Up @@ -168,7 +165,7 @@ else()
endif()


# QTBUG-82978
# QTBUG-82978, QTBUG-122004, QTBUG-122582
if(CMAKE_CXX_FLAGS MATCHES "-Wextra-semi-stmt")
list(APPEND INCOMPATIBLE_QT_COMPILER_FLAGS "-Wno-extra-semi-stmt")
endif()
Expand All @@ -177,8 +174,18 @@ else()
list(APPEND INCOMPATIBLE_QT_COMPILER_FLAGS "-Wno-useless-cast")
endif()

if(CMAKE_CXX_FLAGS MATCHES "-Wconversion" AND MAC)
list(APPEND INCOMPATIBLE_QT_COMPILER_FLAGS "-Wno-sign-conversion")
if(CMAKE_CXX_FLAGS MATCHES "-Wconversion")
list(APPEND INCOMPATIBLE_QT_COMPILER_FLAGS "-Wno-conversion")
endif()

# codereview: 541911
if(CMAKE_CXX_FLAGS MATCHES "-Wnewline-eof")
list(APPEND INCOMPATIBLE_QT_COMPILER_FLAGS "-Wno-newline-eof")
endif()

# QTBUG-114897
if(QT_VERSION VERSION_LESS "6.5.3" AND CMAKE_CXX_FLAGS MATCHES "-Wshadow")
list(APPEND INCOMPATIBLE_QT_COMPILER_FLAGS "-Wno-shadow")
endif()
endif()

Expand Down
66 changes: 36 additions & 30 deletions cmake/Helper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function(ADD_FLAG)
endif()

if(NOT _PARAM_LINK_VAR)
set(_PARAM_LINK_VAR CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
set(_PARAM_LINK_VAR CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS)
endif()

if(_PARAM_LINK)
Expand Down Expand Up @@ -109,34 +109,6 @@ function(GET_PUBLIC_HEADER _target _out)
endfunction()


function(QUERY_QMAKE _out _var)
if(NOT TARGET ${Qt}::qmake)
message(WARNING "qmake not found")
return()
endif()

get_target_property(qmake_bin ${Qt}::qmake LOCATION)

if (IOS OR ANDROID)
find_file(TARGET_QT_CONF target_qt.conf PATH_SUFFIXES /bin CMAKE_FIND_ROOT_PATH_BOTH)
if(NOT TARGET_QT_CONF)
message(FATAL_ERROR "Could not find target_qt.conf")
endif()

set(QT_CONFIG -qtconf ${TARGET_QT_CONF})
endif()

execute_process(COMMAND "${qmake_bin}" ${QT_CONFIG} -query ${_var}
RESULT_VARIABLE _result
OUTPUT_VARIABLE _output
OUTPUT_STRIP_TRAILING_WHITESPACE)

if(_result EQUAL 0)
set(${_out} "${_output}" PARENT_SCOPE)
endif()
endfunction()


function(GET_FILE_MATCHER _result_remove _result_keep)
if(NOT ANDROID)
list(APPEND matcher_remove "_android")
Expand Down Expand Up @@ -204,7 +176,7 @@ endfunction()
function(ADD_PLATFORM_LIBRARY _name)
set(options)
set(oneValueArgs)
set(multiValueArgs PATH)
set(multiValueArgs PATH EXCLUDE)
cmake_parse_arguments(_PARAM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

GET_FILE_EXTENSIONS(FILE_EXTENSIONS PATH ${_PARAM_PATH})
Expand All @@ -215,6 +187,21 @@ function(ADD_PLATFORM_LIBRARY _name)
foreach(file ${FILES})
string(REPLACE "${CMAKE_SOURCE_DIR}" "" file_stripped "${file}")

if(_PARAM_EXCLUDE)
set(skip_file FALSE)
foreach(exclude ${_PARAM_EXCLUDE})
if(file_stripped MATCHES "${exclude}")
set(skip_file TRUE)
break()
endif()
endforeach()

if(skip_file)
list(REMOVE_ITEM FILES "${file}")
continue()
endif()
endif()

set(keep FALSE)
foreach(match ${matcher_keep})
if("${file_stripped}" MATCHES ${match})
Expand Down Expand Up @@ -414,6 +401,25 @@ function(map_get_value _var _map _key)
set(${_var} ${${_map}_${_key}} PARENT_SCOPE)
endfunction()

function(configure_files _path _pattern _destination)
set(options FLATTEN)
set(oneValueArgs)
set(multiValueArgs)
cmake_parse_arguments(_PARAM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

foreach(pattern ${_pattern})
file(GLOB_RECURSE files RELATIVE "${_path}" "${_path}/${pattern}")
foreach(entry ${files})
if(_PARAM_FLATTEN)
get_filename_component(destEntry "${entry}" NAME)
else()
set(destEntry ${entry})
endif()

configure_file("${_path}/${entry}" "${_destination}/${destEntry}" COPYONLY)
endforeach()
endforeach()
endfunction()

if(WIN32)
if(WIN_SIGN_SUBJECT_NAME OR (WIN_SIGN_KEYSTORE AND WIN_SIGN_KEYSTORE_PSW))
Expand Down
Loading

0 comments on commit 7e84e66

Please sign in to comment.