use of org.fagu.version.Version in project fmv by f-agu.
the class IMInfoTestCase method testParseOnWindows.
/**
* @throws IOException
*/
@Test
public void testParseOnWindows() throws IOException {
Parser parser = newParser();
parser.readLine("Version: ImageMagick 6.8.7-1 2013-10-17 Q16 http://www.imagemagick.org");
parser.readLine("Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC");
parser.readLine("Features: DPC OpenMP");
parser.readLine("Delegates: bzlib freetype jbig jng jp2 jpeg lcms lqr png ps png tiff webp x xml zlib");
assertInfo(parser, new Version(6, 8, 7, 1), d(2013, 10, 17), "6.8.7.1");
}
use of org.fagu.version.Version in project fmv by f-agu.
the class IMSoftProvider method createSoftExecutor.
/**
* @see org.fagu.fmv.soft.find.SoftProvider#createSoftExecutor(org.fagu.fmv.soft.Soft, java.io.File, java.util.List)
*/
@Override
public SoftExecutor createSoftExecutor(Soft soft, File execFile, List<String> parameters) {
if (SOFT_MAGICK_NAME.equalsIgnoreCase(FilenameUtils.getBaseName(soft.getFile().getName()))) {
SoftInfo softInfo = soft.getFirstInfo();
if (softInfo instanceof VersionSoftInfo) {
VersionSoftInfo versionSoftInfo = (VersionSoftInfo) softInfo;
Optional<Version> version = versionSoftInfo.getVersion();
if (version.isPresent() && version.get().isUpperOrEqualsThan(V7)) {
List<String> newParams = new ArrayList<>(parameters);
newParams.add(0, getName());
return new SoftExecutor(this, execFile, newParams);
}
}
}
return super.createSoftExecutor(soft, execFile, parameters);
}
use of org.fagu.version.Version in project fmv by f-agu.
the class GSSoftProviderTestCase method testParseOnWindows.
/**
* @throws IOException
*/
@Test
public void testParseOnWindows() throws IOException {
Parser parser = newParser();
parser.readLine("GPL Ghostscript 9.16 (2015-03-30)");
parser.readLine("Copyright (C) 2015 Artifex Software, Inc. All rights reserved.");
assertInfo(parser, new Version(9, 16), d(2015, 03, 30));
}
use of org.fagu.version.Version in project fmv by f-agu.
the class GSSoftProviderTestCase method testParseOnMac.
/**
* @throws IOException
*/
@Test
public void testParseOnMac() throws IOException {
Parser parser = newParser();
parser.readLine("GPL Ghostscript 9.18 (2015-10-05)");
parser.readLine("Copyright (C) 2015 Artifex Software, Inc. All rights reserved.");
assertInfo(parser, new Version(9, 18), d(2015, 10, 05));
}
use of org.fagu.version.Version in project fmv by f-agu.
the class JavaSoftProviderTestCase method testParse18OnWindows.
/**
* @throws IOException
*/
@Test
public void testParse18OnWindows() throws IOException {
Parser parser = newParser();
parser.readLine("java version \"1.8.0_20\"");
parser.readLine("Java(TM) SE Runtime Environment (build 1.8.0_20-b26)");
parser.readLine("Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)");
assertInfo(parser, new Version(1, 8, 0, 20));
}
Aggregations