@if "%1" == "" (echo %0: No program name argument specified && goto usage)
@if "%2" == "" (echo %0: No creator id specified && goto usage)

@echo "Compiling resource file %1.rcp"
@..\bin\pilrc %1.rcp
@IF ERRORLEVEL 1 GOTO error_exit
@echo "Building Palm OS prc format executable"
..\bin\par c -a resource %1.prc "%3" appl %2 ../lib/palmtcl.prc *.bin

@exit

:usage
@echo Usage: %0 PROGRAMNAME CREATORID [PROGRAMDESCRIPTION]
:error_exit
@exit 1

