From 5947965e8962b00f35d3405b8bc093e317a26a7e Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 15 Aug 2023 09:15:31 +0300 Subject: [PATCH] Increase version number - add arm64 support to iOS simulator IB-7723 Signed-off-by: Raul Metsma --- CMakeLists.txt | 2 +- CONTRIBUTING.md | 1 - README.md | 3 +-- build-library.sh | 10 +++++----- build.ps1 | 3 +-- cmake | 2 +- .../ios/libdigidocpp.xcodeproj/project.pbxproj | 5 ++++- .../ios/libdigidocpp/Base.lproj/Main.storyboard | 14 ++++++++++---- examples/ios/libdigidocpp/MasterViewController.mm | 4 +--- prepare_osx_build_environment.sh | 13 +++++++------ 10 files changed, 31 insertions(+), 26 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CMakeLists.txt b/CMakeLists.txt index a519f6717..6df4989ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) if(POLICY CMP0122) cmake_policy(SET CMP0122 NEW) endif() -project(libdigidocpp VERSION 3.16.0) +project(libdigidocpp VERSION 3.17.0) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) include(VersionInfo) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 7e717b5f7..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please read the [common contributing guidelines](https://github.com/open-eid/org/blob/master/CONTRIBUTING.md) before you continue! diff --git a/README.md b/README.md index e14cce32c..31505145f 100644 --- a/README.md +++ b/README.md @@ -110,8 +110,7 @@ cmake -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake ` -DVCPKG_TARGET_TRIPLET=x64-windows-v142 ` -DVCPKG_MANIFEST_FEATURES=tests ` - -DXSD_INCLUDE_DIR=xsd/libxsd ` - -DXSD_EXECUTABLE=xsd/bin/xsd.exe ` + -DXSD_ROOT=xsd/libxsd ` -B build -S . Optional CMake parameters: diff --git a/build-library.sh b/build-library.sh index 2f9925be8..5602f7702 100755 --- a/build-library.sh +++ b/build-library.sh @@ -11,9 +11,9 @@ if [ "$#" -eq 0 ]; then echo " - MACOSX_DEPLOYMENT_TARGET=10.15" echo " - IPHONEOS_DEPLOYMENT_TARGET=12.0" echo " archs to build on macOS/iOS" - echo " - ARCHS=\"x86_64 arm64\" (macOS)" + echo " - ARCHS=\"arm64 x86_64\" (macOS)" echo " - ARCHS=\"arm64\" (iOS)" - echo " - ARCHS=\"x86_64\" (iPhoneSimulator)" + echo " - ARCHS=\"arm64 x86_64\" (iPhoneSimulator)" exit fi @@ -55,7 +55,7 @@ case "$@" in echo "Building for iOS Simulator" TARGET=iphonesimulator SYSROOT=iphonesimulator - : ${ARCHS:="x86_64"} + : ${ARCHS:="arm64 x86_64"} ;; *catalyst*) echo "Building for iOS macOS Catalyst" @@ -63,7 +63,7 @@ case "$@" in SYSROOT=macosx export CFLAGS="-target x86_64-apple-ios-macabi" export CXXFLAGS="-target x86_64-apple-ios-macabi" - : ${ARCHS:="x86_64 arm64"} + : ${ARCHS:="arm64 x86_64"} ;; *) echo "Building for iOS" @@ -88,7 +88,7 @@ case "$@" in echo "Building for macOS" TARGET=macOS TARGET_PATH=/Library/libdigidocpp - : ${ARCHS:="x86_64 arm64"} + : ${ARCHS:="arm64 x86_64"} : ${MACOSX_DEPLOYMENT_TARGET:="10.15"} export MACOSX_DEPLOYMENT_TARGET esac diff --git a/build.ps1 b/build.ps1 index f9b748420..c7665e3a8 100644 --- a/build.ps1 +++ b/build.ps1 @@ -69,8 +69,7 @@ foreach($platform in @("x86", "x64")) { "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_dir/scripts/buildsystems/vcpkg.cmake" ` "-DVCPKG_TARGET_TRIPLET=$platform-windows-v$toolset" ` "-DVCPKG_INSTALLED_DIR=$vcpkg_installed\vcpkg_installed_$platform" ` - "-DXSD_INCLUDE_DIR=$xsd/libxsd" ` - "-DXSD_EXECUTABLE=$xsd/bin/xsd.exe" ` + "-DXSD_ROOT=$xsd" ` "-DSIGNCERT=$sign" ` "-DCROSSSIGNCERT=$crosssign" ` $cmakeext "&&" $cmake --build $buildpath --target check install diff --git a/cmake b/cmake index 01ec22ddc..60896303b 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 01ec22ddceaf93824737bed3158bd4a560c4af9d +Subproject commit 60896303b94527c015958225ac3c5c1321786975 diff --git a/examples/ios/libdigidocpp.xcodeproj/project.pbxproj b/examples/ios/libdigidocpp.xcodeproj/project.pbxproj index 17740beaa..c62f6eb9e 100644 --- a/examples/ios/libdigidocpp.xcodeproj/project.pbxproj +++ b/examples/ios/libdigidocpp.xcodeproj/project.pbxproj @@ -169,7 +169,8 @@ 4E7663901B5A37AC00672ACF /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1340; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = RIA; TargetAttributes = { 4E7663971B5A37AC00672ACF = { @@ -357,6 +358,7 @@ BUILD_NUMBER = 0; CODE_SIGN_ENTITLEMENTS = libdigidocpp/libdigidocpp.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -407,6 +409,7 @@ BUILD_NUMBER = 0; CODE_SIGN_ENTITLEMENTS = libdigidocpp/libdigidocpp.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/examples/ios/libdigidocpp/Base.lproj/Main.storyboard b/examples/ios/libdigidocpp/Base.lproj/Main.storyboard index 427e7ef55..efbbef265 100644 --- a/examples/ios/libdigidocpp/Base.lproj/Main.storyboard +++ b/examples/ios/libdigidocpp/Base.lproj/Main.storyboard @@ -1,9 +1,10 @@ - - + + - + + @@ -14,7 +15,7 @@ - + @@ -85,4 +86,9 @@ + + + + + diff --git a/examples/ios/libdigidocpp/MasterViewController.mm b/examples/ios/libdigidocpp/MasterViewController.mm index 42c368a3c..a8b1b89be 100644 --- a/examples/ios/libdigidocpp/MasterViewController.mm +++ b/examples/ios/libdigidocpp/MasterViewController.mm @@ -49,18 +49,16 @@ @interface MasterViewController : UITableViewController { @implementation MasterViewController +#if TESTING - (void)viewDidLoad { [super viewDidLoad]; -#if TESTING self.tableView.contentInset = UIEdgeInsetsMake(20, 0, 0, 0); URLTableViewCell *urlView = [self.tableView dequeueReusableCellWithIdentifier:@"URL"]; urlView.isAccessibilityElement = NO; urlView.accessibilityElements = @[urlView.search, urlView.run]; self.tableView.tableHeaderView = urlView; -#endif } -#if TESTING - (IBAction)runTest:(id)sender { URLTableViewCell *urlView = (URLTableViewCell *)self.tableView.tableHeaderView; [urlView.search endEditing:YES]; diff --git a/prepare_osx_build_environment.sh b/prepare_osx_build_environment.sh index 042408048..cce6d6c94 100755 --- a/prepare_osx_build_environment.sh +++ b/prepare_osx_build_environment.sh @@ -66,7 +66,7 @@ case "$@" in TARGET_PATH=/Library/libdigidocpp.iphonesimulator CONFIGURE="--host=arm-apple-darwin --enable-static --disable-shared --disable-dependency-tracking" SYSROOT=$(xcrun -sdk iphonesimulator --show-sdk-path) - : ${ARCHS:="x86_64"} + : ${ARCHS:="arm64 x86_64"} : ${IPHONEOS_DEPLOYMENT_TARGET:="12.0"} export IPHONEOS_DEPLOYMENT_TARGET export CFLAGS="-arch ${ARCHS// / -arch } -isysroot ${SYSROOT}" @@ -76,7 +76,7 @@ case "$@" in TARGET_PATH=/Library/libdigidocpp.iphonecatalyst CONFIGURE="--host=x86_64-apple-darwin --enable-static --disable-shared --disable-dependency-tracking" SYSROOT=$(xcrun -sdk macosx --show-sdk-path) - : ${ARCHS:="x86_64 arm64"} + : ${ARCHS:="arm64 x86_64"} : ${IPHONEOS_DEPLOYMENT_TARGET:="12.0"} export IPHONEOS_DEPLOYMENT_TARGET export CFLAGS="-arch ${ARCHS// / -arch } -target x86_64-apple-ios-macabi -isysroot ${SYSROOT}" @@ -96,7 +96,7 @@ case "$@" in TARGET_PATH=/Library/libdigidocpp CONFIGURE="--disable-static --enable-shared --disable-dependency-tracking" SYSROOT=$(xcrun -sdk macosx --show-sdk-path) - : ${ARCHS:="x86_64 arm64"} + : ${ARCHS:="arm64 x86_64"} : ${MACOSX_DEPLOYMENT_TARGET:="10.15"} export MACOSX_DEPLOYMENT_TARGET export CFLAGS="-arch ${ARCHS// / -arch } " @@ -256,13 +256,14 @@ function openssl { case "${ARCH}" in *x86_64*) case "${ARGS}" in - *simulator*) CC="" CFLAGS="" ./Configure iossimulator-xcrun --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;; + *simulator*) CC="" CFLAGS="-arch x86_64" ./Configure iossimulator-xcrun --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;; *catalyst*) CC="" CFLAGS="-target x86_64-apple-ios-macabi" ./Configure darwin64-x86_64 --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;; *) CC="" CFLAGS="" ./Configure darwin64-x86_64 --prefix=${TARGET_PATH} shared no-module no-tests enable-ec_nistp_64_gcc_128 esac ;; *arm64*) case "${ARGS}" in + *simulator*) CC="" CFLAGS="-arch arm64" ./Configure iossimulator-xcrun --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;; *catalyst*) CC="" CFLAGS="-target x86_64-apple-ios-macabi" ./Configure darwin64-arm64 --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;; *ios*) CC="" CFLAGS="" ./Configure ios64-xcrun --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;; *) CC="" CFLAGS="" ./Configure darwin64-arm64 --prefix=${TARGET_PATH} shared no-module no-tests enable-ec_nistp_64_gcc_128 @@ -426,8 +427,8 @@ case "$@" in echo " - MACOSX_DEPLOYMENT_TARGET=10.15" echo " - IPHONEOS_DEPLOYMENT_TARGET=12.0" echo " archs to build on macOS/iOS" - echo " - ARCHS=\"x86_64 arm64\" (macOS)" + echo " - ARCHS=\"arm64 x86_64\" (macOS)" echo " - ARCHS=\"arm64\" (iOS)" - echo " - ARCHS=\"x86_64\" (iPhoneSimulator)" + echo " - ARCHS=\"arm64 x86_64\" (iPhoneSimulator)" ;; esac