|
|
@ -32,16 +32,16 @@ public class PluginManagerPane extends BasicPane { |
|
|
|
setLayout(new BorderLayout()); |
|
|
|
setLayout(new BorderLayout()); |
|
|
|
if (System.getProperty("java.version").startsWith("1.8")) { |
|
|
|
if (System.getProperty("java.version").startsWith("1.8")) { |
|
|
|
String installHome; |
|
|
|
String installHome; |
|
|
|
if(StableUtils.isDebug()){ |
|
|
|
if (StableUtils.isDebug()) { |
|
|
|
URL url = ClassLoader.getSystemResource(""); |
|
|
|
URL url = ClassLoader.getSystemResource(""); |
|
|
|
installHome = url.getPath() + "scripts"; |
|
|
|
installHome = url.getPath() + "scripts"; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
installHome = StableUtils.getInstallHome() + File.separator + "scripts"; |
|
|
|
installHome = StableUtils.getInstallHome() + File.separator + "scripts"; |
|
|
|
File file = new File(installHome); |
|
|
|
File file = new File(installHome); |
|
|
|
if (!file.exists()) { |
|
|
|
if (!file.exists()) { |
|
|
|
int rv = JOptionPane.showConfirmDialog( |
|
|
|
int rv = JOptionPane.showConfirmDialog( |
|
|
|
null, |
|
|
|
null, |
|
|
|
"您还没有插件商店的资源,是否下载?", |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Install"), |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Warning"), |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Warning"), |
|
|
|
JOptionPane.OK_CANCEL_OPTION, |
|
|
|
JOptionPane.OK_CANCEL_OPTION, |
|
|
|
JOptionPane.INFORMATION_MESSAGE |
|
|
|
JOptionPane.INFORMATION_MESSAGE |
|
|
@ -53,7 +53,6 @@ public class PluginManagerPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath()); |
|
|
|
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath()); |
|
|
|
add(webPane, BorderLayout.CENTER); |
|
|
|
add(webPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
initTraditionalStore(); |
|
|
|
initTraditionalStore(); |
|
|
|
} |
|
|
|
} |
|
|
@ -92,7 +91,7 @@ public class PluginManagerPane extends BasicPane { |
|
|
|
IOUtils.unzip(new File(StableUtils.pathJoin(PluginHelper.DOWNLOAD_PATH, PluginHelper.TEMP_FILE)), StableUtils.getInstallHome()); |
|
|
|
IOUtils.unzip(new File(StableUtils.pathJoin(PluginHelper.DOWNLOAD_PATH, PluginHelper.TEMP_FILE)), StableUtils.getInstallHome()); |
|
|
|
int rv = JOptionPane.showOptionDialog( |
|
|
|
int rv = JOptionPane.showOptionDialog( |
|
|
|
null, |
|
|
|
null, |
|
|
|
"商店安装完毕,是否立刻启动?", |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Warning"), |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Warning"), |
|
|
|
JOptionPane.YES_NO_OPTION, |
|
|
|
JOptionPane.YES_NO_OPTION, |
|
|
|
JOptionPane.INFORMATION_MESSAGE, |
|
|
|
JOptionPane.INFORMATION_MESSAGE, |
|
|
|