mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
added windows installer
moved config file location
This commit is contained in:
@@ -42,6 +42,8 @@ public class DIYLCStarter {
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not initialize log4j configuration", e);
|
||||
}
|
||||
|
||||
ConfigurationManager.initialize("diylc");
|
||||
|
||||
LOG.debug("Java version: " + System.getProperty("java.runtime.version") + " by "
|
||||
+ System.getProperty("java.vm.vendor"));
|
||||
|
||||
@@ -111,19 +111,8 @@ public class MainFrame extends JFrame implements ISwingUI {
|
||||
|
||||
presenter.installPlugin(new ComponentTree(this, canvasPlugin.getCanvasPanel()));
|
||||
presenter.installPlugin(new FramePlugin());
|
||||
|
||||
try {
|
||||
File testFile = new File("test.tmp");
|
||||
Writer out = new OutputStreamWriter(new FileOutputStream(testFile));
|
||||
out.write("This is a test");
|
||||
out.close();
|
||||
testFile.delete();
|
||||
presenter.installPlugin(new AutoSavePlugin(this));
|
||||
} catch (Exception e) {
|
||||
showMessage("The current user does not have permissions to access folder " + new File(".").getAbsolutePath()
|
||||
+ ".\nAuto-save feature will not be available, contact your system administrator.", "Warning",
|
||||
IView.WARNING_MESSAGE);
|
||||
}
|
||||
|
||||
presenter.installPlugin(new AutoSavePlugin(this));
|
||||
|
||||
presenter.createNewProject();
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.concurrent.Executors;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import org.diylc.appframework.miscutils.ConfigurationManager;
|
||||
import org.diylc.appframework.miscutils.Utils;
|
||||
import org.diylc.common.EventType;
|
||||
import org.diylc.common.IPlugIn;
|
||||
import org.diylc.common.IPlugInPort;
|
||||
@@ -17,7 +18,7 @@ import org.diylc.swing.gui.DummyView;
|
||||
|
||||
public class AutoSavePlugin implements IPlugIn {
|
||||
|
||||
private static final String AUTO_SAVE_FILE_NAME = "autoSave.diy";
|
||||
private static final String AUTO_SAVE_FILE_NAME = Utils.getUserDataDirectory("diylc") + "autoSave.diy";
|
||||
|
||||
protected static final long autoSaveFrequency = 60 * 1000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user