forked from I2P_Developers/i2p.i2p
Branch from 0.9.5 release.
Implement new Main wrapper class for utility.jar, to work around izpack ticket #162 http://jira.codehaus.org/browse/IZPACK-162 which prevents us from specifying a main class as it fails on Windows installations when a full path including a drive letter is specified (ticket #912)
This commit is contained in:
@ -49,6 +49,7 @@
|
|||||||
<fileset dir="../../core/java/build/obj" includes="**/FileUtil.class"/>
|
<fileset dir="../../core/java/build/obj" includes="**/FileUtil.class"/>
|
||||||
<fileset dir="./build/obj" includes="**" />
|
<fileset dir="./build/obj" includes="**" />
|
||||||
<manifest>
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="net.i2p.installer.Main" />
|
||||||
<attribute name="Built-By" value="${build.built-by}" />
|
<attribute name="Built-By" value="${build.built-by}" />
|
||||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||||
|
36
installer/java/src/net/i2p/installer/Main.java
Normal file
36
installer/java/src/net/i2p/installer/Main.java
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package net.i2p.installer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Execute one of the other classes in this package.
|
||||||
|
* Workaround for izpack bug #162 / our bug #912
|
||||||
|
* http://jira.codehaus.org/browse/IZPACK-162
|
||||||
|
* http://trac.i2p2.i2p/ticket/912
|
||||||
|
* </p>
|
||||||
|
* Usage: <code>copy|delete|exec|fixwinpaths args...</code><br>
|
||||||
|
*
|
||||||
|
* @since 0.9.6
|
||||||
|
*/
|
||||||
|
public class Main {
|
||||||
|
|
||||||
|
private static final String USAGE = "Usage: {copy|delete|exec|fixwinpaths} [args...]";
|
||||||
|
|
||||||
|
public static void main(String args[]) {
|
||||||
|
if (args.length == 0)
|
||||||
|
throw new IllegalArgumentException(USAGE);
|
||||||
|
String cmd = args[0];
|
||||||
|
String[] shift = new String[args.length - 1];
|
||||||
|
if (shift.length > 0)
|
||||||
|
System.arraycopy(args, 1, shift, 0, shift.length);
|
||||||
|
if (cmd.equals("copy"))
|
||||||
|
Copy.main(shift);
|
||||||
|
else if (cmd.equals("delete"))
|
||||||
|
Delete.main(shift);
|
||||||
|
else if (cmd.equals("exec"))
|
||||||
|
Exec.main(shift);
|
||||||
|
else if (cmd.equals("fixwinpaths"))
|
||||||
|
FixWinPaths.main(shift);
|
||||||
|
else
|
||||||
|
throw new IllegalArgumentException(USAGE);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user