Commit 1dea4958 authored by Tor Lillqvist's avatar Tor Lillqvist

Win32 portability changes:

	* config.h.win32, README.win32: Small changes.

	* tools/pdbgen/pdb/*.pdb: Include <string.h>.

	* app/*_cmds.c: Autogenerated files reflect above changes.

	* libgimp/makefile.msc app/makefile.msc: Various updates,
 	including new object files. Gtk+ directory now should be called
 	gtk+ (not gtk-plus). Use win32-specific gdk subdir. Glib directory
 	now should be called just glib.

	* libgimp/gimp.def: Updates.

	* libgimp/gimpfeatures.h.win32: Made current with
 	gimpfeatures.h.in.

	* libgimp/gimpfileselection.c: Define S_ISDIR and S_ISREG if
 	necessary.

	* tools/pdbgen/pdb/fileops.pdb: Must have a
 	statement (even an empty one) after a label.

	* app/fileops_cmds.c: Autogenerated file reflects above changes.

	* app/crop.c: Include <string.h>.

	* app/{app_procs,batch,fileops,datafiles,errorconsole,general,
 	plug_in,temp_buf,tile_swap}.c: Test NATIVE_WIN32, not
 	_MSC_VER. (NATIVE_WIN32 means we are using the Microsoft C
 	runtime, even if we might be compiling with gcc.)

	* app/fileops.c: Don't include <process.h> here.

	* app/fileops.h: Do include <process.h> here.

	* app/gimpparasite.c: Include config.h, guard inclusion of
 	<unistd.h>. (Is the inclusion of unistd.h in source files all over
 	the place really necessary?)

	* app/ink.c: MSC doesn't handle conversion from unsigned __int64
 	to double, so cast to signed.

	* app/lut_funcs.c: Include config.h, and define rint() if necessary.

	* app/pixel_processor.c: Include config.h without "..", like in
 	all the other places. Include <string.h>

	* app/text_tool.c: Guard the "POINTS" identifier that clashes with
 	<windows.h>, sigh.
parent 80663930
1999-05-04 Tor Lillqvist <tml@iki.fi>
Win32 portability changes:
* config.h.win32, README.win32: Small changes.
* tools/pdbgen/pdb/*.pdb: Include <string.h>.
* app/*_cmds.c: Autogenerated files reflect above changes.
* libgimp/makefile.msc app/makefile.msc: Various updates,
including new object files. Gtk+ directory now should be called
gtk+ (not gtk-plus). Use win32-specific gdk subdir. Glib directory
now should be called just glib.
* libgimp/gimp.def: Updates.
* libgimp/gimpfeatures.h.win32: Made current with
gimpfeatures.h.in.
* libgimp/gimpfileselection.c: Define S_ISDIR and S_ISREG if
necessary.
* tools/pdbgen/pdb/fileops.pdb: Must have a
statement (even an empty one) after a label.
* app/fileops_cmds.c: Autogenerated file reflects above changes.
* app/crop.c: Include <string.h>.
* app/{app_procs,batch,fileops,datafiles,errorconsole,general,
plug_in,temp_buf,tile_swap}.c: Test NATIVE_WIN32, not
_MSC_VER. (NATIVE_WIN32 means we are using the Microsoft C
runtime, even if we might be compiling with gcc.)
* app/fileops.c: Don't include <process.h> here.
* app/fileops.h: Do include <process.h> here.
* app/gimpparasite.c: Include config.h, guard inclusion of
<unistd.h>. (Is the inclusion of unistd.h in source files all over
the place really necessary?)
* app/ink.c: MSC doesn't handle conversion from unsigned __int64
to double, so cast to signed.
* app/lut_funcs.c: Include config.h, and define rint() if necessary.
* app/pixel_processor.c: Include config.h without "..", like in
all the other places. Include <string.h>
* app/text_tool.c: Guard the "POINTS" identifier that clashes with
<windows.h>, sigh.
1999-05-02 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/commands.c: call gdisplays_resize_cursor_label(gimage)
......
This is an unstable release of the GIMP, intended for developers only.
This is an unstable version of the GIMP, intended for developers
only. Even more so the Win32 port.
For more information about the port or GLib, GTk+ and the GIMP to
native Windows, and pre-built binary packages, see
......@@ -6,12 +7,15 @@ http://www.iki.fi/tml/gimp/win32/ or
http://www.gimp.org/~tml/gimp/win32/
To build the GIMP on Win32, you will need (for now) the Microsoft
compiler. Eventually gcc (egcs) from cygwin will also be supported.
compiler. Eventually gcc (egcs) on cygwin will also be supported, but
without the produced executables depending on the cygwin dll (gcc
-mno-cygwin).
First, build in the libgimp directory, then in tools/gcg, then in app,
plug-ins, and finally in modules. Check the makefile.msc files in said
directories.
The current build setup for Windows is a mess, I know that.
The current build setup for Windows is a mess, with complex
hand-maintained makefiles. I know.
--Tor Lillqvist <tml@iki.fi>
......@@ -44,7 +44,7 @@
#include <windows.h>
#include <process.h>
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <fcntl.h>
#include <io.h>
#endif
......
......@@ -31,7 +31,7 @@
#include <unistd.h>
#endif
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <process.h> /* For _getpid() */
#endif
......
......@@ -16,12 +16,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "gimplut.h"
#include "gimphistogram.h"
#include <stdio.h>
#include <math.h>
#include <glib.h>
#ifndef HAVE_RINT
#define rint(x) floor (x + 0.5)
#endif
/* ---------- Brightness/Contrast -----------*/
typedef struct B_C_struct
......
......@@ -18,12 +18,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "../config.h"
#include "config.h"
#include "pixel_processor.h"
#include "pixel_region.h"
#include "gimprc.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#ifdef ENABLE_MP
......
......@@ -28,7 +28,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <process.h> /* For _getpid() */
#endif
......
......@@ -13,7 +13,7 @@
#include <pthread.h>
#endif
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <io.h>
#endif
......
......@@ -9,7 +9,7 @@
#include <unistd.h>
#endif
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <io.h>
#endif
......
......@@ -20,6 +20,8 @@
#include "procedural_db.h"
#include <string.h>
#include "brush_select.h"
#include "gimpbrushlist.h"
#include "paint_funcs.h"
......
......@@ -20,6 +20,8 @@
#include "procedural_db.h"
#include <string.h>
#include "convert.h"
#include "gimage.h"
#include "palette.h"
......
......@@ -15,9 +15,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "app_procs.h"
#include "parasitelist.h"
#include "gimpparasite.h"
......
......@@ -32,7 +32,7 @@
#include <dirent.h>
#endif
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#ifndef S_ISDIR
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
......
......@@ -15,9 +15,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "app_procs.h"
#include "parasitelist.h"
#include "gimpparasite.h"
......
......@@ -15,6 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <string.h>
#include "gdk/gdkkeysyms.h"
#include "appenv.h"
#include "actionarea.h"
......
......@@ -32,7 +32,7 @@
#include <dirent.h>
#endif
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#ifndef S_ISDIR
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
......
......@@ -35,7 +35,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <io.h>
#ifndef S_IRUSR
#define S_IRUSR _S_IREAD
......
......@@ -33,8 +33,7 @@
#endif
#include <errno.h>
#ifdef _MSC_VER
#include <process.h> /* For _getpid() */
#ifdef NATIVE_WIN32
#include <direct.h> /* For _mkdir() */
#define mkdir(path,mode) _mkdir(path)
#endif
......
......@@ -20,6 +20,11 @@
#include <gtk/gtk.h>
#ifdef NATIVE_WIN32
#include <process.h> /* For _getpid() */
#endif
#include "plug_in.h"
#include "gimpimageF.h"
......
......@@ -297,7 +297,7 @@ register_magic_load_handler_invoker (Argument *args)
success = TRUE;
done:
done: ;
}
return procedural_db_return_args (&register_magic_load_handler_proc, success);
......@@ -442,7 +442,7 @@ register_save_handler_invoker (Argument *args)
success = TRUE;
done:
done: ;
}
return procedural_db_return_args (&register_save_handler_proc, success);
......
......@@ -24,7 +24,7 @@
#include <time.h>
#include <glib.h>
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#ifndef S_ISREG
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
......
......@@ -20,6 +20,8 @@
#include "procedural_db.h"
#include <string.h>
#include "channel.h"
#include "cursorutil.h"
#include "drawable.h"
......
......@@ -15,9 +15,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "app_procs.h"
#include "parasitelist.h"
#include "gimpparasite.h"
......
......@@ -20,6 +20,8 @@
#include "procedural_db.h"
#include <string.h>
#include "gradient.h"
#include "gradient_header.h"
......
......@@ -44,7 +44,7 @@
#include <windows.h>
#include <process.h>
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <fcntl.h>
#include <io.h>
#endif
......
......@@ -44,7 +44,7 @@
#include <windows.h>
#include <process.h>
#ifdef _MSC_VER
#ifdef NATIVE_WIN32
#include <fcntl.h>
#include <io.h>
#endif
......
......@@ -945,7 +945,11 @@ time_smoother_result (InkTool* ink_tool)
result += ink_tool->ts_buffer[i];
}
#ifdef _MSC_VER
return (gdouble) (gint64) (result / TIME_SMOOTHER_BUFFER);
#else
return (result / TIME_SMOOTHER_BUFFER);
#endif
}
......
......@@ -16,12 +16,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "gimplut.h"
#include "gimphistogram.h"
#include <stdio.h>
#include <math.h>
#include <glib.h>
#ifndef HAVE_RINT
#define rint(x) floor (x + 0.5)
#endif
/* ---------- Brightness/Contrast -----------*/
typedef struct B_C_struct
......
......@@ -8,23 +8,24 @@ BIN = D:\gimp\bin
# Nothing much configurable below
# cl -? described the options
CC = cl -GA -G5 -GF -Ox -W3 -MD -nologo
# cl -? describes the options
#CC = cl -GA -G5 -GF -Ox -W3 -MD -nologo
CC = cl -GA -G5 -GF -Zi -W3 -MD -nologo
# Change to /subsystem:console when debugging
LDFLAGS = /link /subsystem:windows /machine:ix86
LDFLAGS = /link /subsystem:windows /machine:ix86 /debug
INSTALL = copy
TOUCH = copy makefile.msc+nul
GIMP_VER = 1.1
GTK_VER = 1.3
GLIB_VER = 1.2
GLIB_VER = 1.3
GTK = ..\..\gtk-plus
GLIB = ..\..\glib-$(GLIB_VER)
GTK = ..\..\gtk+
GLIB = ..\..\glib
GMODULE = $(GLIB)\gmodule
CFLAGS = -DREGEX_MALLOC -DHAVE_CONFIG_H -I. -I.. -I$(GLIB) -I$(GMODULE) -I$(GTK)
CFLAGS = -DREGEX_MALLOC -DHAVE_CONFIG_H -I. -I.. -I$(GLIB) -I$(GMODULE) -I$(GTK)\gdk\win32 -I$(GTK)
GCG = ..\tools\gcg\gcg -I. -I ..\tools\gcg\gh
......@@ -43,163 +44,188 @@ install : gimp.exe
copy ..\config.h.win32 ..\config.h
gimpim_OBJECTS = \
gimpobject.obj \
gimpdrawable.obj\
gimpimage.obj \
gimpobject.obj \
gimpset.obj \
gimpsignal.obj \
gimpdrawable.obj
gimpsignal.obj
gimpim.lib : $(gimpim_OBJECTS)
lib /out:gimpim.lib $(gimpim_OBJECTS)
gimp_OBJECTS = \
about_dialog.obj\
actionarea.obj \
airbrush.obj \
app_procs.obj \
asupsample.obj \
batch.obj \
bezier_select.obj\
blend.obj \
blob.obj \
boundary.obj \
brightness_contrast.obj\
brush_edit.obj \
brush_select.obj\
bucket_fill.obj \
buildmenu.obj \
by_color_select.obj\
channel.obj \
channel_cmds.obj\
channels_dialog.obj\
channel_ops.obj \
clone.obj \
color_area.obj \
color_balance.obj\
color_notebook.obj\
color_panel.obj \
color_picker.obj\
color_select.obj\
color_transfer.obj\
colormaps.obj \
colormap_dialog.obj\
commands.obj \
convert.obj \
convolve.obj \
crop.obj \
cursorutil.obj \
curves.obj \
datafiles.obj \
desaturate.obj \
devices.obj \
dialog_handler.obj\
disp_callbacks.obj\
docindex.obj \
docindexif.obj \
draw_core.obj \
drawable.obj \
drawable_cmds.obj\
edit_cmds.obj \
edit_selection.obj\
ellipse_select.obj\
eraser.obj \
errorconsole.obj\
errors.obj \
equalize.obj \
fileops.obj \
flip_tool.obj \
floating_sel.obj\
floating_sel_cmds.obj\
file_new_dialog.obj\
frac.obj \
free_select.obj \
fuzzy_select.obj\
gdisplay.obj \
gdisplay_cmds.obj\
gdisplay_ops.obj\
general.obj \
gimage.obj \
gimage_cmds.obj \
gimage_mask.obj \
gimage_mask_cmds.obj\
gimpbrush.obj \
gimpbrushgenerated.obj\
gimpbrushlist.obj\
gimphistogram.obj\
gimplist.obj \
gimplut.obj \
gimpparasite.obj\
gimpprogress.obj\
gimprc.obj \
global_edit.obj \
gradient.obj \
gradient_select.obj\
gximage.obj \
histogramwidget.obj \
histogram_tool.obj\
hue_saturation.obj\
image_map.obj \
image_render.obj\
info_dialog.obj \
info_window.obj \
ink.obj \
install.obj \
interface.obj \
internal_procs.obj\
invert.obj \
iscissors.obj \
layer.obj \
layer_cmds.obj \
layer_select.obj\
layers_dialog.obj\
levels.obj \
magnify.obj \
main.obj \
menus.obj \
module_db.obj \
move.obj \
ops_buttons.obj \
palette.obj \
palette_select.obj\
paint_core.obj \
paint_funcs.obj \
paintbrush.obj \
parasite_cmds.obj\
parasitelist.obj\
paths_dialog.obj\
pattern_select.obj\
patterns.obj \
pencil.obj \
perspective_tool.obj\
pixel_region.obj\
plug_in.obj \
posterize.obj \
preferences_dialog.obj\
procedural_db.obj\
rect_select.obj \
regex.obj \
resize.obj \
rotate_tool.obj \
scale.obj \
scale_tool.obj \
scroll.obj \
selection.obj \
session.obj \
shear_tool.obj \
temp_buf.obj \
text_tool.obj \
threshold.obj \
tile.obj \
tile_cache.obj \
tile_manager.obj\
tile_swap.obj \
tips_dialog.obj \
tools.obj \
transform_core.obj\
transform_tool.obj\
undo.obj \
undo_cmds.obj \
vector2d.obj \
about_dialog.obj \
actionarea.obj \
airbrush.obj \
app_procs.obj \
asupsample.obj \
batch.obj \
bezier_select.obj \
blend.obj \
blob.obj \
boundary.obj \
brightness_contrast.obj \
brush_edit.obj \
brush_select.obj \
brush_select_cmds.obj \
brushes_cmds.obj \
bucket_fill.obj \
buildmenu.obj \
by_color_select.obj \
channel.obj \
channel_cmds.obj \
channels_dialog.obj \
channel_ops.obj \
channel_ops_cmds.obj \
clone.obj \
color_area.obj \
color_balance.obj \
color_cmds.obj \
color_notebook.obj \
color_panel.obj \
color_picker.obj \
color_select.obj \
color_transfer.obj \
colormaps.obj \
colormap_dialog.obj \
commands.obj \
convert.obj \
convert_cmds.obj \
convolve.obj \
crop.obj \
cursorutil.obj \
curves.obj \
datafiles.obj \
desaturate.obj \
devices.obj \
dialog_handler.obj \
disp_callbacks.obj \
docindex.obj \
docindexif.obj \
draw_core.obj \
drawable.obj \
drawable_cmds.obj \
edit_cmds.obj \
edit_selection.obj \
ellipse_select.obj \
eraser.obj \
errorconsole.obj \
errors.obj \
equalize.obj \
fileops.obj \
fileops_cmds.obj \
flip_tool.obj \
floating_sel.obj \
floating_sel_cmds.obj \
file_new_dialog.obj \
frac.obj \
free_select.obj \
fuzzy_select.obj \
gdisplay.obj \
gdisplay_cmds.obj \
gdisplay_ops.obj \
general.obj \
gimage.obj \
gimage_cmds.obj \
gimage_mask.obj \
gimage_mask_cmds.obj \
gimpbrush.obj \
gimpbrushgenerated.obj \
gimpbrushlist.obj \
gimphistogram.obj \
gimplist.obj \
gimplut.obj \
gimpparasite.obj \
gimpprogress.obj \
gimprc.obj \
gimprc_cmds.obj \
gimpunit.obj \
global_edit.obj \
gradient.obj \
gradient_cmds.obj \
gradient_select.obj \
gradient_select_cmds.obj \
guides_cmds.obj \
gximage.obj \
histogramwidget.obj \
histogram_tool.obj \
hue_saturation.obj \
image_map.obj \
image_render.obj \
info_dialog.obj \
info_window.obj \
ink.obj \
install.obj \
interface.obj \
interface_cmds.obj \
internal_procs.obj \
invert.obj \
iscissors.obj \
layer.obj \
layer_cmds.obj \
layer_select.obj \
layers_dialog.obj \
levels.obj \
lut_funcs.obj \
magnify.obj \
main.obj \
menus.obj \
misc_cmds.obj \
module_db.obj \
move.obj \
ops_buttons.obj \
palette.obj \
palette_cmds.obj \
palette_select.obj \
paint_core.obj \
paint_funcs.obj \
paintbrush.obj \
parasite_cmds.obj \
parasitelist.obj \
paths_cmds.obj \
paths_dialog.obj \
pattern_select.obj \
pattern_select_cmds.obj \
patterns.obj \
patterns_cmds.obj \
pencil.obj \
perspective_tool.obj \
pixel_processor.obj \
pixel_region.obj \
plug_in.obj \
plug_in_cmds.obj \
posterize.obj \
preferences_dialog.obj \
procedural_db.obj \
procedural_db_cmds.obj \
rect_select.obj \
regex.obj \
resize.obj \
rotate_tool.obj \
scale.obj \
scale_tool.obj \
scroll.obj \
selection.obj \