X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2FExternalTools.java;fp=tim%2Fprune%2FExternalTools.java;h=cd65fffd519d68a95a21b0623dac2146d3e0048b;hb=5625a1abadb5f2ca5f017fe7dbda1d5141cb637b;hp=0000000000000000000000000000000000000000;hpb=23959e65a6a0d581e657b07186d18b7a1ac5afeb;p=GpsPrune.git diff --git a/tim/prune/ExternalTools.java b/tim/prune/ExternalTools.java new file mode 100644 index 0000000..cd65fff --- /dev/null +++ b/tim/prune/ExternalTools.java @@ -0,0 +1,48 @@ +package tim.prune; + +import java.io.IOException; + + +/** + * Class to manage interfaces to external tools, like exiftool + */ +public abstract class ExternalTools +{ + + /** + * Attempt to call Povray to see if it's installed / available in path + * @return true if found, false otherwise + */ + public static boolean isPovrayInstalled() + { + try + { + Runtime.getRuntime().exec("povray"); + return true; + } + catch (IOException ioe) + { + // exception thrown, povray not found + return false; + } + } + + + /** + * Attempt to call Exiftool to see if it's installed / available in path + * @return true if found, false otherwise + */ + public static boolean isExiftoolInstalled() + { + try + { + Runtime.getRuntime().exec("exiftool -v"); + return true; + } + catch (IOException ioe) + { + // exception thrown, exiftool not found + return false; + } + } +}