Thanks a lot for the great tutorial
However, and I don't know if the place is right, please feel free to redirect me, but after trying a first little tweak I got looooads of errors when compiling.
The first being that the include in the main.m was screwed, then I changed, in the MakeFile the line TweakTest1_FILES = main.m to tweak.xm
content of tweak folder:
/var/mobile/tweakttest1 root# ls -la
total 16
drwxr-xr-x 9 root mobile 288 May 19 19:36 .
drwx--x--x 15 mobile mobile 480 May 19 19:11 ..
drwxr-xr-x 4 root mobile 128 May 19 19:18 .theos
-rw-r--r-- 1 root mobile 343 May 19 19:45 Makefile
drwxr-xr-x 5 root mobile 160 May 19 19:11 client
drwxr-xr-x 4 root mobile 128 May 19 19:11 layout
-rw-r--r-- 1 root mobile 1800 May 19 19:31 main.h
-rw-r--r-- 1 root mobile 1780 May 19 19:29 main.m
-rw-r--r-- 1 root mobile 68 May 19 19:18 tweak.xm
Makefile:
ARCHS = armv7 armv7s arm64
include /var/theos/makefiles/common.mk
TOOL_NAME = TweakTtest1
TweakTtest1_FILES = tweak.xm
TweakTtest1_CFLAGS = -fobjc-arc
include $(THEOS_MAKE_PATH)/tool.mk
after-TweakTtest1-stage::
$(ECHO_NOTHING)$(FAKEROOT) chown root:wheel $(THEOS_STAGING_DIR)/Library/LaunchDaemons/com.wisbit.tweaktest1.plist$(ECHO_END)
tweak.xm:
%hook SBFolder
-(BOOL)shouldRemoveWhenEmpty {
return NO;
}
%end
Results :
/var/mobile/tweakttest1 root# make package install
> Making all for tool TweakTtest1…
==> Preprocessing tweak.xm…
==> Preprocessing tweak.xm…
==> Preprocessing tweak.xm…
==> Compiling tweak.xm (arm64)…
==> Linking tool TweakTtest1 (arm64)…
Undefined symbols for architecture arm64:
"_MSHookMessageEx", referenced from:
_logosLocalInit() in tweak.xm.b8ba8393.o
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/var/theos/makefiles/instance/tool.mk:20: /var/mobile/tweakttest1/.theos/obj/debug/arm64/TweakTtest1] Error 1
make[2]: *** [/var/theos/makefiles/instance/tool.mk:20: /var/mobile/tweakttest1/.theos/obj/debug/arm64/TweakTtest1] Error 2
make[2]: *** Waiting for unfinished jobs....
==> Compiling tweak.xm (armv7)…
==> Compiling tweak.xm (armv7s)…
==> Linking tool TweakTtest1 (armv7)…
Undefined symbols for architecture armv7:
"_MSHookMessageEx", referenced from:
_logosLocalInit() in tweak.xm.1740f4d9.o
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture armv7
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/var/theos/makefiles/instance/tool.mk:20: /var/mobile/tweakttest1/.theos/obj/debug/armv7/TweakTtest1] Error 1
==> Linking tool TweakTtest1 (armv7s)…
Undefined symbols for architecture armv7s:
"_MSHookMessageEx", referenced from:
_logosLocalInit() in tweak.xm.a48028c5.o
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture armv7s
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/var/theos/makefiles/instance/tool.mk:20: /var/mobile/tweakttest1/.theos/obj/debug/armv7s/TweakTtest1] Error 1
rm /var/mobile/tweakttest1/.theos/obj/debug/armv7/tweak.xm.mmrm /var/mobile/tweakttest1/.theos/obj/debug/armv7s/tweak.xm.mm
make[2]: *** [/var/theos/makefiles/instance/tool.mk:20: /var/mobile/tweakttest1/.theos/obj/debug/armv7/TweakTtest1] Error 2
make[2]: *** [/var/theos/makefiles/instance/tool.mk:20: /var/mobile/tweakttest1/.theos/obj/debug/armv7s/TweakTtest1] Error 2
make[1]: *** [/var/theos/makefiles/instance/tool.mk:11: internal-tool-all_] Error 2
make: *** [/var/theos/makefiles/master/rules.mk:111: TweakTtest1.all.tool.variables] Error 2
I wondered if the issue was on the hook ...
Thanks a lot for any help. I am completely new at this. cheers.