use of org.fagu.fmv.soft.find.SoftLocator in project fmv by f-agu.
the class FFSoftProvider method getSoftLocator.
/**
* @see org.fagu.fmv.soft.find.SoftProvider#getSoftLocator()
*/
@Override
public SoftLocator getSoftLocator() {
SoftLocator softLocator = super.getSoftLocator();
softLocator.enableCacheInSameFolderOfGroup(getGroupName());
if (SystemUtils.IS_OS_WINDOWS) {
softLocator.addDefaultLocator();
ProgramFilesLocatorSupplier.with(softLocator).find(programFile -> {
List<File> files = new ArrayList<>();
File[] folders = programFile.listFiles(f -> f.getName().toLowerCase().startsWith("ffmpeg"));
if (folders != null) {
for (File folder : folders) {
files.add(folder);
files.add(new File(folder, "bin"));
}
}
return files;
}).supplyIn();
}
return softLocator;
}
use of org.fagu.fmv.soft.find.SoftLocator in project fmv by f-agu.
the class IMSoftProvider method getSoftLocator.
/**
* @see org.fagu.fmv.soft.find.SoftProvider#getSoftLocator()
*/
@Override
public SoftLocator getSoftLocator() {
SoftLocator softLocator = super.getSoftLocator();
softLocator.enableCacheInSameFolderOfGroup(getGroupName());
if (SystemUtils.IS_OS_WINDOWS) {
softLocator.addDefaultLocator();
ProgramFilesLocatorSupplier.with(softLocator).findFolder(folder -> folder.getName().toLowerCase().startsWith("imagemagick")).supplyIn();
}
return softLocator;
}
Aggregations