gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r9585: Merge new XPCOM support from


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9585: Merge new XPCOM support from branch.
Date: Tue, 12 Aug 2008 10:13:44 -0600
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9585
committer: address@hidden
branch nick: trunk
timestamp: Tue 2008-08-12 10:13:44 -0600
message:
  Merge new XPCOM support from branch.
added:
  macros/nspr.m4
  macros/xpcom.m4
  plugin/xpcom/
  plugin/xpcom/GnashComponent.cpp
  plugin/xpcom/GnashComponent.h
  plugin/xpcom/GnashComponentModule.cpp
  plugin/xpcom/Makefile.am
  plugin/xpcom/iGnashComponent.idl
modified:
  Makefile.am
  configure.ac
  packaging/xpi.am
  packaging/xpi/install.rdf
  plugin/Makefile.am
    ------------------------------------------------------------
    revno: 9568.1.9
    committer: address@hidden
    branch nick: build
    timestamp: Sun 2008-08-10 12:35:12 -0600
    message:
      update from trunk
    modified:
      libcore/cxform.h
      libcore/fill_style.cpp
      libcore/fill_style.h
      libcore/font.cpp
      libcore/font.h
      libcore/matrix.h
      libcore/movie_root.cpp
      libcore/parser/SWFMovieDefinition.cpp
      libcore/parser/abc_block.cpp
      libcore/parser/abc_block.h
      libcore/parser/button_character_def.cpp
      libcore/parser/button_character_def.h
      libcore/parser/edit_text_character_def.cpp
      libcore/parser/edit_text_character_def.h
      libcore/parser/morph2_character_def.cpp
      libcore/parser/morph2_character_def.h
      libcore/parser/shape_character_def.cpp
      libcore/parser/shape_character_def.h
      libcore/parser/sprite_definition.cpp
      libcore/parser/sprite_definition.h
      libcore/parser/text_character_def.cpp
      libcore/parser/text_character_def.h
      libcore/parser/video_stream_def.cpp
      libcore/parser/video_stream_def.h
      libcore/rect.h
      libcore/styles.cpp
      libcore/styles.h
      libcore/swf/CSMTextSettingsTag.cpp
      libcore/swf/CSMTextSettingsTag.h
      libcore/swf/DefineButtonCxformTag.h
      libcore/swf/DefineFontAlignZonesTag.cpp
      libcore/swf/DefineFontAlignZonesTag.h
      libcore/swf/DoActionTag.h
      libcore/swf/DoInitActionTag.h
      libcore/swf/PlaceObject2Tag.cpp
      libcore/swf/PlaceObject2Tag.h
      libcore/swf/RemoveObjectTag.cpp
      libcore/swf/RemoveObjectTag.h
      libcore/swf/ScriptLimitsTag.h
      libcore/swf/SetBackgroundColorTag.h
      libcore/swf/StartSoundTag.cpp
      libcore/swf/StartSoundTag.h
      libcore/swf/StreamSoundBlockTag.cpp
      libcore/swf/StreamSoundBlockTag.h
      libcore/swf/TagLoadersTable.h
      libcore/swf/tag_loaders.cpp
      libcore/swf/tag_loaders.h
      libcore/text.cpp
      libcore/text.h
      libcore/types.cpp
      libcore/types.h
      po/cs.po
      po/de.po
      po/es.po
      po/fi.po
      po/fr.po
      po/it.po
      po/ja.po
      po/sv.po
    ------------------------------------------------------------
    revno: 9568.1.10
    committer: address@hidden
    branch nick: build
    timestamp: Sun 2008-08-10 16:21:43 -0600
    message:
      New XPCOM support for Gnash.
    added:
      macros/xpcom.m4
      plugin/xpcom/
      plugin/xpcom/GnashComponent.cpp
      plugin/xpcom/GnashComponent.h
      plugin/xpcom/Makefile.am
      plugin/xpcom/iGnashComponent.idl
    ------------------------------------------------------------
    revno: 9568.1.11
    committer: address@hidden
    branch nick: build
    timestamp: Sun 2008-08-10 16:22:09 -0600
    message:
      New XPCOM support for Gnash.
    modified:
      Makefile.am
      configure.ac
    ------------------------------------------------------------
    revno: 9568.1.12
    committer: address@hidden
    branch nick: build
    timestamp: Sun 2008-08-10 16:22:53 -0600
    message:
      New XPCOM support for Gnash.
    modified:
      plugin/Makefile.am
    ------------------------------------------------------------
    revno: 9568.1.13
    committer: address@hidden
    branch nick: build
    timestamp: Sun 2008-08-10 18:21:49 -0600
    message:
      XPCOM Module compiles now.
    added:
      plugin/xpcom/GnashComponentModule.cpp
    modified:
      plugin/xpcom/GnashComponent.cpp
      plugin/xpcom/GnashComponent.h
      plugin/xpcom/Makefile.am
      plugin/xpcom/iGnashComponent.idl
    ------------------------------------------------------------
    revno: 9568.1.14
    committer: address@hidden
    branch nick: build
    timestamp: Sun 2008-08-10 18:22:58 -0600
    message:
      Add dependencies so "make xpi" works.
    modified:
      packaging/xpi.am
    ------------------------------------------------------------
    revno: 9568.1.15
    committer: address@hidden
    branch nick: build
    timestamp: Mon 2008-08-11 23:11:32 -0600
    message:
      Build a XPCOM component, and install it in the xpi file.
    modified:
      Makefile.am
      configure.ac
      packaging/xpi.am
      packaging/xpi/install.rdf
      plugin/plugin.cpp
      plugin/xpcom/GnashComponent.h
      plugin/xpcom/Makefile.am
      plugin/xpcom/iGnashComponent.idl
      po/cs.po
      po/de.po
      po/es.po
      po/fi.po
      po/fr.po
      po/it.po
      po/ja.po
      po/sv.po
    ------------------------------------------------------------
    revno: 9568.1.16
    committer: address@hidden
    branch nick: build
    timestamp: Tue 2008-08-12 09:07:44 -0600
    message:
      Move conditional to after the WITH options.
    added:
      macros/nspr.m4
    modified:
      macros/xpcom.m4
    ------------------------------------------------------------
    revno: 9568.1.17
    committer: address@hidden
    branch nick: build
    timestamp: Tue 2008-08-12 09:08:14 -0600
    message:
      update from trunk.
    renamed:
      libcore/stream.cpp => libcore/SWFStream.cpp
      libcore/stream.h => libcore/SWFStream.h
    modified:
      libbase/GnashImage.h
      libbase/GnashImageJpeg.cpp
      libbase/GnashImageJpeg.h
      libbase/GnashImagePng.cpp
      libbase/GnashImagePng.h
      libbase/curl_adapter.cpp
      libbase/image.cpp
      libbase/image.h
      libcore/Makefile.am
      libcore/asobj/NetConnection.cpp
      libcore/asobj/NetConnection.h
      libcore/cxform.cpp
      libcore/fill_style.cpp
      libcore/font.cpp
      libcore/matrix.cpp
      libcore/namedStrings.cpp
      libcore/namedStrings.h
      libcore/parser/SWFMovieDefinition.cpp
      libcore/parser/SWFMovieDefinition.h
      libcore/parser/abc_block.cpp
      libcore/parser/action_buffer.cpp
      libcore/parser/button_character_def.cpp
      libcore/parser/edit_text_character_def.cpp
      libcore/parser/filter_factory.cpp
      libcore/parser/morph2_character_def.cpp
      libcore/parser/shape_character_def.cpp
      libcore/parser/sound_definition.cpp
      libcore/parser/sprite_definition.cpp
      libcore/parser/sprite_definition.h
      libcore/parser/text_character_def.cpp
      libcore/parser/video_stream_def.cpp
      libcore/rect.cpp
      libcore/sprite_instance.cpp
      libcore/styles.cpp
      libcore/swf/CSMTextSettingsTag.cpp
      libcore/swf/DefineButtonCxformTag.h
      libcore/swf/DefineFontAlignZonesTag.cpp
      libcore/swf/DoActionTag.h
      libcore/swf/DoInitActionTag.h
      libcore/swf/PlaceObject2Tag.cpp
      libcore/swf/RemoveObjectTag.cpp
      libcore/swf/ScriptLimitsTag.h
      libcore/swf/StartSoundTag.cpp
      libcore/swf/StreamSoundBlockTag.cpp
      libcore/swf/tag_loaders.cpp
      libcore/text.cpp
      libcore/types.cpp
      testsuite/libcore.all/StreamTest.cpp
      libcore/SWFStream.cpp
    ------------------------------------------------------------
    revno: 9568.1.18
    committer: address@hidden
    branch nick: build
    timestamp: Tue 2008-08-12 10:00:54 -0600
    message:
      Use shell instead of GNU Make extensions
    modified:
      plugin/xpcom/Makefile.am
    ------------------------------------------------------------
    revno: 9568.1.19
    committer: address@hidden
    branch nick: build
    timestamp: Tue 2008-08-12 10:01:42 -0600
    message:
      Don't try to extract the extensions path
    modified:
      packaging/xpi.am
    ------------------------------------------------------------
    revno: 9568.1.20
    committer: address@hidden
    branch nick: build
    timestamp: Tue 2008-08-12 10:02:20 -0600
    message:
      nspr is already used by another test, so use npsr4
    modified:
      macros/nspr.m4
      macros/xpcom.m4
    ------------------------------------------------------------
    revno: 9568.1.21
    committer: address@hidden
    branch nick: build
    timestamp: Tue 2008-08-12 10:02:52 -0600
    message:
      Tweak display tests for NSPR4 and XPCOM so everything works disabled.
    modified:
      configure.ac
