git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@19451 ebf7c1c2-ba36-0410-9fe8-c592906822b4

This commit is contained in:
coalado 2013-01-19 11:51:04 +00:00
parent ceae00d5e6
commit bfbe002222
4 changed files with 87 additions and 71 deletions

View File

@ -152,53 +152,41 @@
<attribute name="Created-By" value="JD-Team and AppWork GmbH" /> <attribute name="Created-By" value="JD-Team and AppWork GmbH" />
</manifest> </manifest>
<jar file="${dist}/libs/JDHttp.jar" manifest="${dist}/Manifest.MF"> <jar file="${dist}/libs/JDHttp.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${working}">
<include name="version.nfo" />
</fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">
<include name="jd/http/**/*" /> <include name="jd/http/**/*" />
</fileset> </fileset>
</jar> </jar>
<jar file="${dist}/libs/JDGUI.jar" manifest="${dist}/Manifest.MF"> <jar file="${dist}/libs/JDGUI.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${working}">
<include name="version.nfo" />
</fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">
<include name="jd/gui/**" /> <include name="jd/gui/**" />
</fileset> </fileset>
</jar> </jar>
<jar file="${dist}/libs/JAntiCaptcha.jar" manifest="${dist}/Manifest.MF"> <jar file="${dist}/libs/JAntiCaptcha.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${working}">
<include name="version.nfo" />
</fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">
<include name="jd/captcha/**" /> <include name="jd/captcha/**" />
<exclude name="jd/captcha/methods/**" /> <exclude name="jd/captcha/methods/**" />
</fileset> </fileset>
</jar> </jar>
<jar file="${dist}/libs/JDUtils.jar" manifest="${dist}/Manifest.MF"> <jar file="${dist}/libs/JDUtils.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${working}">
<include name="version.nfo" />
</fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">
<include name="jd/nutils/**" /> <include name="jd/nutils/**" />
</fileset> </fileset>
</jar> </jar>
<jar file="${dist}/libs/Dynamics.jar" manifest="${dist}/Manifest.MF"> <jar file="${dist}/libs/Dynamics.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${working}">
<include name="version.nfo" />
</fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">
<include name="org/jdownloader/dynamic/**/*" /> <include name="org/jdownloader/dynamic/**/*" />
</fileset> </fileset>
</jar> </jar>
<jar file="${dist}/libs/cons.jar" manifest="${dist}/Manifest.MF"> <jar file="${dist}/libs/cons.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${working}">
<include name="version.nfo" />
</fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">
<include name="org/jdownloader/container/**/*" /> <include name="org/jdownloader/container/**/*" />
</fileset> </fileset>
@ -230,9 +218,7 @@
<!--CORE--> <!--CORE-->
<jar file="${dist}/Core.jar" manifest="${dist}/Manifest.MF"> <jar file="${dist}/Core.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${working}">
<include name="version.nfo" />
</fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">
<include name="**/*.class" /> <include name="**/*.class" />
<include name="**/*.txt" /> <include name="**/*.txt" />
@ -307,7 +293,7 @@
<zipfileset src="${dep.awu}/libs/miglayout.jar" excludes="META-INF/*" /> <zipfileset src="${dep.awu}/libs/miglayout.jar" excludes="META-INF/*" />
<zipfileset src="${dep.updateclient}/libs/xz.jar" excludes="META-INF/*" /> <zipfileset src="${dep.updateclient}/libs/xz.jar" excludes="META-INF/*" />
<fileset dir="${working}"> <fileset dir="${working}">
<include name="version.nfo" />
<include name="classpath" /> <include name="classpath" />
</fileset> </fileset>
<fileset dir="${cls}"> <fileset dir="${cls}">

View File

@ -683,48 +683,54 @@ public class LinkCollector extends PackageController<CrawledPackage, CrawledLink
} }
public LinkCrawler addCrawlerJob(final LinkCollectingJob job) { public LinkCrawler addCrawlerJob(final LinkCollectingJob job) {
if (job == null) throw new IllegalArgumentException("job is null"); try {
lazyInit(); if (job == null) throw new IllegalArgumentException("job is null");
synchronized (shutdownRequests) { lazyInit();
if (shutdownRequests.get() > 0) return null; synchronized (shutdownRequests) {
final LinkCollectorCrawler lc = new LinkCollectorCrawler() { if (shutdownRequests.get() > 0) return null;
private LinkCollectingInformation collectingInfo = new LinkCollectingInformation(this, linkChecker); final LinkCollectorCrawler lc = new LinkCollectorCrawler() {
private LinkCollectingInformation collectingInfo = new LinkCollectingInformation(this, linkChecker);
@Override @Override
protected CrawledLink crawledLinkFactorybyURL(String url) { protected CrawledLink crawledLinkFactorybyURL(String url) {
CrawledLink ret = new CrawledLink(url); CrawledLink ret = new CrawledLink(url);
ret.setCollectingInfo(collectingInfo); ret.setCollectingInfo(collectingInfo);
ret.setSourceJob(job); ret.setSourceJob(job);
return ret; return ret;
} }
@Override @Override
protected void generalCrawledLinkModifier(CrawledLink link) { protected void generalCrawledLinkModifier(CrawledLink link) {
crawledLinkModifier(link, job); crawledLinkModifier(link, job);
} }
@Override @Override
protected void crawlerStopped() { protected void crawlerStopped() {
eventsender.removeListener(this); eventsender.removeListener(this);
super.crawlerStopped(); super.crawlerStopped();
} }
@Override @Override
protected void crawlerStarted() { protected void crawlerStarted() {
eventsender.addListener(this, true); eventsender.addListener(this, true);
super.crawlerStarted(); super.crawlerStarted();
} }
}; };
lc.setFilter(crawlerFilter); lc.setFilter(crawlerFilter);
lc.setHandler(this); lc.setHandler(this);
String jobText = job.getText(); String jobText = job.getText();
/* /*
* we don't want to keep reference on text during the whole link grabbing/checking/collecting way * we don't want to keep reference on text during the whole link grabbing/checking/collecting way
*/ */
job.setText(null); job.setText(null);
lc.crawl(jobText, job.getCustomSourceUrl(), job.isDeepAnalyse()); lc.crawl(jobText, job.getCustomSourceUrl(), job.isDeepAnalyse());
return lc; return lc;
}
} catch (VerifyError e) {
Dialog.getInstance().showExceptionDialog("Eclipse Java 1.7 Bug", "This is an eclipse Java 7 bug. See here: http://goo.gl/REs9c\r\nAdd JVM Parameter -XX:-UseSplitVerifier", e);
throw e;
} }
} }

