Skip to content

Commit 7119e3c

Browse files
author
hackcatml
committed
fix Makefile to build with the latest theos
1 parent e87fd46 commit 7119e3c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $(TOOL_NAME)_FILES += $(wildcard Sources/include/opainject/*.m)
3333
$(TOOL_NAME)_CFLAGS = -w
3434
$(TOOL_NAME)_SWIFTFLAGS = -ISources/include
3535
ifeq ($(ROOTLESS),1)
36-
$(TOOL_NAME)_INSTALL_PATH = /var/jb/usr/bin
36+
$(TOOL_NAME)_INSTALL_PATH = /usr/bin
3737
else
3838
$(TOOL_NAME)_INSTALL_PATH = /usr/local/bin
3939
endif
@@ -60,14 +60,16 @@ $(LIBRARY_NAME)_LIBRARIES = substrate
6060
include $(THEOS)/makefiles/common.mk
6161
include $(THEOS_MAKE_PATH)/application.mk
6262
include $(THEOS_MAKE_PATH)/library.mk
63+
include $(THEOS_MAKE_PATH)/tool.mk
64+
include $(THEOS_MAKE_PATH)/aggregate.mk
6365

6466
ifeq ($(ROOTLESS),1)
6567
before-package::
6668
# for mldecryptapp
6769
cp info.plist $(THEOS_STAGING_DIR)/Applications/$(APPLICATION_NAME).app/
6870
ldid -Sent.plist $(THEOS_STAGING_DIR)/Applications/$(APPLICATION_NAME).app/$(APPLICATION_NAME)
6971
# for mldecrypt
70-
ldid -S./entitlements.plist $(THEOS_STAGING_DIR)/var/jb/usr/bin/$(TOOL_NAME);
72+
ldid -S./entitlements.plist $(THEOS_STAGING_DIR)/usr/bin/$(TOOL_NAME);
7173

7274
# if ldid doesn't work...push entitlements.plist and do ldid on the device
7375
after-install::
@@ -86,10 +88,7 @@ before-package::
8688
# if ldid doesn't work...push entitlements.plist and do ldid on the device
8789
after-install::
8890
scp -P2222 ent.plist root@localhost:~/
89-
install.exec "ldid -Sent.plist /var/jb/Applications/mldecryptapp.app/mldecryptapp"
91+
install.exec "ldid -Sent.plist /Applications/mldecryptapp.app/mldecryptapp"
9092
scp -P2222 entitlements.plist root@localhost:~/
9193
install.exec "ldid -Sentitlements.plist /usr/local/bin/mldecrypt"
9294
endif
93-
94-
include $(THEOS_MAKE_PATH)/tool.mk
95-
include $(THEOS_MAKE_PATH)/aggregate.mk

Sources/mldecryptapp/ContentView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ struct ContentView: View {
270270
fileMgr.createFile(atPath: entitlementsPath, contents: data)
271271

272272
// Replace the original binary file with a dumped one
273+
let _ = task(launchPath: command, arguments: "-S\(entitlementsPath)", "\(replacementFile)")
273274
let copyFileSigPath = documentsPath + ".mldecrypt_copy_done"
274275
callMldecryptWithOptions(options: ["copy", replacementFile, fileToReplace, "ext"])
275276
checkFileExistenceAndThen(path: copyFileSigPath, interval: 0.01) {

0 commit comments

Comments
 (0)