=== modified file 'Makefile.am'
--- a/Makefile.am       2008-08-04 13:27:32 +0000
+++ b/Makefile.am       2008-08-12 05:11:32 +0000
@@ -269,6 +269,15 @@
        @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
        @echo " AGG_LIBS is $(AGG_LIBS)"
 endif
+if XPCOM
+       @echo " XPCOM_CFLAGS is $(XPCOM_CFLAGS)"
+       @echo " XPCOM_LIBS is $(XPCOM_LIBS)"
+       @echo " XPIDL path is $(XPIDL)"
+endif
+if NSPR
+       @echo " NSPR_CFLAGS is $(NSPR_CFLAGS)"
+       @echo " NSPR_LIBS is $(NSPR_LIBS)"
+endif
        @echo ""
        @echo "A blank value for CFLAGS means the header is installed in the"
        @echo "default system header location. All the LIBS should have a"
@@ -278,7 +287,6 @@
        @echo " Media handler: $(MEDIA_CONFIG)"
        @echo " Renderer engine: $(RENDERER_CONFIG)"
 
-
 if BUILD_GTK_GUI
        @echo " Supported GUI: GTK"
 endif
@@ -309,6 +317,9 @@
 if BUILD_FB_GUI
        @echo " Supported GUI: FB"
 endif
