mirror of https://github.com/rusefi/rusefi-1.git
progress
This commit is contained in:
parent
298618a9f9
commit
f7c83d263a
|
@ -1,5 +1,7 @@
|
||||||
package com.rusefi.ui.storage;
|
package com.rusefi.ui.storage;
|
||||||
|
|
||||||
|
import com.rusefi.shared.FileUtil;
|
||||||
|
|
||||||
import java.beans.XMLDecoder;
|
import java.beans.XMLDecoder;
|
||||||
import java.beans.XMLEncoder;
|
import java.beans.XMLEncoder;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
@ -9,14 +11,13 @@ import java.util.Map;
|
||||||
public class PersistentConfiguration {
|
public class PersistentConfiguration {
|
||||||
private static final PersistentConfiguration INSTANCE = new PersistentConfiguration();
|
private static final PersistentConfiguration INSTANCE = new PersistentConfiguration();
|
||||||
|
|
||||||
public static final String RUSEFI_SETTINGS_FOLDER = System.getProperty("user.home") + File.separator + ".rusEFI";
|
|
||||||
private static boolean hookRegistered;
|
private static boolean hookRegistered;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
new File(RUSEFI_SETTINGS_FOLDER).mkdirs();
|
new File(FileUtil.RUSEFI_SETTINGS_FOLDER).mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String CONFIG_FILE_NAME = RUSEFI_SETTINGS_FOLDER + File.separator + "console_properties.xml";
|
private static final String CONFIG_FILE_NAME = FileUtil.RUSEFI_SETTINGS_FOLDER + File.separator + "console_properties.xml";
|
||||||
|
|
||||||
private Map<String, Object> config = new HashMap<>();
|
private Map<String, Object> config = new HashMap<>();
|
||||||
private boolean isLoaded;
|
private boolean isLoaded;
|
||||||
|
|
|
@ -4,7 +4,6 @@ import com.opensr5.ConfigurationImage;
|
||||||
import com.opensr5.ini.IniFileModel;
|
import com.opensr5.ini.IniFileModel;
|
||||||
import com.opensr5.ini.field.IniField;
|
import com.opensr5.ini.field.IniField;
|
||||||
import com.rusefi.config.generated.Fields;
|
import com.rusefi.config.generated.Fields;
|
||||||
import com.rusefi.ui.storage.PersistentConfiguration;
|
|
||||||
import com.rusefi.xml.XmlUtil;
|
import com.rusefi.xml.XmlUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@ import java.util.Objects;
|
||||||
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
public class Msq {
|
public class Msq {
|
||||||
public static final String outputXmlFileName = PersistentConfiguration.RUSEFI_SETTINGS_FOLDER + File.separator + "output.msq";
|
public static final String outputXmlFileName = FileUtil.RUSEFI_SETTINGS_FOLDER + File.separator + "output.msq";
|
||||||
|
|
||||||
public List<Page> page = new ArrayList<>();
|
public List<Page> page = new ArrayList<>();
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
public class FileUtil {
|
public class FileUtil {
|
||||||
|
public static final String RUSEFI_SETTINGS_FOLDER = System.getProperty("user.home") + File.separator + ".rusEFI";
|
||||||
|
|
||||||
public static void unzip(String zipFileName, String destPath) throws IOException {
|
public static void unzip(String zipFileName, String destPath) throws IOException {
|
||||||
File destDir = new File(destPath);
|
File destDir = new File(destPath);
|
||||||
byte[] buffer = new byte[1024];
|
byte[] buffer = new byte[1024];
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<module fileurl="file://$PROJECT_DIR$/../../java_console/inifile/inifile.iml" filepath="$PROJECT_DIR$/../../java_console/inifile/inifile.iml" />
|
<module fileurl="file://$PROJECT_DIR$/../../java_console/inifile/inifile.iml" filepath="$PROJECT_DIR$/../../java_console/inifile/inifile.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/../../java_console/logging/logging.iml" filepath="$PROJECT_DIR$/../../java_console/logging/logging.iml" />
|
<module fileurl="file://$PROJECT_DIR$/../../java_console/logging/logging.iml" filepath="$PROJECT_DIR$/../../java_console/logging/logging.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/../../java_console/models/models.iml" filepath="$PROJECT_DIR$/../../java_console/models/models.iml" />
|
<module fileurl="file://$PROJECT_DIR$/../../java_console/models/models.iml" filepath="$PROJECT_DIR$/../../java_console/models/models.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/../../java_console/shared_io/shared_io.iml" filepath="$PROJECT_DIR$/../../java_console/shared_io/shared_io.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/../../java_console/shared_ui/shared_ui.iml" filepath="$PROJECT_DIR$/../../java_console/shared_ui/shared_ui.iml" />
|
<module fileurl="file://$PROJECT_DIR$/../../java_console/shared_ui/shared_ui.iml" filepath="$PROJECT_DIR$/../../java_console/shared_ui/shared_ui.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/../ts_plugin/ts_plugin.iml" filepath="$PROJECT_DIR$/../ts_plugin/ts_plugin.iml" />
|
<module fileurl="file://$PROJECT_DIR$/../ts_plugin/ts_plugin.iml" filepath="$PROJECT_DIR$/../ts_plugin/ts_plugin.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/ts_plugin_launcher.iml" filepath="$PROJECT_DIR$/ts_plugin_launcher.iml" />
|
<module fileurl="file://$PROJECT_DIR$/ts_plugin_launcher.iml" filepath="$PROJECT_DIR$/ts_plugin_launcher.iml" />
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.rusefi.ts_plugin;
|
||||||
|
|
||||||
import com.rusefi.autoupdate.AutoupdateUtil;
|
import com.rusefi.autoupdate.AutoupdateUtil;
|
||||||
import com.rusefi.shared.ConnectionAndMeta;
|
import com.rusefi.shared.ConnectionAndMeta;
|
||||||
import com.rusefi.ui.storage.PersistentConfiguration;
|
import com.rusefi.shared.FileUtil;
|
||||||
import org.putgemin.VerticalFlowLayout;
|
import org.putgemin.VerticalFlowLayout;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
@ -21,7 +21,7 @@ import static com.rusefi.ts_plugin.TsPluginLauncher.VERSION;
|
||||||
|
|
||||||
public class Updater {
|
public class Updater {
|
||||||
private static final String PLUGIN_BODY_JAR = "rusefi_plugin_body.jar";
|
private static final String PLUGIN_BODY_JAR = "rusefi_plugin_body.jar";
|
||||||
public static final String LOCAL_JAR_FILE_NAME = PersistentConfiguration.RUSEFI_SETTINGS_FOLDER + File.separator + PLUGIN_BODY_JAR;
|
public static final String LOCAL_JAR_FILE_NAME = FileUtil.RUSEFI_SETTINGS_FOLDER + File.separator + PLUGIN_BODY_JAR;
|
||||||
private static final String TITLE = "rusEFI plugin installer " + VERSION;
|
private static final String TITLE = "rusEFI plugin installer " + VERSION;
|
||||||
|
|
||||||
private final JPanel content = new JPanel(new VerticalFlowLayout());
|
private final JPanel content = new JPanel(new VerticalFlowLayout());
|
||||||
|
|
|
@ -10,5 +10,6 @@
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="TunerStudioPluginAPI" level="project" />
|
<orderEntry type="library" name="TunerStudioPluginAPI" level="project" />
|
||||||
<orderEntry type="module" module-name="autoupdate" />
|
<orderEntry type="module" module-name="autoupdate" />
|
||||||
|
<orderEntry type="module" module-name="shared_io" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
Loading…
Reference in New Issue