diff --git a/ChangeLog b/ChangeLog index 88d5c03f8d..19e211e6db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,41 @@ +2000-01-04 Tor Lillqvist + + * libgimp/makefile.{cygwin.msc}: Add gimpcolorspace object. + + * libgimp/gimp.def: Add functions from it. + + Fixes from Hans Breuer: + + * app/datafiles.c: redefine the executable flag for Win32 + to _S_IREAD, to get _all_ files from the plug-in dirs as + executables (including scripts) + + * app/main.c: Win32-specific changes to allow building Gimp as a + console application, with all its benefits (like inheriting the + console), but hide it if the user doesn't want it. Also, if stdout + goes to a console, give the user a chance to read the help or + version messages. (tml: I am not convinced that it is better to + build gimp as a console application, but let's try it this way for + a while.) + + * app/makefile.{cygwin,msc}: Build as console application, and + link with shell32 library. + + * app/paint_core.c (paint_core_motion): Pass the value of a call + to the function gimage_active_drawable() to the paint_func, + instead of just passing the address of gimage_active_drawable... + + (tml: This code is only called when the TOOL_TRACES_ON_WINDOW flag + is on, and only the clone tool sets that, and the clone tool's + paint_func doesn't use the drawable argument, so this hasn't + caused any trouble.) + + * app/plug_in.c: On Win32, to support scripts, use new function + xspawn() instead of _spawnv. Add some more code to properly kill + plug-ins. + + * libgimp/color_display.h: Add G_MODULE_EXPORT declarations. + Tue Jan 4 18:00:40 CET 2000 Sven Neumann * plug-ins/script-fu/scripts/circuit.scm: someone didn't close a diff --git a/app/actions/plug-in-commands.c b/app/actions/plug-in-commands.c index 2822d9abc9..46009717ca 100644 --- a/app/actions/plug-in-commands.c +++ b/app/actions/plug-in-commands.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/core/gimpdatafiles.c b/app/core/gimpdatafiles.c index a392651fb5..52477753ba 100644 --- a/app/core/gimpdatafiles.c +++ b/app/core/gimpdatafiles.c @@ -39,10 +39,10 @@ #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #endif -#ifndef S_IXUSR -#define S_IXUSR _S_IEXEC -#endif -#endif +/* (Re)define S_IXUSR as _S_IREAD to get scripts, too. */ +#undef S_IXUSR +#define S_IXUSR _S_IREAD +#endif /* G_OS_WIN32 */ #include "datafiles.h" #include "errors.h" diff --git a/app/datafiles.c b/app/datafiles.c index a392651fb5..52477753ba 100644 --- a/app/datafiles.c +++ b/app/datafiles.c @@ -39,10 +39,10 @@ #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #endif -#ifndef S_IXUSR -#define S_IXUSR _S_IEXEC -#endif -#endif +/* (Re)define S_IXUSR as _S_IREAD to get scripts, too. */ +#undef S_IXUSR +#define S_IXUSR _S_IREAD +#endif /* G_OS_WIN32 */ #include "datafiles.h" #include "errors.h" diff --git a/app/gui/plug-in-commands.c b/app/gui/plug-in-commands.c index 2822d9abc9..46009717ca 100644 --- a/app/gui/plug-in-commands.c +++ b/app/gui/plug-in-commands.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/gui/plug-in-menus.c b/app/gui/plug-in-menus.c index 2822d9abc9..46009717ca 100644 --- a/app/gui/plug-in-menus.c +++ b/app/gui/plug-in-menus.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/main.c b/app/main.c index 763cbd6dbf..1f8fe666b5 100644 --- a/app/main.c +++ b/app/main.c @@ -46,7 +46,9 @@ #include "libgimp/gimpintl.h" -#ifndef G_OS_WIN32 +#ifdef G_OS_WIN32 +#include +#else static RETSIGTYPE on_signal (int); #ifdef SIGCHLD static RETSIGTYPE on_sig_child (int); @@ -285,6 +287,16 @@ main (int argc, char **argv) } } +#ifdef G_OS_WIN32 + /* Common windoze apps don't have a console at all. So does Gimp + * - if appropiate. This allows to compile as console application + * with all it's benfits (like inheriting the console) but hide + * it, if the user doesn't want it. + */ + if (!show_help && !show_version && !be_verbose && !console_messages) + FreeConsole (); +#endif + if (show_version) g_print ( "%s %s\n", _("GIMP version"), GIMP_VERSION); @@ -311,7 +323,25 @@ main (int argc, char **argv) } if (show_version || show_help) - exit (0); + { +#ifdef G_OS_WIN32 + /* Give them time to read the message if it was printed in a + * separate console window. I would really love to have + * some way of asking for confirmation to close the console + * window. + */ + HANDLE console; + DWORD mode; + + console = GetStdHandle (STD_OUTPUT_HANDLE); + if (GetConsoleMode (console, &mode) != 0) + { + g_print (_("(This console window will close in ten seconds)\n")); + Sleep(10000); + } +#endif + exit (0); + } g_set_message_handler ((GPrintFunc) gimp_message_func); @@ -385,7 +415,10 @@ main (int argc, char **argv) #endif int _stdcall -WinMain (int hInstance, int hPrevInstance, char *lpszCmdLine, int nCmdShow) +WinMain (struct HINSTANCE__ *hInstance, + struct HINSTANCE__ *hPrevInstance, + char *lpszCmdLine, + int nCmdShow) { return main (__argc, __argv); } diff --git a/app/makefile.cygwin b/app/makefile.cygwin index 14e4a228ce..9c4ec57eae 100644 --- a/app/makefile.cygwin +++ b/app/makefile.cygwin @@ -269,11 +269,11 @@ gimp.def: gimp.sym gimp.exe : ../config.h $(gimp_OBJECTS) libgimpim.a gimp.def gimpres.o # This is sickening. - $(CC) $(CFLAGS) -Wl,--base-file,gimp.base -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 + $(CC) $(CFLAGS) -Wl,--base-file,gimp.base -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 -lshell32 $(DLLTOOL) --base-file gimp.base --input-def gimp.def --output-exp gimp.exp - $(CC) $(CFLAGS) -Wl,--base-file,gimp.base,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 + $(CC) $(CFLAGS) -Wl,--base-file,gimp.base,gimp.exp -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 -lshell32 $(DLLTOOL) --base-file gimp.base --input-def gimp.def --output-exp gimp.exp - $(CC) $(CFLAGS) -Wl,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L. -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 + $(CC) $(CFLAGS) -Wl,gimp.exp -o gimp.exe $(gimp_OBJECTS) -L. -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 -lshell32 $(DLLTOOL) --dllname gimp.exe gimp.def --output-lib libgimp.a $(gimp_OBJECTS) .SUFFIXES: .c .o .i diff --git a/app/makefile.msc b/app/makefile.msc index ca05a52d6e..e8b5dd9a0c 100644 --- a/app/makefile.msc +++ b/app/makefile.msc @@ -11,17 +11,17 @@ BIN = C:\gimp\bin !IFNDEF DEBUG # Full optimization: OPTIMIZE = -Ox -MD -LINKDEBUG = /subsystem:windows +LINKDEBUG = !ELSE # Debugging: OPTIMIZE = -Zi -MDd -LINKDEBUG = /subsystem:console /debug +LINKDEBUG = /debug !ENDIF # cl -? describes the options CC = cl -GA -G5 -GF $(OPTIMIZE) -W3 -nologo -LDFLAGS = /link /machine:ix86 $(LINKDEBUG) +LDFLAGS = /link /subsystem:console /machine:ix86 $(LINKDEBUG) INSTALL = copy GIMP_VER = 1.1 @@ -275,7 +275,7 @@ gimp.def: gimp.sym copy /y $@+gimp.sym $@ gimp.exe : ..\config.h $(gimp_OBJECTS) gimpim.lib gimp.def gimp.res ..\libgimp\gimpi.lib - $(CC) $(CFLAGS) -Fegimp.exe $(gimp_OBJECTS) gimpim.lib ..\libgimp\gimpi.lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib $(LDFLAGS) gimp.res gdi32.lib user32.lib /def:gimp.def + $(CC) $(CFLAGS) -Fegimp.exe $(gimp_OBJECTS) gimpim.lib ..\libgimp\gimpi.lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib $(LDFLAGS) gimp.res gdi32.lib user32.lib shell32.lib /def:gimp.def # General rule for building $(gimp_OBJECTS) .c.obj: diff --git a/app/menus/plug-in-menus.c b/app/menus/plug-in-menus.c index 2822d9abc9..46009717ca 100644 --- a/app/menus/plug-in-menus.c +++ b/app/menus/plug-in-menus.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/paint_core.c b/app/paint_core.c index df71378dcd..73a7ae9de2 100644 --- a/app/paint_core.c +++ b/app/paint_core.c @@ -408,10 +408,10 @@ paint_core_motion (Tool *tool, paint_core_interpolate (paint_core, gimage_active_drawable (gdisp->gimage)); if (paint_core->flags & TOOL_TRACES_ON_WINDOW) - (* paint_core->paint_func) (paint_core, gimage_active_drawable, PRETRACE_PAINT); + (* paint_core->paint_func) (paint_core, gimage_active_drawable (gdisp->gimage), PRETRACE_PAINT); gdisplay_flush_now (gdisp); if (paint_core->flags & TOOL_TRACES_ON_WINDOW) - (* paint_core->paint_func) (paint_core, gimage_active_drawable, POSTTRACE_PAINT); + (* paint_core->paint_func) (paint_core, gimage_active_drawable (gdisp->gimage), POSTTRACE_PAINT); paint_core->lastx = paint_core->curx; paint_core->lasty = paint_core->cury; diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/gimpplugin-message.c +++ b/app/plug-in/gimpplugin-message.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/gimpplugin-progress.c b/app/plug-in/gimpplugin-progress.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/gimpplugin-progress.c +++ b/app/plug-in/gimpplugin-progress.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/gimpplugin.c +++ b/app/plug-in/gimpplugin.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/gimppluginmanager-call.c +++ b/app/plug-in/gimppluginmanager-call.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/gimppluginmanager-run.c b/app/plug-in/gimppluginmanager-run.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/gimppluginmanager-run.c +++ b/app/plug-in/gimppluginmanager-run.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/gimppluginmanager.c b/app/plug-in/gimppluginmanager.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/gimppluginmanager.c +++ b/app/plug-in/gimppluginmanager.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/gimppluginshm.c b/app/plug-in/gimppluginshm.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/gimppluginshm.c +++ b/app/plug-in/gimppluginshm.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-in-def.c b/app/plug-in/plug-in-def.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-in-def.c +++ b/app/plug-in/plug-in-def.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-in-message.c b/app/plug-in/plug-in-message.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-in-message.c +++ b/app/plug-in/plug-in-message.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-in-params.c +++ b/app/plug-in/plug-in-params.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-in-progress.c b/app/plug-in/plug-in-progress.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-in-progress.c +++ b/app/plug-in/plug-in-progress.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-in-run.c b/app/plug-in/plug-in-run.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-in-run.c +++ b/app/plug-in/plug-in-run.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-in-shm.c b/app/plug-in/plug-in-shm.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-in-shm.c +++ b/app/plug-in/plug-in-shm.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-in.c b/app/plug-in/plug-in.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-in.c +++ b/app/plug-in/plug-in.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug-in/plug-ins.c b/app/plug-in/plug-ins.c index 2822d9abc9..46009717ca 100644 --- a/app/plug-in/plug-ins.c +++ b/app/plug-in/plug-ins.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/plug_in.c b/app/plug_in.c index 2822d9abc9..46009717ca 100644 --- a/app/plug_in.c +++ b/app/plug_in.c @@ -802,6 +802,59 @@ plug_in_destroy (PlugIn *plug_in) } } +#ifdef G_OS_WIN32 +/* The Microsoft _spawnv() does not allow to run scripts. But + * this is essential to get scripting extension up and running. + * Following the replacement function xspawnv(). + */ +int +xspawnv (int mode, + const char *cmdname, + const char *const *argv ) +{ + char sExecutable[_MAX_PATH*2]; + char** sArgsList; + char sCmndLine[1024]; + char* sPath; + HINSTANCE hInst; + int i; + int pid; + + /* only use it if _spawnv fails */ + pid = _spawnv(mode, cmdname, argv); + if (pid != -1) return pid; + + /* stuff parameters into one cmndline */ + sCmndLine[0] = 0; + for (i = 1; argv[i] != NULL; i++) + { + strcat(sCmndLine, argv[i]); + strcat(sCmndLine, " "); + } + /* remove last blank */ + sCmndLine[strlen(sCmndLine)-1] = 0; + + /* do we really need _spawnv (ShelExecute seems not to do it)*/ + if (32 <= (int)FindExecutable (cmdname, + gimp_directory (), + sExecutable)) + { + //g_print("_spawnlp %s %s %s", sExecutable, cmdname, sCmndLine); + + pid = _spawnlp(mode, sExecutable, "-c", cmdname, sCmndLine, NULL); + } + else + { + g_warning("Execution error for: %s", cmdname); + return -1; + } + return pid; +} +#undef _spawnv +#define _spawnv xspawnv + +#endif /* G_OS_WIN32 */ + gint plug_in_open (PlugIn *plug_in) { @@ -989,7 +1042,26 @@ plug_in_close (PlugIn *plug_in, waitpid (plug_in->pid, &status, 0); #else if (kill_it && plug_in->pid) - TerminateProcess ((HANDLE) plug_in->pid, 0); + { + /* Trying to avoid TerminateProcess (does mostly work). + * Otherwise some of our needed DLLs may get into an unstable state + * (see Win32 API docs). + */ + DWORD dwExitCode = STILL_ACTIVE; + DWORD dwTries = 10; + while ((STILL_ACTIVE == dwExitCode) + && GetExitCodeProcess((HANDLE) plug_in->pid, &dwExitCode) + && (dwTries > 0)) + { + Sleep(10); + dwTries--; + } + if (STILL_ACTIVE == dwExitCode) + { + g_warning("Terminating %s ...", plug_in->args[0]); + TerminateProcess ((HANDLE) plug_in->pid, 0); + } + } #endif /* Remove the input handler. diff --git a/app/tools/paint_core.c b/app/tools/paint_core.c index df71378dcd..73a7ae9de2 100644 --- a/app/tools/paint_core.c +++ b/app/tools/paint_core.c @@ -408,10 +408,10 @@ paint_core_motion (Tool *tool, paint_core_interpolate (paint_core, gimage_active_drawable (gdisp->gimage)); if (paint_core->flags & TOOL_TRACES_ON_WINDOW) - (* paint_core->paint_func) (paint_core, gimage_active_drawable, PRETRACE_PAINT); + (* paint_core->paint_func) (paint_core, gimage_active_drawable (gdisp->gimage), PRETRACE_PAINT); gdisplay_flush_now (gdisp); if (paint_core->flags & TOOL_TRACES_ON_WINDOW) - (* paint_core->paint_func) (paint_core, gimage_active_drawable, POSTTRACE_PAINT); + (* paint_core->paint_func) (paint_core, gimage_active_drawable (gdisp->gimage), POSTTRACE_PAINT); paint_core->lastx = paint_core->curx; paint_core->lasty = paint_core->cury; diff --git a/libgimp/color_display.h b/libgimp/color_display.h index 92dc1c9571..600c0b218e 100644 --- a/libgimp/color_display.h +++ b/libgimp/color_display.h @@ -20,6 +20,7 @@ #define __GIMP_COLOR_DISPLAY_H__ #include +#include #include @@ -60,8 +61,14 @@ struct _GimpColorDisplayMethods GimpColorDisplayConfigureCancel cancel; }; +/* + * The following two functions are implemted and exported by gimp/app + * but need to be marked for it here too ... + */ +G_MODULE_EXPORT gboolean gimp_color_display_register (const char *name, GimpColorDisplayMethods *methods); +G_MODULE_EXPORT gboolean gimp_color_display_unregister (const char *name); #endif /* __GIMP_COLOR_DISPLAY_H__ */ diff --git a/libgimp/gimp.def b/libgimp/gimp.def index 4b4e727934..72054800f1 100644 --- a/libgimp/gimp.def +++ b/libgimp/gimp.def @@ -37,7 +37,6 @@ EXPORTS gimp_drawable_delete gimp_drawable_detach gimp_drawable_fill - gimp_drawable_parasite_find gimp_drawable_flush gimp_drawable_get gimp_drawable_get_thumbnail_data @@ -58,6 +57,7 @@ EXPORTS gimp_drawable_offsets gimp_drawable_parasite_attach gimp_drawable_parasite_detach + gimp_drawable_parasite_find gimp_drawable_set_name gimp_drawable_set_visible gimp_drawable_type @@ -75,6 +75,11 @@ EXPORTS gimp_gradients_sample_uniform gimp_gradients_set_active gimp_gtkrc + gimp_hls_to_rgb + gimp_hls_value + gimp_hsv_to_rgb + gimp_hsv_to_rgb4 + gimp_hsv_to_rgb_double gimp_image_add_channel gimp_image_add_hguide gimp_image_add_layer @@ -222,6 +227,11 @@ EXPORTS gimp_register_magic_load_handler gimp_register_save_handler gimp_request_wakeups + gimp_rgb_to_hls + gimp_rgb_to_hsv + gimp_rgb_to_hsv4 + gimp_rgb_to_hsv_double + gimp_rgb_to_l gimp_run_procedure gimp_run_procedure2 gimp_run_temp diff --git a/libgimp/gimpcolordisplay.h b/libgimp/gimpcolordisplay.h index 92dc1c9571..600c0b218e 100644 --- a/libgimp/gimpcolordisplay.h +++ b/libgimp/gimpcolordisplay.h @@ -20,6 +20,7 @@ #define __GIMP_COLOR_DISPLAY_H__ #include +#include #include @@ -60,8 +61,14 @@ struct _GimpColorDisplayMethods GimpColorDisplayConfigureCancel cancel; }; +/* + * The following two functions are implemted and exported by gimp/app + * but need to be marked for it here too ... + */ +G_MODULE_EXPORT gboolean gimp_color_display_register (const char *name, GimpColorDisplayMethods *methods); +G_MODULE_EXPORT gboolean gimp_color_display_unregister (const char *name); #endif /* __GIMP_COLOR_DISPLAY_H__ */ diff --git a/libgimp/makefile.cygwin b/libgimp/makefile.cygwin index 9ac401264c..1025d0d9f6 100644 --- a/libgimp/makefile.cygwin +++ b/libgimp/makefile.cygwin @@ -52,6 +52,7 @@ gimpi_OBJECTS = \ gimpenv.o \ gimpchainbutton.o \ gimpcolorbutton.o \ + gimpcolorspace.o \ gimpfileselection.o\ gimpmatrix.o \ gimppatheditor.o\ @@ -69,6 +70,7 @@ libgimpi.a : $(gimpi_OBJECTS) gimp_OBJECTS = \ gimp.o \ gimpchannel.o \ + gimpcolorspace.o \ gimpdisplay.o \ gimpdrawable.o \ gimpenv.o \ diff --git a/libgimp/makefile.msc b/libgimp/makefile.msc index 73eacf11e0..c3e0b362fb 100644 --- a/libgimp/makefile.msc +++ b/libgimp/makefile.msc @@ -58,6 +58,7 @@ gimpi_OBJECTS = \ gimpenv.obj \ gimpchainbutton.obj\ gimpcolorbutton.obj\ + gimpcolorspace.obj \ gimpfileselection.obj\ gimpmatrix.obj \ gimppatheditor.obj\ @@ -75,6 +76,7 @@ gimpi.lib : $(gimpi_OBJECTS) gimp_OBJECTS = \ gimp.obj \ gimpchannel.obj \ + gimpcolorspace.obj \ gimpdisplay.obj \ gimpdrawable.obj\ gimpenv.obj \ diff --git a/libgimpbase/gimpdatafiles.c b/libgimpbase/gimpdatafiles.c index a392651fb5..52477753ba 100644 --- a/libgimpbase/gimpdatafiles.c +++ b/libgimpbase/gimpdatafiles.c @@ -39,10 +39,10 @@ #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #endif -#ifndef S_IXUSR -#define S_IXUSR _S_IEXEC -#endif -#endif +/* (Re)define S_IXUSR as _S_IREAD to get scripts, too. */ +#undef S_IXUSR +#define S_IXUSR _S_IREAD +#endif /* G_OS_WIN32 */ #include "datafiles.h" #include "errors.h" diff --git a/plug-ins/makefile.cygwin b/plug-ins/makefile.cygwin index 02509d3164..d433c4ba6b 100644 --- a/plug-ins/makefile.cygwin +++ b/plug-ins/makefile.cygwin @@ -29,7 +29,7 @@ COMMON4 = mapcolor max_rgb mblur newsprint nlfilt noisify normalize nova oilify COMMON5 = sample_colorize scatter_hsv semiflatten sharpen shift smooth_palette snoise sobel sparkle spheredesigner spread sunras tga threshold_alpha tiff tile tileit tiler video vinvert vpropagate waves whirlpinch winclipboard wind winprint wmf xbm xwd zealouscrop # These have own subdirectories each -SEPARATE = AlienMap FractalExplorer Lighting MapObject bmp borderaverage dbbrowser faxg3 fits flame fp gdyntext gfig gfli gimpressionist ifscompose imagemap maze mosaic pagecurl rcm sel2path sgi sinus struc twain unsharp winsnap +SEPARATE = AlienMap AlienMap2 FractalExplorer Lighting MapObject bmp borderaverage dbbrowser faxg3 fits flame fp gdyntext gfig gfli gimpressionist ifscompose imagemap maze mosaic pagecurl rcm sel2path sgi sinus struc twain unsharp winsnap # These are unofficial, ie not in the CVS. To build these, you should # get tml's source snapshot and copy this makefile to the diff --git a/plug-ins/makefile.msc b/plug-ins/makefile.msc index 5fadf82dca..c50f2b1283 100644 --- a/plug-ins/makefile.msc +++ b/plug-ins/makefile.msc @@ -28,7 +28,7 @@ COMMON4 = mapcolor max_rgb mblur newsprint nlfilt noisify normalize nova oilify COMMON5 = sample_colorize scatter_hsv semiflatten sharpen shift smooth_palette snoise sobel sparkle spheredesigner spread sunras tga threshold_alpha tiff tile tileit tiler video vinvert vpropagate waves whirlpinch winclipboard wind winprint wmf xbm xwd zealouscrop # These have own subdirectories each -SEPARATE = AlienMap FractalExplorer Lighting MapObject bmp borderaverage dbbrowser faxg3 fits flame fp gdyntext gfig gfli gimpressionist ifscompose imagemap maze mosaic pagecurl rcm sel2path sgi sinus struc twain unsharp winsnap +SEPARATE = AlienMap AlienMap2 FractalExplorer Lighting MapObject bmp borderaverage dbbrowser faxg3 fits flame fp gdyntext gfig gfli gimpressionist ifscompose imagemap maze mosaic pagecurl rcm sel2path sgi sinus struc twain unsharp winsnap # These are unofficial, ie not in the CVS. To build these, you should # get tml's source snapshot and copy this makefile to the