-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathMakefile-arm64
More file actions
112 lines (96 loc) · 3.61 KB
/
Makefile-arm64
File metadata and controls
112 lines (96 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
APP = RsyncUI
BUNDLE_ID = no.blogspot.$(APP)
VERSION = 2.9.3
BUILD_PATH = $(PWD)/build
# Arch-specific paths
APP_PATH_ARM64 = "$(BUILD_PATH)/arm64/$(APP).app"
ZIP_PATH_ARM64 = "$(BUILD_PATH)/$(APP).$(VERSION).arm64.zip"
DMG_ARM64 = "$(APP).$(VERSION).arm64.dmg"
# Default target builds both architectures
build: clean archive notarize-arm64 sign-arm64 prepare-dmg-arm64 open
# Debug builds
debug: clean archive-debug-arm64 open-debug
# --- MAIN WORKFLOW FUNCTIONS --- #
archive:
osascript -e 'display notification "Exporting arm64 archive..." with title "Build the RsyncUI"'
echo "Exporting application archive (RELEASE - arm64)..."
xcodebuild \
-scheme $(APP) \
-destination 'platform=OS X,arch=arm64' \
-configuration Release archive \
-archivePath $(BUILD_PATH)/arm64/$(APP).xcarchive \
ARCHS=arm64 \
ONLY_ACTIVE_ARCH=NO \
EXCLUDED_ARCHS=x86_64
xcodebuild -exportArchive \
-exportOptionsPlist "exportOptions.plist" \
-archivePath $(BUILD_PATH)/arm64/$(APP).xcarchive \
-exportPath $(BUILD_PATH)/arm64
ditto -c -k --keepParent $(APP_PATH_ARM64) $(ZIP_PATH_ARM64)
echo "Project archived successfully (RELEASE - arm64)"
archive-debug-arm64:
osascript -e 'display notification "Building debug arm64 version..." with title "Build the RsyncUI"'
echo "Building application (DEBUG - arm64)..."
xcodebuild \
-scheme $(APP) \
-destination 'platform=OS X,arch=arm64' \
-configuration Debug archive \
-archivePath $(BUILD_PATH)/arm64/$(APP).xcarchive \
ARCHS=arm64 \
ONLY_ACTIVE_ARCH=NO \
EXCLUDED_ARCHS=x86_64
xcodebuild -exportArchive \
-exportOptionsPlist "exportOptions.plist" \
-archivePath $(BUILD_PATH)/arm64/$(APP).xcarchive \
-exportPath $(BUILD_PATH)/arm64
echo "Debug build completed successfully (arm64)"
notarize-arm64:
osascript -e 'display notification "Submitting arm64 app for notarization..." with title "Build the RsyncUI"'
echo "Submitting arm64 app for notarization..."
xcrun notarytool submit --keychain-profile "RsyncUI" --wait $(ZIP_PATH_ARM64)
echo "RsyncUI arm64 successfully notarized"
sign-arm64:
osascript -e 'display notification "Stapling arm64 RsyncUI..." with title "Build the RsyncUI"'
echo "Stapling arm64 application..."
xcrun stapler staple $(APP_PATH_ARM64)
spctl -a -t exec -vvv $(APP_PATH_ARM64)
osascript -e 'display notification "RsyncUI arm64 successfully stapled" with title "Build the RsyncUI"'
echo "RsyncUI arm64 successfully stapled"
prepare-dmg-arm64:
../create-dmg/create-dmg \
--volname "RsyncUI ver $(VERSION) (Apple Silicon)" \
--background "./images/background.png" \
--window-pos 200 120 \
--window-size 500 320 \
--icon-size 80 \
--icon "RsyncUI.app" 125 175 \
--hide-extension "RsyncUI.app" \
--app-drop-link 375 175 \
--no-internet-enable \
--codesign 93M47F4H9T \
$(DMG_ARM64) \
$(APP_PATH_ARM64)
# --- HELPERS --- #
clean:
rm -rf $(BUILD_PATH)
if [ -a $(PWD)/$(DMG_ARM64) ]; then rm $(PWD)/$(DMG_ARM64); fi;
check:
xcrun notarytool log f62c4146-0758-4942-baac-9575190858b8 --keychain-profile "RsyncUI"
history:
xcrun notarytool history --keychain-profile "RsyncUI"
open:
osascript -e 'display notification "RsyncUI signed and ready for distribution" with title "Build the RsyncUI"'
echo "Opening working folder..."
open $(PWD)
open-debug:
osascript -e 'display notification "RsyncUI debug builds ready" with title "Build the RsyncUI"'
echo "Opening working folder..."
open $(PWD)
echo "Debug builds complete - arm64: $(APP_PATH_ARM64)"
.PHONY: build debug \
archive \
archive-debug-arm64 \
notarize-arm64 \
sign-arm64 \
prepare-dmg-arm64 \
clean check history open open-debug