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

View File

@ -683,48 +683,54 @@ public class LinkCollector extends PackageController<CrawledPackage, CrawledLink
}
public LinkCrawler addCrawlerJob(final LinkCollectingJob job) {
if (job == null) throw new IllegalArgumentException("job is null");
lazyInit();
synchronized (shutdownRequests) {
if (shutdownRequests.get() > 0) return null;
final LinkCollectorCrawler lc = new LinkCollectorCrawler() {
private LinkCollectingInformation collectingInfo = new LinkCollectingInformation(this, linkChecker);
try {
if (job == null) throw new IllegalArgumentException("job is null");
lazyInit();
synchronized (shutdownRequests) {
if (shutdownRequests.get() > 0) return null;
final LinkCollectorCrawler lc = new LinkCollectorCrawler() {
private LinkCollectingInformation collectingInfo = new LinkCollectingInformation(this, linkChecker);
@Override
protected CrawledLink crawledLinkFactorybyURL(String url) {
CrawledLink ret = new CrawledLink(url);
ret.setCollectingInfo(collectingInfo);
ret.setSourceJob(job);
return ret;
}
@Override
protected CrawledLink crawledLinkFactorybyURL(String url) {
CrawledLink ret = new CrawledLink(url);
ret.setCollectingInfo(collectingInfo);
ret.setSourceJob(job);
return ret;
}
@Override
protected void generalCrawledLinkModifier(CrawledLink link) {
crawledLinkModifier(link, job);
}
@Override
protected void generalCrawledLinkModifier(CrawledLink link) {
crawledLinkModifier(link, job);
}
@Override
protected void crawlerStopped() {
eventsender.removeListener(this);
super.crawlerStopped();
}
@Override
protected void crawlerStopped() {
eventsender.removeListener(this);
super.crawlerStopped();
}
@Override
protected void crawlerStarted() {
eventsender.addListener(this, true);
super.crawlerStarted();
}
};
@Override
protected void crawlerStarted() {
eventsender.addListener(this, true);
super.crawlerStarted();
}
};
lc.setFilter(crawlerFilter);
lc.setHandler(this);
String jobText = job.getText();
/*
* we don't want to keep reference on text during the whole link grabbing/checking/collecting way
*/
job.setText(null);
lc.crawl(jobText, job.getCustomSourceUrl(), job.isDeepAnalyse());
return lc;
lc.setFilter(crawlerFilter);
lc.setHandler(this);
String jobText = job.getText();
/*
* we don't want to keep reference on text during the whole link grabbing/checking/collecting way
*/
job.setText(null);
lc.crawl(jobText, job.getCustomSourceUrl(), job.isDeepAnalyse());
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.ChangeListener;
import org.appwork.utils.swing.EDTRunner;
import org.appwork.utils.swing.dialog.Dialog;
import org.jdownloader.gui.translate._GUI;
import org.jdownloader.gui.views.SelectionInfo;
import org.jdownloader.gui.views.linkgrabber.actions.ConfirmAction;
@ -136,17 +137,23 @@ public class AutoConfirmButton extends ExtButton implements ChangeListener, Tabl
setVisible(false);
}
});
LinkCrawler.getEventSender().addListener(new LinkCrawlerListener() {
try {
LinkCrawler.getEventSender().addListener(new LinkCrawlerListener() {
public void onLinkCrawlerEvent(LinkCrawlerEvent event) {
if (event.getCaller() instanceof LinkCollectorCrawler) {
/*
* we only want to react on the LinkCrawler of the LinkCollector
*/
update();
public void onLinkCrawlerEvent(LinkCrawlerEvent event) {
if (event.getCaller() instanceof LinkCollectorCrawler) {
/*
* we only want to react on the LinkCrawler of the LinkCollector
*/
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() {
public void onLinkCheckerEvent(LinkCheckerEvent event) {

View File

@ -48,19 +48,36 @@ public class InstallLog {
private Collection<String> modifiedRestartRequiredFiles;
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) {
if (relPath.endsWith(FILE_EXT_UPDATESIGNATURE)) return;
if (relPath.endsWith(FILE_EXT_JARSIGNATURE)) return;
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);
return;
}
if (relPath.endsWith(".lng")) {
if (check.endsWith(".lng")) {
modifiedDirects.add(relPath);
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);
return;
}