mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-14 20:33:48 +00:00
Added code to auto-detect ImageMagick
SVN revision: 2024
This commit is contained in:
parent
23e8f51537
commit
11ea3914f5
14
src/elogd.c
14
src/elogd.c
@ -208,7 +208,8 @@ struct in_addr rem_addr;
|
|||||||
char rem_host[256];
|
char rem_host[256];
|
||||||
char rem_host_ip[256];
|
char rem_host_ip[256];
|
||||||
int _sock;
|
int _sock;
|
||||||
BOOL use_keepalive, enable_execute = FALSE, fckedit_exist;
|
BOOL use_keepalive, enable_execute = FALSE;
|
||||||
|
BOOL fckedit_exist, image_magick_exist;
|
||||||
int verbose, _current_message_id;
|
int verbose, _current_message_id;
|
||||||
int _logging_level;
|
int _logging_level;
|
||||||
|
|
||||||
@ -22029,9 +22030,12 @@ int create_thumbnail(LOGBOOK * lbs, char *file_name)
|
|||||||
{
|
{
|
||||||
char str[MAX_PATH_LENGTH], cmd[2*MAX_PATH_LENGTH], thumb_size[256];
|
char str[MAX_PATH_LENGTH], cmd[2*MAX_PATH_LENGTH], thumb_size[256];
|
||||||
|
|
||||||
if (!getcfg(lbs->name, "Thumbnail size", thumb_size, sizeof(thumb_size)))
|
if (!image_magick_exist)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!getcfg(lbs->name, "Thumbnail size", thumb_size, sizeof(thumb_size)))
|
||||||
|
strcpy(thumb_size, "300>");
|
||||||
|
|
||||||
if (!chkext(file_name, ".ps") && !chkext(file_name, ".pdf") && !chkext(file_name, ".eps") &&
|
if (!chkext(file_name, ".ps") && !chkext(file_name, ".pdf") && !chkext(file_name, ".eps") &&
|
||||||
!chkext(file_name, ".gif") && !chkext(file_name, ".jpg") && !chkext(file_name, ".jpeg") &&
|
!chkext(file_name, ".gif") && !chkext(file_name, ".jpg") && !chkext(file_name, ".jpeg") &&
|
||||||
!chkext(file_name, ".png") && !chkext(file_name, ".ico") && !chkext(file_name, ".tif"))
|
!chkext(file_name, ".png") && !chkext(file_name, ".ico") && !chkext(file_name, ".tif"))
|
||||||
@ -26776,6 +26780,12 @@ void server_loop(void)
|
|||||||
if (fckedit_exist)
|
if (fckedit_exist)
|
||||||
eprintf("FCKedit detected\n");
|
eprintf("FCKedit detected\n");
|
||||||
|
|
||||||
|
/* check for ImageMagick */
|
||||||
|
subst_shell("convert -version", str, sizeof(str));
|
||||||
|
image_magick_exist = (strstr(str, "ImageMagick") != NULL);
|
||||||
|
if (image_magick_exist)
|
||||||
|
eprintf("ImageMagick detected\n");
|
||||||
|
|
||||||
/* build logbook indices */
|
/* build logbook indices */
|
||||||
if (!verbose && !running_as_daemon)
|
if (!verbose && !running_as_daemon)
|
||||||
eprintf("Indexing logbooks ... ");
|
eprintf("Indexing logbooks ... ");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user