diff --git a/ChangeLog b/ChangeLog index b0d3991ee1..49c6cf3217 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,18 +1,25 @@ +Sat Jul 03 11:27:47 1999 Tor Lillqvist + 1999-07-03 Tor Lillqvist * README.win32: Advice about gcc. * libgimp/gimp.{c,h,def}: New way to get address of PLUG_IN_INFO - to the gimp dll, similar as used by the EMX port. Much cleaner. - Works well with gcc also now. + to the gimp dll. Do it a bit like the EMX port. Much cleaner. Now + works well also when built with gcc. * app/gimprc.c: Remove gratuituous printf. - * app/makefile.msc: Update with new files. + * modules/makefile.msc + * plug-ins/makefile.msc + * app/makefile.msc: Small updates. - * plug-ins/makefile.msc: Small updates. + * modules/makefile.cygwin + * plug-ins/makefile.cygwin + * app/makefile.cygwin: New files. - * plug-ins/makefile.cygwin: New file. + * app/color_notebook.c: Mark the two functions used by color + selection modules for export. * plug-ins/gfig/gfig.c * plug-ins/script-fu/script-fu-scripts.c: Include early. diff --git a/app/color_notebook.c b/app/color_notebook.c index d112c8526a..d41d2e0c04 100644 --- a/app/color_notebook.c +++ b/app/color_notebook.c @@ -19,6 +19,9 @@ */ #include "config.h" + +#include + #include #include #include @@ -373,7 +376,7 @@ color_notebook_page_switch (GtkWidget *w, /**************************************************************/ /* Registration functions */ - +G_MODULE_EXPORT GimpColorSelectorID gimp_color_selector_register (const char *name, GimpColorSelectorMethods *methods) @@ -403,6 +406,7 @@ gimp_color_selector_register (const char *name, } +G_MODULE_EXPORT gboolean gimp_color_selector_unregister (GimpColorSelectorID id, void (*callback)(void *data), diff --git a/app/dialogs/color-dialog.c b/app/dialogs/color-dialog.c index d112c8526a..d41d2e0c04 100644 --- a/app/dialogs/color-dialog.c +++ b/app/dialogs/color-dialog.c @@ -19,6 +19,9 @@ */ #include "config.h" + +#include + #include #include #include @@ -373,7 +376,7 @@ color_notebook_page_switch (GtkWidget *w, /**************************************************************/ /* Registration functions */ - +G_MODULE_EXPORT GimpColorSelectorID gimp_color_selector_register (const char *name, GimpColorSelectorMethods *methods) @@ -403,6 +406,7 @@ gimp_color_selector_register (const char *name, } +G_MODULE_EXPORT gboolean gimp_color_selector_unregister (GimpColorSelectorID id, void (*callback)(void *data), diff --git a/app/gui/color-notebook.c b/app/gui/color-notebook.c index d112c8526a..d41d2e0c04 100644 --- a/app/gui/color-notebook.c +++ b/app/gui/color-notebook.c @@ -19,6 +19,9 @@ */ #include "config.h" + +#include + #include #include #include @@ -373,7 +376,7 @@ color_notebook_page_switch (GtkWidget *w, /**************************************************************/ /* Registration functions */ - +G_MODULE_EXPORT GimpColorSelectorID gimp_color_selector_register (const char *name, GimpColorSelectorMethods *methods) @@ -403,6 +406,7 @@ gimp_color_selector_register (const char *name, } +G_MODULE_EXPORT gboolean gimp_color_selector_unregister (GimpColorSelectorID id, void (*callback)(void *data), diff --git a/app/makefile.cygwin b/app/makefile.cygwin new file mode 100644 index 0000000000..3bda3285a6 --- /dev/null +++ b/app/makefile.cygwin @@ -0,0 +1,259 @@ +## Makefile for building gimp.exe with gcc +## Use: make -f makefile.cygwin + +# Change this to wherever you want to install gimp.exe. +BIN = /gimp/bin + +OPTIMIZE = -g -O + +################################################################ + +# Nothing much configurable below + +CC = gcc -mno-cygwin -mpentium + +CP = cp +LD = ld +DLLTOOL = dlltool +INSTALL = install + +GIMP_VER = 1.1 +GTK_VER = 1.3 +GLIB_VER = 1.3 + +GTK = ../../gtk+ +GLIB = ../../glib +GMODULE = $(GLIB)/gmodule +GETTEXT = ../../gettext-0.10.35 + +CFLAGS = $(OPTIMIZE) -DREGEX_MALLOC -DHAVE_CONFIG_H -I. -I.. -I$(GLIB) -I$(GMODULE) -I$(GTK)/gdk/win32 -I$(GTK) -I$(GETTEXT)/intl + +GCG = ../tools/gcg/gcg -I. -I../tools/gcg/gh + +all : \ + ../config.h \ + libgimpim.a \ + colormap_dialog.c \ + gimp.exe + +install : gimp.exe + $(INSTALL) gimp.exe $(BIN) + +../config.h : ../config.h.win32 + $(CP) ../config.h.win32 ../config.h + +gimpim_OBJECTS = \ + gimpdrawable.o \ + gimpimage.o \ + gimpobject.o \ + gimppreviewcache.o\ + gimpset.o \ + gimpsignal.o + +libgimpim.a : $(gimpim_OBJECTS) + ar cr libgimpim.a $(gimpim_OBJECTS) + +gimp_OBJECTS = \ + about_dialog.o \ + actionarea.o \ + airbrush.o \ + app_procs.o \ + asupsample.o \ + batch.o \ + bezier_select.o \ + blend.o \ + blob.o \ + boundary.o \ + brightness_contrast.o \ + brush_edit.o \ + brush_select.o \ + brush_select_cmds.o \ + brushes_cmds.o \ + bucket_fill.o \ + buildmenu.o \ + by_color_select.o \ + channel.o \ + channel_cmds.o \ + channels_dialog.o \ + channel_ops.o \ + channel_ops_cmds.o \ + clone.o \ + color_area.o \ + color_balance.o \ + color_cmds.o \ + color_notebook.o \ + color_panel.o \ + color_picker.o \ + color_select.o \ + color_transfer.o \ + colormaps.o \ + colormap_dialog.o \ + commands.o \ + context_manager.o \ + convert.o \ + convert_cmds.o \ + convolve.o \ + crop.o \ + cursorutil.o \ + curves.o \ + datafiles.o \ + desaturate.o \ + devices.o \ + dialog_handler.o \ + disp_callbacks.o \ + docindex.o \ + docindexif.o \ + dodgeburn.o \ + draw_core.o \ + drawable.o \ + drawable_cmds.o \ + edit_cmds.o \ + edit_selection.o \ + ellipse_select.o \ + eraser.o \ + errorconsole.o \ + errors.o \ + equalize.o \ + fileops.o \ + fileops_cmds.o \ + flip_tool.o \ + floating_sel.o \ + floating_sel_cmds.o \ + file_new_dialog.o \ + frac.o \ + free_select.o \ + fuzzy_select.o \ + gdisplay.o \ + gdisplay_cmds.o \ + gdisplay_ops.o \ + general.o \ + gimage.o \ + gimage_cmds.o \ + gimage_mask.o \ + gimage_mask_cmds.o \ + gimpbrush.o \ + gimpbrushgenerated.o \ + gimpbrushlist.o \ + gimpcontext.o \ + gimphistogram.o \ + gimplist.o \ + gimplut.o \ + gimpparasite.o \ + gimpprogress.o \ + gimprc.o \ + gimprc_cmds.o \ + gimpunit.o \ + global_edit.o \ + gradient.o \ + gradient_cmds.o \ + gradient_select.o \ + gradient_select_cmds.o \ + guides_cmds.o \ + gximage.o \ + histogramwidget.o \ + histogram_tool.o \ + hue_saturation.o \ + image_map.o \ + image_render.o \ + indicator_area.o \ + info_dialog.o \ + info_window.o \ + ink.o \ + install.o \ + interface.o \ + interface_cmds.o \ + internal_procs.o \ + invert.o \ + iscissors.o \ + layer.o \ + layer_cmds.o \ + layer_select.o \ + layers_dialog.o \ + lc_dialog.o \ + levels.o \ + lut_funcs.o \ + magnify.o \ + main.o \ + menus.o \ + misc_cmds.o \ + module_db.o \ + move.o \ + ops_buttons.o \ + palette.o \ + palette_cmds.o \ + palette_select.o \ + paint_core.o \ + paint_funcs.o \ + paintbrush.o \ + parasite_cmds.o \ + parasitelist.o \ + paths_cmds.o \ + paths_dialog.o \ + pattern_select.o \ + pattern_select_cmds.o \ + patterns.o \ + patterns_cmds.o \ + pencil.o \ + perspective_tool.o \ + pixel_processor.o \ + pixel_region.o \ + plug_in.o \ + plug_in_cmds.o \ + posterize.o \ + preferences_dialog.o \ + procedural_db.o \ + procedural_db_cmds.o \ + rect_select.o \ + regex.o \ + resize.o \ + rotate_tool.o \ + scale.o \ + scale_tool.o \ + scroll.o \ + selection.o \ + session.o \ + shear_tool.o \ + smudge.o \ + temp_buf.o \ + text_tool.o \ + text_tool_cmds.o \ + threshold.o \ + tile.o \ + tile_cache.o \ + tile_manager.o \ + tile_swap.o \ + tips_dialog.o \ + tool_options.o \ + tools.o \ + tools_cmds.o \ + transform_core.o \ + transform_tool.o \ + undo.o \ + undo_cmds.o \ + unit_cmds.o \ + vector2d.o \ + xcf.o + +.SUFFIXES: .gc + +.gc.c: + $(GCG) -o $@ $< + +gimpres.o : gimp.rc wilber.ico + windres gimp.rc gimpres.o + +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/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 + $(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/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 + $(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/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32 + $(DLLTOOL) --dllname gimp.exe gimp.def --output-lib libgimp.a $(gimp_OBJECTS) + +# General rule for building $(gimp_OBJECTS) +.c.o: + $(CC) $(CFLAGS) -c $< + +clean: + -rm *.exe *.a *.o *.base *.exp diff --git a/app/widgets/gimpcolordialog.c b/app/widgets/gimpcolordialog.c index d112c8526a..d41d2e0c04 100644 --- a/app/widgets/gimpcolordialog.c +++ b/app/widgets/gimpcolordialog.c @@ -19,6 +19,9 @@ */ #include "config.h" + +#include + #include #include #include @@ -373,7 +376,7 @@ color_notebook_page_switch (GtkWidget *w, /**************************************************************/ /* Registration functions */ - +G_MODULE_EXPORT GimpColorSelectorID gimp_color_selector_register (const char *name, GimpColorSelectorMethods *methods) @@ -403,6 +406,7 @@ gimp_color_selector_register (const char *name, } +G_MODULE_EXPORT gboolean gimp_color_selector_unregister (GimpColorSelectorID id, void (*callback)(void *data), diff --git a/libgimp/gimp.c b/libgimp/gimp.c index 776359fbfd..fe5e5d55da 100644 --- a/libgimp/gimp.c +++ b/libgimp/gimp.c @@ -175,6 +175,7 @@ gimp_main (int argc, setmode(g_io_channel_unix_get_fd(_writechannel), O_BINARY); #endif #else + g_assert (PLUG_IN_INFO_PTR != NULL); _readchannel = g_io_channel_win32_new_pipe (atoi (argv[2])); peer = strchr (argv[3], ':') + 1; peer_fd = strchr (peer, ':') + 1; diff --git a/modules/makefile.cygwin b/modules/makefile.cygwin new file mode 100644 index 0000000000..85b4c05efd --- /dev/null +++ b/modules/makefile.cygwin @@ -0,0 +1,54 @@ +## Makefile for building gimp modules with gcc -mno-cygwin +## Use: make -f makefile.cygwin + +# Change this to wherever you install the gimp. +GIMP = /gimp +BIN = $(GIMP)/modules + +################################################################ + +# Nothing much configurable below + +CC = gcc -mno-cygwin -mpentium + +INSTALL = install + +GIMP_VER = 1.1 +GTK_VER = 1.3 +GLIB_VER = 1.3 + +GLIB = ../../glib +GMODULE = $(GLIB)/gmodule +GTK = ../../gtk+ + +CFLAGS = -DHAVE_CONFIG_H -DMODULE_COMPILATION -I. -I.. -I$(GLIB) -I$(GMODULE) -I$(GTK)/gdk/win32 -I$(GTK) +LDFLAGS = -s + +MODULES = \ + colorsel_gtk.dll \ + colorsel_triangle.dll + + +all : \ + $(MODULES) + +install : all + $(INSTALL) colorsel_gtk.dll $(BIN) + $(INSTALL) colorsel_triangle.dll $(BIN) + +../config.h : ../config.h.win32 + cp ../config.h.win32 $@ + +colorsel_gtk.dll : colorsel_gtk.o module.def + $(GLIB)/build-dll colorsel_gtk - module.def colorsel_gtk.o $(LDFLAGS) -L ../app -lgimp -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GLIB) -lgmodule-$(GLIB_VER) -lglib-$(GLIB_VER) + +colorsel_triangle.dll : colorsel_triangle.o module.def + $(GLIB)/build-dll colorsel_triangle - module.def colorsel_triangle.o $(LDFLAGS) -L ../app -lgimp -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GLIB) -lgmodule-$(GLIB_VER) -lglib-$(GLIB_VER) + + +# General rule for building +.c.obj: + $(CC) $(CFLAGS) -c $< + +clean: + -rm *.exe *.a *.o *.exp *.base diff --git a/modules/makefile.msc b/modules/makefile.msc index b25977aa10..0d41eec735 100644 --- a/modules/makefile.msc +++ b/modules/makefile.msc @@ -9,12 +9,11 @@ BIN = $(GIMP)\modules # Nothing much configurable below -# cl -? described the options -CC = cl -GA -G5 -GF -Ox -W3 -MD -nologo +# cl -? describes the options +CC = cl -G5 -GF -Ox -W3 -MD -nologo LDFLAGS = /link /machine:ix86 INSTALL = copy -TOUCH = copy makefile.msc+nul GIMP_VER = 1.1 GTK_VER = 1.3 @@ -26,18 +25,17 @@ GTK = ..\..\gtk+ CFLAGS = -DHAVE_CONFIG_H -DMODULE_COMPILATION -I. -I.. -I$(GLIB) -I$(GMODULE) -I$(GTK)\gdk\win32 -I$(GTK) -MODULES = colorsel_gtk.dll \ +MODULES = \ + colorsel_gtk.dll \ colorsel_triangle.dll all : \ $(MODULES) - $(TOUCH) all install : all $(INSTALL) colorsel_gtk.dll $(BIN) $(INSTALL) colorsel_triangle.dll $(BIN) - $(TOUCH) install ..\config.h : ..\config.h.win32 copy ..\config.h.win32 ..\config.h @@ -50,7 +48,7 @@ colorsel_triangle.dll : colorsel_triangle.obj module.def # General rule for building .c.obj: - $(CC) $(CFLAGS) -c $< + $(CC) $(CFLAGS) -GD -c $< clean: del *.exe @@ -60,7 +58,5 @@ clean: del *.err del *.map del *.sym - del *.lk1 - del *.mk1 del *.pdb del *.ilk