+if XPCOM
+       @echo " XPCOM support for Mozilla/Firefox"
+endif
 
        @if test -n "$(EXTENSIONS_LIST)" ; then \
          echo "        Extensions added are: $(EXTENSIONS_LIST)"; \

=== modified file 'configure.ac'
--- a/configure.ac      2008-08-10 03:45:25 +0000
+++ b/configure.ac      2008-08-12 16:02:52 +0000
@@ -1266,6 +1266,17 @@
 
 
 GNASH_PATH_FIREFOX
+dnl XPCOM and NSPR can be used in the plugin for better integration
+dnl within Firefox.
+GNASH_PATH_XPCOM
+GNASH_PATH_NSPR
+dnl If we don't have both XPCOM and NSPR, we can't build either.
+if test x$has_xpcom = xno -o x$has_nspr = xno; then
+  has_xpcom=no
+  has_nspr=no
+fi
+AM_CONDITIONAL(XPCOM, test x$has_xpcom = xyes)
+AM_CONDITIONAL(NSPR, test x$has_nspr = xyes)
 
 dnl -----------------------------------------------------------------
 dnl END OF PLUGIN RELATED STUFF
@@ -2138,6 +2149,7 @@
 extensions/dbus/Makefile
 extensions/metome/Makefile
 plugin/Makefile
+plugin/xpcom/Makefile
 plugin/klash/Makefile
 plugin/mozilla-sdk/Makefile
 plugin/win32/Makefile
@@ -2989,6 +3001,25 @@
   fi
 fi
 
+dnl XPCOM support for Mozilla/Firefox
+if test x"$xpcom" = x"yes"; then
+  if test x"$has_xpcom" = x"yes"; then
+    echo "        XPCOM flags are: $XPCOM_CFLAGS"
+    echo "        XPCOM libs are: $XPCOM_LIBS"
+    echo "        XPIDL path is: $XPIDL"
+  else
+    echo "        ERROR: No XPCOM development package is installed." >&3
+  fi
+fi
+if test x"$nspr4" = x"yes"; then
+  if test x"$has_nspr" = x"yes"; then
+    echo "        NSPR flags are: $NSPR_CFLAGS"
+    echo "        NSPR libs are: $NSPR_LIBS"
+  else
+    echo "        ERROR: No NSPR development package is installed." >&3
+  fi
+fi
+
 if test x$cross_compiling = xyes; then
   AC_MSG_NOTICE([This build is setup for cross compiling])
 fi

