Commit 0aeb6370 authored by Tor Lillqvist's avatar Tor Lillqvist
Browse files

Update gcc instructions. Remove warning about gettext being GPL, as the

	* README.win32: Update gcc instructions. Remove warning about
 	gettext being GPL, as the GIMP is GPL, too, of course, and it
 	thus doesn't matter.

	* user_install.bat: Rename the template user gtkrc to gtkrc_user,
 	to reduce user confusion.

	* app/main.c: Small change for gcc on Win32 compilation.

	* */makefile.cygwin
	* app/module_db.c: With newest gcc-2.95 -fnative-struct on Win32,
 	no need to have differently named DLLs (including modules) for
 	(built by) gcc and MSVC.

	* app/module_db.c: Use g_strdup_printf() instead of
 	strlen(), g_malloc() and g_snprintf()

	* libgimp/Makefile.am: No need to distribute gimpfeatures.h.win32,
 	the suitable gimpfeatures.h is built when making the dist.

	* libgimp/gimpfeatures.h.win32: Removed.

	* libgimp/makefile.cygwin
	* libgimp/makefile.msc: Remove gimpfeatures.h.win32.

	* libgimp/gimp.h: Win32 startup code changed a bit.

	* plug-ins/makefile.cygwin
	* plug-ins/makefile.msc: Add the winsnap unofficial plug-in.

	* plug-ins/common/animationplay.c
	* plug-ins/common/gz.c: (Win32) Hack aroung WinMain getting
	clashing declarations because these guys include gdkx.h (which
	includes windows.h), and gimp.h also declares WinMain on its own.
