Skip to content

Commit 94fc98c

Browse files
Caggegiclaude
andauthored
Add arm64 (Apple Silicon) support with universal binary (#476)
- Set ARCHS = "arm64 x86_64" explicitly in project-level Debug and Release configs - Raise MACOSX_DEPLOYMENT_TARGET from 10.12.2 to 11.0 (minimum macOS for Apple Silicon) - Pass ARCHS="arm64 x86_64" in build.sh and CI workflows to guarantee universal output - Update CI action versions (checkout@v3, setup-node@v3, Node 18.x) - Add lipo verification step in build-test CI to confirm universal binary Sparkle.framework was already a universal binary (x86_64 + arm64). Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c06615c commit 94fc98c

5 files changed

Lines changed: 19 additions & 13 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: macOS-latest
88

99
steps:
10-
- uses: actions/checkout@v1
10+
- uses: actions/checkout@v3
1111

1212
- name: Run tests
1313
run: xcodebuild test -project MTMR.xcodeproj -scheme 'UnitTests' | xcpretty -c && exit ${PIPESTATUS[0]}
@@ -16,7 +16,10 @@ jobs:
1616
runs-on: macOS-latest
1717

1818
steps:
19-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@v3
2020

21-
- name: Build
22-
run: xcodebuild archive -project "MTMR.xcodeproj" -scheme "MTMR" -archivePath Release/App.xcarchive DEVELOPMENT_TEAM="" CODE_SIGN_IDENTITY="" | xcpretty -c && exit ${PIPESTATUS[0]}
21+
- name: Build (universal binary)
22+
run: xcodebuild archive -project "MTMR.xcodeproj" -scheme "MTMR" -archivePath Release/App.xcarchive DEVELOPMENT_TEAM="" CODE_SIGN_IDENTITY="" ARCHS="arm64 x86_64" | xcpretty -c && exit ${PIPESTATUS[0]}
23+
24+
- name: Verify universal binary
25+
run: lipo -info Release/App.xcarchive/Products/Applications/MTMR.app/Contents/MacOS/MTMR

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ jobs:
1212
runs-on: macOS-latest
1313

1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v3
1616

1717
- name: Set up Node.js
18-
uses: actions/setup-node@v1
18+
uses: actions/setup-node@v3
1919
with:
20-
node-version: 12.x
20+
node-version: 18.x
2121

2222
- name: Install create-dmg
2323
run: npm i -g create-dmg
2424

25-
- name: Build Archive
26-
run: xcodebuild archive -project "MTMR.xcodeproj" -scheme "MTMR" -archivePath Release/App.xcarchive DEVELOPMENT_TEAM="" CODE_SIGN_IDENTITY="" | xcpretty -c && exit ${PIPESTATUS[0]}
25+
- name: Build Archive (universal binary)
26+
run: xcodebuild archive -project "MTMR.xcodeproj" -scheme "MTMR" -archivePath Release/App.xcarchive DEVELOPMENT_TEAM="" CODE_SIGN_IDENTITY="" ARCHS="arm64 x86_64" | xcpretty -c && exit ${PIPESTATUS[0]}
2727

2828
- name: Build App
2929
run: xcodebuild -project "MTMR.xcodeproj" -exportArchive -archivePath Release/App.xcarchive -exportOptionsPlist export-options.plist -exportPath Release | xcpretty -c && exit ${PIPESTATUS[0]}

MTMR.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@
550550
isa = XCBuildConfiguration;
551551
buildSettings = {
552552
ALWAYS_SEARCH_USER_PATHS = NO;
553+
ARCHS = "arm64 x86_64";
553554
CLANG_ANALYZER_NONNULL = YES;
554555
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
555556
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -595,7 +596,7 @@
595596
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
596597
GCC_WARN_UNUSED_FUNCTION = YES;
597598
GCC_WARN_UNUSED_VARIABLE = YES;
598-
MACOSX_DEPLOYMENT_TARGET = 10.12.2;
599+
MACOSX_DEPLOYMENT_TARGET = 11.0;
599600
MTL_ENABLE_DEBUG_INFO = YES;
600601
ONLY_ACTIVE_ARCH = YES;
601602
SDKROOT = macosx;
@@ -608,6 +609,7 @@
608609
isa = XCBuildConfiguration;
609610
buildSettings = {
610611
ALWAYS_SEARCH_USER_PATHS = NO;
612+
ARCHS = "arm64 x86_64";
611613
CLANG_ANALYZER_NONNULL = YES;
612614
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
613615
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -648,7 +650,7 @@
648650
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
649651
GCC_WARN_UNUSED_FUNCTION = YES;
650652
GCC_WARN_UNUSED_VARIABLE = YES;
651-
MACOSX_DEPLOYMENT_TARGET = 10.12.2;
653+
MACOSX_DEPLOYMENT_TARGET = 11.0;
652654
MTL_ENABLE_DEBUG_INFO = NO;
653655
SDKROOT = macosx;
654656
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

MTMR/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>0.27</string>
2121
<key>CFBundleVersion</key>
22-
<string>448</string>
22+
<string>452</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.utilities</string>
2525
<key>LSMinimumSystemVersion</key>

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ rm -r Release 2>/dev/null
66

77
xcodebuild archive \
88
-scheme "$NAME" \
9-
-archivePath Release/App.xcarchive | xcpretty -c
9+
-archivePath Release/App.xcarchive \
10+
ARCHS="arm64 x86_64" | xcpretty -c
1011

1112
xcodebuild \
1213
-exportArchive \

0 commit comments

Comments
 (0)