-
Notifications
You must be signed in to change notification settings - Fork 153
/
Makefile
53 lines (40 loc) · 2.32 KB
/
Makefile
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
# Shamelessly stolen from https://github.com/elihwyma/Pogo/blob/main/Makefile
TARGET_CODESIGN = $(shell which ldid)
APP_TMP = $(TMPDIR)/santander
APP_STAGE_DIR = $(APP_TMP)/stage
APP_APP_DIR = $(APP_TMP)/Build/Products/Release-iphoneos/Santander.app
APP_HELPER_PATH = $(APP_TMP)/Build/Products/Release-iphoneos/RootHelper
package:
@set -o pipefail; \
xcodebuild -quiet -jobs $(shell sysctl -n hw.ncpu) -project 'Santander.xcodeproj' -scheme Santander -configuration Release -arch arm64 -sdk iphoneos -derivedDataPath $(APP_TMP) \
CODE_SIGNING_ALLOWED=NO DSTROOT=$(APP_TMP)/install ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
@set -o pipefail; \
xcodebuild -quiet -jobs $(shell sysctl -n hw.ncpu) -project 'Santander.xcodeproj' -scheme RootHelper -configuration Release -arch arm64 -sdk iphoneos -derivedDataPath $(APP_TMP) \
CODE_SIGNING_ALLOWED=NO DSTROOT=$(APP_TMP)/install ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
@rm -rf Payload
@rm -rf $(APP_STAGE_DIR)/
@mkdir -p $(APP_STAGE_DIR)/Payload $(APP_STAGE_DIR)/JailedPayload $(APP_STAGE_DIR)/TSPayload
@mv $(APP_APP_DIR) $(APP_STAGE_DIR)/Payload/Santander.app
@cp -r $(APP_STAGE_DIR)/Payload/Santander.app $(APP_STAGE_DIR)/JailedPayload/SantanderJailed.app
@mv $(APP_HELPER_PATH) $(APP_STAGE_DIR)/Payload/Santander.app/RootHelper
@$(TARGET_CODESIGN) -Sentitlements.plist $(APP_STAGE_DIR)/Payload/Santander.app/
@$(TARGET_CODESIGN) -Sentitlements.plist $(APP_STAGE_DIR)/Payload/Santander.app/RootHelper
@rm -rf $(APP_STAGE_DIR)/Payload/Santander.app/_CodeSignature
@cp -r $(APP_STAGE_DIR)/Payload/Santander.app $(APP_STAGE_DIR)/TSPayload/SantanderTS.app
@$(TARGET_CODESIGN) -Sentitlements-TS.plist $(APP_STAGE_DIR)/TSPayload/SantanderTS.app/
@$(TARGET_CODESIGN) -Sentitlements-TS.plist $(APP_STAGE_DIR)/TSPayload/SantanderTS.app/RootHelper
chmod 6755 $(APP_STAGE_DIR)/Payload/Santander.app/RootHelper
chmod 6755 $(APP_STAGE_DIR)/TSPayload/SantanderTS.app/RootHelper
@ln -sf $(APP_STAGE_DIR)/Payload Payload
@ln -sf $(APP_STAGE_DIR)/JailedPayload JailedPayload
@ln -sf $(APP_STAGE_DIR)/TSPayload TSPayload
@rm -rf build
@mkdir -p build
@zip -r9 build/Santander.ipa Payload
@rm -rf Payload
@mv TSPayload Payload
@zip -r9 build/SantanderTrollStore.tipa Payload
@rm -rf Payload
@mv JailedPayload Payload
@zip -r9 build/SantanderJailed.ipa Payload
@rm -rf Payload