theos 踩坑;

【编译】问题 1

Makefile:1:/makefiles/common.mk: No such file or directory
Makefile:6: /tweak.mk: No such file or directory

解决方案

改为 include /opt/theos/makefiles/common.mk
改为 include /opt/theos/makefiles/tweak.mk

【编译】问题 2

Last login: Mon May  7 15:23:27 on ttys009
qingweideMacBook-Pro:~ qingwei$ cd /Users/qingwei/Desktop/lookproject 
qingweideMacBook-Pro:lookproject qingwei$ make
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
==> Error: You do not have any SDKs in /Library/Developer/CommandLineTools/Platforms/iPhoneOS.platform/Developer/SDKs or /opt/theos/sdks.
make: *** [before-all] Error 1

解决方案

qingweideMacBook-Pro:lookproject qingwei$ sudo xcode-select --switch /Applications/Xcode.app 

【编译】 问题 3【少写了个“;”】

qingweideMacBook-Pro:lookproject qingwei$ make
> Making all for tweak LookProject…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (armv7)…
Tweak.xm:5:102: error: expected ';' after expression
  ..._cmd, source, options) UIAlertView *alert = [[UIAlertView alloc]initWith...
                           ^
                           ;
1 error generated.
make[3]: *** [/Users/qingwei/Desktop/lookproject/.theos/obj/debug/armv7/Tweak.xm.8aee9f68.o] Error 1
rm /Users/qingwei/Desktop/lookproject/.theos/obj/debug/armv7/Tweak.xm.mm
make[2]: *** [/Users/qingwei/Desktop/lookproject/.theos/obj/debug/armv7/LookProject.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [LookProject.all.tweak.variables] Error 2

编译成功

 qingweideMacBook-Pro:lookproject qingwei$ make
 Making all for tweak LookProject…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (armv7)…
==> Linking tweak LookProject (armv7)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
==> Generating debug symbols for LookProject…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (arm64)…
==> Linking tweak LookProject (arm64)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
==> Generating debug symbols for LookProject…
>rm /Users/qingwei/Desktop/lookproject/.theos/obj/debug/arm64/Tweak.xm.mm
==> Merging tweak LookProject…
==> Signing LookProject…

【打包】问题1

qingweideMacBook-Pro:lookproject qingwei$ make package
 >Making all for tweak LookProject…
make[2]: Nothing to be done for `internal-library-compile'.
> Making stage for tweak LookProject…
Can't locate IO/Compress/Lzma.pm in @INC (you may need to install the IO::Compress::Lzma module) (@INC contains: /usr/local/Cellar/perl/5.26.2/lib/perl5/site_perl/5.26.2/darwin-thread-multi-2level /usr/local/Cellar/perl/5.26.2/lib/perl5/site_perl/5.26.2 /usr/local/Cellar/perl/5.26.2/lib/perl5/5.26.2/darwin-thread-multi-2level /usr/local/Cellar/perl/5.26.2/lib/perl5/5.26.2 /usr/local/lib/perl5/site_perl/5.26.2/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.26.2) at /opt/theos/bin/dm.pl line 12.
BEGIN failed--compilation aborted at /opt/theos/bin/dm.pl line 12.
make: *** [internal-package] Error 2

解决方案

1、/opt/theos/vendor/dm.pl/dm.pl
  注释掉第12、13行
 _# use IO::Compress::Lzma;
 _# use IO::Compress::Xz;

2、/opt/theos/makefiles/package/deb.mk
   第6行lzma改为gzip
  _THEOS_PLATFORM_DPKG_DEB_COMPRESSION ?= gzip

原文:https://www.jianshu.com/p/866c7418d506

打包成功

qingweideMacBook-Pro:lookproject qingwei$ make package
 Making all for tweak LookProject…
make[2]: Nothing to be done for `internal-library-compile'.
 Making stage for tweak LookProject…
 dm.pl: building package `com.keshang:iphoneos-arm' in `./packages/com.keshang_0.0.1-2+debug_iphoneos-arm.deb'
上一篇 目录 下一篇

你可能感兴趣的:(theos 踩坑;)