[Lazarus] Android build without ant
Sven Barth
pascaldragon at googlemail.com
Mon Mar 26 17:47:43 CEST 2012
Am 26.03.2012 17:19, schrieb Felipe Monteiro de Carvalho:
> Hello,
>
> Ok, so far I have this script:
>
> =================
> cmd
>
> SET PATH=C:\Programas\android-sdk\tools;C:\Programas\android-sdk\platform-tools\;C:\Progra~1\Java\jdk1.6.0_20\bin
>
> mkdir bin
> mkdir bin\classes
>
> javac -classpath
> C:\Programas\android-sdk\platforms\android-8\android.jar -d
> bin\classes src\com\pascal\lcltest\LCLActivity.java
>
> dx --dex --no-strict --output=bin\classes.dex
> F:\Programas\lazarussvn\examples\androidlcl\android\bin\classes\com\pascal\lcltest\LCLActivity.class
AFAIK it should be
dx --dex --no-strict --output=bin\classes.dex
F:\Programas\lazarussvn\examples\androidlcl\android\bin\classes
Note that the path only goes up to "classes" not the class path below it.
> And it is really annoying that the entire script quits running if any
> command fails, is there any way to make it more resistent? I would
> like it to stop at the final pause so that I can more easily see the
> output ... even if some commands fail I'd like it to keep running...
>
You should look for the concepts of "errorlevel" and "if". See e.g. here:
http://ss64.com/nt/if.html
http://www.robvanderwoude.com/errorlevel.php
AFAIK the variable ERRORLEVEL is set if you run a program (perhaps you
need to use "call" for it, don't know). I've never used the concept
though up to now, so you'll need to inform yourself.
Regards,
Sven
More information about the Lazarus
mailing list