Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ios,mac): support build on Apple Silicon using Xcode 15.3 #11302

Merged
merged 17 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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 ios/engine/KMEI/KeymanEngine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/usr/bin/env bash";
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n. \"$KEYMAN_ROOT/resources/build/xcode-utils.sh\"\n\nphaseSetBundleVersions true\n";
shellScript = "\"$KEYMAN_ROOT/resources/build/xcode-wrap.sh\" \"$KEYMAN_ROOT/resources/build/set-bundle-versions-tagged.sh\"\n";
showEnvVarsInLog = 0;
};
CEC0C66F2410B005003E1BCD /* Run Script - upload dsyms to Sentry */ = {
Expand Down
4 changes: 2 additions & 2 deletions ios/keyman/Keyman/Keyman.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/usr/bin/env bash";
shellScript = ". \"$KEYMAN_ROOT/resources/build/xcode-utils.sh\"\n\n# Calls resource script to update build products' versioning.\n# true: applies VERSION_WITH_TAG to custom KeymanVersionWithTag plist member used for in-app display\nphaseSetBundleVersions true\n\n# Also updates the version string for Settings\nsetSettingsBundleVersion\n";
shellScript = "\"$KEYMAN_ROOT/resources/build/xcode-wrap.sh\" \"$KEYMAN_ROOT/resources/build/set-bundle-versions-and-settings.sh\"\n";
showEnvVarsInLog = 0;
};
CED3CFDA240E49DF001540A1 /* ShellScript */ = {
Expand All @@ -1020,7 +1020,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/usr/bin/env bash";
shellScript = ". \"$KEYMAN_ROOT/resources/build/xcode-utils.sh\"\n\n# Calls resource script to update build products' versioning.\nphaseSetBundleVersions\n";
shellScript = "\"$KEYMAN_ROOT/resources/build/xcode-wrap.sh\" \"$KEYMAN_ROOT/resources/build/set-bundle-versions-untagged.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
10 changes: 6 additions & 4 deletions mac/Keyman4Mac/Keyman4Mac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -375,7 +375,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
Expand All @@ -399,7 +399,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = org.sil.Keyman4Mac;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -425,7 +425,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = org.sil.Keyman4Mac;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_VERSION = 0.0.1;
Expand All @@ -451,6 +451,7 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Keyman4Mac.app/Contents/MacOS/Keyman4Mac";
};
Expand All @@ -471,6 +472,7 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Keyman4Mac.app/Contents/MacOS/Keyman4Mac";
};
Expand Down
12 changes: 6 additions & 6 deletions mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -1275,7 +1275,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
Expand Down Expand Up @@ -1314,7 +1314,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
ONLY_ACTIVE_ARCH = YES;
OTHER_CODE_SIGN_FLAGS = "--timestamp --verbose";
PRODUCT_BUNDLE_IDENTIFIER = "keyman.inputmethod.$(PRODUCT_NAME:rfc1034identifier)";
Expand Down Expand Up @@ -1358,7 +1358,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_CODE_SIGN_FLAGS = "--timestamp --verbose";
PRODUCT_BUNDLE_IDENTIFIER = "keyman.inputmethod.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1402,7 +1402,7 @@
"@loader_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = org.sil.consoleTestbed.KeymanTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1436,7 +1436,7 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = org.sil.consoleTestbed.KeymanTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
2 changes: 1 addition & 1 deletion mac/Keyman4MacIM/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment the next line to define a global platform for your project
platform :osx, '10.10'
platform :osx, '10.13'
use_frameworks!

target 'Keyman' do
Expand Down
2 changes: 1 addition & 1 deletion mac/Keyman4MacIM/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
Sentry: 7d075cae43a9a518fdd51e258b6212f0527c51cd

PODFILE CHECKSUM: 521a56f741ba869ecf0fd64a7773173265973269
PODFILE CHECKSUM: d1e1f991bca05599c1667234a03e9f365d109ed0

COCOAPODS: 1.11.2
10 changes: 6 additions & 4 deletions mac/KeymanEngine4Mac/KeymanEngine4Mac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@
);
INSTALL_PATH = "";
"LIBRARY_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../core/build/mac/debug";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -647,7 +647,7 @@
);
INSTALL_PATH = "";
"LIBRARY_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../core/build/mac/release";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -685,7 +685,7 @@
"$(PROJECT_DIR)/../../core/build/mac-x86_64/debug/subprojects/icu/source/i18n",
"$(PROJECT_DIR)/../../core/build/mac/debug",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
ONLY_ACTIVE_ARCH = NO;
"OTHER_LDFLAGS[arch=*]" = "-lstdc++";
PRODUCT_BUNDLE_IDENTIFIER = org.sil.KeymanEngine4Mac;
Expand Down Expand Up @@ -728,7 +728,7 @@
"$(PROJECT_DIR)/../../core/build/mac-x86_64/release/subprojects/icu/source/i18n",
"$(PROJECT_DIR)/../../core/build/mac/release",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
"OTHER_LDFLAGS[arch=*]" = "-lstdc++";
PRODUCT_BUNDLE_IDENTIFIER = org.sil.KeymanEngine4Mac;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -753,6 +753,7 @@
);
INFOPLIST_FILE = KeymanEngine4MacTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "Tavultesoft.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -768,6 +769,7 @@
);
INFOPLIST_FILE = KeymanEngine4MacTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "Tavultesoft.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down
6 changes: 2 additions & 4 deletions mac/help/about/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ title: System Requirements

