58 lines
1.7 KiB
Diff
58 lines
1.7 KiB
Diff
--- jEdit/installer/OperatingSystem.java 2009-12-22 21:02:27.000000000 +0100
|
|
+++ jEdit/installer/OperatingSystem.java-gil 2010-01-05 05:28:47.000000000 +0100
|
|
@@ -158,54 +158,6 @@
|
|
public void perform(String installDir,
|
|
Vector filesets) throws IOException
|
|
{
|
|
- if(!enabled)
|
|
- {
|
|
- return;
|
|
- }
|
|
-
|
|
- mkdirs(directory);
|
|
-
|
|
- String name = installer.getProperty("app.name");
|
|
-
|
|
- // create app start script
|
|
- String script = directory + File.separatorChar
|
|
- + name.toLowerCase();
|
|
-
|
|
- // Delete existing copy
|
|
- new File(script).delete();
|
|
-
|
|
- // Write simple script
|
|
- FileWriter out = new FileWriter(script);
|
|
- out.write("#!/bin/sh\n");
|
|
- out.write("#\n");
|
|
- out.write("# Runs jEdit - Programmer's Text Editor.\n");
|
|
- out.write("#\n");
|
|
- out.write("\n");
|
|
- out.write("# Set jvm heap initial and maximum sizes (in megabytes).\n");
|
|
- out.write("JAVA_HEAP_MAX_SIZE=192\n");
|
|
- out.write("\n");
|
|
- out.write("DEFAULT_JAVA_HOME=\""
|
|
- + System.getProperty("java.home")
|
|
- + "\"\n");
|
|
- out.write("if [ -z \"$JAVA_HOME\" ]; then\n");
|
|
- out.write("\tJAVA_HOME=\"$DEFAULT_JAVA_HOME\"\n");
|
|
- out.write("fi\n");
|
|
- out.write("\n");
|
|
- out.write("# Launch application.\n");
|
|
- out.write("\n");
|
|
-
|
|
- String jar = "\""+ installDir + File.separator
|
|
- + name.toLowerCase() + ".jar"+"\"";
|
|
-
|
|
-
|
|
- out.write("exec \"$JAVA_HOME/bin/java\"" +
|
|
- " -Xmx${JAVA_HEAP_MAX_SIZE}M -jar " +
|
|
- jar + " \"$@\"\n");
|
|
- out.close();
|
|
-
|
|
- // Make it executable
|
|
- String[] chmodArgs = { "chmod", "755", script };
|
|
- exec(chmodArgs);
|
|
}
|
|
}
|
|
|