CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/07/31 19:29:43
Modified files: . : ChangeLog configure.ac gui : Makefile.am Player.cpp Player.h gnash.cpp Log message: * configure.ac: rename GUI_CONFIG to SUPPORTED_GUIS to avoid confusion with the define later set by gui/Makefile.am * gui/Makefile.am: build an executable for each supported GUI, named <gui>-gnash * gui/Player.{cpp,h}: drop runtime parsing of gui name, just use whatever gui is specified by the GUI_CONFIG macro set by the Makefile. * gui/gnash.cpp: drop runtime GUI selection (and -G switch). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3886&r2=1.3887 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.386&r2=1.387 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.95&r2=1.96 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.64&r2=1.65 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.h?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.88&r2=1.89 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3886 retrieving revision 1.3887 diff -u -b -r1.3886 -r1.3887 --- ChangeLog 31 Jul 2007 17:07:11 -0000 1.3886 +++ ChangeLog 31 Jul 2007 19:29:42 -0000 1.3887 @@ -1,5 +1,16 @@ 2007-07-31 Sandro Santilli <[EMAIL PROTECTED]> + * configure.ac: rename GUI_CONFIG to SUPPORTED_GUIS to + avoid confusion with the define later set by gui/Makefile.am + * gui/Makefile.am: build an executable for each supported + GUI, named <gui>-gnash + * gui/Player.{cpp,h}: drop runtime parsing of gui name, just + use whatever gui is specified by the GUI_CONFIG macro set + by the Makefile. + * gui/gnash.cpp: drop runtime GUI selection (and -G switch). + +2007-07-31 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/misc-ming.all/ming_utils.c: add word wrapping to the xtrace window. Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.386 retrieving revision 1.387 diff -u -b -r1.386 -r1.387 --- configure.ac 31 Jul 2007 16:43:31 -0000 1.386 +++ configure.ac 31 Jul 2007 19:29:42 -0000 1.387 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.386 2007/07/31 16:43:31 strk Exp $ +dnl $Id: configure.ac,v 1.387 2007/07/31 19:29:42 strk Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -246,51 +246,27 @@ [case "${val}" in gtk|GTK|gtk2|GTK2) build_gtk=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=gtk - fi ;; kde|KDE) build_kde=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=kde - fi ;; qt|QT) build_qt=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=kde - fi ;; sdl|SDL) build_sdl=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=sdl - fi ;; aqua|AQUA|Aqua) build_aqua=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=aqua - fi ;; riscos|RISCOS|RiscOS) build_riscos=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=riscos - fi ;; fltk|FLTK|fltk2|FLTK2) build_fltk=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=fltk - fi ;; fb|FB) build_fb=yes - if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=fb - fi ;; all|ALL) build_fb=yes @@ -1274,35 +1250,31 @@ AC_SUBST(RENDERER_LIBS) AC_SUBST(RENDERER_CONFIG) -GUI_CONFIG= +SUPPORTED_GUIS= if test x$build_fb = xyes; then - GUI_CONFIG="${GUI_CONFIG},fb" + SUPPORTED_GUIS="${SUPPORTED_GUIS},fb" fi if test x$build_fltk = xyes; then - GUI_CONFIG="${GUI_CONFIG},fltk" + SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk" fi if test x$build_kde = xyes; then - GUI_CONFIG="${GUI_CONFIG},kde" + SUPPORTED_GUIS="${SUPPORTED_GUIS},kde" fi if test x$build_gtk = xyes; then - GUI_CONFIG="${GUI_CONFIG},gtk" + SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk" fi if test x$build_sdl = xyes; then - GUI_CONFIG="${GUI_CONFIG},sdl" + SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl" fi if test x$build_riscos = xyes; then - GUI_CONFIG="${GUI_CONFIG},riscos" + SUPPORTED_GUIS="${SUPPORTED_GUIS},riscos" fi if test x$build_aqua = xyes; then - GUI_CONFIG="${GUI_CONFIG},aqua" + SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua" fi -GUI_CONFIG="`echo ${GUI_CONFIG} | sed 's/,//'`" # Strip leading comma -AC_SUBST(GUI_CONFIG) +SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma +AC_SUBST(SUPPORTED_GUIS) -if test "x$DEFAULT_GUI" = "x"; then - DEFAULT_GUI=gtk -fi -AC_SUBST(DEFAULT_GUI) MEDIA_CONFIG=${media_handler} AC_SUBST(MEDIA_CONFIG) @@ -1439,7 +1411,7 @@ if test x"$extensions_list" != x; then echo " Building extensions: ${extensions_list}" fi -echo " GUI toolkits supported: ${GUI_CONFIG} (default gui: ${DEFAULT_GUI})" +echo " GUI toolkits supported: ${SUPPORTED_GUIS}" echo " Renderers supported: ${add_renderer}" echo " Media handler: "$media_handler if test x"$media_handler" = xffmpeg -o x"$media_handler" = xmad; then Index: gui/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/gui/Makefile.am,v retrieving revision 1.95 retrieving revision 1.96 diff -u -b -r1.95 -r1.96 --- gui/Makefile.am 30 Jul 2007 14:27:08 -0000 1.95 +++ gui/Makefile.am 31 Jul 2007 19:29:42 -0000 1.96 @@ -15,7 +15,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.95 2007/07/30 14:27:08 nihilus Exp $ +# +# build gtk-gnash, kde-gnash, sdl-gnash, fltk-gnash, aqua-gnash, fb-gnash and riscos-gnash +# AUTOMAKE_OPTIONS = -Wno-portability @@ -24,9 +26,10 @@ # this is where Gnash plugins get installed pluginsdir = $(libdir)/gnash/plugins -lib_LTLIBRARIES = libgnashgui.la libgnashplayer.la +# noinst_LTLIBRARIES = libgnashgui.la BUILT_SOURCES = klash.moc .configline +noinst_LTLIBRARIES = AM_CPPFLAGS = -I.. \ -I$(top_srcdir) \ -I$(top_srcdir)/server \ @@ -77,68 +80,13 @@ $(PTHREAD_LIBS) \ $(NULL) -libgnashgui_la_SOURCES = \ - gui.cpp gui.h \ - NullGui.cpp \ - gui_gtk.cpp \ - gui_kde.cpp \ - gui_sdl.cpp \ - gui_fb.cpp \ - gui_fltk.cpp \ - gui_aqua.cpp \ - gui_riscos.cpp \ - NullGui.h - -libgnashgui_la_LIBADD = \ - $(top_builddir)/server/libgnashserver.la \ - $(top_builddir)/backend/libgnashbackend.la \ - $(top_builddir)/libamf/libgnashamf.la - -# is LDFLAGS still needed when AM_LDFLAGS is defined already ? -libgnashgui_la_LDFLAGS = \ - -release $(VERSION) \ - $(AM_LDFLAGS) - -libgnashgui_la_CPPFLAGS = $(AM_CPPFLAGS) $(GUI_CPPFLAGS) - - -libgnashplayer_la_SOURCES = \ - Player.cpp Player.h - -libgnashplayer_la_LIBADD = \ - $(top_builddir)/server/libgnashserver.la \ - $(top_builddir)/backend/libgnashbackend.la \ - libgnashgui.la - -libgnashplayer_la_CPPFLAGS = $(AM_CPPFLAGS) $(GUI_CPPFLAGS) -libgnashplayer_la_LDFLAGS = \ - -release $(VERSION) \ - -no-undefined \ - -export-dynamic \ - $(AM_LDFLAGS) - GNASH_LIBS = \ $(top_builddir)/libamf/libgnashamf.la \ $(top_builddir)/backend/libgnashbackend.la \ $(top_builddir)/server/libgnashserver.la \ $(top_builddir)/libgeometry/libgnashgeo.la \ - $(top_builddir)/libbase/libgnashbase.la - -KLASH_LIBS = \ - $(top_builddir)/libamf/libgnashamf.la \ - $(top_builddir)/backend/libgnashbackend.la \ - $(top_builddir)/server/libgnashserver.la \ - $(top_builddir)/libgeometry/libgnashgeo.la \ - $(top_builddir)/libbase/libgnashbase.la - -# -# Build the libraries that hold the combined GUI toolkit and -# renderer. These are built as static libraries if doing a static -# build for debugging. Otherwise they are built as a loadable shared -# library module so we can dlopen() them at runtime. -# - -plugins_LTLIBRARIES = # set later on by conditionals + $(top_builddir)/libbase/libgnashbase.la \ + $(MYSQL_LIBS) # Only build loadable modules unless statically linking if DYNAMIC_GUI # make shared libraries suitable for dlopen(). @@ -153,10 +101,8 @@ # AQUA Toolkit if BUILD_AQUA_GUI - #OS X stuff goes here... - - GUI_CPPFLAGS += -DGUI_AQUA +GUI_CPPFLAGS += -DGUI_AQUA bundle_name = gnash.app @@ -172,254 +118,18 @@ cp -f images/GnashG.icns $(bundle_name)/Contents/Resources/ if HAVE_OPENGL - plugins_LTLIBRARIES += libgnashaqua_ogl.la - libgnashaqua_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \ +noinst_LTLIBRARIES += libgnashaqua_ogl.la +libgnashaqua_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \ $(OPENGL_CFLAGS) - libgnashaqua_ogl_la_SOURCES = \ +libgnashaqua_ogl_la_SOURCES = \ aqua_ogl_glue.cpp aqua_ogl_glue.h \ aqua.cpp aquasup.h aqua_glue.h - libgnashaqua_ogl_la_LDFLAGS = $(LIB_FLAGS) - libgnashaqua_ogl_la_LIBADD = \ +libgnashaqua_ogl_la_LDFLAGS = $(LIB_FLAGS) +libgnashaqua_ogl_la_LIBADD = \ $(top_builddir)/backend/libgnashogl.la - libgnashgui_la_LIBADD += libgnashaqua_ogl.la endif # HAVE_OPENGL endif # BUILD_AQUA_GUI -# GTK2 Toolkit -if BUILD_GTK_GUI - GUI_CPPFLAGS += -DGUI_GTK $(GTK_CFLAGS) -if HAVE_OPENGL - plugins_LTLIBRARIES += libgnashgtk_ogl.la - libgnashgtk_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(GTK_CFLAGS) $(OPENGL_CFLAGS) - libgnashgtk_ogl_la_SOURCES = \ - gtk_glue_gtkglext.cpp gtk_glue_gtkglext.h \ - gtk.cpp gtksup.h gtk_glue.h - libgnashgtk_ogl_la_LDFLAGS = $(LIB_FLAGS) - libgnashgtk_ogl_la_LIBADD = \ - $(top_builddir)/backend/libgnashogl.la $(GTK_LIBS) - libgnashgui_la_LIBADD += libgnashgtk_ogl.la -endif # HAVE_OPENGL -if HAVE_AGG - plugins_LTLIBRARIES += libgnashgtk_agg.la - libgnashgtk_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(GTK_CFLAGS) $(AGG_CFLAGS) - libgnashgtk_agg_la_SOURCES = \ - gtk_glue_agg.cpp gtk_glue_agg.h \ - gtk.cpp gtksup.h gtk_glue.h - libgnashgtk_agg_la_LDFLAGS = $(LIB_FLAGS) - libgnashgtk_agg_la_LIBADD = \ - $(top_builddir)/backend/libgnashagg.la \ - $(GTK_LIBS) $(AGG_LIBS) - libgnashgui_la_LIBADD += libgnashgtk_agg.la -endif # HAVE_AGG -if HAVE_CAIRO - plugins_LTLIBRARIES += libgnashgtk_cairo.la - libgnashgtk_cairo_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(GTK_CFLAGS) $(CAIRO_CFLAGS) - libgnashgtk_cairo_la_SOURCES = \ - gtk_glue_cairo.cpp gtk_glue_cairo.h \ - gtk.cpp gtksup.h gtk_glue.h - libgnashgtk_cairo_la_LDFLAGS = $(LIB_FLAGS) - libgnashgtk_cairo_la_LIBADD = \ - $(top_builddir)/backend/libgnashcairo.la \ - $(GTK_LIBS) $(CAIRO_LIBS) - libgnashgui_la_LIBADD += libgnashgtk_cairo.la -endif # HAVE_CAIRO -endif # BUILD_GTK_GUI - -# KDE/QT Toolkit -if BUILD_KDE_GUI - GUI_CPPFLAGS += -DGUI_KDE $(KDE_CFLAGS) $(QT_CFLAGS) -if HAVE_OPENGL - plugins_LTLIBRARIES += libgnashkde_ogl.la - libgnashkde_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(OPENGL_FLAGS) $(KDE_CFLAGS) $(QT_CFLAGS) - libgnashkde_ogl_la_SOURCES = \ - kde_glue_opengl.cpp kde_glue_opengl.h kde_glue.h \ - kde.cpp kdesup.h kde_glue.h - libgnashkde_ogl_la_LDFLAGS = $(LIB_FLAGS) - libgnashkde_ogl_la_LIBADD = \ - $(top_builddir)/backend/libgnashogl.la \ - $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS) - libgnashgui_la_LIBADD += libgnashkde_ogl.la -endif # HAVE_OPENGL -if HAVE_AGG - plugins_LTLIBRARIES += libgnashkde_agg.la - libgnashkde_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(AGG_CFLAGS) $(KDE_CFLAGS) $(QT_CFLAGS) - libgnashkde_agg_la_SOURCES = \ - kde_glue_agg.cpp kde_glue_agg.h \ - kde.cpp kdesup.h kde_glue.h - libgnashkde_agg_la_LDFLAGS = $(LIB_FLAGS) - libgnashkde_agg_la_LIBADD = \ - $(top_builddir)/backend/libgnashagg.la \ - $(KDE_LIBS) $(QT_LIBS) $(AGG_LIBS) - libgnashgui_la_LIBADD += libgnashkde_agg.la -endif # HAVE_AGG -endif # BUILD_KDE_GUI - -# SDL Toolkit -if BUILD_SDL_GUI - GUI_CPPFLAGS += -DGUI_SDL $(SDL_CFLAGS) -if HAVE_OPENGL - plugins_LTLIBRARIES += libgnashsdl_ogl.la - libgnashsdl_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(SDL_CFLAGS) $(OPENGL_CFLAGS) - libgnashsdl_ogl_la_SOURCES = \ - sdl_ogl_glue.cpp sdl_ogl_glue.h \ - sdl.cpp sdlsup.h sdl_glue.h - libgnashsdl_ogl_la_LDFLAGS = $(LIB_FLAGS) - libgnashsdl_ogl_la_LIBADD = \ - $(top_builddir)/backend/libgnashogl.la \ - $(SDL_LIBS) $(OPENGL_LIBS) - libgnashgui_la_LIBADD += libgnashsdl_ogl.la -endif # HAVE_OPENGL -if HAVE_AGG - plugins_LTLIBRARIES += libgnashsdl_agg.la - libgnashsdl_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(SDL_CFLAGS) $(AGG_CFLAGS) - libgnashsdl_agg_la_SOURCES = \ - sdl_agg_glue.cpp sdl_agg_glue.h \ - sdl.cpp sdlsup.h sdl_glue.h - libgnashsdl_agg_la_LDFLAGS = $(LIB_FLAGS) - libgnashsdl_agg_la_LIBADD = \ - $(top_builddir)/backend/libgnashagg.la \ - $(SDL_LIBS) $(AGG_LIBS) - libgnashgui_la_LIBADD += libgnashsdl_agg.la -endif # HAVE_AGG -if HAVE_CAIRO - plugins_LTLIBRARIES += libgnashsdl_cairo.la - libgnashsdl_cairo_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(SDL_CFLAGS) $(CAIRO_CFLAGS) - libgnashsdl_cairo_la_SOURCES = \ - sdl_cairo_glue.cpp sdl_cairo_glue.h \ - sdl.cpp sdlsup.h sdl_glue.h - libgnashsdl_cairo_la_LDFLAGS = $(LIB_FLAGS) - libgnashsdl_cairo_la_LIBADD = \ - $(top_builddir)/backend/libgnashcairo.la \ - $(SDL_LIBS) $(CAIRO_LIBS) - libgnashgui_la_LIBADD += libgnashsdl_cairo.la -endif # HAVE_CAIRO -endif # BUILD_SDL_GUI - -# FLTK2 Toolkit -if BUILD_FLTK_GUI - - GUI_CPPFLAGS += -DGUI_FLTK $(FLTK2_CFLAGS) -if HAVE_AGG - plugins_LTLIBRARIES += libgnashfltk_agg.la - libgnashfltk_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(FLTK2_CFLAGS) $(AGG_CFLAGS) - libgnashfltk_agg_la_SOURCES = \ - fltk_glue_agg.cpp fltk_glue_agg.h \ - fltk.cpp fltksup.h - libgnashfltk_agg_la_LDFLAGS = $(LIB_FLAGS) - libgnashfltk_agg_la_LIBADD = \ - $(top_builddir)/backend/libgnashagg.la \ - $(FLTK2_LIBS) $(AGG_LIBS) $(XFT_LIBS) $(X11_LIBS) - libgnashgui_la_LIBADD += libgnashfltk_agg.la -endif # HAVE_AGG - -if HAVE_CAIRO - plugins_LTLIBRARIES += libgnashfltk_cairo.la - libgnashfltk_cairo_la_CPPFLAGS = $(AM_CPPFLAGS) \ - $(FLTK2_CFLAGS) $(CAIRO_CFLAGS) - libgnashfltk_cairo_la_SOURCES = \ - fltk_glue_cairo.cpp fltk_glue_cairo.h \ - fltk.cpp fltksup.h - libgnashfltk_cairo_la_LDFLAGS = $(LIB_FLAGS) - libgnashfltk_cairo_la_LIBADD = \ - $(top_builddir)/backend/libgnashcairo.la \ - $(FLTK2_LIBS) $(CAIRO_LIBS) $(XFT_LIBS) $(X11_LIBS) - libgnashgui_la_LIBADD += libgnashfltk_cairo.la -endif # HAVE_CAIRO - -endif # BUILD_FLTK_GUI - -# Framebuffer, no toolkit -if BUILD_FB_GUI - GUI_CPPFLAGS += -DGUI_FB -if HAVE_AGG - libgnashsdl_agg_la_CPPFLAGS = $(AM_CPPFLAGS) $(SDL_CFLAGS) - plugins_LTLIBRARIES += libgnashfb_agg.la - libgnashfb_agg_la_SOURCES = \ - fb.cpp fbsup.h - libgnashfb_agg_la_LDFLAGS = $(LIB_FLAGS) - libgnashfb_agg_la_LIBADD = \ - $(top_builddir)/backend/libgnashagg.la \ - $(SDL_LIBS) $(AGG_LIBS) - libgnashgui_la_LIBADD += libgnashfb_agg.la -endif # HAVE_AGG -endif # BUILD_FB_GUI - -# -# When static linking, we have to link in the correct library. These -# are built as static libraries by the above section, -# - -# -# Setup the GUIs that have OpenGL support -# -if STATIC_GUI -if BUILD_OGL_RENDERER -if BUILD_GTK_GUI - GNASH_LIBS += libgnashgtk_ogl.la $(GTK_LIBS) $(OPENGL_LIBS) -endif # BUILD_GTK_GUI -if BUILD_AQUA_GUI - GNASH_LIBS += libgnashaqua_ogl.la $(AQUA_LIBS) $(OPENGL_LIBS) -endif # BUILD_AQUA_GUI -if BUILD_SDL_GUI - GNASH_LIBS += libgnashsdl_ogl.la $(SDL_LIBS) $(OPENGL_LIBS) -endif # BUILD_SDL_GUI -if BUILD_KDE_GUI - GNASH_LIBS += libgnashkde_ogl.la $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS) - KLASH_LIBS += libgnashkde_ogl.la $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS) -endif # BUILD_KDE_GUI -endif # BUILD_OPENGL_RENDERER - -# -# Setup the GUIs that have Cairo support -# -if BUILD_CAIRO_RENDERER -if BUILD_GTK_GUI - GNASH_LIBS += libgnashgtk_cairo.la $(GTK_LIBS) $(CAIRO_LIBS) -endif # BUILD_GTK_GUI -if BUILD_SDL_GUI - GNASH_LIBS += libgnashsdl_cairo.la $(SDL_LIBS) $(CAIRO_LIBS) -endif # BUILD_SDL -if BUILD_FLTK_GUI - GNASH_LIBS += libgnashfltk_cairo.la $(FLTK2_LIBS) $(CAIRO_LIBS) $(XFT_LIBS) $(X11_LIBS) -endif # BUILD_FLTK_GUI -endif # BUILD_CAIRO_RENDERER - -# -# Setup the GUIs that have AntiGrain (AGG) support -# -if BUILD_AGG_RENDERER -if BUILD_GTK_GUI - GNASH_LIBS += libgnashgtk_agg.la $(AGG_LIBS) $(GTK_LIBS) -endif # BUILD_GTK_GUI -if BUILD_AQUA_GUI - GNASH_LIBS += libgnashaqua_agg.la $(AQUA_LIBS) $(AGG_LIBS) -endif # BUILD_AQUA_GUI -if BUILD_SDL_GUI - GNASH_LIBS += libgnashsdl_agg.la $(SDL_LIBS) $(AGG_LIBS) -endif # BUILD_SDL_GUI -if BUILD_FLTK_GUI - GNASH_LIBS += libgnashfltk_agg.la $(FLTK2_LIBS) $(AGG_LIBS) $(XFT_LIBS) $(X11_LIBS) -endif # BUILD_FLTK_GUI -if BUILD_KDE_GUI - GNASH_LIBS += libgnashkde_agg.la $(KDE_LIBS) $(QT_LIBS) $(AGG_LIBS) - KLASH_LIBS += libgnashkde_agg.la $(KDE_LIBS) $(QT_LIBS) $(AGG_LIBS) -endif # BUILD_KDE_GUI -if BUILD_RISCOS_GUI - GNASH_LIBS += libgnashriscos_agg.la $(RISCOS_LIBS) $(AGG_LIBS) - AM_LDFLAGS += -lOSLib32 -endif # BUILD_RISCOS_GUI -endif # BUILD_AGG_RENDERER -endif # STATIC_GUI - if USE_SOUND_SDL if USE_FFMPEG_ENGINE AM_LDFLAGS += $(FFMPEG_LIBS) @@ -443,10 +153,8 @@ # FLTK_SRCS = # endif - AM_CPPFLAGS += -DPKGDATADIR=\"$(pkgdatadir)\" AM_CPPFLAGS += -DRENDERER_CONFIG=\"$(RENDERER_CONFIG)\" -AM_CPPFLAGS += -DGUI_CONFIG=\"$(GUI_CONFIG)\" -DDEFAULT_GUI=\"$(DEFAULT_GUI)\" AM_CPPFLAGS += -DMEDIA_CONFIG=\"$(MEDIA_CONFIG)\" AM_CPPFLAGS += -DTARGET_CONFIG=\"$(target)\" AM_CPPFLAGS += -DCONFIG_CONFIG="\"$(shell cat .configline)\"" @@ -455,23 +163,208 @@ #dist_images_DATA = images/gnash_G_v3.ico imagesdir = $(pkgdatadir) -bin_PROGRAMS = gnash +bin_PROGRAMS = + +GUI_SRCS = gnash.cpp \ + gui.cpp gui.h \ + Player.cpp Player.h \ + NullGui.cpp NullGui.h + if BUILD_AQUA_GUI bin_PROGRAMS += bundle bundle_SOURCES = $(NULL) endif -gnash_SOURCES = gnash.cpp -# export our symbols so they can be used by Gnash plugins -gnash_LDFLAGS = $(LIBLTDL) -export-dynamic -gnash_DEPENDENCIES = libgnashgui.la .configline -gnash_LDADD = \ - libgnashgui.la \ - libgnashplayer.la \ +# +# Build the KDE gui +# +if BUILD_KDE_GUI +bin_PROGRAMS += kde-gnash +kde_gnash_CPPFLAGS = -DGUI_KDE -DGUI_CONFIG=\"KDE\" \ + $(AM_CPPFLAGS) $(KDE_CFLAGS) $(QT_CFLAGS) +kde_gnash_SOURCES = $(GUI_SRCS) gui_kde.cpp +kde_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic +kde_gnash_DEPENDENCIES = .configline +kde_gnash_LDADD = \ + $(MYSQL_LIBS) \ + $(GNASH_LIBS) \ + $(AM_LDFLAGS) +if BUILD_OGL_RENDERER +kde_gnash_CPPFLAGS += $(OPENGL_CFLAGS) +kde_gnash_LDADD += $(top_builddir)/backend/libgnashogl.la \ + $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS) +kde_gnash_SOURCES += kde_glue_opengl.cpp kde_glue_opengl.h kde_glue.h \ + kde.cpp kdesup.h kde_glue.h +endif +if BUILD_AGG_RENDERER +kde_gnash_CPPFLAGS += $(AGG_CFLAGS) +kde_gnash_LDADD += $(top_builddir)/backend/libgnashagg.la \ + $(KDE_LIBS) $(QT_LIBS) $(AGG_LIBS) +kde_gnash_SOURCES += kde_glue_agg.cpp kde_glue_agg.h \ + kde.cpp kdesup.h kde_glue.h +endif +endif + +# +# Build the SDL gui +# +if BUILD_SDL_GUI +bin_PROGRAMS += sdl-gnash +sdl_gnash_CPPFLAGS = -DGUI_SDL -DGUI_CONFIG=\"SDL\" \ + $(AM_CPPFLAGS) $(SDL_CFLAGS) +sdl_gnash_SOURCES = $(GUI_SRCS) gui_sdl.cpp +sdl_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic +sdl_gnash_DEPENDENCIES = .configline +sdl_gnash_LDADD = \ + $(MYSQL_LIBS) \ + $(GNASH_LIBS) \ + $(AM_LDFLAGS) +if BUILD_OGL_RENDERER +sdl_gnash_CPPFLAGS += $(OPENGL_CFLAGS) +sdl_gnash_LDADD += $(top_builddir)/backend/libgnashogl.la \ + $(SDL_LIBS) $(OPENGL_LIBS) +sdl_gnash_SOURCES += sdl_ogl_glue.cpp sdl_ogl_glue.h \ + sdl.cpp sdlsup.h sdl_glue.h +endif +if BUILD_AGG_RENDERER +sdl_gnash_CPPFLAGS += $(AGG_CFLAGS) +sdl_gnash_LDADD += $(top_builddir)/backend/libgnashagg.la \ + $(SDL_LIBS) $(AGG_LIBS) +sdl_gnash_SOURCES += sdl_agg_glue.cpp sdl_agg_glue.h \ + sdl.cpp sdlsup.h sdl_glue.h +endif +endif + +# +# Build the FLTK gui +# +if BUILD_FLTK_GUI +bin_PROGRAMS += fltk-gnash +fltk_gnash_CPPFLAGS = -DGUI_FLTK -DGUI_CONFIG=\"FLTK\" \ + $(AM_CPPFLAGS) $(FLTK2_CFLAGS) +fltk_gnash_SOURCES = $(GUI_SRCS) gui_fltk.cpp +fltk_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic +fltk_gnash_DEPENDENCIES = .configline +fltk_gnash_LDADD = \ + $(MYSQL_LIBS) \ + $(GNASH_LIBS) \ + $(AM_LDFLAGS) +# if BUILD_OGL_RENDERER +# fltk_gnash_CPPFLAGS += $(OPENGL_CFLAGS) +# fltk_gnash_LDADD += $(top_builddir)/backend/libgnashogl.la +# $(SDL_LIBS) $(OPENGL_LIBS) +# fltk_gnash_SOURCES += fltk_glue_ogl.cpp fltk_glue_ogl.h \ +# fltk.cpp fltksup.h +# endif +if BUILD_AGG_RENDERER +fltk_gnash_CPPFLAGS += $(AGG_CFLAGS) +fltk_gnash_LDADD += $(top_builddir)/backend/libgnashagg.la \ + $(FLTK2_LIBS) $(AGG_LIBS) $(XFT_LIBS) $(X11_LIBS) +fltk_gnash_SOURCES += fltk_glue_agg.cpp fltk_glue_agg.h \ + fltk.cpp fltksup.h +endif +endif + +# +# Build the AQUA gui +# +if BUILD_AQUA_GUI +bin_PROGRAMS += aqua-gnash +aqua_gnash_CPPFLAGS = -DGUI_AQUA $(AM_CPPFLAGS) -DGUI_CONFIG=\"AQUA\" +aqua_gnash_SOURCES = $(GUI_SRCS) gui_aqua.cpp +aqua_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic +aqua_gnash_DEPENDENCIES = .configline +aqua_gnash_LDADD = \ $(MYSQL_LIBS) \ $(GNASH_LIBS) \ $(AM_LDFLAGS) -# $(LIBLTDL) "-dlopen" self "-dlopen" +if BUILD_OGL_RENDERER +aqua_gnash_CPPFLAGS += $(OPENGL_CFLAGS) +aqua_gnash_LDADD += $(top_builddir)/backend/libgnashogl.la \ + $(AQUA_LIBS) $(OPENGL_LIBS) +aqua_gnash_SOURCES += aqua_ogl_glue.cpp aqua_ogl_glue.h \ + aqua.cpp aquasup.h aqua_glue.h +endif +# if BUILD_AGG_RENDERER +# aqua_gnash_CPPFLAGS += $(AGG_CFLAGS) +# aqua_gnash_LDADD += $(top_builddir)/backend/libgnashagg.la \ +# $(AQUA_LIBS) $(AGG_LIBS) +# aqua_gnash_SOURCES += aqua_agg_glue.cpp aqua_agg_glue.h \ +# aqua.cpp aquasup.h aqua_glue.h +# endif +endif + +# +# Build the GTK gui +# +if BUILD_GTK_GUI +bin_PROGRAMS += gtk-gnash +gtk_gnash_SOURCES = $(GUI_SRCS) gui_gtk.cpp +gtk_gnash_CPPFLAGS = -DGUI_GTK -DGUI_CONFIG=\"GTK\" \ + $(AM_CPPFLAGS) $(GTK_CFLAGS) +gtk_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic $(AM_LDFLAGS) +gtk_gnash_DEPENDENCIES = .configline + +if BUILD_OGL_RENDERER +gtk_gnash_CPPFLAGS += $(OPENGL_CFLAGS) +gtk_gnash_SOURCES += gtk_glue_gtkglext.cpp gtk_glue_gtkglext.h \ + gtk.cpp gtksup.h gtk_glue.h +gtk_gnash_LDADD = $(top_builddir)/backend/libgnashogl.la \ + $(GNASH_LIBS) $(GTK_LIBS) $(OPENGL_LIBS) +endif # BUILD_OGL_RENDERER +if BUILD_AGG_RENDERER +gtk_gnash_CPPFLAGS += $(AGG_CFLAGS) +gtk_gnash_SOURCES += gtk_glue_agg.cpp gtk_glue_agg.h \ + gtk.cpp gtksup.h gtk_glue.h +gtk_gnash_LDADD = $(top_builddir)/backend/libgnashagg.la \ + $(GNASH_LIBS) $(GTK_LIBS) $(AGG_LIBS) +endif # BUILD_AGG_RENDERER +if BUILD_CAIRO_RENDERER +gtk_gnash_CPPFLAGS += $(CAIRO_CFLAGS) +gtk_gnash_SOURCES += gtk_glue_cairo.cpp gtk_glue_cairo.h \ + gtk.cpp gtksup.h gtk_glue.h +gtk_gnash_LDADD = $(top_builddir)/backend/libgnashcairo.la + $(GNASH_LIBS) $(GTK_LIBS) $(CAIRO_LIBS) +endif # BUILD_CAIRO_RENDERER +endif # BUILD_GTK_GUI + +# +# Build the FB gui +# +if BUILD_FB_GUI +bin_PROGRAMS += fb-gnash +fb_gnash_SOURCES = $(GUI_SRCS) gui_fb.cpp fb.cpp fbsup.h +fb_gnash_CPPFLAGS = -DGUI_FB -DGUI_CONFIG=\"FB\" \ + $(AM_CPPFLAGS) +fb_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic $(AM_LDFLAGS) +fb_gnash_DEPENDENCIES = .configline + +if BUILD_AGG_RENDERER +fb_gnash_CPPFLAGS += $(AGG_CFLAGS) +fb_gnash_SOURCES += +fb_gnash_LDADD = $(top_builddir)/backend/libgnashagg.la \ + $(GNASH_LIBS) $(AGG_LIBS) +endif # BUILD_AGG_RENDERER +endif # BUILD_FB_GUI + +# +# Build the RISCOS gui +# +if BUILD_RISCOS_GUI +bin_PROGRAMS += riscos-gnash +riscos_gnash_SOURCES = $(GUI_SRCS) gui_riscos.cpp riscos.cpp riscos_glue.h riscossup.h +riscos_gnash_CPPFLAGS = -DGUI_FB -DGUI_CONFIG=\"FB\" \ + $(AM_CPPFLAGS) +riscos_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic $(AM_LDFLAGS) +riscos_gnash_DEPENDENCIES = .configline + +if BUILD_AGG_RENDERER +riscos_gnash_CPPFLAGS += $(AGG_CFLAGS) +riscos_gnash_SOURCES += riscos_glue_agg.cpp riscos_glue_agg.h +riscos_gnash_LDADD = $(top_builddir)/backend/libgnashagg.la \ + $(GNASH_LIBS) $(AGG_LIBS) +endif # BUILD_AGG_RENDERER +endif # BUILD_FB_GUI CLEANFILES = klash.moc .configline @@ -501,10 +394,10 @@ clean-hook: -rm -f core.* $(CLEANFILES) -if DYNAMIC_GUI -install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) - test -d "$(DESTDIR)$(plugindir)" || $(mkinstalldirs) "$(DESTDIR)$(plugindir)" - for i in $(plugins_LTLIBRARIES); do \ - $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$i "$(DESTDIR)$(plugindir)/$$i" ; \ - done -endif +# if DYNAMIC_GUI +# install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) +# test -d "$(DESTDIR)$(plugindir)" || $(mkinstalldirs) "$(DESTDIR)$(plugindir)" +# for i in $(plugins_LTLIBRARIES); do \ +# $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$i "$(DESTDIR)$(plugindir)/$$i" ; \ +# done +# endif Index: gui/Player.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/Player.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -u -b -r1.64 -r1.65 --- gui/Player.cpp 28 Jul 2007 01:18:32 -0000 1.64 +++ gui/Player.cpp 31 Jul 2007 19:29:42 -0000 1.65 @@ -88,7 +88,6 @@ #ifdef GNASH_FPS_DEBUG ,_fpsDebugTime(0.0) #endif - ,_guiFlavor(parseGuiFlavorByName(DEFAULT_GUI)) { init(); } @@ -180,12 +179,9 @@ void Player::init_gui() { - std::cout << "init_gui called - gui flavor : " << guiName(_guiFlavor) << " (" << _guiFlavor << ")" << std::endl; if ( do_render ) { - std::cout << "Gui flavor is " << _guiFlavor << std::endl; - - _gui = getGui(_guiFlavor); // throws on unsupported gui + _gui = getGui(); RcInitFile& rcfile = RcInitFile::getDefaultInstance(); if ( rcfile.startStopped() ) @@ -279,7 +275,7 @@ // which is *required* during movie loading if ( ! _gui->init(argc, &argv) ) { - std::cerr << "Could not initialize gui " << guiName(_guiFlavor) << std::endl; + std::cerr << "Could not initialize gui." << std::endl; return EXIT_FAILURE; } @@ -372,96 +368,36 @@ /* private */ std::auto_ptr<Gui> -Player::getGui(GuiFlavor which) +Player::getGui() { - std::cout << "getGui(" << which << ") called " << std::endl; - switch (which) - { - - case guiGTK: +#ifdef GUI_GTK return createGTKGui(windowid, scale, do_loop, bit_depth); +#endif - case guiKDE: +#ifdef GUI_KDE return createKDEGui(windowid, scale, do_loop, bit_depth); +#endif - case guiSDL: +#ifdef GUI_SDL return createSDLGui(windowid, scale, do_loop, bit_depth); +#endif - case guiAQUA: +#ifdef GUI_AQUA return createAQUAGui(windowid, scale, do_loop, bit_depth); +#endif - case guiRISCOS: +#ifdef GUI_RISCOS return createRISCOSGui(windowid, scale, do_loop, bit_depth); +#endif - case guiFLTK: +#ifdef GUI_FLTK return createFLTKGui(windowid, scale, do_loop, bit_depth); +#endif - case guiFB: +#ifdef GUI_FB return createFBGui(windowid, scale, do_loop, bit_depth); +#endif - case guiNull: return std::auto_ptr<Gui>(new NullGui(do_loop)); - - } - - std::stringstream ss; - ss << "Unknown gui flavor " << which << " requested"; - throw GnashException(ss.str()); } -/* public */ -std::string -Player::guiName(GuiFlavor which) -{ - switch (which) - { - - case guiGTK: - return "GTK"; - - case guiKDE: - return "KDE"; - - case guiSDL: - return "SDL"; - - case guiAQUA: - return "AQUA"; - - case guiRISCOS: - return "RISCOS"; - - case guiFLTK: - return "FLTK"; - - case guiFB: - return "FB"; - - case guiNull: - return "NULL"; - - } - - std::stringstream ss; - ss << "unknown(" << which << ")"; - return ss.str(); -} - -Player::GuiFlavor -Player::parseGuiFlavorByName(const std::string& flavorName) -{ - StringNoCaseEqual match; - - if ( match(flavorName, "GTK") ) return guiGTK; - if ( match(flavorName, "KDE") ) return guiKDE; - if ( match(flavorName, "SDL") ) return guiSDL; - if ( match(flavorName, "FLTK") ) return guiFLTK; - if ( match(flavorName, "FB") ) return guiFB; - if ( match(flavorName, "AQUA") ) return guiAQUA; - if ( match(flavorName, "RISCOS") ) return guiRISCOS; - if ( match(flavorName, "NULL") ) return guiNull; - - std::stringstream ss; - ss << "Unknown Gui flavor " << flavorName; - throw GnashException(ss.str()); -} Index: gui/Player.h =================================================================== RCS file: /sources/gnash/gnash/gui/Player.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- gui/Player.h 29 Jul 2007 04:03:48 -0000 1.16 +++ gui/Player.h 31 Jul 2007 19:29:43 -0000 1.17 @@ -53,34 +53,6 @@ { public: - /// A GUI to use as frontend - enum GuiFlavor { - - /// Null gui - guiNull, - - /// GTK gui - guiGTK, - - /// QT/KDE gui - guiKDE, - - /// SDL gui - guiSDL, - - /// AQUA gui (for OS/X) - guiAQUA, - - /// RISCOS gui - guiRISCOS, - - /// FLTK2 gui - guiFLTK, - - /// Framebuffer (no gui actually) - guiFB - }; - Player(); ~Player() {} @@ -138,22 +110,6 @@ void setDoSound(bool b) { do_sound=b; } - /// Set gui flavor by name - // - /// Throws an exception if gui name is invalid - /// - void setGuiFlavor(const std::string& flavorName) { - GuiFlavor flav = parseGuiFlavorByName(flavorName); - std::cout << "Flavor '" << flavorName << "' parsed as " << flav << std::endl; - //setGuiFlavor(parseGuiFlavorByName(flavorName)); - setGuiFlavor(flav); - } - - /// Return name of given Gui flavor - std::string guiName(GuiFlavor which); - - void setGuiFlavor(GuiFlavor which) { _guiFlavor = which; } - /// Set the base url for this run. // /// The base url will be used to resolve relative @@ -181,13 +137,6 @@ private: - /// Parse gui by name - // - /// Throws an exception if gui name is invalid - /// - GuiFlavor parseGuiFlavorByName(const std::string& flavorName); - - void init(); void init_sound(); @@ -196,10 +145,11 @@ void init_gui(); - /// Initialize the given gui with parameters stored so far + /// Create the gui instance // - /// Throws GnashException if the gui flavor provided isn't supported - std::auto_ptr<Gui> getGui(GuiFlavor which); + /// Uses the USE_<guiname> macros to find out which one + /// + std::auto_ptr<Gui> getGui(); static void setFlashVars(sprite_instance& m, const std::string& varstr); @@ -254,8 +204,6 @@ float _fpsDebugTime; #endif - GuiFlavor _guiFlavor; - }; Index: gui/gnash.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gnash.cpp,v retrieving revision 1.88 retrieving revision 1.89 diff -u -b -r1.88 -r1.89 --- gui/gnash.cpp 26 Jul 2007 16:14:21 -0000 1.88 +++ gui/gnash.cpp 31 Jul 2007 19:29:43 -0000 1.89 @@ -93,7 +93,6 @@ "\n"), _( " -h, --help Print this info.\n" " -s <factor> Scale the movie up/down by the specified factor\n" - " -G <guiname> Use specified gui (gtk|kde|fltk|aqua|riscos|fb)\n" " -c Produce a core file instead of letting SDL trap it\n" " -d num Number of milliseconds to delay in main loop\n" " -v Be verbose; i.e. print log messages to stdout\n" @@ -169,10 +168,10 @@ { printf (_("Build options %s\n" " Target: %s\n" - " Renderer: %s - GUI: %s (default %s) - Media handler: %s\n" + " Renderer: %s - GUI: %s - Media handler: %s\n" " Configured with: %s\n"), VERSION, TARGET_CONFIG, RENDERER_CONFIG, GUI_CONFIG, - DEFAULT_GUI, MEDIA_CONFIG, CONFIG_CONFIG); + MEDIA_CONFIG, CONFIG_CONFIG); #ifdef HAVE_FFMPEG_AVCODEC_H printf(_("Ffmpeg version is: %s\n"), LIBAVCODEC_IDENT); #endif @@ -190,12 +189,6 @@ bool called_by_plugin=false; bool width_given=false, height_given=false; - // Check our name, if 'klash' we'll set KDE gui - if ( strstr(argv[0], "klash") != NULL ) - { - player.setGuiFlavor("kde"); - } - int c = 0; // scan for the two main long GNU options for (; c < argc; c++) { @@ -213,7 +206,7 @@ } } - while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:gVf:G:")) != -1) + while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:gVf:")) != -1) { switch (c) { // case 'c' (Disable SDL core dumps) is decoded in sdl.cpp:init() @@ -324,9 +317,6 @@ case 't': player.setExitTimeout( (float) atof(optarg) ); break; - case 'G': - player.setGuiFlavor(optarg); - break; case 'b': player.setBitDepth(atoi(optarg)); break; _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit