diff --git a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/DIYLCStarter.launch b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/DIYLCStarter.launch
index 11d120ec..23679b63 100644
--- a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/DIYLCStarter.launch
+++ b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/DIYLCStarter.launch
@@ -11,5 +11,5 @@
-
+
diff --git a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/diylc.l4j.ini b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/diylc.l4j.ini
new file mode 100644
index 00000000..92012be2
--- /dev/null
+++ b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/diylc.l4j.ini
@@ -0,0 +1 @@
+-Xms512m -Xmx1024m -Dorg.diylc.scriptRun=true
\ No newline at end of file
diff --git a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/run.sh b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/run.sh
new file mode 100644
index 00000000..96d09f1f
--- /dev/null
+++ b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/run.sh
@@ -0,0 +1 @@
+java -Xms512m -Xmx2048m -Dorg.diylc.scriptRun=true -cp diylc.jar:lib org.diylc.DIYLCStarter
\ No newline at end of file
diff --git a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/DIYLCStarter.java b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/DIYLCStarter.java
index 063fc0e8..c3bd6c7e 100644
--- a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/DIYLCStarter.java
+++ b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/DIYLCStarter.java
@@ -4,6 +4,7 @@ import java.io.FileInputStream;
import java.net.URL;
import java.util.Properties;
+import javax.swing.JOptionPane;
import javax.swing.UIManager;
import org.apache.log4j.Logger;
@@ -26,6 +27,8 @@ public class DIYLCStarter {
private static final Logger LOG = Logger.getLogger(DIYLCStarter.class);
+ private static final String SCRIPT_RUN = "org.diylc.scriptRun";
+
/**
* @param args
*/
@@ -52,6 +55,22 @@ public class DIYLCStarter {
} catch (Exception e) {
LOG.error("Could not set Look&Feel", e);
}
+
+ String val = System.getProperty(SCRIPT_RUN);
+ if (!"true".equals(val)) {
+ int response = JOptionPane
+ .showConfirmDialog(
+ null,
+ "It is not recommended to run DIYLC by clicking on the diylc.jar file.\n" +
+ "Please use diylc.exe on Windows and run.sh on OSX/Linux because they\n" +
+ "will configure your Java for the best performance and reliability.\n" +
+ "Do you want to continue using the application?",
+ "DIYLC", JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if (response != JOptionPane.YES_OPTION) {
+ System.exit(0);
+ }
+ }
MainFrame mainFrame = new MainFrame();
mainFrame.setLocationRelativeTo(null);
@@ -69,7 +88,7 @@ public class DIYLCStarter {
}
}
}
-
+
properties = new Properties();
try {
LOG.info("Injecting default properties.");