/pidgin/main: b6c9e5dd95d1: VV: win32 support. No runtimes depen...
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Sun Jun 2 16:17:22 EDT 2013
Changeset: b6c9e5dd95d1f22e756e180039299e6b3408c923
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-06-02 22:17 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/b6c9e5dd95d1
Description:
VV: win32 support. No runtimes dependencies in dep-bundle yet. Refs #11075
diffstat:
config.h.mingw | 7 +++-
libpurple/Makefile.mingw | 37 +++++++++++++++++++---
libpurple/media/backend-fs2.c | 11 ++++--
libpurple/mediamanager.c | 2 +-
libpurple/protocols/jabber/Makefile.mingw | 16 ++++++++-
libpurple/win32/global.mak | 22 +++++++++++++
pidgin/Makefile.mingw | 7 +++-
pidgin/gtkdialogs.c | 4 --
pidgin/gtkmedia.c | 8 ++++-
pidgin/gtkprefs.c | 46 ++++++++++++++++++---------
pidgin/gtksound.c | 50 +++++++++++++++++++++++-------
11 files changed, 162 insertions(+), 48 deletions(-)
diffs (truncated from 599 to 300 lines):
diff --git a/config.h.mingw b/config.h.mingw
--- a/config.h.mingw
+++ b/config.h.mingw
@@ -362,7 +362,12 @@
/* #undef TM_IN_SYS_TIME */
/* Use GStreamer for playing sounds */
-/* #define USE_GSTREAMER 1 */
+/* It's defined in global.mak. */
+/* #undef USE_GSTREAMER */
+
+/* Use voice and video */
+/* It's defined in global.mak. */
+/* #undef USE_VV */
/* Define if we're using GtkSpell */
#define USE_GTKSPELL 1
diff --git a/libpurple/Makefile.mingw b/libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw
+++ b/libpurple/Makefile.mingw
@@ -33,15 +33,27 @@ INCLUDE_PATHS += \
-I$(GTK_TOP)/include/glib-2.0 \
-I$(GTK_TOP)/lib/glib-2.0/include \
-I$(JSON_GLIB_TOP)/include/json-glib-1.0 \
- -I$(LIBXML2_TOP)/include/libxml2
+ -I$(LIBXML2_TOP)/include/libxml2 \
+ $(VV_INCLUDE_PATHS)
LIB_PATHS += -L$(GTK_TOP)/lib \
-L$(JSON_GLIB_TOP)/lib \
- -L$(LIBXML2_TOP)/lib
+ -L$(LIBXML2_TOP)/lib \
+ $(VV_LIB_PATHS)
##
## SOURCES, OBJECTS
##
+ifeq "$(USE_VV)" "1"
+VV_SRC = \
+ media/backend-fs2.c \
+ media/backend-iface.c \
+ media/codec.c \
+ marshallers.c
+else
+VV_SRC =
+endif
+
C_SRC = \
account.c \
accountopt.c \
@@ -109,7 +121,8 @@ C_SRC = \
xmlnode.c \
win32/giowin32.c \
win32/libc_interface.c \
- win32/win32dep.c
+ win32/win32dep.c \
+ $(VV_SRC)
RC_SRC = win32/libpurplerc.rc
@@ -127,7 +140,8 @@ LIBS = \
-lintl \
-lws2_32 \
-lxml2 \
- -ljson-glib-1.0
+ -ljson-glib-1.0 \
+ $(VV_LIBS)
include $(PIDGIN_COMMON_RULES)
@@ -159,6 +173,19 @@ install: install_shallow all
$(OBJECTS): $(PURPLE_CONFIG_H) $(PURPLE_VERSION_H) $(PURPLE_PURPLE_H)
+marshallers.h: marshallers.list
+ @echo -e " GEN\t$@"
+ @$(GLIB_GENMARSHAL) --prefix=purple_smarshal $< --header > marshallers.h
+
+marshallers.c: marshallers.list marshallers.h
+ @echo -e " GEN\t$@"
+ @echo "#include \"marshallers.h\"" > marshallers.c
+ @$(GLIB_GENMARSHAL) --prefix=purple_smarshal $< --body >> marshallers.c
+
+ifeq "$(USE_VV)" "1"
+mediamanager.c media/backend-iface.c: marshallers.h
+endif
+
$(TARGET).dll $(TARGET).dll.a: $(OBJECTS)
$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--output-def,$(TARGET).def,--out-implib,$(TARGET).dll.a -o $(TARGET).dll
@@ -166,7 +193,7 @@ install: install_shallow all
## CLEAN RULES
##
clean:
- rm -f $(OBJECTS) $(RC_SRC) $(PURPLE_VERSION_H) $(PURPLE_PURPLE_H)
+ rm -f $(OBJECTS) $(RC_SRC) $(PURPLE_VERSION_H) $(PURPLE_PURPLE_H) marshallers.h marshallers.c
rm -f $(TARGET).dll $(TARGET).dll.a $(TARGET).def
$(MAKE_at) $(MAKE) -C $(PURPLE_PROTOS_TOP) -f $(MINGW_MAKEFILE) clean
$(MAKE_at) $(MAKE) -C $(PURPLE_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
diff --git a/libpurple/media/backend-fs2.c b/libpurple/media/backend-fs2.c
--- a/libpurple/media/backend-fs2.c
+++ b/libpurple/media/backend-fs2.c
@@ -1661,11 +1661,14 @@ create_src(PurpleMediaBackendFs2 *self,
gst_object_unref(session->src);
gst_object_unref(sinkpad);
- gst_element_set_state(session->src, GST_STATE_PLAYING);
-
purple_media_manager_create_output_window(purple_media_get_manager(
priv->media), priv->media, sess_id, NULL);
+ purple_debug_info("backend-fs2", "create_src: setting source "
+ "state to GST_STATE_PLAYING - it may hang here on win32\n");
+ gst_element_set_state(session->src, GST_STATE_PLAYING);
+ purple_debug_info("backend-fs2", "create_src: state set\n");
+
return TRUE;
}
@@ -2096,8 +2099,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
if (!fs_stream_set_transmitter(fsstream, transmitter,
_params, _num_params, &err)) {
purple_debug_error("backend-fs2",
- "Could not set transmitter %s: %s.\n",
- transmitter, err->message);
+ "Could not set transmitter %s: %s.\n",
+ transmitter, err ? err->message : NULL);
g_clear_error(&err);
g_free(_params);
return FALSE;
diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c
--- a/libpurple/mediamanager.c
+++ b/libpurple/mediamanager.c
@@ -830,7 +830,7 @@ purple_media_manager_create_output_windo
if (g_object_class_find_property(klass,
"sync"))
g_object_set(G_OBJECT(ow->sink),
- "sync", "FALSE", NULL);
+ "sync", FALSE, NULL);
if (g_object_class_find_property(klass,
"async"))
g_object_set(G_OBJECT(ow->sink),
diff --git a/libpurple/protocols/jabber/Makefile.mingw b/libpurple/protocols/jabber/Makefile.mingw
--- a/libpurple/protocols/jabber/Makefile.mingw
+++ b/libpurple/protocols/jabber/Makefile.mingw
@@ -34,16 +34,24 @@ INCLUDE_PATHS += -I. \
-I$(LIBXML2_TOP)/include/libxml2 \
-I$(PURPLE_TOP) \
-I$(PURPLE_TOP)/win32 \
- -I$(PIDGIN_TREE_TOP)
+ -I$(PIDGIN_TREE_TOP) \
+ $(VV_INCLUDE_PATHS)
LIB_PATHS += -L$(GTK_TOP)/lib \
-L$(LIBXML2_TOP)/lib \
-L$(PURPLE_TOP) \
- -L.
+ -L. \
+ $(VV_LIB_PATHS)
##
## SOURCES, OBJECTS
##
+ifeq "$(USE_VV)" "1"
+VV_SRC = google/google_p2p.c
+else
+VV_SRC =
+endif
+
C_SRC = \
adhoccommands.c \
auth.c \
@@ -88,7 +96,8 @@ C_SRC = \
usernick.c \
usertune.c \
xdata.c \
- win32/posix.uname.c
+ win32/posix.uname.c \
+ $(VV_SRC)
OBJECTS = $(C_SRC:%.c=%.o)
@@ -107,6 +116,7 @@ XMPP_OBJECTS = $(XMPP_C_SRC:%.c=%.o)
LIBS = \
-lglib-2.0 \
-lgobject-2.0 \
+ $(VV_LIBS) \
-lxml2 \
-lws2_32 \
-lintl \
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -121,11 +121,33 @@ STRIP ?= strip
INTLTOOL_MERGE ?= $(INTLTOOL_TOP)/bin/intltool-merge
MONO_SIGNCODE ?= signcode
GPG_SIGN ?= gpg
+GLIB_GENMARSHAL ?= $(GTK_BIN)/glib-genmarshal
PIDGIN_COMMON_RULES := $(PURPLE_TOP)/win32/rules.mak
PIDGIN_COMMON_TARGETS := $(PURPLE_TOP)/win32/targets.mak
MINGW_MAKEFILE := Makefile.mingw
MAKE_at := @
+USE_VV ?= 0
+
+ifeq "$(USE_VV)" "1"
+VV_LIBS := \
+ -lgstreamer-0.10 \
+ -lgstvideo-0.10 \
+ -lgstinterfaces-0.10 \
+ -lfarstream-0.1
+VV_INCLUDE_PATHS := \
+ -I$(GSTREAMER_TOP)/include/gstreamer-0.10 \
+ -I$(GSTREAMER_TOP)/include/farstream-0.1 \
+ -I$(LIBXML2_TOP)/include/libxml2
+VV_LIB_PATHS := \
+ -L$(GSTREAMER_TOP)/lib
+DEFINES += -DUSE_GSTREAMER -DUSE_VV
+else
+VV_LIBS :=
+VV_INCLUDE_PATHS :=
+VV_LIB_PATHS :=
+endif
+
INSTALL_PIXMAPS ?= 1
INSTALL_SSL_CERTIFICATES ?= 1
diff --git a/pidgin/Makefile.mingw b/pidgin/Makefile.mingw
--- a/pidgin/Makefile.mingw
+++ b/pidgin/Makefile.mingw
@@ -35,6 +35,7 @@ INCLUDE_PATHS += \
$(PURPLE_INCLUDE_PATHS) \
-I$(PIDGIN_TOP) \
-I$(PIDGIN_TOP)/win32 \
+ $(VV_INCLUDE_PATHS) \
-I$(GTK_TOP)/include/gtk-2.0 \
-I$(GTK_TOP)/include/pango-1.0 \
-I$(GTK_TOP)/include/atk-1.0 \
@@ -48,7 +49,8 @@ INCLUDE_PATHS += \
LIB_PATHS += -L$(GTK_TOP)/lib \
-L$(WEBKITGTK_TOP)/lib \
-L$(PURPLE_TOP) \
- -L$(PIDGIN_TOP)
+ -L$(PIDGIN_TOP) \
+ $(VV_LIB_PATHS)
##
## SOURCES, OBJECTS
@@ -134,6 +136,7 @@ PIDGIN_LIBS = \
-lgdk_pixbuf-2.0 \
-lgdi32 \
-lwinmm \
+ $(VV_LIBS) \
-lwebkitgtk-1.0
include $(PIDGIN_COMMON_RULES)
@@ -146,6 +149,8 @@ include $(PIDGIN_COMMON_RULES)
all: $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
$(MAKE_at) $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE)
+gtkdialogs.c: $(PIDGIN_REVISION_H)
+
win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
@echo -e " GEN\t$@"
@sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -44,11 +44,9 @@
#include "gtkwebview.h"
#include "pidginstock.h"
-#ifndef _WIN32
#ifdef USE_GSTREAMER
#include <gst/gst.h>
#endif
-#endif
#include "gtk3compat.h"
@@ -658,7 +656,6 @@ void pidgin_dialogs_buildinfo(void)
g_string_append(str, "<dt>GnuTLS:</dt><dd>Disabled</dd>");
#endif
-#ifndef _WIN32
#ifdef USE_GSTREAMER
tmp = gst_version_string();
g_string_append_printf(str, "<dt>GStreamer:</dt><dd>%s</dd>", tmp);
@@ -666,7 +663,6 @@ void pidgin_dialogs_buildinfo(void)
#else
g_string_append(str, "<dt>GStreamer:</dt><dd>Disabled</dd>");
#endif
-#endif
#ifndef _WIN32
#ifdef ENABLE_MONO
diff --git a/pidgin/gtkmedia.c b/pidgin/gtkmedia.c
--- a/pidgin/gtkmedia.c
+++ b/pidgin/gtkmedia.c
@@ -556,7 +556,7 @@ realize_cb_cb(PidginMediaRealizeData *da
More information about the Commits
mailing list