Keyman supports the following Mac operating systems:

* Mac OS X Yosemite (10.10)
* Mac OS X El Capitan (10.11)
* macOS Sierra (10.12)
* macOS High Sierra (10.13)
* macOS Mojave (10.14)
* macOS Catalina (10.15)
* macOS Big Sur (11.0)
* macOS Monterey (12.0)
* macOS Ventura (13.0)
* macOS Sonoma (14.0)

Keyman should also work on future releases of macOS, even if they are not yet listed here.

## Resource Requirements

Keyman for macOS has minimal resource requirements. Any computer running
Mac OS X 10.10 or later should be able to run Keyman for macOS without trouble.
Mac OS X 10.13 or later should be able to run Keyman for macOS without trouble.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Mac OS X 10.13 or later should be able to run Keyman for macOS without trouble.
macOS 10.13 or later should be able to run Keyman for macOS without trouble.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keymanapp/keyman.com@486df1b updates the minimum version listed on keyman.com

6 changes: 3 additions & 3 deletions mac/help/common/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ title: Which versions does Keyman for macOS work with?

Keyman supports the following Mac operating systems:

* Mac OS X Yosemite (10.10)
* Mac OS X El Capitan (10.11)
* macOS Sierra (10.12)
* macOS High Sierra (10.13)
* macOS Mojave (10.14)
* macOS Catalina (10.15)
* macOS Big Sur (11.0)
* macOS Monterey (12.0)
* macOS Ventura (13.0)
* macOS Sonoma (14.0)
2 changes: 1 addition & 1 deletion mac/help/common/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ title: What are Keyman's hardware requirements?
---

Keyman for macOS has minimal resource requirements. Any computer running
Mac OS X 10.10 or later should be able to run Keyman for macOS without trouble.
Mac OS X 10.13 or later should be able to run Keyman for macOS without trouble.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Mac OS X 10.13 or later should be able to run Keyman for macOS without trouble.
macOS 10.13 or later should be able to run Keyman for macOS without trouble.

11 changes: 11 additions & 0 deletions resources/build/set-bundle-versions-and-settings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#!/bin/bash
#!/usr/bin/env bash

We should be using env throughout to signify that we want the bash version from the path, even though we are attempting to run the scripts with the correct version of bash.


# Calls script in xcode-utils to update the version
# true: applies VERSION_WITH_TAG to custom KeymanVersionWithTag plist member used for in-app display
# updates the version string for Settings

source "$KEYMAN_ROOT/resources/build/xcode-utils.sh"

phaseSetBundleVersions true

setSettingsBundleVersion
7 changes: 7 additions & 0 deletions resources/build/set-bundle-versions-tagged.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Calls script in xcode-utils to update the version
# true: applies VERSION_WITH_TAG to custom KeymanVersionWithTag plist member used for in-app display

source "$KEYMAN_ROOT/resources/build/xcode-utils.sh"
phaseSetBundleVersions true
6 changes: 6 additions & 0 deletions resources/build/set-bundle-versions-untagged.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Calls script in xcode-utils to update the version

source "$KEYMAN_ROOT/resources/build/xcode-utils.sh"
phaseSetBundleVersions
11 changes: 11 additions & 0 deletions resources/build/xcode-wrap.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see if we can move this to resources/build/mac as well A18S1

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

echo "wrap script for arch $(arch)"
if [[ $(arch) == i386 ]] && [[ -f /usr/local/bin/bash ]]; then
/usr/local/bin/bash -l "$@" || exit $?
elif [[ $(arch) == arm64 ]] && [[ -f /opt/homebrew/bin/bash ]]; then
/opt/homebrew/bin/bash -l "$@" || exit $?
else
>&2 echo "Could not start build due to missing homebrew bash"
exit 55
fi
2 changes: 1 addition & 1 deletion resources/devbox/macos/macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ which brew || (
## Install devchain components

BREW_ALL="bash jq python3 meson ninja coreutils pyenv"
BREW_WEB="node emscripten openjdk@8"
BREW_WEB="node emscripten"
BREW_IOS="swiftlint carthage"
BREW_MACOS="carthage cocoapods"
BREW_ANDROID="openjdk@8 android-sdk android-studio ant gradle maven"
Expand Down
Loading