forked from vendetta-mod/VendettaTweak
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from castdrian/objc-rewrite
refactor: rewrite to objc and logos
- Loading branch information
Showing
28 changed files
with
654 additions
and
596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"label": "Make and Copy Tweak", | ||
"command": "zsh", | ||
"args": [ | ||
"-c", | ||
"rm -rf packages && make clean && make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless && cp ./packages/app.pyoncord_*arm64.deb ~/Library/Mobile\\ Documents/com~apple~CloudDocs/" | ||
], | ||
"problemMatcher": { | ||
"owner": "cpp", | ||
"pattern": { | ||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"severity": 4, | ||
"message": 5 | ||
} | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"presentation": { | ||
"panel": "shared", | ||
"showReuseMessage": false, | ||
"clear": true, | ||
"close": true | ||
} | ||
} | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
extern NSMutableDictionary<NSString *, NSString *> *fontMap; | ||
void patchFonts(NSDictionary<NSString *, NSString *> *mainFonts, NSString *fontDefName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@interface LoaderConfig : NSObject | ||
@property (nonatomic, assign) BOOL customLoadUrlEnabled; | ||
@property (nonatomic, strong) NSURL *customLoadUrl; | ||
+ (instancetype)defaultConfig; | ||
+ (instancetype)getLoaderConfig; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
#define LOG_PREFIX @"[Bunny]" | ||
#define BunnyLog(fmt, ...) NSLog((LOG_PREFIX @" " fmt), ##__VA_ARGS__) |
6 changes: 1 addition & 5 deletions
6
Sources/BunnyTweakC/include/RCTCxxBridge.h → Headers/RCTCxxBridge.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
@import Foundation; | ||
|
||
@interface RCTCxxBridge : NSObject | ||
|
||
- (void)executeApplicationScript:(NSData *)script url:(NSURL *)url async:(BOOL)async; | ||
|
||
@end | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
void swizzleDCDThemeColor(NSDictionary<NSString *, NSArray<NSString *> *> *semanticColors); | ||
void swizzleUIColor(NSDictionary<NSString *, NSString *> *rawColors); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
NSURL *getPyoncordDirectory(void); | ||
UIColor *hexToUIColor(NSString *hex); | ||
void showErrorAlert(NSString *title, NSString *message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
ifeq ($(THEOS_PACKAGE_SCHEME),rootless) | ||
TARGET := iphone:clang:latest:15.0 | ||
else | ||
TARGET := iphone:clang:latest:12.2 | ||
endif | ||
|
||
TARGET := iphone:clang:latest:14.0 | ||
ARCHS = arm64 | ||
INSTALL_TARGET_PROCESSES = Discord | ||
|
||
include $(THEOS)/makefiles/common.mk | ||
|
||
TWEAK_NAME = BunnyTweak | ||
TWEAK_NAME = Bunny | ||
BUNDLE_NAME = BunnyResources | ||
|
||
BunnyTweak_FILES = $(shell find Sources/BunnyTweak -name '*.swift') $(shell find Sources/BunnyTweakC -name '*.m' -o -name '*.c' -o -name '*.mm' -o -name '*.cpp') | ||
BunnyTweak_SWIFTFLAGS = -ISources/BunnyTweakC/include | ||
BunnyTweak_CFLAGS = -fobjc-arc -ISources/BunnyTweakC/include | ||
Bunny_FILES = $(wildcard Sources/*.x Sources/*.m Sources/**/*.x Sources/**/*.m) | ||
Bunny_CFLAGS = -fobjc-arc -DPACKAGE_VERSION='@"$(THEOS_PACKAGE_BASE_VERSION)"' -I$(THEOS_PROJECT_DIR)/Headers | ||
Bunny_FRAMEWORKS = Foundation UIKit CoreGraphics CoreText CoreFoundation | ||
|
||
BunnyTweak_BUNDLE_NAME = BunnyPatches | ||
BunnyTweak_BUNDLE_RESOURCE_DIRS = Resources | ||
BunnyResources_INSTALL_PATH = "/Library/Application\ Support/" | ||
BunnyResources_RESOURCE_DIRS = Resources | ||
|
||
include $(THEOS_MAKE_PATH)/tweak.mk | ||
include $(THEOS_MAKE_PATH)/bundle.mk | ||
|
||
before-all:: | ||
$(ECHO_NOTHING)mkdir -p Resources$(ECHO_END) | ||
$(ECHO_NOTHING)sed -e 's/@PACKAGE_VERSION@/$(THEOS_PACKAGE_BASE_VERSION)/g' \ | ||
-e 's/@TWEAK_NAME@/$(TWEAK_NAME)/g' \ | ||
Sources/payload-base.template.js > Resources/payload-base.js$(ECHO_END) | ||
|
||
after-stage:: | ||
$(ECHO_NOTHING)find $(THEOS_STAGING_DIR) -name ".DS_Store" -delete$(ECHO_END) | ||
|
||
after-package:: | ||
$(ECHO_NOTHING)rm -rf Resources$(ECHO_END) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.