diff --git a/Sources/VendettaTweak/Tweak.x.swift b/Sources/VendettaTweak/Tweak.x.swift index 6a3c61d..940665c 100644 --- a/Sources/VendettaTweak/Tweak.x.swift +++ b/Sources/VendettaTweak/Tweak.x.swift @@ -5,10 +5,12 @@ import os let vendettaLog = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "vendetta") let source = URL(string: "vendetta")! +let install_prefix = String(cString: get_install_prefix()) + let vendettaPatchesBundlePath = FileManager.default.fileExists( - atPath: "\(install_prefix())/Library/Application Support/VendettaTweak/VendettaPatches.bundle") - ? "\(install_prefix())/Library/Application Support/VendettaTweak/VendettaPatches.bundle" + atPath: "\(install_prefix)/Library/Application Support/VendettaTweak/VendettaPatches.bundle") + ? "\(install_prefix)/Library/Application Support/VendettaTweak/VendettaPatches.bundle" : "\(Bundle.main.bundleURL.path)/VendettaPatches.bundle" class LoadHook: ClassHook { diff --git a/Sources/VendettaTweakC/Tweak.m b/Sources/VendettaTweakC/Tweak.m index ef7e1dd..94f9277 100644 --- a/Sources/VendettaTweakC/Tweak.m +++ b/Sources/VendettaTweakC/Tweak.m @@ -1,6 +1,6 @@ #import -const char * const _Nonnull install_prefix(void) { +const char * const _Nonnull get_install_prefix(void) { return THEOS_PACKAGE_INSTALL_PREFIX; } diff --git a/Sources/VendettaTweakC/include/Tweak.h b/Sources/VendettaTweakC/include/Tweak.h index 819331e..0429e20 100644 --- a/Sources/VendettaTweakC/include/Tweak.h +++ b/Sources/VendettaTweakC/include/Tweak.h @@ -1,3 +1,3 @@ #import "RCTCxxBridge.h" -const char * const _Nonnull install_prefix(void); +const char * const _Nonnull get_install_prefix(void);