diff --git a/.gitignore b/.gitignore index 4d6fbd0a..3d46bc1a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,9 @@ Essentials/libsean/libsean16.o Essentials/lib/build tmp SDK +*.theos +.vscode +packages +compile_commands.json +control +FridaCodeManager.o \ No newline at end of file diff --git a/Blueprint/FridaCodeManager.app/Info.plist b/Blueprint/FridaCodeManager.app/Info.plist index 4292e574..8aade1ee 100644 --- a/Blueprint/FridaCodeManager.app/Info.plist +++ b/Blueprint/FridaCodeManager.app/Info.plist @@ -1,179 +1,179 @@ - - CFBundleDevelopmentRegion - en - CFBundleDocumentTypes - - - CFBundleTypeName - FCM Project - CFBundleTypeRole - Viewer - LSHandlerRank - Owner - LSItemContentTypes - - com.sparklechan.swifty.sproj - - - - CFBundleExecutable - swifty - CFBundleIconFile - AppIcon.png - CFBundleIdentifier - com.sparklechan.swifty - CFBundleName - FCM - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleSupportedPlatforms - - iPhoneOS - - CFBundleVersion - 2.0 - LSRequiresIPhoneOS - - MinimumOSVersion - 15.0 - UILaunchImageFile - LaunchImage - UILaunchImages - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - LaunchImage-800-Portrait-736h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - LaunchImage-800-Landscape-736h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - LaunchImage-800-667h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {375, 667} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700 - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 480} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700-568h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 568} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700-Portrait - UILaunchImageOrientation - Portrait - UILaunchImageSize - {768, 1024} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700-Landscape - UILaunchImageOrientation - Landscape - UILaunchImageSize - {768, 1024} - - - UILaunchStoryboardName - Launch Screen - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UTExportedTypeDeclarations - - - UTTypeConformsTo - - public.data - - UTTypeDescription - FCM Project - UTTypeIdentifier - com.sparklechan.swifty.sproj - UTTypeTagSpecification - - public.filename-extension - - sproj - - public.mime-type - application/octet-stream - - - - UTImportedTypeDeclarations - - - CFBundleTypeRole - Editor - UTTypeConformsTo - - public.data - - UTTypeDescription - FCM Project - UTTypeIdentifier - com.sparklechan.swifty.sproj - UTTypeTagSpecification - - public.filename-extension - - sproj - - public.mime-type - application/octet-stream - - - - - + + CFBundleDevelopmentRegion + en + CFBundleDocumentTypes + + + CFBundleTypeName + FCM Project + CFBundleTypeRole + Viewer + LSHandlerRank + Owner + LSItemContentTypes + + com.sparklechan.swifty.sproj + + + + CFBundleExecutable + FridaCodeManager + CFBundleIconFile + AppIcon.png + CFBundleIdentifier + com.sparklechan.swifty + CFBundleName + FCM + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 2.0 + LSRequiresIPhoneOS + + MinimumOSVersion + 15.0 + UILaunchImageFile + LaunchImage + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + LaunchImage-800-Portrait-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + LaunchImage-800-Landscape-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + LaunchImage-800-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700 + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700-Portrait + UILaunchImageOrientation + Portrait + UILaunchImageSize + {768, 1024} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700-Landscape + UILaunchImageOrientation + Landscape + UILaunchImageSize + {768, 1024} + + + UILaunchStoryboardName + Launch Screen + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UTExportedTypeDeclarations + + + UTTypeConformsTo + + public.data + + UTTypeDescription + FCM Project + UTTypeIdentifier + com.sparklechan.swifty.sproj + UTTypeTagSpecification + + public.filename-extension + + sproj + + public.mime-type + application/octet-stream + + + + UTImportedTypeDeclarations + + + CFBundleTypeRole + Editor + UTTypeConformsTo + + public.data + + UTTypeDescription + FCM Project + UTTypeIdentifier + com.sparklechan.swifty.sproj + UTTypeTagSpecification + + public.filename-extension + + sproj + + public.mime-type + application/octet-stream + + + + + \ No newline at end of file diff --git a/Blueprint/FridaCodeManager.app/include b/Blueprint/FridaCodeManager.app/include index 5ff7d77c..af3fd498 160000 --- a/Blueprint/FridaCodeManager.app/include +++ b/Blueprint/FridaCodeManager.app/include @@ -1 +1 @@ -Subproject commit 5ff7d77c115b40212ee642d413b2b078ab253628 +Subproject commit af3fd498606fea35d6c4ed83d66beffa3a902a42 diff --git a/Essentials/Makefile b/Essentials/Makefile index 4a97e061..bc15dda8 100644 --- a/Essentials/Makefile +++ b/Essentials/Makefile @@ -4,37 +4,39 @@ # :3 # -SHELL := /var/jb/bin/bash +ifeq ($(LINUX), 1) -all: prepare libfcm-compile libdycall-compile libsean-compile #libcheck-compile +include $(THEOS)/makefiles/common.mk + +SUBPROJECTS += libfcm +SUBPROJECTS += libsean +include $(THEOS_MAKE_PATH)/aggregate.mk + +else # ifeq ($(LINUX), 0) + +export SDKROOT := sdk + +export CC := clang +export CF := -target arm64-apple-ios15 -arch arm64 -I$(ROOTDIR)/include + +export COBJ_DIR := tmp/out/c +export MOBJ_DIR := tmp/out/m + +# fishy patch +export uuid := uuid + +all: libfcm-compile libsean-compile #libcheck-compile prepare: - @if [ -d lib/build ]; then \ - rm -rf lib/build; \ - mkdir lib/build; \ - else \ - mkdir lib/build; \ - fi - -libfcm-compile: - @$(MAKE) -C libfcm all - @cp libfcm/tmp/lib/libfcm.a lib/build/libfcm.a - @$(MAKE) -C libfcm clean - -libsean-compile: - @$(MAKE) -C libsean all - @cp libsean/tmp/lib/libsean.a lib/build/libsean.a - @$(MAKE) -C libsean clean - -libdycall-compile: - @$(MAKE) -C libdycall all - @cp libdycall/tmp/lib/libdycall.a lib/build/libdycall.a - @$(MAKE) -C libdycall clean - -libcheck-compile: - @$(MAKE) -C libcheck all - @cp libcheck/tmp/lib/libcheck.a lib/build/libcheck.a - @$(MAKE) -C libcheck clean + @rm -rf lib/build + @mkdir -p lib/build + +%-compile: prepare + @$(MAKE) -C $* all || $(MAKE) -C $* clean + @cp $*/tmp/lib/$*.a lib/build/$*.a + @$(MAKE) -C $* clean clean: @rm -rf lib/build + +endif \ No newline at end of file diff --git a/Essentials/libfcm/Makefile b/Essentials/libfcm/Makefile index fa7d1e55..11ecd969 100644 --- a/Essentials/libfcm/Makefile +++ b/Essentials/libfcm/Makefile @@ -5,38 +5,49 @@ # Created by SeanIsNotAConstant on October the 12th 2024 # -# config -SHELL := /var/jb/bin/sh -SDKROOT := ./sdk -CC := clang -CF := -target arm64-apple-ios15 -arch arm64 +ifeq ($(LINUX), 1) + +include $(THEOS)/makefiles/common.mk + +LIBRARY_NAME = libfcm +libfcm_INSTALL = 0 + +libfcm_FILES = $(wildcard *.m) $(wildcard *.c) +libfcm_CFLAGS = -fobjc-arc +libfcm_PRIVATE_FRAMEWORKS = MobileContainerManager + +include $(THEOS_MAKE_PATH)/library.mk + +else # ifeq ($(LINUX), 0) # finding all C and Objective-C files CFILES := $(shell find . -name "*.c") MFILES := $(shell find . -name '*.m') +# listing all compiled objects +OBJS := $(patsubst %.c,$(COBJ_DIR)/%.o,$(CFILES)) $(patsubst %.m,$(MOBJ_DIR)/%.o,$(MFILES)) + # compiling them to libsean16 -# fishy patch -uuid := uuid - -all: compile bind - -compile: - @if [ -d tmp ]; then \ - rm -rf tmp; \ - mkdir tmp tmp/out tmp/lib; \ - else \ - mkdir tmp tmp/out tmp/lib; \ - fi - @for file in $(CFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - @for file in $(MFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - -bind: - @ar rcs tmp/lib/libfcm.a tmp/out/*.o + +all: setup bind + +$(COBJ_DIR)/%.o: %.c setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +$(MOBJ_DIR)/%.o: %.m setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +setup: + @rm -rf tmp + @mkdir -p $(COBJ_DIR) $(MOBJ_DIR) + @mkdir -p tmp/lib + +bind: setup $(OBJS) + @ar rcs tmp/lib/libfcm.a $(OBJS) clean: @rm -rf tmp + +endif \ No newline at end of file diff --git a/Essentials/libsean/Makefile b/Essentials/libsean/Makefile index 77019420..a87684f3 100644 --- a/Essentials/libsean/Makefile +++ b/Essentials/libsean/Makefile @@ -5,38 +5,52 @@ # Created by SeanIsNotAConstant on October the 12th 2024 # +ifeq ($(LINUX), 1) + +include $(THEOS)/makefiles/common.mk + +LIBRARY_NAME = libsean + +libsean_INSTALL = 0 + +libsean_FILES = $(shell find . -type f -name "*.c") $(shell find . -type f -name "*.m") +libsean_CFLAGS = -fobjc-arc -ISOC -ICompiler + +include $(THEOS_MAKE_PATH)/library.mk + +else # ifeq ($(LINUX), 0) + # config -SHELL := /var/jb/bin/sh -SDKROOT := ./sdk -CC := clang -CF := -target arm64-apple-ios15 -arch arm64 -ISOC -ICompiler +CF := $(CF) -ISOC -ICompiler # finding all C and Objective-C files CFILES := $(shell find . -name "*.c") -MFILES := $(shell find . -name '*.m') +MFILES := $(shell find . -name "*.m") + +# listing all compiled objects +OBJS := $(patsubst %.c,$(COBJ_DIR)/%.o,$(CFILES)) $(patsubst %.m,$(MOBJ_DIR)/%.o,$(MFILES)) # compiling them to libsean16 -# fishy patch -uuid := uuid - -all: compile bind - -compile: - @if [ -d tmp ]; then \ - rm -rf tmp; \ - mkdir tmp tmp/out tmp/lib; \ - else \ - mkdir tmp tmp/out tmp/lib; \ - fi - @for file in $(CFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - @for file in $(MFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - -bind: - @ar rcs tmp/lib/libsean.a tmp/out/*.o + +all: setup bind + +$(COBJ_DIR)/%.o: %.c setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +$(MOBJ_DIR)/%.o: %.m setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +setup: + @rm -rf tmp + @mkdir -p $(COBJ_DIR) $(MOBJ_DIR) + @mkdir -p tmp/lib + +bind: setup $(OBJS) + @ar rcs tmp/lib/libsean.a $(OBJS) clean: @rm -rf tmp + +endif \ No newline at end of file diff --git a/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m b/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m index 9bb1fd2c..43d778fc 100644 --- a/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m +++ b/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m @@ -104,7 +104,7 @@ - (void)updateTouchPosition:(CGPoint)location { if (touchTrackerInstance == nil) { CGRect screenSize = [[UIScreen mainScreen] bounds]; CGFloat screenWidth = screenSize.size.width; - CGFloat screenHeight = screenSize.size.height; + // CGFloat screenHeight = screenSize.size.height; touchTrackerInstance = [[TouchTracker alloc] initWithView:view scale:(screenWidth / 254.0)]; } diff --git a/Essentials/libsean/SOC/VFS/fs.m b/Essentials/libsean/SOC/VFS/fs.m index 502eaa8e..21ac06bb 100644 --- a/Essentials/libsean/SOC/VFS/fs.m +++ b/Essentials/libsean/SOC/VFS/fs.m @@ -99,15 +99,15 @@ void vfs_delete_file(VFSDirectory *parentDir, NSString *fileName) { //NSLog(@"File '%@' not found.", fileName); } -void vfs_list_dir(VFSDirectory *dir) { - //NSLog(@"Listing directory: %@", dir.name); - for (VFSDirectory *subdir in dir.directories) { - //NSLog(@"[DIR] %@", subdir.name); - } - for (VFSFile *file in dir.files) { - //NSLog(@"[FILE] %@ (%lu bytes)", file.name, (unsigned long)file.size); - } -} +// void vfs_list_dir(VFSDirectory *dir) { +// //NSLog(@"Listing directory: %@", dir.name); +// for (VFSDirectory *subdir in dir.directories) { +// //NSLog(@"[DIR] %@", subdir.name); +// } +// for (VFSFile *file in dir.files) { +// //NSLog(@"[FILE] %@ (%lu bytes)", file.name, (unsigned long)file.size); +// } +// } NSData *vfs_read_file(VFSDirectory *parentDir, NSString *fileName) { for (VFSFile *file in parentDir.files) { diff --git a/Essentials/libsean/libsean.m b/Essentials/libsean/libsean.m new file mode 100644 index 00000000..e69de29b diff --git a/FCM/UI/TabBar/ProjectManagement/MacroManager.swift b/FCM/UI/TabBar/ProjectManagement/MacroManager.swift index d8f43d7c..cf6e4686 100644 --- a/FCM/UI/TabBar/ProjectManagement/MacroManager.swift +++ b/FCM/UI/TabBar/ProjectManagement/MacroManager.swift @@ -21,7 +21,7 @@ class MacroManager { func addMacro(_ macroName: String) { var macroDict = plistData["Macro"] as? [String: Any] ?? [:] - macroDict[macroName] = [:] + macroDict[macroName] = [:] as [String: Any] plistData["Macro"] = macroDict } diff --git a/FCM/UI/TabBar/ProjectManagement/Project.swift b/FCM/UI/TabBar/ProjectManagement/Project.swift index 3a583e86..c4d94c7f 100644 --- a/FCM/UI/TabBar/ProjectManagement/Project.swift +++ b/FCM/UI/TabBar/ProjectManagement/Project.swift @@ -103,8 +103,8 @@ func MakeApplicationProject(_ Name: String, _ BundleID: String, type: Int) -> In "TYPE": TYPE, "CMacro": "stable", "Macro": [ - "stable": [:], - "debug": [:], + "stable": [:] as [String: Any], + "debug": [:] as [String: Any], ] ] diff --git a/FCM/UI/UINeoEditor.swift b/FCM/UI/UINeoEditor.swift index c137e85f..c377a8d2 100644 --- a/FCM/UI/UINeoEditor.swift +++ b/FCM/UI/UINeoEditor.swift @@ -1302,7 +1302,8 @@ extension UserDefaults { } func color(forKey key: String) -> UIColor { if let colorData = self.data(forKey: key), - let color = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(colorData) as? UIColor { + // let color = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(colorData) as? UIColor + let color = try? NSKeyedUnarchiver.unarchivedObject(ofClasses: [UIColor.self], from: colorData) as? UIColor { return color } return UIColor.clear diff --git a/Makefile b/Makefile index 2500731e..01b1fefa 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,67 @@ -# Makefile -SDK_PATH = SDK -OUTPUT_DIR = Blueprint/FridaCodeManager.app -VERSION := 2.0 +ifeq ($(shell uname -s),Linux) +export LINUX = 1 +endif + +VERSION = 2.0 + +ifeq ($(LINUX),1) + +export TARGET = iphone:clang:latest:15.0 +INSTALL_TARGET_PROCESSES = FridaCodeManager +export THEOS_PACKAGE_SCHEME = roothide +GO_EASY_ON_ME = 1 + +export ARCHS = arm64 +export THEOS_LINKAGE_TYPE = static +TARGET_CODESIGN_FLAGS = -SFCM/debug.xml + +include $(THEOS)/makefiles/common.mk + +SUBPROJECTS += Essentials +include $(THEOS_MAKE_PATH)/aggregate.mk + +APPLICATION_NAME = FridaCodeManager + +FridaCodeManager_FILES = $(shell find ./FCM/ -name '*.swift') + +FridaCodeManager_SWIFT_BRIDGING_HEADER = FCM/bridge.h +FridaCodeManager_FRAMEWORKS = UIKit CoreGraphics CoreFoundation +FridaCodeManager_PRIVATE_FRAMEWORKS = MobileContainerManager + +FridaCodeManager_LDFLAGS = -L$(THEOS_OBJ_DIR) -LEssentials/lib/prebuild +FridaCodeManager_LIBRARIES = sean fcm zip root swiftCore + +FridaCodeManager_SWIFTFLAGS = -Xcc -IEssentials/include -parse-as-library -Djailbreak + +FridaCodeManager_BUNDLE_RESOURCE_DIRS = Blueprint/FridaCodeManager.app + +before-stage:: + @if [ ! -d $(FridaCodeManager_BUNDLE_RESOURCE_DIRS)/include ]; then \ + cd $(FridaCodeManager_BUNDLE_RESOURCE_DIRS); \ + git clone --depth=1 https://github.com/theos/headers; \ + mv headers include; \ + fi + +before-package:: + @echo "Package: com.sparklechan.swifty" > control + @echo "Name: FridaCodeManager" >> control + @echo "Version: $(VERSION)" >> control + @echo "Description: Full fledged Xcode-like IDE for iOS" >> control + @echo "Depends: swift, clang-14, ldid, git" >> control + @echo "Icon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png" >> control + @echo "Conflicts: com.sparklechan.sparkkit" >> control + @echo "Maintainer: FCCT" >> control + @echo "Author: FCCT" >> control + @echo "Section: Utilities" >> control + @echo "Tag: role::hacker" >> control + +include $(THEOS_MAKE_PATH)/application.mk + +else # ifeq ($(LINUX), 0) + +export ROOTDIR = $(shell pwd) +export SDK_PATH = $(ROOTDIR)/SDK +export OUTPUT_DIR = $(ROOTDIR)/Blueprint/FridaCodeManager.app BUILD_PATH := .package/ SWIFT := $(shell find ./FCM/ -name '*.swift') @@ -15,6 +75,10 @@ else SHELL := /bin/sh endif +export SHELL + +export SHELL + PLF := -LEssentials/lib/prebuild -LEssentials/lib/build -lzip -lsean #-lserver -lcheck # Targets @@ -28,7 +92,7 @@ roothide: LF := -lroot -lfcm roothide: ARCH := iphoneos-arm64e roothide: JB_PATH := / roothide: TARGET := jailbreak -roothide: greet compile_swift sign package_fs clean done +roothide: greet compile_swift sign package_fs clean done trollstore: LF := -lfcm trollstore: TARGET := trollstore @@ -39,29 +103,43 @@ stock: LF := -lfcm -ldycall stock: TARGET := stock stock: greet compile_swift makechain_jailed ipa clean done -# Functions +get_sdk: + @if [ ! -d SDK ]; then \ + mkdir -p tmp; \ + cd tmp; \ + unzip ../FCM/UI/TabBar/Settings/SDKHub/sdk/iOS16.5.zip; \ + mv iPhoneOS16.5.sdk ../SDK; \ + cd ../SDK; \ + mv System/Library/PrivateFrameworks/MobileContainerManager.framework System/Library/Frameworks/MobileContainerManager.framework; \ + rm -rf tmp; \ + fi + @if [ ! -d $(OUTPUT_DIR)/include ]; then \ + cd $(OUTPUT_DIR); \ + git clone https://github.com/theos/headers; \ + mv headers include; \ + fi + greet: - @if [ ! -d tmp ]; then if [ ! -d SDK ]; then mkdir tmp; cd tmp; unzip ../FCM/UI/TabBar/Settings/SDKHub/sdk/iOS15.6.zip; mv iPhoneOS15.6.sdk ../SDK; cd ..; mv SDK/System/Library/PrivateFrameworks/MobileContainerManager.framework SDK/System/Library/Frameworks/MobileContainerManager.framework; rm -rf tmp; fi; fi; if [ ! -d Blueprint/FridaCodeManager.app/include ]; then cd Blueprint/FridaCodeManager.app; git clone https://github.com/theos/headers; mv headers include; fi @echo "\nIts meant to be compiled on jailbroken iOS devices in terminal, compiling it using macos can cause certain anomalies with UI, etc\n " + @#echo "PATH = $(PATH)" @if [ ! -d "Product" ]; then mkdir Product; fi -compile_swift: +compile_swift: greet get_sdk @echo "\033[32mcompiling Essentials\033[0m" @$(MAKE) -C Essentials all @echo "\033[32mcompiling FridaCodeManager\033[0m" - @output=$$(swiftc -wmo -warnings-as-errors -Xlinker -lswiftCore -Xcc -IEssentials/include -D$(TARGET) -sdk $(SDK_PATH) $(SWIFT) $(PLF) $(LF) -o "$(OUTPUT_DIR)/swifty" -parse-as-library -import-objc-header FCM/bridge.h -framework MobileContainerManager -target arm64-apple-ios15.0 2>&1); \ + @output=$$(swiftc -wmo -warnings-as-errors -Xlinker -lswiftCore -Xcc -IEssentials/include -D$(TARGET) -sdk $(SDK_PATH) $(SWIFT) $(PLF) $(LF) -o "$(OUTPUT_DIR)/swifty" -parse-as-library -import-objc-header FCM/bridge.h -I$(OUTPUT_DIR)/include -framework MobileContainerManager -target arm64-apple-ios15.0 2>&1); \ if [ $$? -ne 0 ]; then \ echo "$$output" | grep -v "remark:"; \ exit 1; \ fi @$(MAKE) -C Essentials clean -#sign: linkfix -sign: +sign: compile_swift @echo "\033[32msigning FridaCodeManager $(Version)\033[0m" @ldid -S./FCM/debug.xml $(OUTPUT_DIR)/swifty -package_fs: +package_fs: sign @echo "\033[32mpackaging FridaCodeManager\033[0m" @find . -type f -name ".DS_Store" -delete @-rm -rf $(BUILD_PATH) @@ -97,9 +175,13 @@ ipa: # @install_name_tool -add_rpath @loader_path $(OUTPUT_DIR)/swifty # @install_name_tool -add_rpath @loader_path/toolchain/lib $(OUTPUT_DIR)/swifty -clean: +clean: package_fs @rm -rf $(OUTPUT_DIR)/swifty $(OUTPUT_DIR)/*.dylib .package -done: +extreme-clean: + rm -rf SDK $(OUTPUT_DIR)/include + +done: clean @echo "\033[32mall done! :)\033[0m" +endif \ No newline at end of file