/* Allows changes in ImageMagick and Gifsicle paths so that different versions can be tested v210917: First version (just ImageMagick path) v211018: Gifsicle added and changed prefs to being app specific to be consistent with recent macros v211213: fixed function v220121: GnuWin32 added v220628 Changed from convert to magick.exe for IM7. v230720: Removed GnuWin32 ('g32') as all tiff operations now performed with 64-bit ImageMagick. v230720b: Consolidated dialogs. Only logs output on failure. v230803: Replaced getDir for 1.54g10. */ macroL = "Set_External_App_Paths_v230803.ijm"; if (!startsWith(getInfo("os.name"),"Windows")) exit ("Sorry, this macro currently only works with Windows"); fS = File.separator; ijPath = getDirectory("imagej"); appsPath = substring(ijPath,0,lengthOf(ijPath)-1); appsPath = substring(appsPath,0,lastIndexOf(appsPath,fS)); cProg = "C:"+fS+"Program Files"; defAppPaths = newArray(cProg + fS + "Utilities", cProg + " \(x86\)" + fS + "Utilities", cProg, cProg + " \(x86\)", appsPath,ijPath+"Apps"); prefsPrefix = "asc.external.paths."; iMLoc = ""+fS+"ImageMagick"+fS; iMApp = "magick.exe"; iMAppPrefsSet = prefsPrefix + "imagemagick." + iMApp; gSLoc = ""+fS+"Gifsicle"+fS; gSApp = "gifsicle.exe"; gSAppPrefsSet = prefsPrefix + "gifsicle." + gSApp; iMAppPath = findAppPath("ImageMagick",iMApp,"not found"); if (File.exists(iMAppPath)) iMAppFound = true; else iMAppFound = false; if (iMAppFound) iMRadioButtons = newArray(iMAppPath); else iMRadioButtons = newArray(); for (i=0, j=iMRadioButtons.length; i