* windows installer fixes / improvements

- move deprecated installer-only classes (Exec, Delete, and Copy) from
    i2p.jar into installer/
  - replace installer/resources/fixpaths.cmd with an improved method in java
  - combine the installer-only utility classes into a single jar and call the
    classes from within izpack
This commit is contained in:
kytv
2012-12-28 20:59:17 +00:00
parent cf10cb1c09
commit 4389f277d6
11 changed files with 350 additions and 175 deletions

View File

@ -1,12 +0,0 @@
package net.i2p.util;
/**
* Usage: Copy from to
*
* @deprecated only for use by installer, to be removed from i2p.jar, use FileUtil.copy()
*/
public class Copy {
public static void main(String args[]) {
FileUtil.copy(args[0], args[1], true);
}
}

View File

@ -1,12 +0,0 @@
package net.i2p.util;
/**
* Usage: Delete name
*
* @deprecated only for use by installer, to be removed from i2p.jar, use FileUtil.rmdir()
*/
public class Delete {
public static void main(String args[]) {
FileUtil.rmdir(args[0], false);
}
}

View File

@ -1,26 +0,0 @@
package net.i2p.util;
import java.io.File;
/**
* Usage: Exec dir command [args ...]
*
* @deprecated only for use by installer, to be removed from i2p.jar, use ShellCommand
*/
public class Exec {
public static void main(String args[]) {
try {
String cmd[] = new String[args.length - 1];
System.arraycopy(args, 1, cmd, 0, cmd.length);
Process proc = Runtime.getRuntime().exec(cmd, (String[])null, new File(args[0]));
// ugly hack, because it seems we'll block otherwise!
// http://cephas.net/blog/2004/03/23/external_applications_javas_runtimeexec.html
try { proc.exitValue(); } catch (Throwable t) { }
Runtime.getRuntime().halt(0);
} catch (Exception e) {
e.printStackTrace();
}
}
}