generating without build folder, faster fail in case of failure

This commit is contained in:
rusefi 2019-06-10 23:13:32 -04:00
parent 2b7fde2c5e
commit 090fa01465
3 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,4 @@
@echo off
rem This batch files reads rusefi_config.txt and produses firmware persistent configuration headers
rem the storage section of rusefi.ini is updated as well
@ -5,6 +6,8 @@ rem the storage section of rusefi.ini is updated as well
rem lazy is broken - TS input is not considered a change
rm build/config.gen
mkdir build
java -Drusefi.generator.lazyfile.enabled=true ^
-jar ../java_tools/ConfigDefinition.jar ^
-definition integration\rusefi_config.txt ^
@ -13,6 +16,8 @@ java -Drusefi.generator.lazyfile.enabled=true ^
-c_defines controllers\algo\rusefi_generated.h ^
-c_destination controllers\algo\engine_configuration_generated_structures.h ^
-java_destination ../java_console -skip build/config.gen
IF NOT ERRORLEVEL 0 echo ERROR generating
IF NOT ERRORLEVEL 0 EXIT /B 1
rem This would automatically copy latest file to 'dev' TS project
@ -21,5 +26,14 @@ echo %ts_path%
cp tunerstudio/rusefi.ini %ts_path%\mainController.ini
call gen_config_board microrusefi
IF NOT ERRORLEVEL 0 echo ERROR generating
IF NOT ERRORLEVEL 0 EXIT /B 1
call gen_config_board frankenso
IF NOT ERRORLEVEL 0 echo ERROR generating
IF NOT ERRORLEVEL 0 EXIT /B 1
call gen_config_board prometheus
IF NOT ERRORLEVEL 0 echo ERROR generating
IF NOT ERRORLEVEL 0 EXIT /B 1

Binary file not shown.

View File

@ -40,6 +40,16 @@ public class ConfigDefinition {
public static String definitionInputFile = null;
public static void main(String[] args) throws IOException {
try {
doJob(args);
} catch (Throwable e) {
System.out.println(e);
e.printStackTrace();
System.exit(-1);
}
}
private static void doJob(String[] args) throws IOException {
if (args.length < 2) {
System.out.println("Please specify\r\n"
+ KEY_DEFINITION + " x\r\n"