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
21 changes: 8 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ jobs:
- name: Prepare vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 5ee5eee0d3e9c6098b24d263e9099edcdcef6631
vcpkgGitCommitId: 031ad89ce6c575df35a8e58707ad2c898446c63e
vcpkgJsonGlob: ./vcpkg.json
runVcpkgInstall: true
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
- name: Build
run: |
cmake --preset ${{ matrix.target }} "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=libdigidocpp.${{ matrix.target }}
cmake --preset ${{ matrix.target }} "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build --preset ${{ matrix.target }}
cmake --build --preset ${{ matrix.target }} --target install/strip
zip -q -r libdigidocpp.${{ matrix.target }}.zip libdigidocpp.${{ matrix.target }}
Expand Down Expand Up @@ -161,15 +161,12 @@ jobs:
path: libdigidocpp*.*
windows:
name: Build on Windows
runs-on: ${{ matrix.image }}
runs-on: windows-2025
strategy:
matrix:
toolset: [143]
platform: [x86, x64, arm64]
include:
- toolset: 143
image: windows-2022
vcvars: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"
- platform: x86
setenv: amd64_x86
- platform: x64
Expand All @@ -185,18 +182,15 @@ jobs:
- name: Prepare vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 5ee5eee0d3e9c6098b24d263e9099edcdcef6631
vcpkgGitCommitId: 031ad89ce6c575df35a8e58707ad2c898446c63e
vcpkgJsonGlob: ./vcpkg.json
runVcpkgInstall: true
runVcpkgFormatString: "[`install`, `--recurse`, `--clean-after-build`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `tests`]"
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed_${{ matrix.platform }}
- name: Install dependencies
run: |
choco install doxygen.install -y > $null
Invoke-WebRequest -UserAgent "Wget" "https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.2.1/swigwin-4.2.1.zip/download" -OutFile swig.zip
tar xf swig.zip
run: winget install --silent --accept-source-agreements --accept-package-agreements swig doxygen
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand All @@ -208,8 +202,9 @@ jobs:
architecture: ${{ matrix.platform }}
- name: Build
run: |
& "${{ matrix.vcvars }}" ${{ matrix.setenv }} "&&" pwsh build.ps1 `
-swig ${{ github.workspace }}/swigwin-4.2.1/swig.exe `
$swig = (Get-Item "$env:LOCALAPPDATA\Microsoft\WinGet\Links\swig.exe").Target
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" ${{ matrix.setenv }} "&&" pwsh build.ps1 `
-swig $swig `
-doxygen "C:/Program files/doxygen/bin/doxygen.exe" `
-boost
- name: Archive artifacts
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ endif()
if(POLICY CMP0177)
cmake_policy(SET CMP0177 NEW)
endif()
project(libdigidocpp VERSION 4.2.0)
project(libdigidocpp VERSION 4.3.0)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})

