最近开始对Windows phone 7感兴趣了,但是忙了一天才把第一个WP7程序运行,下面开始介绍WP7的环境搭建:
1、首先在这个网址http://download.microsoft.com/download/6/0/9/6092A6EA-8638-4F4B-BD49-4A8FF77B2E99/WPDT_RTM_en1.iso
下载WPDT_RTM_en1.iso文件,这是个离线安装包,之间安装就可以搭建你的WP7的运行环境了,安装完后,运行
Microsoft Visio studio Express for Windows Phone,这个就是你开发WP7应用程序的开发工具,另外,这个安装包自带了
这些开发工具,很方面,而且全是免费的,不过VS2010和Blend 4要注册一下,在网上搜一下注册码注册即可
2、另外还可以在线安装运行环境,在http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&displaylang=en上下载vm_web.exe文件,点击后即可在线安装运行环境
3、下面就开始创建自己的第一个WP7应用程序,并且运行它
①点击File --> New Projects-->选择你要创建一个应用程序,比如创建如下
②这时,点击菜单栏的绿色运行按钮,也可以按F5键:
注意:如果要要用模拟器运行必须要选择为如下,而不是Windows Phone 7 Dev
运行结果如下:
以下是一些有用的网址(以备后用):
1、http://www.microsoft.com/downloads/en/default.aspx
2、这个很好http://msdn.microsoft.com/zh-cn/windowsphone/default.aspx
3、博客http://randylee.cnblogs.com/
4、博客http://blog.joycode.com/scottgu/archives/2010/11/03/116154.joy
5、英文http://forums.create.msdn.com/forums/
不太清楚,最好是安装在windows 7上,因为有些工具只有windows 7才支持
我也是搞android , win7 的机子安装了android的开发环境 , 那安装wp7的开发环境不冲突吗? 因为也想看看wp7的效果,
1.使用platform密钥对apk进行签名
1.1.进入<Android_Source_Path>\build\target\product\security,找到【platform.pk8】和【platform.x509.pem】系统密钥。
1.2.进入<Android_Source_Path>\build\tools\signapk找到SignApk.java,运行javac编译成SignApk.class
1.3.执行命令java com.android.signapk.SignApk platform.x509.pem platform.pk8 input.apk output.apk
至此,完成。
2. 对1的补充:<Android_Source_Path>\build\target\product\security下有多对密钥,详细如下:
The following commands were used to generate the test key pairs:
development/tools/make_key testkey '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
development/tools/make_key platform '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
development/tools/make_key shared '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
development/tools/make_key media '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
The following standard test keys are currently included:
testkey -- a generic key for packages that do not otherwise specify a key.
platform -- a test key for packages that are part of the core platform.
shared -- a test key for things that are shared in the home/contacts process.
media -- a test key for packages that are part of the media/download system.
These test keys are used strictly in development, and should never be assumed
to convey any sort of validity. When $BUILD_SECURE=true, the code should not
honor these keys in any context.
signing using the openssl commandline (for boot/system images)
--------------------------
1. convert pk8 format key to pem format
% openssl pkcs8 -inform DER -nocrypt -in testkey.pk8 -out testkey.pem
2. create a signature using the pem format key
% openssl dgst -binary -sha1 -sign testkey.pem FILE > FILE.sig
extracting public keys for embedding
------------------------------------
it's a Java tool
but it generates C code
take a look at commands/recovery/Android.mk
you'll see it running $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar
在运行第三步的命令前,请在你当前的工作目录下新建如下结构的文件夹:com.android.signapk,然后将第二步编译生成的SignApk放入该目录下。或者也可以将SignApk.java的package声明删除后再运行javac编译。
命令java com.android.signapk.SignApk platform.x509.pem platform.pk8 input.apk output.apk
不单可以对apk文件进行重签名,也可以对所有的zip文件进行重签名,包括ROM文件。
原文:http://blog.csdn.net/sodino/archive/2010/11/17/6016706.aspx
一、基本概念:scene:texture RGB 模式设置
game:maximize on play
window:layout tall模式
scene:object move rotate scute部分摆动
project:list every thing to use
hierarchy:list every object you use in this scene
inspector:every details of the hierarchy object
save the scene:File save as and project reimport from folder
project:create many folders
createGameobject:cube set position rotation scale比例当设为Y很小时即可得到地板。
spotlight:加入,拉高即可
前后键可以设置CAMERA:
空格键对当前的视图全屏。everything can change from inspector。
二、应用:
1.animation inspector 都是hierarchy 中的具体Game Object属性,选项设置面板。
2.Project 为整个工程的资源,可以添加到Scene 中也可以添加到hierarchy中。
js脚本也要添加到player 中且要在此gameobject中script选项下设置automatic run,然后利用hierarchy 中相应gameobject创建的tag(js对象)实现对象编程。
3.理解脚本代码:
(1)ControllerColliderHit对象:
function OnControllerColliderHit(hit:ControllerColliderHit){
if(hit.gameObject.tag=="door")//door为door (gameObject)的Tag名称
{
hit.gameObject.animation.Play("door_open");//door_open为door的Animation名称
}
}
(2)RaycastHit对象:
var rayCastLength=5;//可以在inspector中调整
function Update()
{
var hit:RaycastHit;
//check if we are colliding
if(Physics.Raycast(transform.position,transform.forward,hit,rayCastLength))
{
if(hit.collider.gameObject.tag=="door"){
//因为hit 为 RaycastHit 在ControllerColliderHit上面面所以要.collider区别于以上。
hit.collider.gameObject.animation.Play("door_open");
}
}
}
3.改变坐标:
var speed=3;
var cratePrefab:Transform;
function Update()
{
if(Input.GetButtonDown("Fire1"))//按下Fire1按钮
{
var crate=Instantiate(createPrefab,transform.position,Quaternion.identity);
crate.rigidbody.AddForce(transform.forward*3000);
}
}
function 内可以写 transform.position.y<-200来控制玩家越过空间时reset。