parent 1af1700b
1999-07-21 Tor Lillqvist <tml@iki.fi>
* README.win32: Update gcc instructions. Remove warning about
gettext being GPL, as the GIMP is GPL, too, of course, and it
thus doesn't matter.
* user_install.bat: Rename the template user gtkrc to gtkrc_user,
to reduce user confusion.
* app/main.c: Small change for gcc on Win32 compilation.
* */makefile.cygwin
* app/module_db.c: With newest gcc-2.95 -fnative-struct on Win32,
no need to have differently named DLLs (including modules) for
(built by) gcc and MSVC.
* app/module_db.c: Use g_strdup_printf() instead of
strlen(), g_malloc() and g_snprintf()
* libgimp/Makefile.am: No need to distribute gimpfeatures.h.win32,
the suitable gimpfeatures.h is built when making the dist.
* libgimp/gimpfeatures.h.win32: Removed.
* libgimp/makefile.cygwin
* libgimp/makefile.msc: Remove gimpfeatures.h.win32.
* libgimp/gimp.h: Win32 startup code changed a bit.
* plug-ins/makefile.cygwin
* plug-ins/makefile.msc: Add the winsnap unofficial plug-in.
* plug-ins/common/animationplay.c
* plug-ins/common/gz.c: (Win32) Hack aroung WinMain getting
clashing declarations because these guys include gdkx.h (which
includes windows.h), and gimp.h also declares WinMain on its own.
Wed Jul 21 00:00:35 BST 1999 Andy Thomas <alt@gimp.org>
* plug-ins/sel2path/fit.c
......
......@@ -7,10 +7,10 @@ http://www.iki.fi/tml/gimp/win32/ or
http://www.gimp.org/~tml/gimp/win32/
To build the GIMP on Win32, you can use either the Microsoft compiler
or gcc (egcs) without the produced executables depending on the
cygwin dll (gcc -mno-cygwin). For more information about the
preparation necessary for building with gcc, read README.win32 in the
GLib 1.3 distribution.
or gcc without the produced executables depending on the cygwin dll
(gcc -mno-cygwin). For more information about the preparation
necessary for building with gcc, what version you want and where to
get it, etc, read README.win32 in the GLib 1.3 distribution.
The GIMP wants to be built with the GNU gettext library for
internationalisation (i18n). Get the version ported to Win32 (not a
......
......@@ -470,23 +470,11 @@ valid_module_name (const char *filename)
if (strcmp (basename + len - 3, ".so"))
return FALSE;
#elif defined (__GNUC__)
/* When compiled with gcc on Win32, require modules to be compiled with
* gcc, too. Use the convention that gcc-compiled GIMP modules are named
* *.gcc.dll. Subject to change.
*/
if (len < 1 + 8)
return FALSE;
if (g_strcasecmp (basename + len - 8, ".gcc.dll"))
return FALSE;
#else
/* When compiled with MSVC, the modules should be called *.msvc.dll.
*/
if (len < 1 + 9)
if (len < 1 + 4)
return FALSE;
if (g_strcasecmp (basename + len - 9, ".msvc.dll"))
if (g_strcasecmp (basename + len - 4, ".dll"))
return FALSE;
#endif
......@@ -796,14 +784,8 @@ browser_info_update (module_info *mod, browser_st *st)
if (mod->state == ST_MODULE_ERROR && mod->last_module_error)
{
gulong len = strlen (statename[mod->state]) + 2 +
strlen (mod->last_module_error) + 2;
status = g_malloc (len);
g_snprintf (status, len,
"%s (%s)", statename[mod->state], mod->last_module_error);
}
status = g_strdup_printf ("%s (%s)", statename[mod->state],
mod->last_module_error);
else
{
status = g_strdup (statename[mod->state]);
......
......@@ -470,23 +470,11 @@ valid_module_name (const char *filename)
if (strcmp (basename + len - 3, ".so"))
return FALSE;
#elif defined (__GNUC__)
/* When compiled with gcc on Win32, require modules to be compiled with
* gcc, too. Use the convention that gcc-compiled GIMP modules are named
* *.gcc.dll. Subject to change.
*/
if (len < 1 + 8)
return FALSE;
if (g_strcasecmp (basename + len - 8, ".gcc.dll"))
return FALSE;
#else
/* When compiled with MSVC, the modules should be called *.msvc.dll.
*/
if (len < 1 + 9)
if (len < 1 + 4)
return FALSE;
if (g_strcasecmp (basename + len - 9, ".msvc.dll"))
if (g_strcasecmp (basename + len - 4, ".dll"))
return FALSE;
#endif
......@@ -796,14 +784,8 @@ browser_info_update (module_info *mod, browser_st *st)
if (mod->state == ST_MODULE_ERROR && mod->last_module_error)
{
gulong len = strlen (statename[mod->state]) + 2 +
strlen (mod->last_module_error) + 2;
status = g_malloc (len);
g_snprintf (status, len,
"%s (%s)", statename[mod->state], mod->last_module_error);
}
status = g_strdup_printf ("%s (%s)", statename[mod->state],
mod->last_module_error);
else
{
status = g_strdup (statename[mod->state]);
......
......@@ -370,8 +370,6 @@ main (int argc, char **argv)
#ifdef __GNUC__
#define _stdcall __attribute__((stdcall))
#define __argc _argc
#define __argv _argv
#endif
int _stdcall
......
......@@ -10,7 +10,7 @@ OPTIMIZE = -g -O
# Nothing much configurable below
CC = gcc -mno-cygwin -mpentium
CC = gcc -mno-cygwin -mpentium -fnative-struct
CP = cp
LD = ld
......@@ -245,11 +245,11 @@ gimpres.o : gimp.rc wilber.ico
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).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc -lgmodule-$(GLIB_VER).gcc gimpres.o -lgdi32 -luser32
$(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).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc -lgmodule-$(GLIB_VER).gcc gimpres.o -lgdi32 -luser32
$(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) -v $(CFLAGS) -Wl,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L. -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc -lgmodule-$(GLIB_VER).gcc gimpres.o -lgdi32 -luser32
$(CC) -v $(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)
......
......@@ -470,23 +470,11 @@ valid_module_name (const char *filename)
if (strcmp (basename + len - 3, ".so"))
return FALSE;
#elif defined (__GNUC__)
/* When compiled with gcc on Win32, require modules to be compiled with
* gcc, too. Use the convention that gcc-compiled GIMP modules are named
* *.gcc.dll. Subject to change.
*/
if (len < 1 + 8)
return FALSE;
if (g_strcasecmp (basename + len - 8, ".gcc.dll"))
return FALSE;
#else
/* When compiled with MSVC, the modules should be called *.msvc.dll.
*/
if (len < 1 + 9)
if (len < 1 + 4)
return FALSE;
if (g_strcasecmp (basename + len - 9, ".msvc.dll"))
if (g_strcasecmp (basename + len - 4, ".dll"))
return FALSE;
#endif
......@@ -796,14 +784,8 @@ browser_info_update (module_info *mod, browser_st *st)
if (mod->state == ST_MODULE_ERROR && mod->last_module_error)
{
gulong len = strlen (statename[mod->state]) + 2 +
strlen (mod->last_module_error) + 2;
status = g_malloc (len);
g_snprintf (status, len,
"%s (%s)", statename[mod->state], mod->last_module_error);
}
status = g_strdup_printf ("%s (%s)", statename[mod->state],
mod->last_module_error);
else
{
status = g_strdup (statename[mod->state]);
......
......@@ -3,7 +3,7 @@
mkdir %2
copy %1\gimprc_user %2\gimprc
copy %1\unitrc %2\unitrc
copy %1\gtkrc %2\gtkrc
copy %1\gtkrc_user %2\gtkrc
mkdir %2\brushes
mkdir %2\gradients
mkdir %2\palettes
......
......@@ -19,8 +19,7 @@ EXTRA_DIST = \
makefile.msc \
makefile.cygwin \
gimp.def \
gimpui.def \
gimpfeatures.h.win32
gimpui.def
lib_LTLIBRARIES = libgimp.la libgimpui.la
noinst_LIBRARIES = libgimpi.a
......
......@@ -183,15 +183,12 @@ struct _GParam
* application.
*/
# ifdef __GNUC__
/* With gcc these must be handled differently */
# define __argc _argc
# define __argv _argv
# define _stdcall __attribute__((stdcall))
# endif
# define MAIN() \
static int \
win32_gimp_main (int argc, char *argv[]) \
win32_gimp_main (int argc, char **argv) \
{ \
extern void set_gimp_PLUG_IN_INFO_PTR(GPlugInInfo *); \
set_gimp_PLUG_IN_INFO_PTR(&PLUG_IN_INFO); \
......@@ -202,7 +199,7 @@ struct _GParam
WinMain (void *hInstance, \
void *hPrevInstance, \
char *lpszCmdLine, \
int nCmdShow) \
int nCmdShow) \
{ \
return win32_gimp_main (__argc, __argv); \
} \
......
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_FEATURES_H__
#define __GIMP_FEATURES_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GIMP_MAJOR_VERSION (1)
#define GIMP_MINOR_VERSION (1)
#define GIMP_MICRO_VERSION (6)
#define GIMP_VERSION "1.1.6"
#define GIMP_CHECK_VERSION(major, minor, micro) \
(GIMP_MAJOR_VERSION > (major) || \
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
GIMP_MICRO_VERSION >= (micro)))
#define GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE 1-1-0
#define GIMP_HAVE_PARASITES 1-1-0
#define GIMP_HAVE_RESOLUTION_INFO 1-1-0
#define GIMP_HAVE_DESTROY_PARAMDEFS 1-1-0
#define GIMP_HAVE_FEATURES_1_1_5 1-1-5
#define GIMP_HAVE_DEFAULT_DISPLAY 1-1-5
#define GIMP_HAVE_PIXEL_RGNS_REGISTER2 1-1-5
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_FEATURES_H__ */
......@@ -16,7 +16,7 @@ OPTIMIZE = -g -O
# Nothing much configurable below
CC = gcc -mno-cygwin -mpentium
CC = gcc -mno-cygwin -mpentium -fnative-struct
CP = cp
LD = ld
......@@ -37,20 +37,16 @@ CFLAGS = $(OPTIMIZE) -I.. -I$(GLIB) -I$(GTK)/gdk/win32 -I$(GTK) -I$(GETTEXT)/int
all : \
../config.h \
gimpfeatures.h \
libgimpi.a \
gimp-$(GIMP_VER).gcc.dll \
gimpui-$(GIMP_VER).gcc.dll
gimp-$(GIMP_VER).dll \
gimpui-$(GIMP_VER).dll
../config.h : ../config.h.win32
cp ../config.h.win32 ../config.h
gimpfeatures.h : gimpfeatures.h.win32
cp gimpfeatures.h.win32 gimpfeatures.h
install : all
$(INSTALL) gimp-$(GIMP_VER).gcc.dll $(BIN)
$(INSTALL) gimpui-$(GIMP_VER).gcc.dll $(BIN)
$(INSTALL) gimp-$(GIMP_VER).dll $(BIN)
$(INSTALL) gimpui-$(GIMP_VER).dll $(BIN)
gimpi_OBJECTS = \
gimpenv.o \
......@@ -88,8 +84,8 @@ gimp_OBJECTS = \
gserialize.o \
parasite.o
gimp-$(GIMP_VER).gcc.dll : $(gimp_OBJECTS) gimp.def
$(GLIB)/build-dll gimp $(GIMP_VER).gcc gimp.def -s $(gimp_OBJECTS) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc -luser32
gimp-$(GIMP_VER).dll : $(gimp_OBJECTS) gimp.def
$(GLIB)/build-dll gimp $(GIMP_VER) gimp.def -s $(gimp_OBJECTS) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -luser32
# Pass -DLIBGIMP_COMPILATION when compiling gimp_OBJECTS
......@@ -137,11 +133,11 @@ gimpui_OBJECTS = \
gimpgradientmenu.o\
gimppatternmenu.o
gimpui-$(GIMP_VER).gcc.dll : $(gimpui_OBJECTS) gimpui.def
$(GLIB)/build-dll gimpui $(GIMP_VER).gcc gimpui.def -s $(gimpui_OBJECTS) -L . -lgimp-$(GIMP_VER).gcc -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc
gimpui-$(GIMP_VER).dll : $(gimpui_OBJECTS) gimpui.def
$(GLIB)/build-dll gimpui $(GIMP_VER) gimpui.def -s $(gimpui_OBJECTS) -L . -lgimp-$(GIMP_VER) -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER)
# General rule for compiling, used by the objects that don't go into
# gimp-$(GIMP_VER).gcc.dll.
# gimp-$(GIMP_VER).dll.
.c.o:
$(CC) $(CFLAGS) -c $<
clean:
......
......@@ -43,7 +43,6 @@ CFLAGS = -I.. -I$(GLIB) -I$(GTK)\gdk\win32 -I$(GTK) -I$(GETTEXT)\intl -DGIMPDIR=
all : \
..\config.h \
gimpfeatures.h \
gimpi.lib \
gimp-$(GIMP_VER).dll \
gimpui-$(GIMP_VER).dll
......@@ -51,9 +50,6 @@ all : \
..\config.h : ..\config.h.win32
copy ..\config.h.win32 ..\config.h
gimpfeatures.h : gimpfeatures.h.win32
copy gimpfeatures.h.win32 gimpfeatures.h
install : all
$(INSTALL) gimp-$(GIMP_VER).dll $(BIN)
$(INSTALL) gimpui-$(GIMP_VER).dll $(BIN)
......
......@@ -5,11 +5,13 @@
GIMP = /gimp
BIN = $(GIMP)/modules
OPTIMIZE = -O
################################################################
# Nothing much configurable below
CC = gcc -mno-cygwin -mpentium
CC = gcc -mno-cygwin -mpentium -fnative-struct
INSTALL = install
......@@ -21,14 +23,13 @@ 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)
CFLAGS = $(OPTIMIZE) -DHAVE_CONFIG_H -DMODULE_COMPILATION -I. -I.. -I$(GLIB) -I$(GMODULE) -I$(GTK)/gdk/win32 -I$(GTK)
LDFLAGS = -s
MODULES = \
colorsel_gtk-$(GIMP_VER).gcc.dll \
colorsel_triangle-$(GIMP_VER).gcc.dll \
colorsel_water-$(GIMP_VER).gcc.dll
colorsel_gtk-$(GIMP_VER).dll \
colorsel_triangle-$(GIMP_VER).dll \
colorsel_water-$(GIMP_VER).dll
all : \
$(MODULES)
......@@ -39,19 +40,14 @@ install : all
../config.h : ../config.h.win32
cp ../config.h.win32 $@
colorsel_gtk-$(GIMP_VER).gcc.dll : colorsel_gtk.o module.def
$(GLIB)/build-dll colorsel_gtk $(GIMP_VER).gcc module.def colorsel_gtk.o $(LDFLAGS) -L ../app -lgimp -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GLIB) -lgmodule-$(GLIB_VER).gcc -lglib-$(GLIB_VER).gcc
colorsel_triangle-$(GIMP_VER).gcc.dll : colorsel_triangle.o module.def
$(GLIB)/build-dll colorsel_triangle $(GIMP_VER).gcc module.def colorsel_triangle.o $(LDFLAGS) -L ../app -lgimp -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GLIB) -lgmodule-$(GLIB_VER).gcc -lglib-$(GLIB_VER).gcc
colorsel_water-$(GIMP_VER).gcc.dll : colorsel_water.o module.def
$(GLIB)/build-dll colorsel_water $(GIMP_VER).gcc module.def colorsel_water.o $(LDFLAGS) -L ../app -lgimp -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GLIB) -lgmodule-$(GLIB_VER).gcc -lglib-$(GLIB_VER).gcc
colorsel_gtk-$(GIMP_VER).dll : colorsel_gtk.o module.def
$(GLIB)/build-dll colorsel_gtk $(GIMP_VER) 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-$(GIMP_VER).dll : colorsel_triangle.o module.def
$(GLIB)/build-dll colorsel_triangle $(GIMP_VER) 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 $<
colorsel_water-$(GIMP_VER).dll : colorsel_water.o module.def
$(GLIB)/build-dll colorsel_water $(GIMP_VER) module.def colorsel_water.o $(LDFLAGS) -L ../app -lgimp -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(GLIB) -lgmodule-$(GLIB_VER) -lglib-$(GLIB_VER)
clean:
-rm *.dll *.a *.o *.exp *.base
......@@ -101,7 +101,9 @@
#include <string.h>
#include <ctype.h>
#include "libgimp/gimp.h"
#define WinMain WinMain_foo /* Kludge */
#include "gdk/gdkx.h"
#undef WinMain
#include "gtk/gtk.h"
......
......@@ -62,7 +62,9 @@
#ifdef NATIVE_WIN32
#define STRICT
#define WinMain WinMain_foo
#include <windows.h>
#undef WinMain
#endif
#include <stdlib.h>
......
......@@ -62,7 +62,9 @@
#ifdef NATIVE_WIN32
#define STRICT
#define WinMain WinMain_foo
#include <windows.h>
#undef WinMain
#endif
#include <stdlib.h>
......
......@@ -22,21 +22,21 @@ FROMPLUGINSDIR=YES # Used to bypass other parts below
# the one used with Microsoft's nmake, which has silly limits.
# The COMMON* ones are in the common subdirectory
COMMON1 = CEL CML_explorer align_layers animationplay animoptimize apply_lens autocrop autostretch_hsv blinds blur borderaverage bumpmap c_astretch checkerboard colorify compose convmatrix csource cubism
COMMON1 = CEL CML_explorer align_layers animationplay animoptimize apply_lens autocrop autostretch_hsv blinds blur bumpmap c_astretch checkerboard colorify compose convmatrix csource cubism
COMMON2 = decompose deinterlace depthmerge despeckle destripe diffraction displace edge emboss engrave exchange film flarefx fractaltrace
COMMON3 = gauss_iir gauss_rle gbr gee gicon gif gifload glasstile gqbist gradmap grid gtm guillotine header hot hrz gz illusion iwarp jigsaw jpeg laplace lic
COMMON3 = gauss_iir gauss_rle gbr gee gicon gif gifload glasstile gqbist gradmap grid gtm guillotine gz header hot hrz illusion iwarp jigsaw jpeg laplace lic
COMMON4 = mapcolor max_rgb mblur newsprint nlfilt noisify normalize nova oilify palette papertile pat pcx pix pixelize plasma plugindetails png pnm polar ps psd randomize ripple rotate rotators
COMMON5 = scatter_hsv semiflatten sharpen shift smooth_palette snoise sobel sparkle spread sunras tga threshold_alpha tiff tile tileit tiler video vinvert vpropagate waves whirlpinch wind wmf xbm xwd zealouscrop
# These have own subdirectories each
SEPARATE = AlienMap FractalExplorer Lighting MapObject bmp dbbrowser faxg3 fits flame fp gfig gfli ifscompose maze mosaic pagecurl print rcm sel2path sgi sinus struc unsharp
SEPARATE = AlienMap FractalExplorer Lighting MapObject bmp borderaverage dbbrowser faxg3 fits flame fp gfig gfli ifscompose maze mosaic pagecurl print rcm sel2path sgi sinus struc unsharp
# These are unofficial, ie not in the CVS. To build these, you should
# get tml's source snapshot and copy this makefile to the
# ../unofficial-plug-ins directory, go there, and do "make -f
# makefile.cygwin unofficial".
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze curve_bend fuse gimp_ace gimpressionist guash user_filter twain
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze curve_bend fuse gimp_ace gimpressionist guash user_filter twain winsnap
# The main target
......@@ -360,6 +360,10 @@ OBJECTS = \
EXTRALIBS = -luser32
endif
ifdef EXTRA_winsnap
HAVE_RESOURCE = YES
endif
GIMP_VER = 1.1
GTK_VER = 1.3
GLIB_VER = 1.3
......@@ -372,7 +376,7 @@ PLUGINDIR = $(TOP)/plug-ins
OPTIMIZE = -O
CC = gcc $(OPTIMIZE) -mno-cygwin -mpentium
CC = gcc $(OPTIMIZE) -mno-cygwin -mpentium -fnative-struct
CFLAGS = -DHAVE_CONFIG_H $(EXTRACFLAGS) -I. -I$(TOP) -I$(PLUGINDIR) -I$(PLUGINDIR)/libgck -I$(GLIB) -I$(GTK)/gdk/win32 -I$(GTK) -I$(GETTEXT)/intl
......@@ -399,10 +403,13 @@ RESOURCE = ../../app/gimpres.o
endif
$(PLUGIN).exe : $(OBJECTS) $(RESOURCE)
$(CC) $(CFLAGS) -mwindows -s -o $(PLUGIN).exe $(OBJECTS) $(RESOURCE) -L $(PLUGINDIR)/megawidget -lmegawidget -L $(PLUGINDIR)/gpc -lgpc -L $(PLUGINDIR)/libgck/gck -lgck -L ../../libgimp -lgimp-$(GIMP_VER).gcc -lgimpui-$(GIMP_VER).gcc -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc $(EXTRALIBS) $(LDFLAGS)
$(CC) $(CFLAGS) -mwindows -s -o $(PLUGIN).exe $(OBJECTS) $(RESOURCE) -L $(PLUGINDIR)/megawidget -lmegawidget -L $(PLUGINDIR)/gpc -lgpc -L $(PLUGINDIR)/libgck/gck -lgck -L ../../libgimp -lgimp-$(GIMP_VER) -lgimpui-$(GIMP_VER) -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) $(EXTRALIBS) $(LDFLAGS)
# Kludge to get the path to the win32 headers
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!')
$(PLUGIN)res.o : $(PLUGIN).rc
windres $(PLUGIN).rc $(PLUGIN)res.o
windres --include-dir $(WIN32APIHEADERS) $(PLUGIN).rc $(PLUGIN)res.o
endif
......
......@@ -21,21 +21,21 @@ FROMPLUGINSDIR=YES # Used to bypass other parts below
# List plug-ins. We must use several lists to work around nmake's limits
# The COMMON* ones are in the common subdirectory
COMMON1 = CEL CML_explorer align_layers animationplay animoptimize apply_lens autocrop autostretch_hsv blinds blur borderaverage bumpmap c_astretch checkerboard colorify compose convmatrix csource cubism
COMMON1 = CEL CML_explorer align_layers animationplay animoptimize apply_lens autocrop autostretch_hsv blinds blur bumpmap c_astretch checkerboard colorify compose convmatrix csource cubism
COMMON2 = decompose deinterlace depthmerge despeckle destripe diffraction displace edge emboss engrave exchange film flarefx fractaltrace
COMMON3 = gauss_iir gauss_rle gbr gee gicon gif gifload glasstile gqbist gradmap grid gtm guillotine header hot hrz gz illusion iwarp jigsaw jpeg laplace lic
COMMON3 = gauss_iir gauss_rle gbr gee gicon gif gifload glasstile gqbist gradmap grid gtm guillotine gz header hot hrz illusion iwarp jigsaw jpeg laplace lic
COMMON4 = mapcolor max_rgb mblur newsprint nlfilt noisify normalize nova oilify palette papertile pat pcx pix pixelize plasma plugindetails png pnm polar ps psd randomize ripple rotate rotators
COMMON5 = scatter_hsv semiflatten sharpen shift smooth_palette snoise sobel sparkle spread sunras tga threshold_alpha tiff tile tileit tiler video vinvert vpropagate waves whirlpinch wind wmf xbm xwd zealouscrop
# These have own subdirectories each
SEPARATE = AlienMap FractalExplorer Lighting MapObject bmp dbbrowser faxg3 fits flame fp gfig gfli ifscompose maze mosaic pagecurl print rcm sel2path sgi sinus struc unsharp
SEPARATE = AlienMap FractalExplorer Lighting MapObject bmp borderaverage dbbrowser faxg3 fits flame fp gfig gfli ifscompose maze mosaic pagecurl print rcm sel2path sgi sinus struc unsharp
# These are unofficial, ie not in the CVS. To build these, you should
# get tml's source snapshot and copy this makefile to the
# ..\unofficial-plug-ins directory, go there, and do "nmake -f
# makefile.msc unofficial".
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze curve_bend fuse gimp_ace gimpressionist guash user_filter twain
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze curve_bend fuse gimp_ace gimpressionist guash user_filter twain winsnap
# The main target
......@@ -382,6 +382,11 @@ OBJECTS = \
EXTRALIBS = user32.lib
!ENDIF
!IFDEF EXTRA_winsnap
HAVE_RESOURCE = YES
EXTRALIBS = user32.lib gdi32.lib
!endif
GIMP_VER = 1.1
GTK_VER = 1.3
GLIB_VER = 1.3
......
......@@ -3,7 +3,7 @@
################################################################
CC = gcc -mno-cygwin -mpentium
CC = gcc -mno-cygwin -mpentium -fnative-struct
LEX = flex
YACC = bison -y
......@@ -44,7 +44,7 @@ gcg_OBJECTS = \
marshall.o \
gcg.exe : $(gcg_OBJECTS)
$(CC) $(CFLAGS) -o gcg.exe $(gcg_OBJECTS) -L $(GLIB) -lglib-$(GLIB_VER).gcc $(LDFLAGS)
$(CC) $(CFLAGS) -o gcg.exe $(gcg_OBJECTS) -L $(GLIB) -lglib-$(GLIB_VER) $(LDFLAGS)
clean:
-rm parser.[ch] lexer.c *.exe *.o
......@@ -3,7 +3,7 @@
mkdir %2
copy %1\gimprc_user %2\gimprc
copy %1\unitrc %2\unitrc
copy %1\gtkrc %2\gtkrc
copy %1\gtkrc_user %2\gtkrc
mkdir %2\brushes
mkdir %2\gradients
mkdir %2\palettes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment