|
|
@ -3,6 +3,9 @@ package com.fr.start; |
|
|
|
import com.fr.process.FineProcess; |
|
|
|
import com.fr.process.FineProcess; |
|
|
|
import com.fr.process.engine.FineJavaProcessFactory; |
|
|
|
import com.fr.process.engine.FineJavaProcessFactory; |
|
|
|
import com.fr.process.engine.core.FineProcessContext; |
|
|
|
import com.fr.process.engine.core.FineProcessContext; |
|
|
|
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author hades |
|
|
|
* @author hades |
|
|
@ -11,6 +14,10 @@ import com.fr.process.engine.core.FineProcessContext; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class DesignerLauncher { |
|
|
|
public class DesignerLauncher { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final String BIN = "bin"; |
|
|
|
|
|
|
|
private static final String DOT ="."; |
|
|
|
|
|
|
|
private static final String BIN_HOME = generateBinHome(); |
|
|
|
|
|
|
|
|
|
|
|
private static final DesignerLauncher INSTANCE = new DesignerLauncher(); |
|
|
|
private static final DesignerLauncher INSTANCE = new DesignerLauncher(); |
|
|
|
|
|
|
|
|
|
|
|
private String[] args; |
|
|
|
private String[] args; |
|
|
@ -19,6 +26,11 @@ public class DesignerLauncher { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static String generateBinHome() { |
|
|
|
|
|
|
|
return DOT.equals(StableUtils.getInstallHome()) ? |
|
|
|
|
|
|
|
DOT : StableUtils.getInstallHome() + File.separator + BIN; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static DesignerLauncher getInstance() { |
|
|
|
public static DesignerLauncher getInstance() { |
|
|
|
return INSTANCE; |
|
|
|
return INSTANCE; |
|
|
|
} |
|
|
|
} |
|
|
@ -26,12 +38,14 @@ public class DesignerLauncher { |
|
|
|
public void start(String[] args) { |
|
|
|
public void start(String[] args) { |
|
|
|
this.args = args; |
|
|
|
this.args = args; |
|
|
|
FineJavaProcessFactory.create(). |
|
|
|
FineJavaProcessFactory.create(). |
|
|
|
entry("com.fr.start.MainDesigner"). |
|
|
|
entry(MainDesigner.class). |
|
|
|
javaRuntime(DesignerJavaRuntime.getInstance().getJavaExec()). |
|
|
|
javaRuntime(DesignerJavaRuntime.getInstance().getJavaExec()). |
|
|
|
classPath(DesignerJavaRuntime.getInstance().getClassPath()). |
|
|
|
classPath(DesignerJavaRuntime.getInstance().getClassPath()). |
|
|
|
inheritJvmSettings(). |
|
|
|
inheritJvmSettings(). |
|
|
|
jvmSettings(DesignerJavaRuntime.getInstance().getJvmOptions()). |
|
|
|
jvmSettings(DesignerJavaRuntime.getInstance().getJvmOptions()). |
|
|
|
arguments(args). |
|
|
|
arguments(args). |
|
|
|
|
|
|
|
directory(BIN_HOME). |
|
|
|
|
|
|
|
entryPackage(FineDesigner.class). |
|
|
|
startProcess(DesignerProcessType.INSTANCE); |
|
|
|
startProcess(DesignerProcessType.INSTANCE); |
|
|
|
DesignerSuperListener.getInstance().start(); |
|
|
|
DesignerSuperListener.getInstance().start(); |
|
|
|
} |
|
|
|
} |
|
|
|