Expand Down Expand Up @@ -35,7 +35,7 @@ set( BUILD_TOOLS YES CACHE BOOL "Build digidoc-tool" )
set( BUILD_SHARED_LIBS YES CACHE BOOL "Build library as SHARED or STATIC" )
set( SIGNCERT "" CACHE STRING "Common name of certificate to used sign binaries, empty skip signing" )
set( CROSSSIGNCERT "" CACHE STRING "Common name of certificate to used cross sign binaries, empty skip signing" )
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
Expand Down
24 changes: 10 additions & 14 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,32 @@
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "base",
"displayName": "Base build config",
"hidden": true,
"inherits": "default",
"environment": {
"DEST": "/Library/libdigidocpp$env{DEST_SUFFIX}"
},
"installDir": "$env{DEST}"
},
{
"name": "macos",
"description": "This macos build is only available on macOS",
"inherits": "base",
"inherits": "default",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"installDir": "$env{DEST}",
"environment": {
"DEST": "/Library/libdigidocpp$env{DEST_SUFFIX}"
},
"cacheVariables": {
"CMAKE_OSX_ARCHITECTURES": "arm64;x86_64",
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0",
"CMAKE_OSX_DEPLOYMENT_TARGET": "13.0",
"CMAKE_FIND_ROOT_PATH": "$env{DEST}"
}
},
{
"name": "mobile",
"hidden": true,
"inherits": "base",
"inherits": "default",
"installDir": "$env{DEST}",
"environment": {
"DEST": "libdigidocpp$env{DEST_SUFFIX}",
"DEST_SUFFIX": ".${presetName}"
},
"cacheVariables": {
Expand All @@ -52,7 +48,7 @@
{
"name": "ios",
"hidden": true,
"inherits": ["mobile", "macos"],
"inherits": ["macos", "mobile"],
"cacheVariables": {
"CMAKE_SYSTEM_NAME": "iOS",
"CMAKE_OSX_SYSROOT": "${presetName}",
Expand Down
6 changes: 3 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string]$libdigidocpp = $PSScriptRoot,
[string]$platform = $env:PLATFORM,
[string]$build_number = $(if ($null -eq $env:BUILD_NUMBER) {"0"} else {$env:BUILD_NUMBER}),
[string]$msiversion = "4.2.0.$build_number",
[string]$msiversion = "4.3.0.$build_number",
[string]$msi_name = "libdigidocpp-$msiversion$env:VER_SUFFIX.$platform.msi",
[string]$git = "git.exe",
[string]$vcpkg = "vcpkg\vcpkg.exe",
Expand All @@ -23,8 +23,8 @@ Try {
& wix > $null
}
Catch {
& dotnet tool install -g --version 5.0.2 wix
& wix extension add -g WixToolset.UI.wixext/5.0.2
& dotnet tool install -g --version 6.0.1 wix
& wix extension add -g WixToolset.UI.wixext/6.0.1
}

if(!(Test-Path -Path $vcpkg)) {
Expand Down
4 changes: 2 additions & 2 deletions examples/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
def libsPath = '/Library/libdigidocpp'

android {
compileSdk 34
compileSdk 35
defaultConfig {
applicationId "ee.ria.libdigidocpp"
minSdk 30
targetSdk 34
targetSdk 35
versionCode 1
versionName "1.0"
if (System.getenv("BUILD_NUMBER")) {
Expand Down
2 changes: 1 addition & 1 deletion examples/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.8.1'
classpath 'com.android.tools.build:gradle:8.12.0'
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
26 changes: 13 additions & 13 deletions examples/ios/libdigidocpp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1520;
LastUpgradeCheck = 1640;
ORGANIZATIONNAME = RIA;
TargetAttributes = {
4E7663971B5A37AC00672ACF = {
Expand Down Expand Up @@ -215,7 +215,7 @@
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
Expand Down Expand Up @@ -243,10 +243,11 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = ET847QJV9F;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
Expand Down Expand Up @@ -274,7 +275,7 @@
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
Expand All @@ -301,10 +302,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = ET847QJV9F;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
Expand All @@ -325,10 +327,9 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
BUILD_NUMBER = 0;
CODE_SIGN_ENTITLEMENTS = libdigidocpp/libdigidocpp.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)";
DEVELOPMENT_TEAM = ET847QJV9F;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
FRAMEWORK_SEARCH_PATHS = "$(SDKPATH)/lib";
GCC_PREPROCESSOR_DEFINITIONS = (
Expand All @@ -341,6 +342,7 @@
"$(PROJECT_DIR)/../../src/minizip",
);
INFOPLIST_FILE = libdigidocpp/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
Expand All @@ -355,8 +357,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ee.ria.libdigidocpp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKPATH = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.iphoneos";
"SDKPATH[sdk=iphonesimulator*]" = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.iphonesimulator";
SDKPATH = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.$(PLATFORM_NAME)";
"SDKPATH[sdk=macosx*]" = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.iphonecatalyst";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand All @@ -370,10 +371,9 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
BUILD_NUMBER = 0;
CODE_SIGN_ENTITLEMENTS = libdigidocpp/libdigidocpp.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)";
DEVELOPMENT_TEAM = ET847QJV9F;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
FRAMEWORK_SEARCH_PATHS = "$(SDKPATH)/lib";
GCC_PREPROCESSOR_DEFINITIONS = (
Expand All @@ -386,6 +386,7 @@
"$(PROJECT_DIR)/../../src/minizip",
);
INFOPLIST_FILE = libdigidocpp/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
Expand All @@ -400,8 +401,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ee.ria.libdigidocpp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKPATH = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.iphoneos";
"SDKPATH[sdk=iphonesimulator*]" = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.iphonesimulator";
SDKPATH = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.$(PLATFORM_NAME)";
"SDKPATH[sdk=macosx*]" = "$(LOCAL_LIBRARY_DIR)/libdigidocpp.iphonecatalyst";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down
2 changes: 0 additions & 2 deletions examples/ios/libdigidocpp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
</array>
</dict>
</array>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand Down
27 changes: 13 additions & 14 deletions examples/ios/libdigidocpp/MasterViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ @interface URLTableViewCell: UITableViewCell
@implementation URLTableViewCell
@end

@interface MasterViewController : UITableViewController {
#if TESTING
NSMutableArray *result;
#endif
}
@interface MasterViewController : UITableViewController
@end

@implementation MasterViewController

#if TESTING
{
NSMutableArray *result;
}

- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.contentInset = UIEdgeInsetsMake(20, 0, 0, 0);
Expand Down Expand Up @@ -238,14 +237,14 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.textLabel.text = [NSString stdstring:signature->signedBy()];
break;
case 1:
using Validator = digidoc::Signature::Validator;
switch (Validator(signature).status()) {
case Validator::Valid: cell.textLabel.text = @"Valid"; break;
case Validator::Warning: cell.textLabel.text = @"Warning"; break;
case Validator::NonQSCD: cell.textLabel.text = @"NonQSCD"; break;
case Validator::Test: cell.textLabel.text = @"Test"; break;
case Validator::Unknown: cell.textLabel.text = @"Unknown"; break;
case Validator::Invalid: cell.textLabel.text = @"Invalid"; break;
switch (digidoc::Signature::Validator(signature).status()) {
using enum digidoc::Signature::Validator::Status;
case Valid: cell.textLabel.text = @"Valid"; break;
case Warning: cell.textLabel.text = @"Warning"; break;
case NonQSCD: cell.textLabel.text = @"NonQSCD"; break;
case Test: cell.textLabel.text = @"Test"; break;
case Unknown: cell.textLabel.text = @"Unknown"; break;
case Invalid: cell.textLabel.text = @"Invalid"; break;
}
break;
case 2:
Expand Down
6 changes: 3 additions & 3 deletions examples/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'java'
}
group 'ee.ria'
group = 'ee.ria'
java {
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
base {
archivesName = 'libdigidocpp'
Expand Down
Binary file modified examples/java/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/java/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading
Loading