So I did a small batch file which is able to compile the samples very easily. All you need is to copy the following script 'make.cmd' into the connect iq directory and create a private key ('YourKey.der').
Then you can compile and start one of the samples by entering:
make ApplicationName resource-codes [simulation]
where the resource-codes is a string with characters to include various xml files (e.g. 'r' for resources.xml) and additional compiler flags (e.g. '*' to exclude debug information).
Have fun,
Michael
@echo off
if /%2==/ (
set sample=SimpleDataField
set options=brs
) else (
set sample=%1
set options=%2
)
: -------------------------------------------------------------
set loc=samples\%sample%\
set res=%loc%resources\
set src=%loc%source\
set all=
set flags=
:loop
set check=%options:~0,1%
set options=%options:~1%
if /%check%==/r ( set all=%all%;%res%resources.xml)
if /%check%==/R ( set all=%all%;%res%resource\resources.xml)
if /%check%==/s ( set all=%all%;%res%strings.xml)
if /%check%==/S ( set all=%all%;%res%strings\strings.xml)
if /%check%==/l ( set all=%all%;%res%layout.xml)
if /%check%==/L ( set all=%all%;%res%layouts\layout.xml)
if /%check%==/b ( set all=%all%;%res%bitmaps.xml)
if /%check%==/B ( set all=%all%;%res%images\bitmaps.xml)
if /%check%==/D ( set all=%all%;%res%drawables\drawables.xml)
if /%check%==/M ( set all=%all%;%res%menus\menu.xml)
if /%check%==/X ( set all=%all%;%res%menus\auxmenu.xml)
if /%check%==/* ( set flags=%flags% --release )
if /%check%==/! ( set flags=%flags% --warn )
if /%check%==/0 ( set flags=%flags% --device round_watch )
if not /%options%==/ goto loop
set all=%all:~1%
: -------------------------------------------------------------
echo.
echo Compile: '%src%%sample%*.mc':
echo.
if "%all%"=="~1" (
echo /!\ No valid resource file
goto :eof )
setlocal enabledelayedexpansion
echo Resource files:
set /a count=0
for %%i in (%all%) do (
set /a count+=1
set "v_!count!=%%i" )
for /l %%i in (1,1,%count%) do ( echo - !v_%%i! )
endlocal
echo.
if not "%flags%"=="" (
echo Flags: %flags%
echo. )
:compile
call bin\monkeyc -o test.prg -m %loc%manifest.xml %flags% -z %all% %src%%sample%*.mc -y YourKey.der
:run
set options=%3.
set check=%options:~0,1%
set options=%options:~1%
if not "%check%"=="!" ( goto :eof )
set check=square_watch
if "%options%"=="0." ( set check=round_watch)
if "%options%"=="9." ( set check=fr935)
bin\monkeydo test.prg %check%