|
|
@ -43,22 +43,22 @@ public class PluginManagerPane extends BasicPane { |
|
|
|
URL url = ClassLoader.getSystemResource(""); |
|
|
|
URL url = ClassLoader.getSystemResource(""); |
|
|
|
installHome = url.getPath(); |
|
|
|
installHome = url.getPath(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
installHome = StableUtils.getInstallHome(); |
|
|
|
installHome = StableUtils.getInstallHome(); |
|
|
|
File file = new File(StableUtils.pathJoin(installHome, "scripts")); |
|
|
|
File file = new File(StableUtils.pathJoin(installHome, "scripts")); |
|
|
|
if (!file.exists()) { |
|
|
|
if (!file.exists()) { |
|
|
|
int rv = JOptionPane.showConfirmDialog( |
|
|
|
int rv = JOptionPane.showConfirmDialog( |
|
|
|
null, |
|
|
|
this, |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Install"), |
|
|
|
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 |
|
|
|
); |
|
|
|
); |
|
|
|
if (rv == JOptionPane.OK_OPTION) { |
|
|
|
if (rv == JOptionPane.OK_OPTION) { |
|
|
|
downloadShopScripts(); |
|
|
|
downloadShopScripts(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
updateShopScripts(); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
updateShopScripts(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath()); |
|
|
|
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath()); |
|
|
|
add(webPane, BorderLayout.CENTER); |
|
|
|
add(webPane, BorderLayout.CENTER); |
|
|
@ -90,7 +90,7 @@ public class PluginManagerPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} catch (PluginVerifyException e) { |
|
|
|
} catch (PluginVerifyException e) { |
|
|
|
JOptionPane.showMessageDialog(null, e.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); |
|
|
|
JOptionPane.showMessageDialog(PluginManagerPane.this, e.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FRContext.getLogger().error(e.getMessage(), e); |
|
|
|
FRContext.getLogger().error(e.getMessage(), e); |
|
|
@ -106,7 +106,7 @@ public class PluginManagerPane extends BasicPane { |
|
|
|
if (get()) { |
|
|
|
if (get()) { |
|
|
|
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, |
|
|
|
PluginManagerPane.this, |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), |
|
|
|
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, |
|
|
@ -135,7 +135,7 @@ public class PluginManagerPane extends BasicPane { |
|
|
|
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { |
|
|
|
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { |
|
|
|
if (!ComparatorUtils.equals(httpClient.getResponseText(), LATEST)) { |
|
|
|
if (!ComparatorUtils.equals(httpClient.getResponseText(), LATEST)) { |
|
|
|
int rv = JOptionPane.showConfirmDialog( |
|
|
|
int rv = JOptionPane.showConfirmDialog( |
|
|
|
null, |
|
|
|
PluginManagerPane.this, |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Update"), |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Update"), |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Warning"), |
|
|
|
Inter.getLocText("FR-Designer-Plugin_Warning"), |
|
|
|
JOptionPane.OK_CANCEL_OPTION, |
|
|
|
JOptionPane.OK_CANCEL_OPTION, |
|
|
|