feat: CLI-only version (without GTK)
Modify the build system and the source files to support building a CLI-only version with only glib2 as a dependency. Use CLI_ONLY=1 ./configure, then make clean all.
This commit is contained in:
8
image.c
8
image.c
@@ -148,11 +148,13 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(!image || image->type == IMAGE_NONE)
|
||||
{ if(image) CloseImage(image);
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("Image file %s not present or permission denied.\n"), GTK_MESSAGE_ERROR, Closure->imageName);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ Stop(_("Image file %s not present or permission denied.\n"), Closure->imageName);
|
||||
}
|
||||
}
|
||||
@@ -161,11 +163,13 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(image->eccFile && !image->eccFileMethod)
|
||||
{ CloseImage(image);
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("\nError correction file type unknown.\n"), GTK_MESSAGE_ERROR);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ Stop(_("\nError correction file type unknown.\n"));
|
||||
}
|
||||
}
|
||||
@@ -174,12 +178,14 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(!image->eccFile && image->eccFileState == ECCFILE_NOPERM)
|
||||
{ CloseImage(image);
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("\nPermission denied on ecc file (perhaps not writeable?).\n"),
|
||||
GTK_MESSAGE_ERROR);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ Stop(_("\nPermission denied on ecc file (perhaps not writeable?).\n"));
|
||||
}
|
||||
}
|
||||
@@ -189,12 +195,14 @@ int ReportImageEccInconsistencies(Image *image)
|
||||
|
||||
if(!image->eccFile && !image->eccMethod)
|
||||
{ CloseImage(image);
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
{ CreateMessage(_("\nNo error correction file present.\n"
|
||||
"No error correction data recognized in image.\n"), GTK_MESSAGE_ERROR);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ Stop(_("\nNo error correction file present.\n"
|
||||
"No error correction data recognized in image.\n"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user