Many a times, people have asked me how to create a command-line build enviroment. A complete documentation for it is available in PB documentation, here is an easy summary for lazy people like me:
- From command line, browse to: Windows\Program Files\Platform Builder for Windows Mobile\5.00\CEPB\BIN
- Type the following commmand:
pbxmlutils /getbuildenv /workspace "
Volah, the batch file (SetMyBuildEnv.bat) now has the build environment setup!!
Here's an example:
To set up build environment for an OS design called MyWorkspace, based on an x86 CPU and targeted for the Emulator, type the following command:
pbxmlutils /getbuildenv /workspace "C:\WINCE500\PBWorkspaces\MyWorkspace\MyWorkspace.pbxml" /config "Emulator: x86_Debug" > SetEnv.bat
Do I hear: "Okay, so the documentation already tells me that... what's new?"
Value addition is here: Create a shortcut on Desktop that takes you there....
- Copy the SetMyBuildEnv.bat to a convenient location. Lets say C:\MyEnvironment
- Browse to \WINDOWS\system32, right click on cmd.exe and create its shortcut to Desktop.
- Browse to Desktop, rename Shortcut to cmd.exe to MyBuild.exe, or any name you like.
- Right-Click, select properties. In Shortcut tab, observe Target : C:\WINDOWS\system32\cmd.exe.
- Change this to:
C:\WINDOWS\system32\cmd.exe /k C:\MyEnvironment\SetMyBuildEnv.bat
Click Apply, and you are done!!
No more need to use PB for building small changes..... Command line build would do it faster, in a more controlled fashion.