generator now takes full file name
This commit is contained in:
parent
2d0e59cdc5
commit
5db9eb44d9
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat May 25 15:28:18 EDT 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Sun May 26 20:52:16 EDT 2019
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -2752,4 +2752,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat May 25 15:28:18 EDT 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Sun May 26 20:52:16 EDT 2019
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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
|
||||
|
||||
java -jar ../java_tools/ConfigDefinition.jar -definition integration -ts_destination tunerstudio -c_destination controllers\algo -java_destination ../java_console -skip build/config.gen
|
||||
java -jar ../java_tools/ConfigDefinition.jar -definition integration\rusefi_config.txt -ts_destination tunerstudio -c_destination controllers\algo -java_destination ../java_console -skip build/config.gen
|
||||
|
||||
|
||||
rem This would automatically copy latest file to 'dev' TS project
|
||||
|
|
|
@ -72,7 +72,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat May 25 15:28:18 EDT 2019
|
||||
; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Sun May 26 20:52:16 EDT 2019
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat May 25 15:28:18 EDT 2019
|
||||
// this file was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Sun May 26 20:52:16 EDT 2019
|
||||
public class Fields {
|
||||
public static final int accelerometerSpiDevice_offset = 2736;
|
||||
public static final int acCutoffHighRpm_offset = 1498;
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
<configuration default="false" name="ConfigDefinition" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.ConfigDefinition" />
|
||||
<module name="configuration_definition" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-definition ../../firmware/integration -ts_destination ../../firmware/tunerstudio -c_destination ../../firmware/controllers\algo -java_destination ../../java_console -skip lastMd5" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-definition ../../firmware/integration/rusefi_config.txt -ts_destination ../../firmware/tunerstudio -c_destination ../../firmware/controllers\algo -java_destination ../../java_console -skip lastMd5" />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
|
|
|
@ -20,8 +20,8 @@ import java.util.List;
|
|||
@SuppressWarnings("StringConcatenationInsideStringBufferAppend")
|
||||
public class ConfigDefinition {
|
||||
public static final String EOL = "\n";
|
||||
private static final String INPUT_FILE_NAME = "rusefi_config.txt";
|
||||
public static final String MESSAGE = "was generated automatically by ConfigDefinition.jar based on " + INPUT_FILE_NAME + " " + new Date();
|
||||
public static String MESSAGE;
|
||||
|
||||
private static final String ROM_RAIDER_XML_TEMPLATE = "rusefi_template.xml";
|
||||
private static final String ROM_RAIDER_XML_OUTPUT = "rusefi.xml";
|
||||
private static final String ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H = "engine_configuration_generated_structures.h";
|
||||
|
@ -45,7 +45,7 @@ public class ConfigDefinition {
|
|||
return;
|
||||
}
|
||||
|
||||
String definitionInputPath = null;
|
||||
String definitionInputFile = null;
|
||||
String tsPath = null;
|
||||
String headerDestinationFolder = null;
|
||||
String javaConsolePath = null;
|
||||
|
@ -55,7 +55,7 @@ public class ConfigDefinition {
|
|||
for (int i = 0; i < args.length - 1; i += 2) {
|
||||
String key = args[i];
|
||||
if (key.equals(KEY_DEFINITION)) {
|
||||
definitionInputPath = args[i + 1];
|
||||
definitionInputFile = args[i + 1];
|
||||
} else if (key.equals(KEY_TS_DESTINATION)) {
|
||||
tsPath = args[i + 1];
|
||||
} else if (key.equals(KEY_C_DESTINATION)) {
|
||||
|
@ -69,11 +69,11 @@ public class ConfigDefinition {
|
|||
}
|
||||
}
|
||||
|
||||
MESSAGE = "was generated automatically by ConfigDefinition.jar based on " + definitionInputFile + " " + new Date();
|
||||
|
||||
String fullFileName = definitionInputPath + File.separator + INPUT_FILE_NAME;
|
||||
System.out.println("Reading from " + fullFileName);
|
||||
System.out.println("Reading from " + definitionInputFile);
|
||||
|
||||
String currentMD5 = getDefinitionMD5(fullFileName);
|
||||
String currentMD5 = getDefinitionMD5(definitionInputFile);
|
||||
|
||||
if (skipRebuildFile != null) {
|
||||
boolean nothingToDoHere = needToSkipRebuild(skipRebuildFile, currentMD5);
|
||||
|
@ -88,7 +88,7 @@ public class ConfigDefinition {
|
|||
if (prependFile != null)
|
||||
readPrependValues(prependFile);
|
||||
|
||||
BufferedReader definitionReader = new BufferedReader(new FileReader(fullFileName));
|
||||
BufferedReader definitionReader = new BufferedReader(new FileReader(definitionInputFile));
|
||||
ReaderState state = new ReaderState();
|
||||
|
||||
List<ConfigurationConsumer> destinations = new ArrayList<>();
|
||||
|
@ -116,7 +116,7 @@ public class ConfigDefinition {
|
|||
|
||||
VariableRegistry.INSTANCE.writeNumericsToFile(headerDestinationFolder);
|
||||
|
||||
String inputFileName = definitionInputPath + File.separator + ROM_RAIDER_XML_TEMPLATE;
|
||||
String inputFileName = definitionInputFile + File.separator + ROM_RAIDER_XML_TEMPLATE;
|
||||
if (javaConsolePath != null) {
|
||||
String outputFileName = javaConsolePath + File.separator + ROM_RAIDER_XML_OUTPUT;
|
||||
processTextTemplate(inputFileName, outputFileName);
|
||||
|
|
Loading…
Reference in New Issue