feat: rootless support

This commit is contained in:
alexia 2023-03-24 22:27:27 +01:00
parent 047386476f
commit 93a23f96da
No known key found for this signature in database
GPG key ID: A00680AA35225FBE
3 changed files with 8 additions and 2 deletions

View file

@ -7,8 +7,8 @@ let source = URL(string: "vendetta")!
let vendettaPatchesBundlePath =
FileManager.default.fileExists(
atPath: "/Library/Application Support/VendettaTweak/VendettaPatches.bundle")
? "/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<RCTCxxBridge> {

View file

@ -1,5 +1,9 @@
#import <Orion/Orion.h>
const char * const _Nonnull install_prefix(void) {
return THEOS_PACKAGE_INSTALL_PREFIX;
}
__attribute__((constructor)) static void init() {
// Initialize Orion - do not remove this line.
orion_init();

View file

@ -1 +1,3 @@
#import "RCTCxxBridge.h"
const char * const _Nonnull install_prefix(void);