SimulateTouch 源码make出错

simulatetouch是一个模拟屏幕点击的插件,狗神介绍过使用方法,我自己用它cydia的插件也可以实现。
现在需求需要修改一下simulatetouch的源码,但是我make一直出错。请各位大哥帮我过目一下什么原因
simulatetouch地址:https://github.com/iolate/SimulateTouch

Making all for tweak SimulateTouch...
In file included from SimulateTouch.mm:7:
In file included from /opt/theos/include/substrate.h:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach-o/nlist.h:66:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/stdint.h:52:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/sys/_types.h:32:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/sys/cdefs.h:680:2: error: 
      Unsupported architecture
#error Unsupported architecture
 ^
In file included from SimulateTouch.mm:7:
In file included from /opt/theos/include/substrate.h:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach-o/nlist.h:66:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/stdint.h:52:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/machine/_types.h:34:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:7:
In file included from /opt/theos/include/substrate.h:13:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/objc/runtime.h:27:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/sys/types.h:78:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/machine/types.h:37:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:7:
In file included from /opt/theos/include/substrate.h:13:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/objc/runtime.h:27:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/sys/types.h:81:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/machine/endian.h:37:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:65:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/std_types.h:67:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/boolean.h:73:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/boolean.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:65:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/std_types.h:68:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/kern_return.h:70:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/kern_return.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:65:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/std_types.h:69:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/port.h:92:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/vm_types.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:66:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach_types.h:87:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/exception_types.h:62:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/exception.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:66:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach_types.h:87:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/exception_types.h:173:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/thread_status.h:76:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/thread_status.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:66:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach_types.h:87:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/exception_types.h:173:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/thread_status.h:77:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/thread_state.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:66:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach_types.h:90:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/processor_info.h:72:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/processor_info.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:66:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach_types.h:108:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/vm_region.h:47:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/machine/vm_param.h:35:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from SimulateTouch.mm:8:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach.h:67:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/mach_interface.h:42:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/clock_priv.h:7:
In file included from /Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/mach/ndr.h:37:
/Applications/Xcode.app/Contents/Developer//Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/libkern/OSByteOrder.h:45:10: fatal error: 
      'libkern/machine/OSByteOrder.h' file not found
#include <libkern/machine/OSByteOrder.h>
         ^
13 errors generated.
 Compiling SimulateTouch.mm...
SimulateTouch.mm:21:9: error: 'rocketbootstrap.h' file not found with <angled>
      include; use "quotes" instead
#import <rocketbootstrap.h>
        ^~~~~~~~~~~~~~~~~~~
        "rocketbootstrap.h"
1 error generated.
make[2]: *** [obj/SimulateTouch.mm.758379f3.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [SimulateTouch.all.tweak.variables] Error

我在源码里加入了rocketbootstrap的两个头文件,但是关于rocketbootstrap还是有个错误。
其他错误基本上都是Unsupported architecture,这两个是什么原因造成的?

刚看了个帖子说这是三个工程,一个tweak,一个library,一个tool。
我现在只需要tweak就把makefile改成如下

FW_DEVICE_IP=192.168.1.122
TARGET = iphone:latest:8.0
ARCHS = armv7 arm64

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = SimulateTouch
SimulateTouch_FILES = SimulateTouch.mm
SimulateTouch_PRIVATE_FRAMEWORKS = GraphicsServices IOKit
SimulateTouch_LDFLAGS = -lsubstrate -lrocketbootstrap


include $(THEOS_MAKE_PATH)/tweak.mk

然后make,就产生了如上错误。当然改之前make也是一样的错误

貌似说是架构不对,我mac的架构是x86_x64架构.那么我该如何make呢

哥们编译问题解决了吗,我的一直报 ‘IOKit/hid/IOHIDEvent.h’ file not found ,你的有这问题吗

1 个赞

应该是要把IOkit这个framework导进来,怎么导?