|
|
|
@ -80,6 +80,15 @@ public class WebViewDlgHelper {
|
|
|
|
|
public static void checkAndCopyMainFile(String indexPath, String mainJsPath){ |
|
|
|
|
File file = new File(indexPath); |
|
|
|
|
if (!file.exists()) { |
|
|
|
|
copyMainFile(indexPath, mainJsPath); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 將script文件夹中的index.html文件复制到webreport下 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public static void copyMainFile(String indexPath, String mainJsPath){ |
|
|
|
|
try { |
|
|
|
|
File mainJsFile = new File(mainJsPath); |
|
|
|
|
int byteread = 0; |
|
|
|
@ -96,7 +105,6 @@ public class WebViewDlgHelper {
|
|
|
|
|
FRContext.getLogger().error(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 以关键词打开设计器商店 |
|
|
|
@ -186,7 +194,9 @@ public class WebViewDlgHelper {
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
if (get()) { |
|
|
|
|
String relativePath = "/scripts/store/web/index.html"; |
|
|
|
|
IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome); |
|
|
|
|
copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath)); |
|
|
|
|
// TODO: 2017/4/17 删除之前存放在安装目录下的script
|
|
|
|
|
int rv = JOptionPane.showOptionDialog( |
|
|
|
|
null, |
|
|
|
|