magic way to use launcher from IDE
This commit is contained in:
parent
efeb6eeadc
commit
55ddab1377
|
@ -1,17 +1,8 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Launcher" type="Application" factoryName="Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.Launcher" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="ui" />
|
||||
<envs />
|
||||
<option name="VM_PARAMETERS" value="-Dtools_path=../misc/install -Dinput_files_path=../firmware/deliver" />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
|
@ -21,6 +12,8 @@
|
|||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -49,7 +49,8 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20190815;
|
||||
public static final String INPUT_FILES_PATH = "..";
|
||||
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
|
||||
public static final String TOOLS_PATH = System.getProperty("tools_path", ".");
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
protected static final String SPEED_KEY = "speed";
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.io.IOException;
|
|||
* @see FirmwareFlasher
|
||||
*/
|
||||
public class DfuFlasher {
|
||||
public static final String DFU_BINARY = "DfuSe/DfuSeCommand.exe";
|
||||
public static final String DFU_BINARY = Launcher.TOOLS_PATH + File.separator + "DfuSe/DfuSeCommand.exe";
|
||||
// TODO: integration with DFU command line tool
|
||||
static final String DFU_COMMAND = DFU_BINARY + " -c -d --v --fn " + Launcher.INPUT_FILES_PATH + File.separator +
|
||||
"rusefi.dfu";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.rusefi.maintenance;
|
||||
|
||||
import com.rusefi.Launcher;
|
||||
import com.rusefi.ui.StatusWindow;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -19,12 +20,13 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
*/
|
||||
public class FirmwareFlasher {
|
||||
// Even on Windows openOCD insists on "/" for path separator
|
||||
public static final String IMAGE_FILE = INPUT_FILES_PATH + "/" + "rusefi.bin";
|
||||
public static final String IMAGE_NO_ASSERTS_FILE = INPUT_FILES_PATH + "/" + "rusefi_no_asserts.bin";
|
||||
public static final String IMAGE_FILE = INPUT_FILES_PATH + File.separator + "rusefi.bin";
|
||||
public static final String IMAGE_NO_ASSERTS_FILE = INPUT_FILES_PATH + File.separator + "rusefi_no_asserts.bin";
|
||||
/**
|
||||
* SWD ST-LINK/V2 mode
|
||||
*/
|
||||
private static final String OPENOCD_EXE = "openocd/openocd.exe";
|
||||
private static final String OPENOCD_EXE = Launcher.TOOLS_PATH + File.separator + "openocd/openocd.exe";
|
||||
// todo: combine this with Launcher#TOOLS_PATH?
|
||||
static final String BINARY_LOCATION = ".";
|
||||
private static final String SUCCESS_MESSAGE_TAG = "shutdown command invoked";
|
||||
private static final String FAILED_MESSAGE_TAG = "failed";
|
||||
|
|
Loading…
Reference in New Issue