=== added file 'macros/nspr.m4'
--- a/macros/nspr.m4    1970-01-01 00:00:00 +0000
+++ b/macros/nspr.m4    2008-08-12 16:13:44 +0000
@@ -0,0 +1,88 @@
+dnl  
+dnl    Copyright (C) 2008 Free Software Foundation, Inc.
+dnl  
+dnl  This program is free software; you can redistribute it and/or modify
+dnl  it under the terms of the GNU General Public License as published by
+dnl  the Free Software Foundation; either version 3 of the License, or
+dnl  (at your option) any later version.
+dnl  
+dnl  This program is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl  GNU General Public License for more details.
+dnl  You should have received a copy of the GNU General Public License
+dnl  along with this program; if not, write to the Free Software
+dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+dnl Configure paths for Firefox. We used to run firefox-config, but that
+dnl got too messy. Then with a little experimentation we determined
+dnl most of the options weren't actually needed... so now the handful
+dnl of critical headers are part of the plugin/mozilla-sdk sources
+dnl copied out of a current Firefox release. This greatly simplified
+dnl both the configuration and compilation processes.
+AC_DEFUN([GNASH_PATH_NSPR],
+[dnl 
+
+  has_nspr=no
+  AC_ARG_ENABLE(nspr4,
+    AC_HELP_STRING([--enable-nspr4],[Enable nspr4 support in NPAPI plugin]),
+  [case "${enableval}" in
+    yes) nspr4=yes ;;
+    no)  nspr4=no ;;
+    *)   AC_MSG_ERROR([bad value ${enableval} for --enable-nspr4 option]) ;;
+   esac],nspr4=no)
+
+  dnl Look for the header
+  AC_ARG_WITH(nspr-incl, AC_HELP_STRING([--with-nspr-incl], [directory where 
NSPR headers are]), with_nspr_incl=${withval})
+  AC_CACHE_VAL(ac_cv_path_nspr_incl, [
+    if test x"${with_nspr_incl}" != x ; then
+      if test -f ${with_nspr_incl}/nspr.h ; then
+        ac_cv_path_nspr_incl="-I`(cd ${with_nspr_incl}; pwd)`"
+      else
+        AC_MSG_ERROR([${with_nspr_incl} directory doesn't contain 
mozilla-config.h!])
+      fi
+    fi
+  ])
+
+    dnl Look for the library
+    AC_ARG_WITH(nspr_lib, AC_HELP_STRING([--with-nspr-lib], [directory where 
NSPR libraries are]), with_nspr_lib=${withval})
+    AC_CACHE_VAL(ac_cv_path_nspr_lib, [
+      if test x"${with_nspr_lib}" != x ; then
+        if test -f ${with_nspr_libs}/libnspr.so; then
+          ac_cv_path_nspr_lib="-L`(cd ${with_nspr_lib}; pwd)` -lplds4 -lplc4 
-lnspr4"
+        fi
+      fi
+    ])
+
+  if test x$nspr4 = xyes; then
+    if test x$cross_compiling = xno; then
+      if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_nspr_incl}" = x; then
+        $PKG_CONFIG --exists nspr && ac_cv_path_nspr_incl="`$PKG_CONFIG 
--cflags-only-I nspr`"
+        $PKG_CONFIG --exists nspr && ac_cv_path_nspr_lib="`$PKG_CONFIG --libs 
nspr`"
+      fi
+    fi
+  fi
+
+  if test x"${ac_cv_path_nspr_incl}" != x; then
+    NSPR_CFLAGS="${ac_cv_path_nspr_incl}"
+  else
+    NSPR_CFLAGS=""
+  fi
+
+  if test x"${ac_cv_path_nspr_lib}" != x ; then
+    NSPR_LIBS="${ac_cv_path_nspr_lib}"
+    has_nspr=yes
+  else
+    NSPR_LIBS=""
+    has_nspr=no
+  fi
+
+  AC_SUBST(NSPR_CFLAGS)
+  AC_SUBST(NSPR_LIBS)
+])
+dnl end of GNASH_PATH_NSPR
+# Local Variables:
+# c-basic-offset: 2
+# tab-width: 2
+# indent-tabs-mode: nil
+# End:

=== added file 'macros/xpcom.m4'
--- a/macros/xpcom.m4   1970-01-01 00:00:00 +0000
+++ b/macros/xpcom.m4   2008-08-12 16:02:20 +0000
@@ -0,0 +1,95 @@
+dnl  
+dnl    Copyright (C) 2008 Free Software Foundation, Inc.
+dnl  
+dnl  This program is free software; you can redistribute it and/or modify
+dnl  it under the terms of the GNU General Public License as published by
+dnl  the Free Software Foundation; either version 3 of the License, or
+dnl  (at your option) any later version.
+dnl  
+dnl  This program is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl  GNU General Public License for more details.
+dnl  You should have received a copy of the GNU General Public License
+dnl  along with this program; if not, write to the Free Software
+dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+dnl Configure paths for Firefox. We used to run firefox-config, but that
+dnl got too messy. Then with a little experimentation we determined
+dnl most of the options weren't actually needed... so now the handful
+dnl of critical headers are part of the plugin/mozilla-sdk sources
+dnl copied out of a current Firefox release. This greatly simplified
+dnl both the configuration and compilation processes.
+AC_DEFUN([GNASH_PATH_XPCOM],
+[dnl 
+
+  has_xpcom=no
+  AC_ARG_ENABLE(xpcom,
+    AC_HELP_STRING([--enable-xpcom],[Enable xpcom support in NPAPI plugin]),
+  [case "${enableval}" in
+    yes) xpcom=yes ;;
+    no)  xpcom=no ;;
+    *)   AC_MSG_ERROR([bad value ${enableval} for --enable-xpcom option]) ;;
+   esac],xpcom=no)
+
+  dnl Look for the header
+  AC_ARG_WITH(xpcom-incl, AC_HELP_STRING([--with-xpcom-incl], [directory where 
XPCOM headers are]), with_xpcom_incl=${withval})
+  AC_CACHE_VAL(ac_cv_path_xpcom_incl, [
+    if test x"${with_xpcom_incl}" != x ; then
+      if test -f ${with_xpcom_incl}/mozilla-config.h ; then
+        ac_cv_path_xpcom_incl="-I`(cd ${with_xpcom_incl}; pwd)`"
+      else
+        AC_MSG_ERROR([${with_xpcom_incl} directory doesn't contain 
mozilla-config.h!])
+      fi
+    fi
+  ])
+
+    dnl Look for the library
+    AC_ARG_WITH(xpcom_lib, AC_HELP_STRING([--with-xpcom-lib], [directory where 
XPCOM libraries are]), with_xpcom_lib=${withval})
+    AC_CACHE_VAL(ac_cv_path_xpcom_lib, [
+      if test x"${with_xpcom_lib}" != x ; then
+        if test -f ${with_xpcom_libs}/libxpcomglue.a; then
+          ac_cv_path_xpcom_lib="-L`(cd ${with_xpcom_lib}; pwd)` -lxpcomglue 
-lnspr4 -lplds4"
+        fi
+      fi
+    ])
+
+  if test x$xpcom = xyes; then
+    if test x$cross_compiling = xno; then
+      if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_xpcom_incl}" = x; then
+        $PKG_CONFIG --exists libxul && ac_cv_path_xpcom_incl="`$PKG_CONFIG 
--cflags-only-I libxul`"
+        $PKG_CONFIG --exists libxul && ac_cv_path_xpcom_lib="`$PKG_CONFIG 
--libs libxul`"
+        $PKG_CONFIG --exists libxul && ac_cv_path_xpidl="`$PKG_CONFIG 
--libs-only-L libxul`"
+      fi
+    fi
+  fi
+
+  if test x"${ac_cv_path_xpcom_incl}" != x; then
+    XPCOM_CFLAGS="${ac_cv_path_xpcom_incl}"
+    XPCOM_IDL_CFLAGS=`echo $XPCOM_CFLAGS | sed -e 's:include:share/idl:'`
+    XPIDL=`echo ${ac_cv_path_xpidl} | sed -e 's:-L::' -e 's:sdk-::' -e 
's:sdk/lib::'`
+    XPIDL="${XPIDL}xpidl"
+  else
+    XPCOM_CFLAGS=""
+    XPIDL=""
+  fi
+
+  if test x"${ac_cv_path_xpcom_lib}" != x ; then
+    XPCOM_LIBS="${ac_cv_path_xpcom_lib}"
+    has_xpcom=yes
+  else
+    XPCOM_LIBS=""
+    has_xpcom=no
+  fi
+
+  AC_SUBST(XPCOM_CFLAGS)
+  AC_SUBST(XPCOM_IDL_CFLAGS)
+  AC_SUBST(XPCOM_LIBS)
+  AC_SUBST(XPIDL)
+])
+dnl end of GNASH_PATH_XPCOM
+# Local Variables:
+# c-basic-offset: 2
+# tab-width: 2
+# indent-tabs-mode: nil
+# End:

=== modified file 'packaging/xpi.am'
--- a/packaging/xpi.am  2008-08-10 03:46:02 +0000
+++ b/packaging/xpi.am  2008-08-12 16:01:42 +0000
@@ -31,7 +31,8 @@
 
 CONFIG_OPTS = $(DISTCHECK_CONFIGURE_FLAGS) \
        --disable-kparts \
-       --enable-gui=gtk
+       --enable-gui=gtk \
+       --with-npapi-plugindir=/tmp/plugin
 
 xpi-unpack: Makefile #$(top_builddir)/config.status
        address@hidden -f xpi-*         # nuke everything, we're starting over
@@ -53,10 +54,11 @@
 
 xpi-plugin: 
        cd $(XPI_BUILD); ./configure $(CONFIG_OPTS) --disable-static 
--enable-shared
-       $(MAKE) -C $(XPI_BUILD)/plugin clean all
+       $(MAKE) -C $(XPI_BUILD)/plugin clean all GNASHBINDIR=
        $(MAKE) -C $(XPI_BUILD) install-plugin DESTDIR=$(XPI_TMP)
+       $(MAKE) -C $(XPI_BUILD)/plugin/xpcom install-pkglib DESTDIR=$(XPI_TMP)
 
-xpi xpi-bundle: # xpi-build xpi-plugin
+xpi xpi-bundle: #xpi-build xpi-plugin
        if ! test -d $(XPI_BUNDLE)/ ; then \
          mkdir $(XPI_BUNDLE); \
        fi
@@ -64,9 +66,11 @@
        for i in install.rdf; do \
          cp -fr $${topdir}/packaging/xpi/$$i $(XPI_BUNDLE)/; \
        done;
-       cp -fr $(XPI_TMP)/usr/local/bin/*gnash $(XPI_BUNDLE)/
-       cp -fr $(XPI_TMP)/usr/local/share/locale $(XPI_BUNDLE)/
-       cp -fr $(XPI_TMP)/usr/local/npapi/libgnashplugin.so $(XPI_BUNDLE)/
+       cp -fr $(XPI_TMP)$(bindir)/*gnash $(XPI_BUNDLE)/
+       cp -fr $(XPI_TMP)$(localedir) $(XPI_BUNDLE)/
+       cp -fr $(XPI_TMP)/tmp/plugin/libgnashplugin.so $(XPI_BUNDLE)/
+       cp -fr $(XPI_TMP)/tmp/extensions/*/*.xpt $(XPI_BUNDLE)/
+       cp -fr $(XPI_TMP)/tmp/extensions/*/*.so $(XPI_BUNDLE)/
        (cd $(XPI_BUNDLE) ; $(ZIP) -r /tmp/gnash.xpi *)
 
 xpi-clean:

=== modified file 'packaging/xpi/install.rdf'
--- a/packaging/xpi/install.rdf 2008-08-10 03:46:02 +0000
+++ b/packaging/xpi/install.rdf 2008-08-12 05:11:32 +0000
@@ -5,7 +5,7 @@
 
        <Description about="urn:mozilla:install-manifest">
        
-       <em:id>address@hidden</em:id>
+       <em:id>{2b70f2b1-fc72-4734-bb81-4eb2a7713e49}</em:id>
        <em:version>0.8.3</em:version>
        
        <!-- Target Application this extension can install into, 
@@ -60,7 +60,7 @@
        <em:name>Gnash</em:name>
        <em:description>The GNU Flash player</em:description>
        <em:creator>Gnash Team</em:creator>
-       <em:homepageURL>http://adblockplus.org/</em:homepageURL>
+       <em:homepageURL>http://www.gnashdev.org/</em:homepageURL>
        
        <!-- Front End Integration Hooks (used by Extension Manager)-->
 <!--    
<em:updateURL>"http://www.getgnash.org/updates/update.rdf";</em:updateURL> -->

=== modified file 'plugin/Makefile.am'
--- a/plugin/Makefile.am        2008-07-22 21:24:49 +0000
+++ b/plugin/Makefile.am        2008-08-10 22:22:53 +0000
@@ -27,22 +27,27 @@
 if NPAPI
 SUBDIRS += mozilla-sdk
 
+if XPCOM
+SUBDIRS += xpcom
+endif
 if WIN32
 SUBDIRS += win32
 endif
 endif # NPAPI
 
-# if DMALLOC
-# MALL_CFLAGS = $(DMALLOC_CFLAGS)
-# MALL_LIBS = $(DMALLOC_LIBS)
-# endif
-
+# make sure these files make it into the distribution tarball.
+DIST_SUBDIRS = klash mozilla-sdk xpcom win32
+
+# This is a hard coded path to where the plugin gets installed.
+GNASHBINDIR = $(bindir)
+
+# This is the directory the plugin gets installed.
 plugindir   = $(FIREFOX_PLUGINS)
 
 # XP_UNIX      This needs to get defined for npapi.h on unix platforms.
 # PLUGIN_TRACE Enable this define to get debug prints whenever the plugin
 #              api gets control.
-AM_CPPFLAGS = -DPLUGIN_TRACE -DXP_UNIX -DMOZ_X11 -DGNASHBINDIR=\"$(bindir)\" \
+AM_CPPFLAGS = -DPLUGIN_TRACE -DXP_UNIX -DMOZ_X11 
-DGNASHBINDIR=\"$(GNASHBINDIR)\" \
        -DSYSCONFDIR=\"$(sysconfdir)\" \
         -I$(top_srcdir)/libcore \
         -I$(top_srcdir)/libcore/parser \

=== added directory 'plugin/xpcom'
=== added file 'plugin/xpcom/GnashComponent.cpp'
--- a/plugin/xpcom/GnashComponent.cpp   1970-01-01 00:00:00 +0000
+++ b/plugin/xpcom/GnashComponent.cpp   2008-08-11 00:21:49 +0000
@@ -0,0 +1,40 @@
+// 
+//   Copyright (C) 2008 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "GnashComponent.h"
+
+NS_IMPL_ISUPPORTS1(GnashComponent, iGnashComponent)
+
+GnashComponent::GnashComponent()
+{
+  /* member initializers and constructor code */
+}
+
+
+GnashComponent::~GnashComponent()
+{
+  /* destructor code */
+}
+
+/* long Add (in long a, in long b); */
+NS_IMETHODIMP
+GnashComponent::Add(PRInt32 a, PRInt32 b, PRInt32 *_retval)
+{
+    *_retval = a + b;
+    return NS_OK;
+}

=== added file 'plugin/xpcom/GnashComponent.h'
--- a/plugin/xpcom/GnashComponent.h     1970-01-01 00:00:00 +0000
+++ b/plugin/xpcom/GnashComponent.h     2008-08-12 05:11:32 +0000
@@ -0,0 +1,39 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program 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 General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifndef _MY_COMPONENT_H_
+#define _MY_COMPONENT_H_
+
+#include "iGnashComponent.h"
+#include "nsStringAPI.h"
+
+#define GNASH_COMPONENT_CONTRACTID "@getgnash.org/updates/GnashComponent;1"
+// 2b70f2b1-fc72-4734-bb81-4eb2a7713e49
+#define GNASH_COMPONENT_CID  {0x2b70f2b1, 0xfc72, 0xbb81, { 0x4e, 0xb2, 0xa7, 
0x71, 0x3e, 0x49 }}
+
+class GnashComponent : public iGnashComponent
+{
+public:
+    NS_DECL_ISUPPORTS
+    NS_DECL_IGNASHCOMPONENT
+    
+    GnashComponent();
+    // additional members
+    virtual ~GnashComponent();
+};
+
+#endif

=== added file 'plugin/xpcom/GnashComponentModule.cpp'
--- a/plugin/xpcom/GnashComponentModule.cpp     1970-01-01 00:00:00 +0000
+++ b/plugin/xpcom/GnashComponentModule.cpp     2008-08-11 00:21:49 +0000
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2008 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "nsIGenericFactory.h"
+#include "GnashComponent.h"
+
+NS_GENERIC_FACTORY_CONSTRUCTOR(GnashComponent)
+NS_COM_GLUE nsresult
+NS_NewGenericModule2(nsModuleInfo const *info, nsIModule* *result);
+
+static nsModuleComponentInfo components[] =
+{
+    {
+       "GnashComponent", 
+       GNASH_COMPONENT_CID,
+       GNASH_COMPONENT_CONTRACTID,
+       GnashComponentConstructor,
+    }
+};
+
+NS_IMPL_NSGETMODULE("GnashComponentsModule", components) 
+

=== added file 'plugin/xpcom/Makefile.am'
--- a/plugin/xpcom/Makefile.am  1970-01-01 00:00:00 +0000
+++ b/plugin/xpcom/Makefile.am  2008-08-12 16:00:54 +0000
@@ -0,0 +1,69 @@
+## Process this file with automake to generate Makefile.in
+# 
+#   Copyright (C) 2008 Free Software Foundation, Inc.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program 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 General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+AUTOMAKE_OPTIONS = 
+
+IDL_OUTPUT = \
+       iGnashComponent.xpt \
+       iGnashComponent.h
+
+EXTRA_DIST = iGnashComponent.idl
+
+INCLUDES = \
+        -DLOCALEDIR=\"$(localedir)\" \
+        $(XPCOM_CFLAGS)
+
+AM_LDFLAGS = \
+       $(XPCOM_LIBS)
+
+#GECKO_INCLUDES = -I/usr/include/xulrunner-sdk-1.9/stable -I/usr/include/nspr4 
-I/usr/include/xulrunner-sdk-1.9/
+
+#GECKO_LDFLAGS =  -L/usr/lib/xulrunner-sdk-1.9/sdk/lib -lxpcomglue \
+                 -lnspr4      \
+                 -lplds4     
+
+BUILT_SOURCES = $(IDL_OUTPUT)
+
+pkglib_LTLIBRARIES = libgnashcomponent.la
+libgnashcomponent_la_SOURCES = GnashComponent.cpp GnashComponentModule.cpp
+libgnashcomponent_la_CFLAGS = -DXPCOM_GLUE -fno-rtti -fno-exceptions
+libgnashcomponent_la_LDFLAGS = -avoid-version -module -no-undefined \
+       $(XPCOM_LIBS)
+
+noinst_HEADERS = GnashComponent.h
+
+CLEANFILES = \
+       $(IDL_OUTPUT) \
+       *.loT 
+
+# Build the output files from the IDL file
+SUFFIXES = idl xpt
+.idl.h:
+       $(XPIDL) -m header  -v $(XPCOM_IDL_CFLAGS) $<
+.idl.xpt:
+       $(XPIDL) -m typelib -v $(XPCOM_IDL_CFLAGS) $<
+
+EXT_DIR = "`dirname 
$(FIREFOX_PLUGINS))/extensions/{2b70f2b1-fc72-4734-bb81-4eb2a7713e49}`"
+
+install-pkglib: $(pkglib_LTLIBRARIES)
+       @test -d "$(DESTDIR)/$(EXT_DIR)" || $(mkinstalldirs) 
"$(DESTDIR)/$(EXT_DIR)"
+       @if test -d .libs; then \
+         cp -f .libs/libgnashcomponent.so* 
$(DESTDIR)$(EXT_DIR)/libgnashcomponent.so; \
+         cp -f iGnashComponent.xpt $(DESTDIR)$(EXT_DIR)/iGnashComponent.xpt; \
+       fi
+
+force:

=== added file 'plugin/xpcom/iGnashComponent.idl'
--- a/plugin/xpcom/iGnashComponent.idl  1970-01-01 00:00:00 +0000
+++ b/plugin/xpcom/iGnashComponent.idl  2008-08-12 05:11:32 +0000
@@ -0,0 +1,26 @@
+// 
+//   Copyright (C) 2008 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+#include "nsISupports.idl"
+
+[scriptable, uuid(2b70f2b1-fc72-4734-bb81-4eb2a7713e49)]
+interface iGnashComponent : nsISupports
+{
+  //  attribute AString name;
+  long Add(in long a, in long b);
+};
+


reply via email to

[Prev in Thread] Current Thread [Next in Thread]