Skip to content

Commit

Permalink
Increase version number
Browse files Browse the repository at this point in the history
- add arm64 support to iOS simulator

IB-7723

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Aug 15, 2023
1 parent ecdcd14 commit 5947965
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions build-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -55,15 +55,15 @@ 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"
TARGET=iphonecatalyst
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"
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 1 files
+2 −13 modules/FindXSD.cmake
5 changes: 4 additions & 1 deletion examples/ios/libdigidocpp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@
4E7663901B5A37AC00672ACF /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1340;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = RIA;
TargetAttributes = {
4E7663971B5A37AC00672ACF = {
Expand Down Expand Up @@ -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)",
Expand Down Expand Up @@ -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)",
Expand Down
14 changes: 10 additions & 4 deletions examples/ios/libdigidocpp/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="IK0-T2-QRg">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="IK0-T2-QRg">
<device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -14,7 +15,7 @@
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="bxP-Ml-Kgh">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="URL" id="BTg-An-Atm" customClass="URLTableViewCell">
<rect key="frame" x="0.0" y="50" width="375" height="43.5"/>
Expand Down Expand Up @@ -85,4 +86,9 @@
<point key="canvasLocation" x="-671.5" y="-746.5"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
4 changes: 1 addition & 3 deletions examples/ios/libdigidocpp/MasterViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
13 changes: 7 additions & 6 deletions prepare_osx_build_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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}"
Expand All @@ -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 } "
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 5947965

Please sign in to comment.