Monday, November 5, 2012

Batch File To Clean Windows CE 6.0 BSP


This post talks about cleaning the Windows CE 6.0 BSP.

Before shipping the BSP to the customer it is good to remove unwanted files from it. 

What I use to do is search for these files for each item and remove them. 

The below list shows the unwanted files
  • lib and target folders that are created under _TARGETPLATROOT
  • build.* files that are created when BSP is compiled 
  • *.bak files that might be created from WinMerge Tool
  • Intermediate folders such as OBJ
  • Sub-Version files such as .svn folders
The below windows batch file is written for cleaning the BSP
Note: Please take a backup of your BSP before running this batch file

Steps to be followed for cleaning the BSP

  • Copy the below contents to a notepad
@echo My first batch file
@echo Deleting *.bif files
del /s /f *.bif
@echo Deleting build.*
del /s /f build.*
@echo Deleting *.bak files
del /p /s /f *.bak
@echo Deleting *.user files
del /s /f *.user
@echo Deleting lib folder
rd /s/q lib
@echo Deleting lib folder
rd /s/q target
@echo Deleting obj folders
for /d /r . %%d in (obj) do @if exist "%%d" rd /s/q "%%d"
@echo Deleting .svn folders
for /d /r . %%d in (.svn) do @if exist "%%d" rd /s/q "%%d"

  • Save this text file as CleanBSP.bat in the following folder _WINCEROOT\Platform\_YOUR_BSPNAME_
  • Open a windows COMMAND Prompt and navigate to the following path _WINCEROOT\Platform\_YOUR_BSPNAME_
  • Now run CleanBSP.bat

Note: Please refer the following URL to refer how to eliminate all the above steps

No comments:

Post a Comment