* make webstart lazy loading work (reduce initial download to ~2.5MB)
This commit is contained in:
parent
c1b49e98d2
commit
b82943439c
17
build.xml
17
build.xml
|
@ -163,7 +163,7 @@
|
|||
<!-- application bundle folder as .tar.gz -->
|
||||
<tar destfile="${path.appbundle.tar.gz}" compression="gzip">
|
||||
<tarfileset dir="${dir.dist}" includes="${title}.app/**" excludes="**/MacOS/**" />
|
||||
<tarfileset dir="${dir.dist}" includes="${title}.app/**/MacOS/**" filemode="755" /> <!-- application stub must be executable!! -->
|
||||
<tarfileset dir="${dir.dist}" includes="${title}.app/**/MacOS/**" filemode="755" /> <!-- IMPORTANT application stub must be executable!! -->
|
||||
</tar>
|
||||
</target>
|
||||
|
||||
|
@ -227,7 +227,6 @@
|
|||
|
||||
<!-- copy jars -->
|
||||
<copy todir="${dir.dist}/webstart">
|
||||
<fileset dir="${dir.dist}" includes="filebot.jar" />
|
||||
<fileset dir="${dir.lib}" includes="*.jar" excludes="jna.jar" />
|
||||
</copy>
|
||||
|
||||
|
@ -235,6 +234,20 @@
|
|||
<jar destfile="${dir.dist}/webstart/jna.jar">
|
||||
<zipfileset src="${dir.lib}/jna.jar" includes="**/*.class" />
|
||||
</jar>
|
||||
|
||||
<!-- create mediainfo jar as seperate jar and use as trigger for lazy loading the native libs -->
|
||||
<jar destfile="${dir.dist}/webstart/mediainfo.jar">
|
||||
<fileset dir="${dir.build}" includes="net/sourceforge/filebot/mediainfo/**" />
|
||||
</jar>
|
||||
|
||||
<!-- create indexed main jar -->
|
||||
<jar destfile="${dir.dist}/webstart/filebot.jar" index="yes">
|
||||
<fileset dir="${dir.build}" excludes="**/*Test*, net/sourceforge/filebot/mediainfo/**" />
|
||||
<indexjars>
|
||||
<!-- IMPORTANT if groovy is indexed things break during runtime!! -->
|
||||
<fileset dir="${dir.dist}/webstart" includes="**/*.jar" excludes="filebot.jar, groovy.jar" />
|
||||
</indexjars>
|
||||
</jar>
|
||||
|
||||
<!-- create native lib jars -->
|
||||
<antcall target="webstart-nativelib">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jnlp spec="6.0+" codebase="http://filebot.sourceforge.net/webstart/" href="filebot.jnlp">
|
||||
<jnlp spec="1.6+" codebase="http://filebot.sourceforge.net/webstart/" href="filebot.jnlp">
|
||||
<information>
|
||||
<title>FileBot</title>
|
||||
<vendor>Reinhard Pointner</vendor>
|
||||
|
@ -28,43 +28,44 @@
|
|||
<resources>
|
||||
<property name="application.deployment" value="webstart" />
|
||||
<property name="jnlp.packEnabled" value="true" />
|
||||
|
||||
|
||||
<java version="1.6+" max-heap-size="256m" />
|
||||
<jar href="filebot.jar" main="true" />
|
||||
<jar href="miglayout.jar" />
|
||||
<jar href="glazedlists.jar" />
|
||||
<jar href="nekohtml.jar" />
|
||||
<jar href="xercesImpl.jar" />
|
||||
<jar href="ehcache.jar" />
|
||||
<jar href="slf4j.jar" />
|
||||
<jar href="slf4j-jdk.jar" />
|
||||
<jar href="simmetrics.jar" />
|
||||
<jar href="args4j.jar" />
|
||||
<jar href="jna.jar" />
|
||||
<jar href="guava.jar" />
|
||||
<jar href="groovy.jar" />
|
||||
<jar href="sublight-ws.jar" />
|
||||
<jar href="xmlrpc.jar" />
|
||||
<jar href="json-simple.jar" />
|
||||
<jar href="icu4j.jar" />
|
||||
<jar href="junrar-custom.jar" />
|
||||
<jar href="jgat-custom.jar" />
|
||||
<jar href="filebot.jar" download="eager" main="true" />
|
||||
<jar href="groovy.jar" download="eager" />
|
||||
<jar href="args4j.jar" download="eager" />
|
||||
<jar href="jna.jar" download="eager" />
|
||||
<jar href="miglayout.jar" download="eager" />
|
||||
<jar href="glazedlists.jar" download="eager" />
|
||||
<jar href="ehcache.jar" download="eager" />
|
||||
<jar href="simmetrics.jar" download="eager" />
|
||||
<jar href="slf4j.jar" download="eager" />
|
||||
<jar href="slf4j-jdk.jar" download="eager" />
|
||||
<jar href="jgat-custom.jar" download="eager" />
|
||||
<jar href="json-simple.jar" download="lazy" />
|
||||
<jar href="icu4j.jar" download="lazy" />
|
||||
<jar href="xmlrpc.jar" download="eager" />
|
||||
<jar href="sublight-ws.jar" download="eager" />
|
||||
<jar href="mediainfo.jar" download="lazy" part="native" />
|
||||
<jar href="nekohtml.jar" download="lazy" part="scraper" />
|
||||
<jar href="xercesImpl.jar" download="lazy" part="scraper" />
|
||||
<jar href="guava.jar" download="lazy" />
|
||||
<jar href="junrar-custom.jar" download="lazy" />
|
||||
</resources>
|
||||
|
||||
<resources os="Windows" arch="x86">
|
||||
<nativelib href="native/win32-x86.jar" />
|
||||
<nativelib href="native/win32-x86.jar" download="lazy" part="native" />
|
||||
</resources>
|
||||
<resources os="Windows" arch="amd64">
|
||||
<nativelib href="native/win32-x64.jar" />
|
||||
<nativelib href="native/win32-x64.jar" download="lazy" part="native" />
|
||||
</resources>
|
||||
<resources os="Linux" arch="i386">
|
||||
<nativelib href="native/linux-i386.jar" />
|
||||
<nativelib href="native/linux-i386.jar" download="lazy" part="native" />
|
||||
</resources>
|
||||
<resources os="Linux" arch="amd64">
|
||||
<nativelib href="native/linux-amd64.jar" />
|
||||
<nativelib href="native/linux-amd64.jar" download="lazy" part="native" />
|
||||
</resources>
|
||||
<resources os="Mac" arch="x86_64">
|
||||
<nativelib href="native/mac-x86_64.jar" />
|
||||
<nativelib href="native/mac-x86_64.jar" download="lazy" part="native" />
|
||||
</resources>
|
||||
|
||||
<application-desc main-class="net.sourceforge.filebot.Main" />
|
||||
|
|
|
@ -8,7 +8,7 @@ import static net.sourceforge.filebot.MediaTypes.*;
|
|||
import static net.sourceforge.filebot.WebServices.*;
|
||||
import static net.sourceforge.filebot.cli.CLILogging.*;
|
||||
import static net.sourceforge.filebot.hash.VerificationUtilities.*;
|
||||
import static net.sourceforge.filebot.mediainfo.MediaDetection.*;
|
||||
import static net.sourceforge.filebot.media.MediaDetection.*;
|
||||
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.*;
|
||||
import static net.sourceforge.tuned.FileUtilities.*;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ def parallel(List closures, int threads = Runtime.getRuntime().availableProcesso
|
|||
|
||||
|
||||
// Web and File IO helpers
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.Charset
|
||||
import static net.sourceforge.filebot.web.WebRequest.*
|
||||
|
||||
URL.metaClass.parseHtml = { new XmlParser(false, false).parseText(getXmlString(getHtmlDocument(delegate))) }
|
||||
|
@ -73,7 +73,7 @@ Object.metaClass.applyTextTemplate = { template -> new GStringTemplateEngine().c
|
|||
|
||||
|
||||
// Shell helper
|
||||
import static com.sun.jna.Platform.*;
|
||||
import static com.sun.jna.Platform.*
|
||||
|
||||
def execute(String... args) {
|
||||
def cmd = args.toList()
|
||||
|
@ -96,7 +96,7 @@ def execute(String... args) {
|
|||
|
||||
|
||||
// WatchService helper
|
||||
import net.sourceforge.filebot.cli.FolderWatchService;
|
||||
import net.sourceforge.filebot.cli.FolderWatchService
|
||||
|
||||
def createWatchService(Closure callback, List folders, boolean watchTree) {
|
||||
// sanity check
|
||||
|
@ -126,7 +126,7 @@ List.metaClass.watch = { c -> createWatchService(c, delegate, true) }
|
|||
|
||||
|
||||
// Season / Episode helpers
|
||||
import net.sourceforge.filebot.mediainfo.*
|
||||
import net.sourceforge.filebot.media.*
|
||||
import net.sourceforge.filebot.similarity.*
|
||||
|
||||
def parseEpisodeNumber(path) {
|
||||
|
|
|
@ -18,9 +18,9 @@ import net.sf.ehcache.CacheManager;
|
|||
import net.sf.ehcache.Element;
|
||||
import net.sourceforge.filebot.WebServices;
|
||||
import net.sourceforge.filebot.hash.HashType;
|
||||
import net.sourceforge.filebot.media.ReleaseInfo;
|
||||
import net.sourceforge.filebot.mediainfo.MediaInfo;
|
||||
import net.sourceforge.filebot.mediainfo.MediaInfo.StreamKind;
|
||||
import net.sourceforge.filebot.mediainfo.ReleaseInfo;
|
||||
import net.sourceforge.filebot.web.Date;
|
||||
import net.sourceforge.filebot.web.Episode;
|
||||
import net.sourceforge.filebot.web.Movie;
|
||||
|
@ -403,7 +403,7 @@ public class MediaBindingBean {
|
|||
mediaInfo = newMediaInfo;
|
||||
}
|
||||
|
||||
return mediaInfo;
|
||||
return (MediaInfo) mediaInfo;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package net.sourceforge.filebot.mediainfo;
|
||||
package net.sourceforge.filebot.media;
|
||||
|
||||
|
||||
import static net.sourceforge.filebot.MediaTypes.*;
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package net.sourceforge.filebot.mediainfo;
|
||||
package net.sourceforge.filebot.media;
|
||||
|
||||
|
||||
import static java.util.ResourceBundle.*;
|
|
@ -4,7 +4,7 @@ package net.sourceforge.filebot.ui.rename;
|
|||
|
||||
import static java.util.Collections.*;
|
||||
import static net.sourceforge.filebot.MediaTypes.*;
|
||||
import static net.sourceforge.filebot.mediainfo.MediaDetection.*;
|
||||
import static net.sourceforge.filebot.media.MediaDetection.*;
|
||||
import static net.sourceforge.filebot.web.EpisodeUtilities.*;
|
||||
import static net.sourceforge.tuned.FileUtilities.*;
|
||||
import static net.sourceforge.tuned.ui.TunedUtilities.*;
|
||||
|
@ -33,7 +33,7 @@ import javax.swing.Action;
|
|||
import javax.swing.SwingUtilities;
|
||||
|
||||
import net.sourceforge.filebot.Analytics;
|
||||
import net.sourceforge.filebot.mediainfo.ReleaseInfo;
|
||||
import net.sourceforge.filebot.media.ReleaseInfo;
|
||||
import net.sourceforge.filebot.similarity.EpisodeMetrics;
|
||||
import net.sourceforge.filebot.similarity.Match;
|
||||
import net.sourceforge.filebot.similarity.Matcher;
|
||||
|
|
|
@ -5,7 +5,7 @@ package net.sourceforge.filebot.ui.rename;
|
|||
import static java.util.Arrays.*;
|
||||
import static java.util.Collections.*;
|
||||
import static net.sourceforge.filebot.MediaTypes.*;
|
||||
import static net.sourceforge.filebot.mediainfo.MediaDetection.*;
|
||||
import static net.sourceforge.filebot.media.MediaDetection.*;
|
||||
import static net.sourceforge.tuned.FileUtilities.*;
|
||||
import static net.sourceforge.tuned.ui.TunedUtilities.*;
|
||||
|
||||
|
@ -30,7 +30,7 @@ import javax.swing.Action;
|
|||
import javax.swing.SwingUtilities;
|
||||
|
||||
import net.sourceforge.filebot.Analytics;
|
||||
import net.sourceforge.filebot.mediainfo.ReleaseInfo;
|
||||
import net.sourceforge.filebot.media.ReleaseInfo;
|
||||
import net.sourceforge.filebot.similarity.Match;
|
||||
import net.sourceforge.filebot.ui.SelectDialog;
|
||||
import net.sourceforge.filebot.web.Movie;
|
||||
|
|
|
@ -4,7 +4,7 @@ package net.sourceforge.filebot.ui.subtitle;
|
|||
|
||||
import static javax.swing.BorderFactory.*;
|
||||
import static javax.swing.JOptionPane.*;
|
||||
import static net.sourceforge.filebot.mediainfo.MediaDetection.*;
|
||||
import static net.sourceforge.filebot.media.MediaDetection.*;
|
||||
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.*;
|
||||
import static net.sourceforge.tuned.FileUtilities.*;
|
||||
import static net.sourceforge.tuned.StringUtilities.*;
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.junit.runners.Suite.SuiteClasses;
|
|||
|
||||
import net.sourceforge.filebot.format.ExpressionFormatTest;
|
||||
import net.sourceforge.filebot.hash.VerificationFormatTest;
|
||||
import net.sourceforge.filebot.mediainfo.ReleaseInfoTest;
|
||||
import net.sourceforge.filebot.media.ReleaseInfoTest;
|
||||
import net.sourceforge.filebot.similarity.EpisodeMetricsTest;
|
||||
import net.sourceforge.filebot.similarity.SimilarityTestSuite;
|
||||
import net.sourceforge.filebot.subtitle.SubtitleReaderTestSuite;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package net.sourceforge.filebot.mediainfo;
|
||||
package net.sourceforge.filebot.media;
|
||||
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
@ -8,6 +8,8 @@ import java.io.File;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import net.sourceforge.filebot.media.ReleaseInfo;
|
||||
|
||||
|
||||
public class ReleaseInfoTest {
|
||||
|
Loading…
Reference in New Issue