今天发现cocos2d-x的ccDrawCircle只能画空心圆。
找到ccDrawCircle函数文件(/libs/cocos2dx/draw_nodes/CCDrawingPrimitives.cpp),复制其函数,然后将openGL的填充模式从“GL_LINE_STRIP”改成“GL_TRIANGLE_FAN”就ok了。当然头文件也要相应的修改。
CCDrawingPrimitives (下载941 )今天发现cocos2d-x的ccDrawCircle只能画空心圆。
找到ccDrawCircle函数文件(/libs/cocos2dx/draw_nodes/CCDrawingPrimitives.cpp),复制其函数,然后将openGL的填充模式从“GL_LINE_STRIP”改成“GL_TRIANGLE_FAN”就ok了。当然头文件也要相应的修改。
CCDrawingPrimitives (下载941 )问题描述:今天安装cocos2d-x出现如下错误:
Last login: Thu Jun 20 11:49:10 on ttys001
Could-HllmatoMacBook-Pro:~ CouldHll$ /Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh -u -f
cocos2d-x template installer
Installing Xcode 4 cocos2d-x iOS template
----------------------------------------------------
removing old libraries: /Users/CouldHll/Library/Developer/Xcode/Templates/cocos2d-x/
...creating destination directory: /Users/CouldHll/Library/Developer/Xcode/Templates/cocos2d-x/
...copying cocos2d files
rsync: link_stat "/Users/CouldHll/cocos2dx" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_cocos2d-x.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying CocosDenshion files
rsync: link_stat "/Users/CouldHll/CocosDenshion" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying websockets files
rsync: link_stat "/Users/CouldHll/external/libwebsockets/ios" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying extension files
rsync: link_stat "/Users/CouldHll/extensions" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying template files
rsync: link_stat "/Users/CouldHll/template/xcode4/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 Chipmunk iOS template
----------------------------------------------------
...copying Chipmunk files
rsync: link_stat "/Users/CouldHll/external/chipmunk" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_chipmunk.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 Box2d iOS template
----------------------------------------------------
...copying Box2D files
rsync: link_stat "/Users/CouldHll/external/Box2D" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_box2d.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 lua iOS template
----------------------------------------------------
...copying lua files
rsync: link_stat "/Users/CouldHll/scripting/lua" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_lua.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_tolua++.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 JS iOS template
----------------------------------------------------
...copying js files
rsync: link_stat "/Users/CouldHll/scripting/javascript/bindings" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_js.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
...copying spidermonkey files
rsync: link_stat "/Users/CouldHll/scripting/javascript/spidermonkey-ios" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
done!
Could-HllmatoMacBook-Pro:~ CouldHll$ /Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh
cocos2d-x template installer
Error: This script must be run as root in order to copy templates to /Library/Application Support/Developer/Shared/Xcode
Try running it with 'sudo', or with '-u' to install it only you:
sudo /Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh
or:
/Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh -u
Could-HllmatoMacBook-Pro:~ CouldHll$ /Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh
cocos2d-x template installer
Error: This script must be run as root in order to copy templates to /Library/Application Support/Developer/Shared/Xcode
Try running it with 'sudo', or with '-u' to install it only you:
sudo /Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh
or:
/Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh -u
Could-HllmatoMacBook-Pro:~ CouldHll$ sudo /Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh
Password:
cocos2d-x template installer
Installing Xcode 4 cocos2d-x iOS template
----------------------------------------------------
templates already installed. To force a re-install use the '-f' parameter
Could-HllmatoMacBook-Pro:~ CouldHll$ sudo /Users/CouldHll/Downloads/cocos2d-x-2.1.4/install-templates-xcode.sh -f
cocos2d-x template installer
Installing Xcode 4 cocos2d-x iOS template
----------------------------------------------------
removing old libraries: /Users/CouldHll/Library/Developer/Xcode/Templates/cocos2d-x/
...creating destination directory: /Users/CouldHll/Library/Developer/Xcode/Templates/cocos2d-x/
...copying cocos2d files
rsync: link_stat "/Users/CouldHll/cocos2dx" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_cocos2d-x.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying CocosDenshion files
rsync: link_stat "/Users/CouldHll/CocosDenshion" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying websockets files
rsync: link_stat "/Users/CouldHll/external/libwebsockets/ios" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying extension files
rsync: link_stat "/Users/CouldHll/extensions" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
...copying template files
rsync: link_stat "/Users/CouldHll/template/xcode4/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 Chipmunk iOS template
----------------------------------------------------
...copying Chipmunk files
rsync: link_stat "/Users/CouldHll/external/chipmunk" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_chipmunk.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 Box2d iOS template
----------------------------------------------------
...copying Box2D files
rsync: link_stat "/Users/CouldHll/external/Box2D" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_box2d.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 lua iOS template
----------------------------------------------------
...copying lua files
rsync: link_stat "/Users/CouldHll/scripting/lua" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_lua.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_tolua++.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
Installing Xcode 4 JS iOS template
----------------------------------------------------
...copying js files
rsync: link_stat "/Users/CouldHll/scripting/javascript/bindings" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: link_stat "/Users/CouldHll/licenses/LICENSE_js.txt" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
...copying spidermonkey files
rsync: link_stat "/Users/CouldHll/scripting/javascript/spidermonkey-ios" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
done!
done!
Could-HllmatoMacBook-Pro:~ CouldHll$
问题解决:安装脚本是需要在安装程序目录的,所以要先进入安装目录:
Could-HllmatoMacBook-Pro:cocos2d-x-2.1.4 CouldHll$ cd /Users/CouldHll/Downloads/cocos2d-x-2.1.4
然后安装,一切正常。
问题描述:ideapad Y460重装系统
用番茄花园遇到错误:cannot load file code:5555h
用风林火山遇到错误:Units specified don't exist SHSUCDX can't install
问题解决:进入BIOS,把SATA MODE改成IDE
1.打开Time Machine识别网络磁盘:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
我在Mountain Lion感觉这命令已经无效
2.建立磁盘映像:
“应用程序”-“实用工具”-“磁盘工具”-“新建映像”-“稀疏捆绑磁盘映像”-选好自己需要的大小
然后把生成的Time Machine.sparsebundle复制进windows共享文件夹中
3.设置为Time Machine映像:
sudo tmutil setdestination -p "/Volumes/Time Machine"
输入密码后大功告成。进入Time Machine设置备份。
4.自动挂载Time Machine映像:
“系统偏好设置”-“用户和群组”-“你的用户名”-“登录项”-将Time Machine卷拖入登录项列表-勾选“隐藏”(不会自动打开 Finder 窗口)
PS:环境是Mountain Lion和Windows8
PPS:据说这种方法不稳定。建议还是使用AFP协议。具体做法可以使用netatalk或者ExtreamZ-IP。
The DUO Kit is a low cost 3D motion sensor that anyone can build. Paired with a powerful API & SDK it provides companies, researchers and students the ability to create custom 3D interactive environments. We are in the process of launching our Kickstarter Project and are looking for contributors.
The Vuforia™ SDK allows you to build vision-based augmented reality applications. It is available for Android, iOS and as an Extension to Unity - a cross-platform game engine. Download the appropriate package below.
官网:https://developer.vuforia.com/resources/sdk
企业版IDP,即iOS Development Enterprise Program。($299/Year)
Get started with your iOS Developer Enterprise Program:
https://developer.apple.com/programs/ios/enterprise/gettingstarted/
1.申请Apple ID
填写个人资料、开发资料进行注册,最后认证Email。
Apple:
https://developer.apple.com/programs/register/
Apple Developer Registration-Personal
Apple Developer Registration-Professional
Apple Developer Registration-Professional(full)
2.申请邓氏编码
邓氏编码(D-U-N-S® Number,是Data Universal Numbering System的缩写)。它是一个独一无二的9位数字全球编码系统,相当于企业的身份识别码 (就像是个人的身份证),被广泛应用于企业识别、商业信息的组织及整理。这个号码是由邓白氏公司签发的,每个号码会跟一个唯一的企业实体相对应,不会重复使用。也就是说,一个号码代表一个公司实体。
可以到下列网站申请邓氏编码,建议使用Apple申请(免费)。其他需要适当收取一定费用,而且不一定能与苹果兼容。
注意:拿到邓白氏编码不要立即去填,它的生效时间是7-14个工作日。建议一周去填了提交一次。如果一周提交三次都没有通过的话,你的账号会被锁掉。
Apple:
https://developer.apple.com/ios/enroll/dunsLookupForm.action
DUNS Global:
http://www.dunsregistered.com/
邓白氏中国:
http://dnbregistered.com.cn/
3.申请IDP企业版
填写个人资料、公司资料进行注册,然后填入信用卡进行支付,最后等待邮件完成申请。
注意:委托人应该有代表公司签字的授权(公司认可,Apple会在电话里确认)。
Apple:
https://developer.apple.com/programs/ios/enterprise/
Apple Developer Program Enrollment - Enter Legal Contact Information
Apple Developer Program Enrollment - Enter Organization Information
PS:所有文档以Apple官网为准。
问题描述:
今天做陆家嘴金融杂志iPad版,在iOS6上运行都可以,但是运行在iOS5上报如下错误:
2012-12-24 15:25:29.912 Magazine[321:c07] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x14cc022 0xecccd6 0x1474a48 0x14749b9 0x3504a3 0x35067b 0x350383 0x25016d 0xf61fc 0xf6779 0xf699b 0x55401 0x55670 0x55836 0xe241dd8 0x5c72a 0x2d596 0x2e274 0x3d183 0x3dc38 0x31634 0x13b6ef5 0x14a0195 0x1404ff2 0x14038da 0x1402d84 0x1402c9b 0x2dc65 0x2f626 0x236d 0x2295)
terminate called throwing an exception(lldb)
问题解决:
选中.stroyborad和.xib文件,在Inspector属性栏将Interface Builder Document下的“Use Autolayout”复选框勾去掉。
问题描述:
今天新建的iOS6项目添加Three20类库,报错,如下:
/Three20/src/Three20UI/Sources/UIViewAdditions.m:109:5: Unknown type name '_tapCount'; did you mean 'ItemCount'?
/Three20/src/Three20UI/Sources/UIViewAdditions.m:109:15: Expected identifier or '('
/Three20/src/Three20UI/Sources/UIViewAdditions.m:110:5: Use of undeclared identifier '_locationInWindow'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:111:5: Use of undeclared identifier '_previousLocationInWindow'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:113:43: Use of undeclared identifier '_locationInWindow'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:114:5: Use of undeclared identifier '_view'; did you mean 'view'?
/Three20/src/Three20UI/Sources/UIViewAdditions.m:115:5: Use of undeclared identifier '_window'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:116:5: Use of undeclared identifier '_phase'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:117:5: Use of undeclared identifier '_touchFlags'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:118:5: Use of undeclared identifier '_touchFlags'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:119:5: Use of undeclared identifier '_timestamp'
/Three20/src/Three20UI/Sources/UIViewAdditions.m:127:3: Use of undeclared identifier '_phase'; did you mean 'phase'?
/Three20/src/Three20UI/Sources/UIViewAdditions.m:128:3: Use of undeclared identifier '_timestamp'
问题解决:
在UIViewAdditions.m文件中:
#ifdef DEBUG
改为:
#ifdef DEBUG_TOUCHES
问题描述:
今天开始做陆家嘴金融杂志,发现新建的项目报错,如下:
Storyboards are unavailable on iOS 4.3 and prior
问题解决:
1.Open XXXXXX.storyboard
2.Open Identity and Type tag in your right view of Xcode.
3.Set the value of Development in Document Versioning to "Xcode 4.2" (my default value is "Default Version (Xcode 4.1)".
4.Change the value of Deployment from Project SDK Version (iOS 5.0) to iOS 5.0, then back to Project SDK Version (iOS 5.0)