diff --git a/firmware/config/boards/kinetis/config/!gen_config.bat b/firmware/config/boards/kinetis/config/!gen_config.bat index b0f6b90c8f..c15b5d6509 100644 --- a/firmware/config/boards/kinetis/config/!gen_config.bat +++ b/firmware/config/boards/kinetis/config/!gen_config.bat @@ -25,6 +25,7 @@ java ^ -jar ../java_tools/ConfigDefinition.jar ^ -definition integration/rusefi_config.txt ^ -ts_destination tunerstudio ^ + -tool kineris_gen_config.bat ^ -with_c_defines false ^ -initialize_to_zero false ^ -ts_output_name rusefi_kinetis.ini ^ diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index e6b8c4738c..597141c96c 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -1,5 +1,5 @@ // -// was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt +// was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script)integration/rusefi_config.txt // #define absoluteFuelPressure_offset 76 diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index affc184d97..082c86176b 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -1,5 +1,5 @@ // -// was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt +// was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt // #define absoluteFuelPressure_offset 76 diff --git a/firmware/gen_config.bat b/firmware/gen_config.bat index f1dc9d66c0..4be42cbce6 100644 --- a/firmware/gen_config.bat +++ b/firmware/gen_config.bat @@ -18,6 +18,7 @@ java -DSystemOut.name=gen_config ^ -ts_destination tunerstudio ^ -with_c_defines false ^ -initialize_to_zero false ^ + -tool gen_config.bat ^ -c_defines controllers\generated\rusefi_generated.h ^ -c_destination controllers\generated\engine_configuration_generated_structures.h ^ -c_fsio_constants controllers\generated\fsio_enums_generated.def ^ diff --git a/firmware/gen_config_board.bat b/firmware/gen_config_board.bat index d2389f9f59..6b7a4b882c 100644 --- a/firmware/gen_config_board.bat +++ b/firmware/gen_config_board.bat @@ -29,6 +29,7 @@ java -DSystemOut.name=gen_config_board ^ java -DSystemOut.name=gen_config_board ^ -jar ../java_tools/ConfigDefinition.jar ^ -definition integration\rusefi_config.txt ^ + -tool gen_config.bat ^ -ts_destination tunerstudio ^ -ts_output_name rusefi_%BOARDNAME%.ini ^ -prepend tunerstudio/%BOARDNAME%_prefix.txt ^ diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index c6e15c8e74..9ecb4d887b 100644 Binary files a/java_tools/ConfigDefinition.jar and b/java_tools/ConfigDefinition.jar differ diff --git a/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java b/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java index 9257d537c4..6acd0c282e 100644 --- a/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java +++ b/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java @@ -20,9 +20,9 @@ import java.util.List; @SuppressWarnings("StringConcatenationInsideStringBufferAppend") public class ConfigDefinition { public static final String EOL = "\n"; - public static final String GENERATED_AUTOMATICALLY_TAG = LazyFile.LAZY_FILE_TAG + "ConfigDefinition.jar based on "; public static String MESSAGE; + public static String TOOL = "(unknown script)"; private static final String ROM_RAIDER_XML_TEMPLATE = "rusefi_template.xml"; public static final String KEY_DEFINITION = "-definition"; private static final String KEY_ROM_INPUT = "-romraider"; @@ -42,6 +42,10 @@ public class ConfigDefinition { public static boolean needZeroInit = true; public static String definitionInputFile = null; + public static String getGeneratedAutomaticallyTag() { + return LazyFile.LAZY_FILE_TAG + "ConfigDefinition.jar based on " + TOOL + " "; + } + public static void main(String[] args) throws IOException { try { doJob(args); @@ -81,7 +85,9 @@ public class ConfigDefinition { for (int i = 0; i < args.length - 1; i += 2) { String key = args[i]; - if (key.equals(KEY_DEFINITION)) { + if (key.equals("-tool")) { + ConfigDefinition.TOOL = args[i + 1]; + } else if (key.equals(KEY_DEFINITION)) { definitionInputFile = args[i + 1]; } else if (key.equals(KEY_TS_DESTINATION)) { tsPath = args[i + 1]; @@ -116,7 +122,7 @@ public class ConfigDefinition { } } - MESSAGE = GENERATED_AUTOMATICALLY_TAG + definitionInputFile + " " + new Date(); + MESSAGE = getGeneratedAutomaticallyTag() + definitionInputFile + " " + new Date(); SystemOut.println("Reading from " + definitionInputFile); @@ -214,7 +220,7 @@ public class ConfigDefinition { SystemOut.println("Reading from " + inputFileName); SystemOut.println("Writing to " + outputFileName); - VariableRegistry.INSTANCE.put("generator_message", ConfigDefinition.GENERATED_AUTOMATICALLY_TAG + new Date()); + VariableRegistry.INSTANCE.put("generator_message", ConfigDefinition.getGeneratedAutomaticallyTag() + new Date()); File inputFile = new File(inputFileName); diff --git a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java index ece519d34b..c39729375a 100644 --- a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java +++ b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java @@ -101,7 +101,7 @@ public class VariableRegistry extends TreeMap { SystemOut.println("Writing to " + fileName); LazyFile cHeader = new LazyFile(fileName); - cHeader.write("//\n// " + ConfigDefinition.GENERATED_AUTOMATICALLY_TAG + ConfigDefinition.definitionInputFile + "\n//\n\n"); + cHeader.write("//\n// " + ConfigDefinition.getGeneratedAutomaticallyTag() + ConfigDefinition.definitionInputFile + "\n//\n\n"); cHeader.write(getDefinesSection()); cHeader.close(); }