Skip to content

Commit 856341a

Browse files
committed
Add preliminary macOS support
1 parent cea8f53 commit 856341a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ ifeq ($(_THEOS_FINAL_PACKAGE),$(_THEOS_TRUE))
1818
$(ECHO_NOTHING)cp -a $(THEOS_OBJ_DIR)/dSYMs/Orion.framework.dSYM $(DSYM_DIR)$(ECHO_END)
1919
endif
2020
$(ECHO_NOTHING)xcrun tapi stubify $(SDK_DIR)/Orion$(ECHO_END)
21+
$(ECHO_NOTHING)if [[ -L $(SDK_DIR)/Orion ]]; then \
22+
ln -s Versions/Current/Orion.tbd $(SDK_DIR)/Orion.tbd; \
23+
rm $(SDK_DIR)/Versions/Current/Orion; \
24+
fi$(ECHO_END)
2125
$(ECHO_NOTHING)rm $(SDK_DIR)/Orion $(SDK_DIR)/Modules/Orion.swiftmodule/*.swiftmodule$(ECHO_END)
2226
$(ECHO_NOTHING)rm -rf $(THEOS_STAGING_DIR)/Library/Frameworks/Orion.framework/{Headers,Modules}$(ECHO_END)
2327

Orion.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@
510510
);
511511
MACOSX_DEPLOYMENT_TARGET = 10.14.4;
512512
MARKETING_VERSION = 0.9.0;
513-
OTHER_LDFLAGS = "-lsubstrate";
513+
OTHER_LDFLAGS = "-weak-lsubstrate";
514514
PRODUCT_BUNDLE_IDENTIFIER = dev.theos.orion;
515515
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
516516
SKIP_INSTALL = NO;
@@ -557,7 +557,7 @@
557557
);
558558
MACOSX_DEPLOYMENT_TARGET = 10.14.4;
559559
MARKETING_VERSION = 0.9.0;
560-
OTHER_LDFLAGS = "-lsubstrate";
560+
OTHER_LDFLAGS = "-weak-lsubstrate";
561561
PRODUCT_BUNDLE_IDENTIFIER = dev.theos.orion;
562562
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
563563
SKIP_INSTALL = NO;

Sources/OrionBackend_Substrate/SubstrateBackend.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ extension Backends {
1212
/// if the target system has CydiaSubstrate – or another hooking
1313
/// framework which vends its API – installed, this backend makes
1414
/// for a sensible default choice.
15+
///
16+
/// - Warning: Do not use this backend if the target system does not
17+
/// have a framework which vends the CydiaSubstrate APIs. Doing so
18+
/// will result in the process crashing with an "undefined symbols"
19+
/// error.
1520
public struct Substrate: DefaultBackend {
1621
public init() {}
1722
}

0 commit comments

Comments
 (0)