-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
390 lines (344 loc) · 18.8 KB
/
Copy pathMakefile
File metadata and controls
390 lines (344 loc) · 18.8 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
############################################
# Tabular Makefile
# Cross-platform build (macOS / Linux / Windows)
# Includes macOS codesign, notarization, App Store pkg
############################################
.PHONY: all help install-deps clean create-dirs \
build-macos build-linux build-windows \
bundle-macos bundle-linux bundle-windows pkg-macos-store \
release build run dev test check fmt info notarize notarize-check sync-version
all: help
APP_NAME = Tabular
VERSION = $(shell grep '^version' Cargo.toml | head -n1 | cut -d'"' -f2)
RUST_VERSION = stable
export APPLE_BUNDLE_ID ?= id.tabular.database
# Targets
MACOS_X86_TARGET = x86_64-apple-darwin
MACOS_ARM_TARGET = aarch64-apple-darwin
MACOS_UNIVERSAL_TARGET = universal-apple-darwin
LINUX_X86_TARGET = x86_64-unknown-linux-gnu
LINUX_ARM_TARGET = aarch64-unknown-linux-gnu
WINDOWS_X86_TARGET = x86_64-pc-windows-gnu
WINDOWS_ARM_TARGET = aarch64-pc-windows-gnu
# Dirs
BUILD_DIR = target
DIST_DIR = dist
MACOS_DIR = $(DIST_DIR)/macos
LINUX_DIR = $(DIST_DIR)/linux
WINDOWS_DIR = $(DIST_DIR)/windows
help:
@echo "🛠️ Tabular Build System"
@echo "================================"
@echo "Version: $(VERSION)"
@echo ""
@echo "Core Targets:"
@echo " install-deps Install all Rust targets + tools"
@echo " build-macos Build macOS universal binary"
@echo " build-linux Build Linux (x86_64 + aarch64)"
@echo " build-windows Build Windows (x86_64 + aarch64)"
@echo " bundle-macos Create .app (codesign/notarize optional)"
@echo " pkg-macos-store Create signed .pkg (App Store / distribution)"
@echo " build-ipad Build iPad XCFramework and test binary"
@echo " archive-ipad Archive TabulariOS Xcode project for iPad"
@echo " ipa-ipad Export signed .ipa for iPad"
@echo " publish-ipad Upload .ipa to App Store Connect / TestFlight"
@echo " xcode-assets Generate Assets.xcassets catalog"
@echo " xcode-project Generate Tabular.xcodeproj (iOS & macOS)"
@echo " xcode-archive-ios Archive Tabular-iOS via Xcode"
@echo " xcode-archive-macos Archive Tabular-macOS via Xcode"
@echo " xcode-publish-ios Export & publish iOS to App Store Connect"
@echo " xcode-publish-macos Export & publish macOS to App Store Connect"
@echo " xcode-publish-all Publish both iOS & macOS via Xcode"
@echo " bundle-linux Create tarballs + basic AppDir"
@echo " bundle-windows Create zipped binaries"
@echo " release Clean + deps + all bundles"
@echo " notarize Notarize existing .app and .dmg"
@echo " notarize-check Check notarization status"
@echo "Dev Helpers:"
@echo " run / dev / test / check / fmt / info"
@echo " sync-version Sync version across packaging manifests (optional: v=X.Y.Z)"
@echo "Environment (macOS signing/notarization):"
@echo " APPLE_IDENTITY='Developer ID Application: Name (TEAMID)'"
@echo " APPLE_BUNDLE_ID='id.tabular.database'"
@echo " NOTARIZE=1 APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID"
@echo " PROVISIONING_PROFILE=path/to/AppStore.provisionprofile (for pkg)"
@echo ""
install-deps:
@echo "📦 Installing build dependencies..."
rustup target add $(MACOS_X86_TARGET) $(MACOS_ARM_TARGET) \
$(LINUX_X86_TARGET) $(LINUX_ARM_TARGET) \
$(WINDOWS_X86_TARGET) $(WINDOWS_ARM_TARGET)
cargo install cargo-bundle || true
cargo install cross || true
@echo "✅ Dependencies installed."
clean:
@echo "🧹 Cleaning..."
rm -rf $(DIST_DIR)/macos/tabular
rm -rf $(DIST_DIR)/macos/*.app
rm -rf $(DIST_DIR)/macos/*.dmg
rm -rf $(DIST_DIR)/macos/*.pkg
@echo "✅ Clean done."
create-dirs:
@mkdir -p $(MACOS_DIR) $(LINUX_DIR) $(WINDOWS_DIR)
build-macos: create-dirs
@echo "🍎 Build macOS universal binary"
cargo build --release --target $(MACOS_X86_TARGET)
cargo build --release --target $(MACOS_ARM_TARGET)
@mkdir -p $(BUILD_DIR)/$(MACOS_UNIVERSAL_TARGET)/release
lipo -create \
$(BUILD_DIR)/$(MACOS_X86_TARGET)/release/tabular \
$(BUILD_DIR)/$(MACOS_ARM_TARGET)/release/tabular \
-output $(BUILD_DIR)/$(MACOS_UNIVERSAL_TARGET)/release/tabular
cp $(BUILD_DIR)/$(MACOS_UNIVERSAL_TARGET)/release/tabular $(MACOS_DIR)/
@echo "✅ macOS universal binary ready."
build-linux: create-dirs
@echo "🐧 Build Linux (x86_64 + aarch64)"
cargo build --release --target $(LINUX_X86_TARGET)
# cargo build --release --target $(LINUX_ARM_TARGET)
cp $(BUILD_DIR)/$(LINUX_X86_TARGET)/release/tabular $(LINUX_DIR)/tabular-x86_64
cp $(BUILD_DIR)/$(LINUX_X86_TARGET)/release/tabular $(LINUX_DIR)/tabular-x86_64-unknown-linux-gnu
# cp $(BUILD_DIR)/$(LINUX_ARM_TARGET)/release/tabular $(LINUX_DIR)/tabular-aarch64
# cp $(BUILD_DIR)/$(LINUX_ARM_TARGET)/release/tabular $(LINUX_DIR)/tabular-aarch64-unknown-linux-gnu
@echo "✅ Linux builds ready."
build-windows: create-dirs
@echo "🪟 Build Windows (x86_64 + aarch64)"
cargo build --release --target $(WINDOWS_X86_TARGET)
cargo build --release --target $(WINDOWS_ARM_TARGET)
cp $(BUILD_DIR)/$(WINDOWS_X86_TARGET)/release/tabular.exe $(WINDOWS_DIR)/tabular-x86_64.exe
cp $(BUILD_DIR)/$(WINDOWS_ARM_TARGET)/release/tabular.exe $(WINDOWS_DIR)/tabular-aarch64.exe
@echo "✅ Windows builds ready."
bundle-macos: build-macos
@echo "📱 Create macOS .app bundle"
cargo bundle --release --target $(MACOS_ARM_TARGET)
chmod 755 $(BUILD_DIR)/$(MACOS_ARM_TARGET)/release/bundle/osx/$(APP_NAME).app/Contents/MacOS/Tabular
cp -R $(BUILD_DIR)/$(MACOS_ARM_TARGET)/release/bundle/osx/$(APP_NAME).app $(MACOS_DIR)/
cp $(BUILD_DIR)/$(MACOS_UNIVERSAL_TARGET)/release/tabular $(MACOS_DIR)/$(APP_NAME).app/Contents/MacOS/tabular
xattr -cr $(MACOS_DIR)/$(APP_NAME).app
find $(MACOS_DIR)/$(APP_NAME).app -name ".DS_Store" -delete
@if [ -n "$$APPLE_APP_IDENTITY" ]; then \
echo "🔏 Codesign with App Store entitlements (binary + app)..."; \
codesign --force --timestamp --options runtime --entitlements macos/Tabular.entitlements --keychain "$$HOME/Library/Keychains/login.keychain-db" -s "$$APPLE_APP_IDENTITY" $(MACOS_DIR)/$(APP_NAME).app/Contents/MacOS/tabular; \
codesign --force --timestamp --options runtime --entitlements macos/Tabular.entitlements --keychain "$$HOME/Library/Keychains/login.keychain-db" -s "$$APPLE_APP_IDENTITY" -v $(MACOS_DIR)/$(APP_NAME).app; \
elif [ -n "$$APPLE_IDENTITY" ]; then \
echo "🔏 Codesign with Developer ID entitlements (binary + app)..."; \
codesign --force --timestamp --options runtime --entitlements macos/Tabular-DeveloperID.entitlements --keychain "$$HOME/Library/Keychains/login.keychain-db" -s "$$APPLE_IDENTITY" $(MACOS_DIR)/$(APP_NAME).app/Contents/MacOS/tabular; \
codesign --force --timestamp --options runtime --entitlements macos/Tabular-DeveloperID.entitlements --keychain "$$HOME/Library/Keychains/login.keychain-db" -s "$$APPLE_IDENTITY" -v $(MACOS_DIR)/$(APP_NAME).app; \
else \
echo "⚠️ Skipping codesign (set APPLE_IDENTITY)."; \
fi
@if [ -n "$$APPLE_APP_IDENTITY" ]; then codesign --verify --deep --strict --verbose=2 $(MACOS_DIR)/$(APP_NAME).app || true; elif [ -n "$$APPLE_IDENTITY" ]; then codesign --verify --deep --strict --verbose=2 $(MACOS_DIR)/$(APP_NAME).app || true; fi
@if command -v hdiutil >/dev/null 2>&1; then \
echo "💿 Create DMG"; \
DMG_SIZE=$$(( $$(du -sm $(MACOS_DIR)/$(APP_NAME).app | cut -f1) + 100 )); \
hdiutil create -volname "$(APP_NAME)" -srcfolder $(MACOS_DIR)/$(APP_NAME).app -ov -format UDZO -size $${DMG_SIZE}m $(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg; \
if [ -n "$$APPLE_IDENTITY" ]; then \
echo "🔏 Sign DMG with Developer ID"; \
codesign --force --timestamp --keychain "$$HOME/Library/Keychains/login.keychain-db" --sign "$$APPLE_IDENTITY" $(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg; \
fi; \
fi
@if [ -n "$$NOTARIZE" ] && [ -n "$$APPLE_ID" ] && [ -n "$$APPLE_PASSWORD" ] && [ -n "$$APPLE_TEAM_ID" ]; then \
echo "📤 Notarize app bundle"; \
ditto -c -k --keepParent $(MACOS_DIR)/$(APP_NAME).app $(MACOS_DIR)/$(APP_NAME)-$(VERSION).zip; \
if xcrun notarytool submit $(MACOS_DIR)/$(APP_NAME)-$(VERSION).zip --apple-id $$APPLE_ID --team-id $$APPLE_TEAM_ID --password $$APPLE_PASSWORD --wait; then \
echo "✅ App notarized, stapling..."; \
xcrun stapler staple $(MACOS_DIR)/$(APP_NAME).app; \
echo "📤 Notarize DMG"; \
if xcrun notarytool submit $(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg --apple-id $$APPLE_ID --team-id $$APPLE_TEAM_ID --password $$APPLE_PASSWORD --wait; then \
echo "✅ DMG notarized, stapling..."; \
xcrun stapler staple $(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg; \
else \
echo "❌ DMG notarization failed"; \
fi; \
else \
echo "❌ App notarization failed"; \
fi; \
rm -f $(MACOS_DIR)/$(APP_NAME)-$(VERSION).zip; \
else \
echo "ℹ️ Notarization skipped (set NOTARIZE=1, APPLE_ID, APPLE_PASSWORD, APPLE_TEAM_ID)"; \
fi
@echo "✅ macOS bundle done ok BOSS"
# sh notarize.sh
pkg-macos-store: bundle-macos
@echo "📦 Build signed .pkg (App Store / distribution)"
@if [ -z "$$APPLE_IDENTITY" ]; then echo "❌ APPLE_IDENTITY required (Installer identity)"; exit 1; fi
@if [ -z "$$APPLE_BUNDLE_ID" ]; then echo "❌ APPLE_BUNDLE_ID required"; exit 1; fi
APP_PATH=$(MACOS_DIR)/$(APP_NAME).app; \
APP_IDENTITY="3rd Party Mac Developer Application: PT. VNEU TEKNOLOGI INDONESIA (YD4J5Z6A4G)"; \
if [ -n "$$PROVISIONING_PROFILE" ] && [ -f "$$PROVISIONING_PROFILE" ]; then \
echo "🔗 Embed provisioning profile"; cp "$$PROVISIONING_PROFILE" $$APP_PATH/Contents/embedded.provisionprofile; \
else echo "ℹ️ No provisioning profile (set PROVISIONING_PROFILE)"; fi; \
xattr -cr $$APP_PATH; \
find $$APP_PATH -name ".DS_Store" -delete; \
echo "🔏 Re-codesign with Mac App Store entitlements"; \
codesign --force --timestamp --options runtime --entitlements macos/Tabular.entitlements --keychain "$$HOME/Library/Keychains/login.keychain-db" -s "$$APP_IDENTITY" $$APP_PATH/Contents/MacOS/tabular; \
codesign --force --timestamp --options runtime --entitlements macos/Tabular.entitlements --keychain "$$HOME/Library/Keychains/login.keychain-db" -s "$$APP_IDENTITY" -v $$APP_PATH; \
echo "📦 Create installer package"; \
productbuild --component $$APP_PATH /Applications $(MACOS_DIR)/$(APP_NAME)-$(VERSION).pkg --sign "$$APPLE_IDENTITY_INS" --identifier $$APPLE_BUNDLE_ID; \
if [ -n "$$NOTARIZE" ] && [ -n "$$APPLE_ID" ] && [ -n "$$APPLE_PASSWORD" ] && [ -n "$$APPLE_TEAM_ID" ]; then \
xcrun notarytool submit $(MACOS_DIR)/$(APP_NAME)-$(VERSION).pkg --apple-id $$APPLE_ID --team-id $$APPLE_TEAM_ID --password $$APPLE_PASSWORD --wait && xcrun stapler staple $(MACOS_DIR)/$(APP_NAME)-$(VERSION).pkg || true; \
else echo "ℹ️ Notarization skipped for pkg"; fi
@echo "✅ pkg created. Upload via Transporter for App Store."
bundle-linux: build-linux
@echo "📦 Package Linux"
# Create traditional tarballs (for manual installation)
cd $(LINUX_DIR) && tar -czf tabular-$(VERSION)-linux-x86_64.tar.gz tabular-x86_64
cd $(LINUX_DIR) && tar -czf tabular-x86_64-unknown-linux-gnu.tar.gz tabular-x86_64-unknown-linux-gnu
@if [ -f $(LINUX_DIR)/tabular-aarch64 ]; then \
cd $(LINUX_DIR) && tar -czf tabular-$(VERSION)-linux-aarch64.tar.gz tabular-aarch64; \
fi
@if [ -f $(LINUX_DIR)/tabular-aarch64-unknown-linux-gnu ]; then \
cd $(LINUX_DIR) && tar -czf tabular-aarch64-unknown-linux-gnu.tar.gz tabular-aarch64-unknown-linux-gnu; \
fi
# Create AppImage-style binaries (for auto-updater)
# These will be detected by auto-updater as executable binaries
cp $(LINUX_DIR)/tabular-x86_64 $(LINUX_DIR)/Tabular-$(VERSION)-linux-x86_64
@if [ -f $(LINUX_DIR)/tabular-aarch64 ]; then \
cp $(LINUX_DIR)/tabular-aarch64 $(LINUX_DIR)/Tabular-$(VERSION)-linux-aarch64; \
fi
chmod +x $(LINUX_DIR)/tabular-x86_64
chmod +x $(LINUX_DIR)/tabular-x86_64-unknown-linux-gnu
chmod +x $(LINUX_DIR)/Tabular-$(VERSION)-linux-x86_64
@if [ -f $(LINUX_DIR)/tabular-aarch64 ]; then chmod +x $(LINUX_DIR)/tabular-aarch64; fi
@if [ -f $(LINUX_DIR)/tabular-aarch64-unknown-linux-gnu ]; then chmod +x $(LINUX_DIR)/tabular-aarch64-unknown-linux-gnu; fi
@if [ -f $(LINUX_DIR)/Tabular-$(VERSION)-linux-aarch64 ]; then chmod +x $(LINUX_DIR)/Tabular-$(VERSION)-linux-aarch64; fi
# Create AppDir structure for traditional packaging
@mkdir -p $(LINUX_DIR)/AppDir/usr/bin \
$(LINUX_DIR)/AppDir/usr/share/applications \
$(LINUX_DIR)/AppDir/usr/share/icons/hicolor/512x512/apps
cp $(LINUX_DIR)/tabular-x86_64 $(LINUX_DIR)/AppDir/usr/bin/tabular
@echo "[Desktop Entry]" > $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@echo "Type=Application" >> $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@echo "Name=$(APP_NAME)" >> $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@echo "Comment=Your SQL Editor, Forged with Rust: Fast, Safe, Efficient." >> $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@echo "Exec=tabular" >> $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@echo "Icon=tabular" >> $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@echo "Terminal=false" >> $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@echo "Categories=Development;Database;" >> $(LINUX_DIR)/AppDir/usr/share/applications/tabular.desktop
@if [ -f assets/logo.png ]; then cp assets/logo.png $(LINUX_DIR)/AppDir/usr/share/icons/hicolor/512x512/apps/tabular.png; fi
@echo "✅ Linux packaging done."
bundle-windows: build-windows
@echo "🪟 Package Windows"
# Create traditional zip archives (for manual installation)
cd $(WINDOWS_DIR) && zip -r tabular-$(VERSION)-windows-x86_64.zip tabular-x86_64.exe
cd $(WINDOWS_DIR) && zip -r tabular-$(VERSION)-windows-aarch64.zip tabular-aarch64.exe
# Create standalone executables (for auto-updater)
# These will be detected by auto-updater as Windows executables
cp $(WINDOWS_DIR)/tabular-x86_64.exe $(WINDOWS_DIR)/Tabular-$(VERSION)-windows-x86_64.exe
cp $(WINDOWS_DIR)/tabular-aarch64.exe $(WINDOWS_DIR)/Tabular-$(VERSION)-windows-aarch64.exe
@echo "✅ Windows packaging done."
release: clean install-deps bundle-macos bundle-linux bundle-windows
@echo "🎉 Release completed"
@echo "📱 macOS artifacts:"
@find $(MACOS_DIR) -maxdepth 1 -name '*.dmg' -o -name '*.pkg' -o -name '*.app' | sed 's/^/ /' || true
@echo "🐧 Linux artifacts:"
@find $(LINUX_DIR) -maxdepth 1 -name '*.tar.gz' | sed 's/^/ /' || true
@find $(LINUX_DIR) -maxdepth 1 -name 'Tabular-*-linux-*' -type f | sed 's/^/ /' || true
@echo "🪟 Windows artifacts:"
@find $(WINDOWS_DIR) -maxdepth 1 -name '*.zip' | sed 's/^/ /' || true
@find $(WINDOWS_DIR) -maxdepth 1 -name 'Tabular-*-windows-*.exe' | sed 's/^/ /' || true
@echo ""
@echo "🔄 Auto-updater compatible files:"
@echo " macOS: $(MACOS_DIR)/Tabular-$(VERSION).dmg"
@echo " Linux: $(LINUX_DIR)/Tabular-$(VERSION)-linux-x86_64"
@echo " Linux: $(LINUX_DIR)/Tabular-$(VERSION)-linux-aarch64"
@echo " Windows: $(WINDOWS_DIR)/Tabular-$(VERSION)-windows-x86_64.exe"
@echo " Windows: $(WINDOWS_DIR)/Tabular-$(VERSION)-windows-aarch64.exe"
build:
cargo build --release
run:
cargo run
dev:
cargo build
test:
cargo test
check:
cargo fmt --check
cargo clippy -- -D warnings
fmt:
cargo fmt
info:
@echo "Name: $(APP_NAME)"
@echo "Version: $(VERSION)"
@echo "Rust: $(RUST_VERSION)"
@echo "Targets: macOS(universal), Linux(x86_64,aarch64), Windows(x86_64,aarch64)"
@echo "Dist dir: $(DIST_DIR)"
notarize:
@echo "🔐 Notarizing $(APP_NAME) v$(VERSION)"
@if [ -z "$$APPLE_ID" ] || [ -z "$$APPLE_TEAM_ID" ] || [ -z "$$APPLE_PASSWORD" ]; then \
echo "❌ Missing environment variables. Please set:"; \
echo "export APPLE_ID='nunung.pamungkas@vneu.co.id'"; \
echo "export APPLE_TEAM_ID='YD4J5Z6A4G'"; \
echo "export APPLE_PASSWORD='your-app-specific-password'"; \
echo ""; \
echo "📝 Get app-specific password from: https://appleid.apple.com"; \
exit 1; \
fi
@if [ -d "$(MACOS_DIR)/$(APP_NAME).app" ]; then \
echo "📱 Notarizing app bundle..."; \
ditto -c -k --keepParent $(MACOS_DIR)/$(APP_NAME).app $(MACOS_DIR)/$(APP_NAME)-$(VERSION).zip; \
if xcrun notarytool submit $(MACOS_DIR)/$(APP_NAME)-$(VERSION).zip --apple-id $$APPLE_ID --team-id $$APPLE_TEAM_ID --password $$APPLE_PASSWORD --wait; then \
echo "✅ App notarized, stapling..."; \
xcrun stapler staple $(MACOS_DIR)/$(APP_NAME).app; \
else \
echo "❌ App notarization failed"; \
fi; \
rm -f $(MACOS_DIR)/$(APP_NAME)-$(VERSION).zip; \
fi
@if [ -f "$(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg" ]; then \
echo "💿 Notarizing DMG..."; \
if xcrun notarytool submit $(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg --apple-id $$APPLE_ID --team-id $$APPLE_TEAM_ID --password $$APPLE_PASSWORD --wait; then \
echo "✅ DMG notarized, stapling..."; \
xcrun stapler staple $(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg; \
else \
echo "❌ DMG notarization failed"; \
fi; \
fi
@echo "🎉 Notarization completed!"
notarize-check:
@echo "🔍 Checking notarization status for $(APP_NAME) v$(VERSION)"
@if [ -d "$(MACOS_DIR)/$(APP_NAME).app" ]; then \
echo "📱 App Gatekeeper status:"; \
spctl -a -t exec -v $(MACOS_DIR)/$(APP_NAME).app && echo "✅ App accepted" || echo "❌ App rejected"; \
fi
@if [ -f "$(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg" ]; then \
echo "💿 DMG Gatekeeper status:"; \
spctl -a -t open --context context:primary-signature -v $(MACOS_DIR)/$(APP_NAME)-$(VERSION).dmg && echo "✅ DMG accepted" || echo "❌ DMG rejected"; \
fi
# ─── iPad / iPadOS Targets ────────────────────────────────────────────────────
build-ipad:
@echo "📱 Building iPad XCFramework and checking build..."
bash build_ipad.sh build
archive-ipad:
@echo "📦 Archiving TabulariOS Xcode project for iPad..."
bash build_ipad.sh archive
ipa-ipad:
@echo "📦 Exporting signed .ipa for iPad..."
bash build_ipad.sh export
publish-ipad:
@echo "🚀 Publishing Tabular iPad app to App Store Connect / TestFlight..."
bash build_ipad.sh publish
# ─── Unified Xcode Integration Targets ────────────────────────────────────────
.PHONY: xcode-project xcode-assets xcode-archive-ios xcode-archive-macos xcode-publish-ios xcode-publish-macos xcode-publish-all
xcode-assets:
@chmod +x apple/scripts/generate_assets.sh
@./apple/scripts/generate_assets.sh
xcode-project: xcode-assets
@python3 apple/scripts/generate_project.py
xcode-archive-ios: xcode-project
@chmod +x apple/scripts/publish_xcode.sh
@./apple/scripts/publish_xcode.sh ios archive
xcode-archive-macos: xcode-project
@chmod +x apple/scripts/publish_xcode.sh
@./apple/scripts/publish_xcode.sh macos archive
xcode-publish-ios: xcode-project
@chmod +x apple/scripts/publish_xcode.sh
@./apple/scripts/publish_xcode.sh ios upload
xcode-publish-macos: xcode-project
@chmod +x apple/scripts/publish_xcode.sh
@./apple/scripts/publish_xcode.sh macos upload
xcode-publish-all: xcode-project
@chmod +x apple/scripts/publish_xcode.sh
@./apple/scripts/publish_xcode.sh all
sync-version:
@chmod +x scripts/sync-version.sh
@./scripts/sync-version.sh $(v)