Permalink
Browse files

Make it build on windows

  • Loading branch information...
1 parent d4b9925 commit b359113b406e8b479cc4140e4aaefb7576db0113 @dieterv committed Aug 9, 2011
Showing with 37 additions and 28 deletions.
  1. +6 −5 gdk/Makefile.am
  2. +5 −1 gdk/win32/rc/Makefile.am
  3. +1 −1 gdk/win32/rc/gdk.rc.in
  4. +25 −21 gtk/Makefile.am
View
@@ -35,6 +35,7 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DGDK_COMPILATION \
-I$(top_srcdir) \
+ -I$(top_srcdir)/gdk \
-I$(top_builddir) \
-I$(top_builddir)/gdk \
$(GTK_DEBUG_FLAGS) \
@@ -188,14 +189,14 @@ introspection_files = \
gdkenumtypes.c \
gdkenumtypes.h
-Gdk-3.0.gir: libgdk-3.la Makefile
-Gdk_3_0_gir_SCANNERFLAGS = \
- --c-include="gdk/gdk.h"
+Gdk-3.0.gir: libgdk-3.la
+Gdk_3_0_gir_PACKAGES = gio-2.0 gdk-pixbuf-2.0 pango cairo
@jdahlin
jdahlin Aug 29, 2011 Contributor

you shouldn't need to specify both the includes and packages, if you add an include it'll fetch the packages from there. Is that not working?

+Gdk_3_0_gir_EXPORT_PACKAGES = gdk-3.0
Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
Gdk_3_0_gir_LIBS = libgdk-3.la
+Gdk_3_0_gir_CFLAGS = -I$(top_builddir)/gdk/.libs $(AM_CPPFLAGS)
@jdahlin
jdahlin Aug 29, 2011 Contributor

This is definitely the wrong place to add .libs expansions, needs to be done in g-i

@dieterv
dieterv Aug 29, 2011 Owner

Yeah. Most, if not all of these changes have been done in a hurry as GTK+ was the last module on the list and I wanted
to actually "see" something happen on windows (finally, after five months), like PyGObject's gtk-demo for example ;)

Gdk_3_0_gir_FILES = $(introspection_files)
-Gdk_3_0_gir_CFLAGS = $(AM_CPPFLAGS)
-Gdk_3_0_gir_EXPORT_PACKAGES = gdk-3.0
+Gdk_3_0_gir_SCANNERFLAGS = --c-include="gdk/gdk.h"
INTROSPECTION_GIRS += Gdk-3.0.gir
if USE_X11
@@ -9,7 +9,11 @@ if USE_WIN32
noinst_DATA = gdk-win32-res.o
endif
-gdk-win32-res.o : gdk.rc gtk.ico
+.PHONY: gtk.ico
+gtk.ico:
+ cp $(srcdir)/gtk.ico $(builddir)/gtk.ico
+
+gdk-win32-res.o : gtk.ico gdk.rc
$(WINDRES) gdk.rc $@
-include $(top_srcdir)/git.mk
@@ -1,6 +1,6 @@
#include <winver.h>
-GTK_ICON ICON "@srcdir@/gtk.ico"
+GTK_ICON ICON "gtk.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION @GTK_MAJOR_VERSION@,@GTK_MINOR_VERSION@,@GTK_MICRO_VERSION@,0
View
@@ -7,8 +7,9 @@ INTROSPECTION_SCANNER_ARGS = \
--warn-all
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(srcdir) \
- --includedir=. \
- --includedir=../gdk
+ --includedir=. \
+ --includedir=../gdk \
+ --includedir=../gdk/.libs
@jdahlin
jdahlin Aug 29, 2011 Contributor

Wrong place for .libs hacks, see below

if USE_QUARTZ
GTK_PRINT_PREVIEW_COMMAND="open -a /Applications/Preview.app %f"
@@ -1001,36 +1002,39 @@ LDADDS = \
if HAVE_INTROSPECTION
introspection_files = \
- $(filter-out %private.h gtktextdisplay.h gtktextlayout.h, $(gtkinclude_HEADERS)) \
- $(gtk_base_c_sources) \
- gtkprintoperation-unix.c \
- gtktypebuiltins.h \
- gtktypebuiltins.c
+ $(filter-out %private.h gtktextdisplay.h gtktextlayout.h, $(gtkinclude_HEADERS)) \
+ $(gtk_base_c_sources) \
+ gtkprintoperation-unix.c \
+ gtktypebuiltins.h \
+ gtktypebuiltins.c
if USE_X11
introspection_files += \
- gtksocket.c \
- gtkplug.c
+ gtksocket.c \
+ gtkplug.c
endif
-Gtk-3.0.gir: $(INTROSPECTION_SCANNER) libgtk-3.la $(top_builddir)/gdk/Gdk-3.0.gir Makefile
-Gtk_3_0_gir_SCANNERFLAGS = \
+Gtk-3.0.gir: libgtk-3.la
+Gtk_3_0_gir_EXPORT_PACKAGES = gtk+-3.0
+Gtk_3_0_gir_INCLUDES = Atk-1.0
+Gtk_3_0_gir_LIBS = libgtk-3.la
+Gtk_3_0_gir_CFLAGS = \
+ $(AM_CPPFLAGS) \
+ -UGDK_DISABLE_DEPRECATED \
+ -UGTK_DISABLE_DEPRECATED \
+ -DGTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
+Gtk_3_0_gir_FILES = $(introspection_files)
+Gtk_3_0_gir_SCANNERFLAGS = \
--add-include-path=$(top_builddir)/gdk \
--include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir
-Gtk_3_0_gir_INCLUDES = Atk-1.0
if USE_X11
-Gtk_3_0_gir_SCANNERFLAGS += --add-include-path=$(top_builddir)/gdk/x11
+Gtk_3_0_gir_SCANNERFLAGS += \
+ --add-include-path=$(top_builddir)/gdk/x11
Gtk_3_0_gir_INCLUDES += xlib-2.0
endif
Gtk_3_0_gir_SCANNERFLAGS += --c-include="gtk/gtkx.h"
-Gtk_3_0_gir_CFLAGS = \
- $(AM_CPPFLAGS) \
- -UGDK_DISABLE_DEPRECATED \
- -UGTK_DISABLE_DEPRECATED \
- -DGTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
-Gtk_3_0_gir_LIBS = libgtk-3.la
-Gtk_3_0_gir_FILES = $(introspection_files)
-Gtk_3_0_gir_EXPORT_PACKAGES = gtk+-3.0
+
+
INTROSPECTION_GIRS += Gtk-3.0.gir
girdir = $(datadir)/gir-1.0

0 comments on commit b359113

Please sign in to comment.