About the author
I created a batch file for compiling Compact Framework projects written using Delphi.
The file was named CF.cmd, and placed in C:\Program Files\Borland\BDS\3.0\CFPreview\bin. With a sample project Test.bdsproj placed in C:\CF, I compile it like such,
C:\Program Files\Borland\BDS\3.0\CFPreview\bin> CF C:\CF\Test
@echo offECHO *********************************************************ECHO ******** Written by Chua Chee Wee ******* ECHO ******** CMD batch file for compiling CF projects *******ECHO ******** To be used on Windows XP / 2003 Server *******ECHO * Usage: CF FullProjectName *******ECHO * Eg: CF C:\CF\TimeZone.dpr ******* ECHO * Eg: CF C:\CF\TimeZone ******* ECHO * Eg: CF C:\CF\TimeZone.bdsproj *******ECHO *********************************************************SETLOCAL
IF "%1"=="" GOTO NOPARAMSSET EXT=IF EXIST %1\NUL GOTO DirectoryIF /i "%~x1"==".bdsproj" SET EXT=.dprSET F=%~dp1%~n1%EXT%IF EXIST %F% GOTO FilenameResolvedGOTO TryDpr:Directory:TryDprIF "%~x1"=="" SET EXT=.dprSET F=%~dp1%~n1%EXT%IF EXIST "%F%\NUL" GOTO TryDpkIF NOT EXIST "%F%" SET EXT=.dpkGOTO SkipSetDpk:TryDpkECHO TryDpkSET EXT=.dpk:SkipSetDpkSET F=%~dp1%~n1%EXT%
IF EXIST "%F%" GOTO FilenameResolvedSET MSG=Filename not resolvedGOTO FilenameUnresolved:FilenameResolvedSET MSG=
:FilenameUnresolvedIF NOT "%MSG%"=="" ECHO %MSG%IF NOT "%MSG%"=="" GOTO INVALIDNAMEREM ECHO %~dp1
SET SearchPath="%~dp1;C:\Program Files\Borland\BDS\3.0\CFPreview\lib"
REM ECHO %SearchPath%
SET AsmPath=C:\Program Files\Borland\BDS\3.0\CFPreview\assemblies\SET Assemblies="%AsmPath%system.dll;%AsmPath%system.windows.forms.dll;%AsmPath%System.Drawing.dll"SET OutputPath="C:\CF"SET CFPreviewBin=C:\Program Files\Borland\BDS\3.0\CFPreview\bin\
IF "%F%"=="" GOTO NOPARAMS
SET Params=%F% -u%SearchPath% -lu%Assemblies% -E%OutputPath% -H -I%SearchPath% -R%SearchPath%ECHO %Params%"%CFPreviewBin%dccil.exe" %Params%:DONEGOTO COMPLETE:INVALIDNAMEecho You provided an invalid filename or a project that doesn't exist!GOTO COMPLETE:NOPARAMSecho You need to provide a project to compile!!!:COMPLETEECHO Press a key to complete this taskPAUSEENDLOCAL