use of org.fagu.fmv.soft.find.SoftLocator in project fmv by f-agu.
the class SoftSearch method search.
/**
* @param softTester
* @return
*/
public Soft search(SoftTester softTester) {
checkUsed();
SoftLocator locator = getLocator();
Founds founds = locator.find(softTester);
return createAndfireEventFound(founds, locator);
}
use of org.fagu.fmv.soft.find.SoftLocator in project fmv by f-agu.
the class GSSoftProvider method getSoftLocator.
/**
* @see org.fagu.fmv.soft.find.SoftProvider#getSoftLocator()
*/
@Override
public SoftLocator getSoftLocator() {
SoftLocator softLocator = super.getSoftLocator();
if (SystemUtils.IS_OS_WINDOWS) {
ProgramFilesLocatorSupplier.with(softLocator).find(programFile -> {
File folder = new File(programFile, "gs");
if (!folder.exists()) {
return Collections.emptyList();
}
File[] listFiles = folder.listFiles(f -> f.getName().startsWith("gs"));
return listFiles != null && listFiles.length > 0 ? Arrays.asList(listFiles).stream().map(f -> new File(f, "bin")).collect(Collectors.toList()) : Collections.emptyList();
}).supplyIn();
softLocator.addDefaultLocator();
}
return softLocator;
}
use of org.fagu.fmv.soft.find.SoftLocator in project fmv by f-agu.
the class MediaInfoSoftProvider method getSoftLocator.
/**
* @see org.fagu.fmv.soft.find.SoftProvider#getSoftLocator()
*/
@Override
public SoftLocator getSoftLocator() {
SoftLocator softLocator = super.getSoftLocator();
if (SystemUtils.IS_OS_WINDOWS) {
ProgramFilesLocatorSupplier.with(softLocator).findFolder("MediaInfo").supplyIn();
softLocator.addDefaultLocator();
}
return softLocator;
}
use of org.fagu.fmv.soft.find.SoftLocator in project fmv by f-agu.
the class MSoftProvider method getSoftLocator.
/**
* @see org.fagu.fmv.soft.find.SoftProvider#getSoftLocator()
*/
@Override
public SoftLocator getSoftLocator() {
SoftLocator softLocator = super.getSoftLocator();
if (SystemUtils.IS_OS_WINDOWS) {
ProgramFilesLocatorSupplier.with(softLocator).find(programFile -> {
File[] mFolders = programFile.listFiles(f -> f.getName().toLowerCase().startsWith("mplayer"));
return mFolders != null ? Arrays.asList(mFolders) : Collections.emptyList();
}).supplyIn();
softLocator.addDefaultLocator();
}
return softLocator;
}
use of org.fagu.fmv.soft.find.SoftLocator in project fmv by f-agu.
the class VLCSoftProvider method getSoftLocator.
/**
* @see org.fagu.fmv.soft.find.SoftProvider#getSoftLocator()
*/
@Override
public SoftLocator getSoftLocator() {
SoftLocator softLocator = super.getSoftLocator();
if (SystemUtils.IS_OS_WINDOWS) {
ProgramFilesLocatorSupplier.with(softLocator).findFolder("VideoLAN" + File.separator + "VLC").supplyIn();
softLocator.addDefaultLocator();
}
return softLocator;
}
Aggregations