Feature request: Define environment in BatchFiles for Android


Jürgen Fisterham

Hello,

my Android environment is splitted. This means that I have a seperate HD or partition where I have Java, Ant and the AndroidSDK installed. Due to the fact that I develop in Java too the JAVA_HOME environment variable is not set systemwide.

I've tested that the following entries in the Batchfiles would work awesome:

It would be nice if I can input such initialization code in AppBuilder and the stuff is written at first (after the @echo off) out to the batch files.

Thanks

Best regards
Jürgen


Ade Wale

Hi,

There is no need to add your request as a feature because not everybody settings are messy up.

@ECHO OFF

SET JAVA_HOME=c:\Program Files\Java\jdk1.8.0_71\
SET ANT_HOME=c:\Program Files\apache-ant-1.9.6\
SET ANDROID_HOME=d:\android-sdk
SET PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin;%ANDROID_HOME%\platform-tools
PAUSE

If you think you might want to always run above script then open Notepad paste the code inside and save it as ANYNAME YOU WANT with .bat at the end.

REM Add the Android platform for our app
CALL cordova platform add android

REM Add the Whitelist plugin for our app
CALL cordova plugin add cordova-plugin-whitelist

REM Add the "cordova-plugin-flashlight" plugin by the "Flashlight" plugin
CALL cordova plugin add cordova-plugin-flashlight

REM Build our app for the Android platform
CALL cordova build android

REM Pause the script execution, so we can view the script results
PAUSE

If you follow AppBuilder news, there is always new updates. David is really committed and response quickly to help.

Thanks


DecSoft

Hello Jürgen and edunt,

Honestly I never thinking in this before, but, work with Java (and other tools) and also with App Builder did not sound wrong, iust I am never point in that situation and then BAT files works well. But I think your proposal is reasonable Jürgen, so let me some time to consider what can be the best possible solution here.



Ade Wale
Hello Jürgen and edunt,

Honestly I never thinking in this before, but, work with Java (and other tools) and also with App Builder did not sound wrong, iust I am never point in that situation and then BAT files works well. But I think your proposal is reasonable Jürgen, so let me some time to consider what can be the best possible solution here.

Hi,

Ok, there will be some issues for AB beginner users i.e if version numbers changed on Java, and Ant, they might not know how to go about it.

Thanks


DecSoft

Hello,

Ok, there will be some issues for AB beginner users i.e if version numbers changed on Java, and Ant, they might not know how to go about it.

Yes; certainly some implementation can cause problems to beginner users. My plain right now is to add these options completely optional: if we define some specific thing like "JAVA_HOME", then the program take care about. If you just ommit these variables, then the generated BAT files continues exactly like now.



DecSoft

Hello to all,

Jürgen, update your App Builder copy. Now we can specify the Ant, Java and Android home (one, two or three) in order to be placed in the right way into the generated Batch files. I test right now and works fine, but please, try it by yourself and tell me if this can help you or what.



Jürgen Fisterham

Thanks David. That helps me a lot.

Kind regards
Juergen


DecSoft

You're welcome! :)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.