forked from fanruan/design
neil
8 years ago
10 changed files with 158 additions and 198 deletions
@ -1,86 +0,0 @@ |
|||||||
apply plugin: "java" |
|
||||||
tasks.withType(JavaCompile){ |
|
||||||
options.encoding = "UTF-8" |
|
||||||
} |
|
||||||
|
|
||||||
def basicDir="../../" |
|
||||||
def libDir="${basicDir}/finereport-lib-stable" |
|
||||||
//获取什么分支名 |
|
||||||
FileTree files =fileTree(dir:"./",include:"build.*.gradle") |
|
||||||
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) |
|
||||||
def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) |
|
||||||
|
|
||||||
task appletJar<<{ |
|
||||||
|
|
||||||
ant{ |
|
||||||
mkdir(dir:"${libDir}/tmp-${branchName}") |
|
||||||
mkdir(dir:"build/classes/") |
|
||||||
copy(todir:"build/classes/"){ |
|
||||||
fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") |
|
||||||
|
|
||||||
fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") |
|
||||||
|
|
||||||
fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") |
|
||||||
|
|
||||||
fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") |
|
||||||
|
|
||||||
fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") |
|
||||||
|
|
||||||
} |
|
||||||
unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") |
|
||||||
unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") |
|
||||||
jar(jarfile:"build/libs/fr-applet-8.0.jar"){ |
|
||||||
fileset(dir:"build/classes"){ |
|
||||||
exclude(name:"*.*") |
|
||||||
exclude(name:"bin/*.*") |
|
||||||
exclude(name:"classes/**") |
|
||||||
exclude(name:"com/fr/schedule/**") |
|
||||||
exclude(name:"com/fr/cell/**") |
|
||||||
exclude(name:"com/fr/dialog/**") |
|
||||||
exclude(name:"com/fr/view/**") |
|
||||||
exclude(name:"com/fr/web/**") |
|
||||||
exclude(name:"com/fr/fs/**") |
|
||||||
exclude(name:"com/fr/design/**") |
|
||||||
exclude(name:"com/fr/start/**") |
|
||||||
exclude(name:"com/fr/process/**") |
|
||||||
} |
|
||||||
fileset(dir:"${libDir}/tmp-${branchName}"){ |
|
||||||
include(name:"javax/mail/**") |
|
||||||
include(name:"javax/servlet/**") |
|
||||||
include(name:"org/freehep/**") |
|
||||||
include(name:"com/fr/third/JAI/**") |
|
||||||
include(name:"com/fr/third/antlr/**") |
|
||||||
include(name:"com/fr/third/javax/**") |
|
||||||
include(name:"com/sun/xml/**") |
|
||||||
include(name:"javax/xml/**") |
|
||||||
|
|
||||||
} |
|
||||||
fileset(dir:"build/classes"){ |
|
||||||
include(name:"com/fr/web/*.class") |
|
||||||
include(name:"com/fr/web/attr/*.class") |
|
||||||
} |
|
||||||
} |
|
||||||
delete(dir:"${libDir}/tmp-${branchName}") |
|
||||||
def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" |
|
||||||
def keystore="frapplet.store" |
|
||||||
def keycert="fr.cert" |
|
||||||
def keypassword="123456" |
|
||||||
def keyalias="fr" |
|
||||||
|
|
||||||
exec(executable:"${jdk6home}/bin/keytool"){ |
|
||||||
arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") |
|
||||||
} |
|
||||||
exec(executable:"${jdk6home}/bin/keytool"){ |
|
||||||
arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") |
|
||||||
} |
|
||||||
|
|
||||||
exec(executable:"${jdk6home}/bin/jarsigner"){ |
|
||||||
arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") |
|
||||||
} |
|
||||||
delete(file:"${keystore}") |
|
||||||
delete(file:"${keycert}") |
|
||||||
delete(dir:"build/classes") |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -0,0 +1,99 @@ |
|||||||
|
package com.fr.design.extra; |
||||||
|
|
||||||
|
import com.fr.design.dialog.BasicPane; |
||||||
|
import com.fr.design.gui.frpane.UITabbedPane; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.stable.StableUtils; |
||||||
|
import javafx.embed.swing.JFXPanel; |
||||||
|
|
||||||
|
import java.awt.*; |
||||||
|
import java.io.File; |
||||||
|
import java.net.URL; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by vito on 2016/9/28. |
||||||
|
*/ |
||||||
|
public class WebManagerPaneFactory { |
||||||
|
private String installHome; |
||||||
|
|
||||||
|
public WebManagerPaneFactory() { |
||||||
|
if (StableUtils.isDebug()) { |
||||||
|
URL url = ClassLoader.getSystemResource(""); |
||||||
|
this.installHome = url.getPath(); |
||||||
|
} else { |
||||||
|
this.installHome = StableUtils.getInstallHome(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public BasicPane createPluginPane() { |
||||||
|
if (StableUtils.getMajorJavaVersion() == 8) { |
||||||
|
return new ShopManagerPane(new ShopPaneConfig() { |
||||||
|
@Override |
||||||
|
String setMainJS() { |
||||||
|
String relativePath = "/scripts/store/web/index.html"; |
||||||
|
return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
String setScriptsId() { |
||||||
|
return "shop_scripts"; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
JFXPanel setWebPane() { |
||||||
|
return new PluginWebPane(setMainJS()); |
||||||
|
} |
||||||
|
|
||||||
|
}); |
||||||
|
} else { |
||||||
|
BasicPane traditionalStorePane = new BasicPane() { |
||||||
|
@Override |
||||||
|
protected String title4PopupWindow() { |
||||||
|
return Inter.getLocText("FR-Designer-Plugin_Manager"); |
||||||
|
} |
||||||
|
}; |
||||||
|
traditionalStorePane.setLayout(new BorderLayout()); |
||||||
|
traditionalStorePane.add(initTraditionalStore(), BorderLayout.CENTER); |
||||||
|
return traditionalStorePane; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public BasicPane createReusePane() { |
||||||
|
return new ShopManagerPane(new ShopPaneConfig() { |
||||||
|
@Override |
||||||
|
String setMainJS() { |
||||||
|
String relativePath = "/scripts/store/reuse/index.html"; |
||||||
|
return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
String setScriptsId() { |
||||||
|
return "reuse_scripts"; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
JFXPanel setWebPane() { |
||||||
|
return new ReuseWebPane(setMainJS()); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 以关键词打开设计器商店 |
||||||
|
* |
||||||
|
* @param keyword 关键词 |
||||||
|
*/ |
||||||
|
public BasicPane createPluginPane(String keyword) { |
||||||
|
PluginWebBridge.getHelper().openWithSearch(keyword); |
||||||
|
return createPluginPane(); |
||||||
|
} |
||||||
|
|
||||||
|
private Component initTraditionalStore() { |
||||||
|
UITabbedPane tabbedPane = new UITabbedPane(); |
||||||
|
PluginInstalledPane installedPane = new PluginInstalledPane(); |
||||||
|
tabbedPane.addTab(installedPane.tabTitle(), installedPane); |
||||||
|
tabbedPane.addTab(Inter.getLocText("FR-Designer-Plugin_Update"), new PluginUpdatePane(tabbedPane)); |
||||||
|
tabbedPane.addTab(Inter.getLocText("FR-Designer-Plugin_All_Plugins"), new PluginFromStorePane(tabbedPane)); |
||||||
|
return tabbedPane; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue