[desktop] Ignore imagemagick on ARM in one more place
This commit is contained in:
parent
3adadee82b
commit
78a649cae3
|
@ -45,6 +45,9 @@ const convertToJPEGCommand = (
|
||||||
];
|
];
|
||||||
|
|
||||||
case "linux":
|
case "linux":
|
||||||
|
// The bundled binary is an ELF x86-64 executable.
|
||||||
|
if (process.arch != "x64")
|
||||||
|
throw new Error(CustomErrorMessage.NotAvailable);
|
||||||
return [
|
return [
|
||||||
imageMagickPath(),
|
imageMagickPath(),
|
||||||
inputFilePath,
|
inputFilePath,
|
||||||
|
@ -90,6 +93,7 @@ export const generateImageThumbnail = async (
|
||||||
let thumbnail: Uint8Array;
|
let thumbnail: Uint8Array;
|
||||||
do {
|
do {
|
||||||
await execAsync(command);
|
await execAsync(command);
|
||||||
|
// TODO(MR): release 1.7
|
||||||
// TODO(MR): imagemagick debugging. Remove me after verifying logs.
|
// TODO(MR): imagemagick debugging. Remove me after verifying logs.
|
||||||
log.info(`Generated thumbnail using ${command.join(" ")}`);
|
log.info(`Generated thumbnail using ${command.join(" ")}`);
|
||||||
thumbnail = new Uint8Array(await fs.readFile(outputFilePath));
|
thumbnail = new Uint8Array(await fs.readFile(outputFilePath));
|
||||||
|
|
|
@ -1023,6 +1023,8 @@ const withThumbnail = async (
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.message.endsWith(CustomErrorMessage.NotAvailable)) {
|
if (e.message.endsWith(CustomErrorMessage.NotAvailable)) {
|
||||||
moduleState.isNativeImageThumbnailGenerationNotAvailable = true;
|
moduleState.isNativeImageThumbnailGenerationNotAvailable = true;
|
||||||
|
// TODO(MR): release 1.7
|
||||||
|
log.info("Setting isNativeImageThumbnailGenerationNotAvailable", e);
|
||||||
} else {
|
} else {
|
||||||
log.error("Native thumbnail generation failed", e);
|
log.error("Native thumbnail generation failed", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,6 +309,8 @@ export const getRenderableImage = async (fileName: string, imageBlob: Blob) => {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.message.endsWith(CustomErrorMessage.NotAvailable)) {
|
if (e.message.endsWith(CustomErrorMessage.NotAvailable)) {
|
||||||
moduleState.isNativeJPEGConversionNotAvailable = true;
|
moduleState.isNativeJPEGConversionNotAvailable = true;
|
||||||
|
// TODO(MR): release 1.7
|
||||||
|
log.info("Setting isNativeJPEGConversionNotAvailable", e);
|
||||||
} else {
|
} else {
|
||||||
log.error("Native conversion to JPEG failed", e);
|
log.error("Native conversion to JPEG failed", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue