gtk interface for win32

Gildas Bazin gbazin at netcourrier.com
Thu May 31 22:27:19 CEST 2001


Hi,

I've finally been able to test the plugin patch on Windows and it seems to
be working ;-) You just have to be carefull that the plugins names are in
lower case! This is because the plugin code checks for a ".so" extension,
so maybe we'll have to add the ".SO" check ???

The GTK interface is also working (compiled with the package from
http://www.libsdl.org/Xmingw32/). All I had to do to make it work was to
use mingw32's -fnative-struct flag for the compilation of this plugin.

I guess the win32 port is now almost on a par with the other ports :-)
(time to think about a win32 section on the Videolan web site ;-)

In the small following patch I attempted to change the configure.in file to
be able to specify the path of the gtk-config script with a "--with-gtk="
option. But for some reason my patch doesn't enable gtk by default and I
don't have time to find out why (have to go), can someone fix this please
(sorry about this).

See you,



-- Attached file included as plaintext by Listar --

Index: Makefile.modules
===================================================================
RCS file: /var/cvs/videolan/vlc/Makefile.modules,v
retrieving revision 1.2
diff -u -r1.2 Makefile.modules
--- Makefile.modules	2001/05/30 17:03:11	1.2
+++ Makefile.modules	2001/05/31 20:07:49
@@ -13,7 +13,11 @@
 #
 # C compiler flags: plugin compilation
 #
+ifneq (,$(findstring mingw,$(SYS)))
+PCFLAGS += -fnative-struct -fPIC
+else
 PCFLAGS += -fPIC
+endif
 
 #
 # C compiler flags: plugin linking
Index: configure.in
===================================================================
RCS file: /var/cvs/videolan/vlc/configure.in,v
retrieving revision 1.101
diff -u -r1.101 configure.in
--- configure.in	2001/05/30 17:03:11	1.101
+++ configure.in	2001/05/31 20:07:50
@@ -459,17 +459,24 @@
 dnl
 dnl  Gtk+ module
 dnl
-AC_ARG_ENABLE(gtk,
-  [  --disable-gtk           Gtk+ support (default enabled)])
-if test x$enable_gtk != xno; then
-  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
-  if test x${GTK_CONFIG} != xno; then
-    PLUGINS="${PLUGINS} gtk"
-    ALIASES="${ALIASES} gvlc"
-    CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
-    LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
-  fi
-fi
+AC_ARG_WITH(gtk,
+  [  --with-gtk[=name]       Gtk+ support (default enabled)],
+  [ if test "x$withval" != "xno";
+    then
+      if test "x$withval" = "xyes" -o "x$withval" = "x";
+      then
+        AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
+      else
+        GTK_CONFIG="${withval}/bin/gtk-config"
+      fi
+      if test x${GTK_CONFIG} != xno;
+      then
+        PLUGINS="${PLUGINS} gtk"
+        ALIASES="${ALIASES} gvlc"
+        CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
+        LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+      fi
+    fi])
 
 dnl
 dnl  X11 module
Index: plugins/gtk/gtk_menu.c
===================================================================
RCS file: /var/cvs/videolan/vlc/plugins/gtk/gtk_menu.c,v
retrieving revision 1.8
diff -u -r1.8 gtk_menu.c
--- plugins/gtk/gtk_menu.c	2001/05/31 16:10:05	1.8
+++ plugins/gtk/gtk_menu.c	2001/05/31 20:07:51
@@ -59,6 +59,12 @@
 
 #include "modules_export.h"
 
+#ifdef WIN32
+#ifndef snprintf
+#define snprintf _snprintf
+#endif
+#endif
+
 /*
  * Local Prototypes
  */





More information about the vlc-devel mailing list