View File

@ -32,6 +32,7 @@ import org.appwork.swing.components.ExtButton;
import org.appwork.utils.event.predefined.changeevent.ChangeEvent; import org.appwork.utils.event.predefined.changeevent.ChangeEvent;
import org.appwork.utils.event.predefined.changeevent.ChangeListener; import org.appwork.utils.event.predefined.changeevent.ChangeListener;
import org.appwork.utils.swing.EDTRunner; import org.appwork.utils.swing.EDTRunner;
import org.appwork.utils.swing.dialog.Dialog;
import org.jdownloader.gui.translate._GUI; import org.jdownloader.gui.translate._GUI;
import org.jdownloader.gui.views.SelectionInfo; import org.jdownloader.gui.views.SelectionInfo;
import org.jdownloader.gui.views.linkgrabber.actions.ConfirmAction; import org.jdownloader.gui.views.linkgrabber.actions.ConfirmAction;
@ -136,17 +137,23 @@ public class AutoConfirmButton extends ExtButton implements ChangeListener, Tabl
setVisible(false); setVisible(false);
} }
}); });
LinkCrawler.getEventSender().addListener(new LinkCrawlerListener() { try {
LinkCrawler.getEventSender().addListener(new LinkCrawlerListener() {
public void onLinkCrawlerEvent(LinkCrawlerEvent event) { public void onLinkCrawlerEvent(LinkCrawlerEvent event) {
if (event.getCaller() instanceof LinkCollectorCrawler) { if (event.getCaller() instanceof LinkCollectorCrawler) {
/* /*
* we only want to react on the LinkCrawler of the LinkCollector * we only want to react on the LinkCrawler of the LinkCollector
*/ */
update(); update();
}
} }
} });
}); } catch (VerifyError e) {
Dialog.getInstance().showExceptionDialog("Eclipse Java 1.7 Bug", "This is an eclipse Java 7 bug. See here: http://goo.gl/REs9c\r\nAdd -XX:-UseSplitVerifier as JVM Parameter", e);
throw e;
}
LinkChecker.getEventSender().addListener(new LinkCheckerListener() { LinkChecker.getEventSender().addListener(new LinkCheckerListener() {
public void onLinkCheckerEvent(LinkCheckerEvent event) { public void onLinkCheckerEvent(LinkCheckerEvent event) {

View File

@ -48,19 +48,36 @@ public class InstallLog {
private Collection<String> modifiedRestartRequiredFiles; private Collection<String> modifiedRestartRequiredFiles;
private Collection<String> modifiedExtensionFiles; private Collection<String> modifiedExtensionFiles;
public static final String FILE_EXT_JARSIGNATURE = ".jarSignature";
public static final String FILE_EXT_UPDATESIGNATURE = ".updateSignature";
public static final String FILE_EXT_REMOVEDFILE = ".removed";
public static final String FILE_EXT_JAR = ".jar";
public static final String CLIENT_OPTIONS = ".clientOptions";
public static final String SERVER_OPTIONS = ".serverOptions";
public void add(String relPath) { public void add(String relPath) {
if (relPath.endsWith(FILE_EXT_UPDATESIGNATURE)) return;
if (relPath.endsWith(FILE_EXT_JARSIGNATURE)) return;
modifiedFiles.add(relPath); modifiedFiles.add(relPath);
if (relPath.equals("build.json")) { String check = relPath;
if (check.endsWith(CLIENT_OPTIONS)) {
check = relPath.substring(0, relPath.length() - CLIENT_OPTIONS.length());
} else if (check.endsWith(SERVER_OPTIONS)) {
check = relPath.substring(0, relPath.length() - SERVER_OPTIONS.length());
} else if (check.endsWith(FILE_EXT_REMOVEDFILE)) {
check = relPath.substring(0, relPath.length() - FILE_EXT_REMOVEDFILE.length());
}
if (check.equals("build.json")) {
modifiedDirects.add(relPath); modifiedDirects.add(relPath);
return; return;
} }
if (relPath.endsWith(".lng")) { if (check.endsWith(".lng")) {
modifiedDirects.add(relPath); modifiedDirects.add(relPath);
return; return;
} }
if (relPath.endsWith(".class") && relPath.toLowerCase(Locale.ENGLISH).startsWith("jd/plugins")) { if (check.endsWith(".class") && check.toLowerCase(Locale.ENGLISH).startsWith("jd/plugins")) {
modifiedPlugins.add(relPath); modifiedPlugins.add(relPath);
return; return;
} }