Command Line Build

This post will show you how to create a batch file that will build your Windows CE OS without using the Visual Studio/Platform Builder IDE.

Often the question is asked how to setup an environment which automatically extracts all information from version control and then builds your code. There are a lot of tools that can help you do that: an open source alternative can be found at http://cruisecontrol.sourceforge.net.

To build your kernel without having to use the IDE create a batch file with the following content:

@ echo off
SET _WINCEROOT=C:/WINCE500
SET _OSDESIGNDIR= % _WINCEROOT %/PBWorkspaces/YOUR_WORKSPACE_FOLDER
SET _OSDESIGN= % _OSDESIGNDIR %/YOUR_WORKSPACE_FILE.pbxml
SET _OSDESIGNCONFIG=YOUR_OSDESIGN_CONFIG_NAME

" % ProgramFiles %/Windows CE Platform Builder/ 5.00/CEPB/BIN/pbxmlutils" /getbuildenv /workspace " % _OSDESIGN %" /config " % _OSDESIGNCONFIG %" > SetEnv.bat

cd " % _OSDESIGNDIR %"
call SetEnv.bat
delete SetEnv.bat
cd " % _OSDESIGNDIR %"
blddemo clean -q

 

Note that for CE 6.0 pbxmlutils is located in "%ProgramFiles%/Microsoft Platform Builder/6.00/cepb/IdeVS/" and you use SET _WINCEROOT=C:/WINCE600

You need to replace the first 3 SET variables to match your specific project:

YOUR_WORKSPACE_FOLDER: Workspace folder which is located under the PBWorkspaces (CE 5.0) or OSDesigns (CE 6.0) folder. This is the folder that contains YOUR_WORKSPACE_FILE.

YOUR_WORKSPACE_FILE: The name of your OS Design workspace; the file with extension .pbxml. This file is located in YOUR_WORKSPACE_FOLDER.

YOUR_OSDESIGN_CONFIG_NAME: This is the configuration name you select in the IDE of Platform Builder, eg Emulator: x86_Release. You can also open your .pbxml file with notepad to find out what the configuration name is (search for Configuration Name).

Happy building!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值