|
|
@ -9,7 +9,6 @@ import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.os.OperatingSystem; |
|
|
|
import com.fr.stable.os.OperatingSystem; |
|
|
|
|
|
|
|
|
|
|
|
import javax.imageio.ImageIO; |
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
|
|
@ -32,17 +31,15 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime { |
|
|
|
private static final String BIN_HOME = StableUtils.pathJoin(StableUtils.getInstallHome(), "bin"); |
|
|
|
private static final String BIN_HOME = StableUtils.pathJoin(StableUtils.getInstallHome(), "bin"); |
|
|
|
private static final String LOGO_PATH = StableUtils.pathJoin(BIN_HOME, "logo.png"); |
|
|
|
private static final String LOGO_PATH = StableUtils.pathJoin(BIN_HOME, "logo.png"); |
|
|
|
private static final String DOCK_OPTIONS = "-Xdock:icon=" + LOGO_PATH; |
|
|
|
private static final String DOCK_OPTIONS = "-Xdock:icon=" + LOGO_PATH; |
|
|
|
private static final String DOCK_NAME_OPTIONS = "-Xdock:name=" + FineDesigner.class.getName(); |
|
|
|
private static final String DOCK_NAME_OPTIONS = "-Xdock:name=" + FineDesigner.class.getSimpleName(); |
|
|
|
private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"}; |
|
|
|
private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"}; |
|
|
|
|
|
|
|
|
|
|
|
static { |
|
|
|
static { |
|
|
|
if (SupportOSImpl.DOCK_ICON.support()) { |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
ImageIO.write(IOUtils.readImage("com/fr/design/icon/logo.png"), "png", new File(LOGO_PATH)); |
|
|
|
IOUtils.copy(DesignerJavaRuntime.class.getResourceAsStream("/com/fr/design/icon/logo.png"), "logo.png", new File(BIN_HOME)); |
|
|
|
} catch (IOException ignore) { |
|
|
|
} catch (IOException ignore) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final DesignerJavaRuntime INSTANCE = new DesignerJavaRuntime(); |
|
|
|
private static final DesignerJavaRuntime INSTANCE = new DesignerJavaRuntime(); |
|
|
|
|
|
|
|
|
|
|
|