mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
ATS-728: Add optional Windows parameters for ImageMagickCommandExecutor (#229)
* ATS-728: Add optional Windows parameters for ImageMagickCommandExecutor * ATS-728: Split logic * ATS-728: Fix newly implemented AIOImageMagick tests
This commit is contained in:
committed by
GitHub
parent
e2ba7676a6
commit
88116fc4af
@@ -38,8 +38,10 @@ public class ImageMagickCommandExecutor extends AbstractCommandExecutor
|
||||
private final String ROOT;
|
||||
private final String DYN;
|
||||
private final String EXE;
|
||||
private final String CODERS;
|
||||
private final String CONFIG;
|
||||
|
||||
public ImageMagickCommandExecutor(String exe, String dyn, String root)
|
||||
public ImageMagickCommandExecutor(String exe, String dyn, String root, String coders, String config)
|
||||
{
|
||||
if (exe == null || exe.isEmpty())
|
||||
{
|
||||
@@ -56,6 +58,8 @@ public class ImageMagickCommandExecutor extends AbstractCommandExecutor
|
||||
this.EXE = exe;
|
||||
this.DYN = dyn;
|
||||
this.ROOT = root;
|
||||
this.CODERS = coders;
|
||||
this.CONFIG = config;
|
||||
|
||||
super.transformCommand = createTransformCommand();
|
||||
super.checkCommand = createCheckCommand();
|
||||
@@ -76,6 +80,16 @@ public class ImageMagickCommandExecutor extends AbstractCommandExecutor
|
||||
processProperties.put("MAGICK_HOME", ROOT);
|
||||
processProperties.put("DYLD_FALLBACK_LIBRARY_PATH", DYN);
|
||||
processProperties.put("LD_LIBRARY_PATH", DYN);
|
||||
|
||||
//Optional properties (see also https://imagemagick.org/script/resources.php#environment)
|
||||
if (CODERS != null && !CODERS.isBlank())
|
||||
{
|
||||
processProperties.put("MAGICK_CODER_MODULE_PATH", CODERS);
|
||||
}
|
||||
if (CONFIG != null && !CONFIG.isBlank())
|
||||
{
|
||||
processProperties.put("MAGICK_CONFIGURE_PATH", CONFIG);
|
||||
}
|
||||
runtimeExec.setProcessProperties(processProperties);
|
||||
|
||||
Map<String, String> defaultProperties = new HashMap<>();
|
||||
|
Reference in New Issue
Block a user