use of org.fagu.fmv.soft.find.policy.VersionSoftPolicy in project fmv by f-agu.
the class SoftTestCase method testGS.
@Test
@Ignore
public void testGS() throws Exception {
GSSoftProvider gsSoftProvider = new GSSoftProvider();
Soft soft = gsSoftProvider.searchConfigurable(ss -> {
ss.withPolicy(new VersionSoftPolicy().onAllPlatforms(maxVersion(new Version(8))));
});
soft.getFounds().forEach(sf -> {
System.out.println(sf.getFoundReason() + " " + sf.getFile() + " " + sf.getReason());
});
SoftLogger softLogger = new SoftLogger(Collections.singletonList(soft));
softLogger.log(System.out::println);
// System.out.println(soft);
}
use of org.fagu.fmv.soft.find.policy.VersionSoftPolicy in project fmv by f-agu.
the class PdfSoftProvider method getDefaultSoftPolicy.
// ***********************************************************************
/**
* @return
*/
private static SoftPolicy getDefaultSoftPolicy() {
Version v012 = new Version(0, 12);
BiPredicate<SoftInfo, Provider> isProvider = (s, p) -> s instanceof XPdfVersionSoftInfo && ((XPdfVersionSoftInfo) s).getProvider() == p;
return new VersionSoftPolicy().on("xpdf", s -> isProvider.test(s, Provider.XPDF), minVersion(Version.V3)).on("poppler", s -> isProvider.test(s, Provider.POPPLER), minVersion(v012)).onAllPlatforms(minVersion(v012));
}
Aggregations