Discussion:
[Gnash-dev] A problem when building firefox plugin npgnash.dll on Windows
cao wei
2008-12-11 10:00:11 UTC
Permalink
Hi, everyone
I am working on gnash recently, because I need an open source flash player
on Windows.I choose mingw to build gnash, and by now I have built gnash
0.8.3 into a DLL, and a sdl-gnash.exe linked to the DLL can work quite well.

Now I am trying to build the firefox plugin, npgnash.dll, also use mingw.
But It seems the code for a win32 firefox plugin is incomplete,
plugin/win32/plugin.cpp implements a class called nsPluginInstance, I find
declaration of this class in plugin/plugin.h, but it seems incomplete,
because some member variables referenced in plugin.cpp is not declared in
plugin.h, such as '_initialized' '_shutdown' '_stream' '_url', and so on.
Why the header file and source file are not match?

Besides, plugin.h needs X11, so I guess it should not be used in win32,
isn't it? Where can I find a usable plugin.h for win32?

Any suggestion is welcome. Thanks a lot!!!

Regards,

Cyg Cao
Bastiaan Jacques
2008-12-11 10:54:05 UTC
Permalink
 Besides, plugin.h needs X11, so I guess it should not be used in win32,
isn't it? Where can I find a usable plugin.h for win32?
As far as I know plugin/win32 has gone largely unmaintained. However, it
should not be difficult to modify plugin/plugin.{cpp,h} to compile on
windows. The major problem then is to use a GUI which can use the -x ID
parameter to rendering into the specified window ID on Microsoft
Windows. So far as I can remember the only GUI capable of that is the
GTK GUI.

Bastiaan
Dossy Shiobara
2008-12-11 19:57:52 UTC
Permalink
Post by Bastiaan Jacques
Post by cao wei
Besides, plugin.h needs X11, so I guess it should not be used in win32,
isn't it? Where can I find a usable plugin.h for win32?
As far as I know plugin/win32 has gone largely unmaintained. However, it
should not be difficult to modify plugin/plugin.{cpp,h} to compile on
windows. The major problem then is to use a GUI which can use the -x ID
parameter to rendering into the specified window ID on Microsoft
Windows. So far as I can remember the only GUI capable of that is the
GTK GUI.
Unfortunately, none of the GUIs work with -x on Win32. That's why I
started work on plugin/win32, creating a native npgnash.dll plugin for
Mozilla that embeds VM in-process.

I'm not sure why cao wei can't build the plugin/win32 directory: it
builds just fine on the buildbot Win2003 slave ... ?
--
Dossy Shiobara | ***@panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
Wei Cao
2008-12-12 05:14:14 UTC
Permalink
It's strange...I download serveral source code packages released, such as
gnash-0.8.1,0.8.2,0.8.3, 0.8.4, there is only one plugin.h under directory
plugin/, and this head file is for unix, not for win32. I check directory
plugin/win32, there is only a plugin.cpp, no corresponding plugin.h for
win32.
but soon I find this site,
http://bzr.savannah.gnu.org/lh/gnash/files/10398?file_id=win32-20060806180214-7b9ymp6ydt7o-1
it seems a http code repository for gnash, there are five source code files
under plugin/win32, including the missing plugin.h that released source
code packages do not contain. May be these files do not be copied from trunk
to released version by mistake?

I will try them immediately.
Post by Dossy Shiobara
Post by Bastiaan Jacques
Post by cao wei
Besides, plugin.h needs X11, so I guess it should not be used in win32,
isn't it? Where can I find a usable plugin.h for win32?
As far as I know plugin/win32 has gone largely unmaintained. However, it
should not be difficult to modify plugin/plugin.{cpp,h} to compile on
windows. The major problem then is to use a GUI which can use the -x ID
parameter to rendering into the specified window ID on Microsoft
Windows. So far as I can remember the only GUI capable of that is the
GTK GUI.
Unfortunately, none of the GUIs work with -x on Win32. That's why I
started work on plugin/win32, creating a native npgnash.dll plugin for
Mozilla that embeds VM in-process.
I'm not sure why cao wei can't build the plugin/win32 directory: it
builds just fine on the buildbot Win2003 slave ... ?
--
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
Wei Cao
2008-12-12 09:36:17 UTC
Permalink
OK, I have compiled npgnash.dll successfully using the plugin.h I found in

http://bzr.savannah.gnu.org/lh/gnash/files/10398?file_id=win32-20060806180214-7b9ymp6ydt7o-1

with small modification.

But I still want to know why it hasn't been included in source code package
released...
Post by Wei Cao
It's strange...I download serveral source code packages released, such as
gnash-0.8.1,0.8.2,0.8.3, 0.8.4, there is only one plugin.h under directory
plugin/, and this head file is for unix, not for win32. I check directory
plugin/win32, there is only a plugin.cpp, no corresponding plugin.h for
win32.
but soon I find this site,
http://bzr.savannah.gnu.org/lh/gnash/files/10398?file_id=win32-20060806180214-7b9ymp6ydt7o-1
it seems a http code repository for gnash, there are five source code files
under plugin/win32, including the missing plugin.h that released source
code packages do not contain. May be these files do not be copied from trunk
to released version by mistake?
I will try them immediately.
Post by cao wei
Post by Bastiaan Jacques
Post by cao wei
Besides, plugin.h needs X11, so I guess it should not be used in
win32,
Post by Bastiaan Jacques
Post by cao wei
isn't it? Where can I find a usable plugin.h for win32?
As far as I know plugin/win32 has gone largely unmaintained. However, it
should not be difficult to modify plugin/plugin.{cpp,h} to compile on
windows. The major problem then is to use a GUI which can use the -x ID
parameter to rendering into the specified window ID on Microsoft
Windows. So far as I can remember the only GUI capable of that is the
GTK GUI.
Unfortunately, none of the GUIs work with -x on Win32. That's why I
started work on plugin/win32, creating a native npgnash.dll plugin for
Mozilla that embeds VM in-process.
I'm not sure why cao wei can't build the plugin/win32 directory: it
builds just fine on the buildbot Win2003 slave ... ?
--
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
Bastiaan Jacques
2008-12-12 10:14:30 UTC
Permalink
You'll probably want to use the trunk sources. Instructions for fetching
are at:

https://savannah.gnu.org/bzr/?group=gnash

Bastiaan
Post by Wei Cao
OK, I have compiled npgnash.dll successfully using the plugin.h I found in
 
http://bzr.savannah.gnu.org/lh/gnash/files/10398?file_id=win32-20060806180214-7b
9ymp6ydt7o-1
 
with small modification.
 
But I still want to know why it hasn't been included in source code package
released...
It's strange...I download serveral source code packages released,
such as gnash-0.8.1,0.8.2,0.8.3, 0.8.4, there is only one plugin.h
under directory plugin/, and this head file is for unix, not for
win32. I check directory plugin/win32, there is only a plugin.cpp, no
corresponding plugin.h for win32.
but soon I find this site, 
http://bzr.savannah.gnu.org/lh/gnash/files/10398?file_id=win32-20060806180214-7b
9ymp6ydt7o-1
it seems a http code repository for gnash, there are five source code files
under plugin/win32, including the missing plugin.h that released  source
code packages do not contain. May be these files do not be copied from
trunk to released version by mistake?
I will try them immediately.
Post by Bastiaan Jacques
 Besides, plugin.h needs X11, so I guess it should not be used in
win32,
Post by Bastiaan Jacques
isn't it? Where can I find a usable plugin.h for win32?
As far as I know plugin/win32 has gone largely unmaintained.
However, it
Post by Bastiaan Jacques
should not be difficult to modify plugin/plugin.{cpp,h} to compile
on
Post by Bastiaan Jacques
windows. The major problem then is to use a GUI which can use the
-x ID
Post by Bastiaan Jacques
parameter to rendering into the specified window ID on Microsoft
Windows. So far as I can remember the only GUI capable of that is
the
Post by Bastiaan Jacques
GTK GUI.
Unfortunately, none of the GUIs work with -x on Win32.  That's why I
started work on plugin/win32, creating a native npgnash.dll plugin for
Mozilla that embeds VM in-process.
I'm not sure why cao wei can't build the plugin/win32 directory: it
builds just fine on the buildbot Win2003 slave ... ?
--
Panoptic Computer Network   | http://panoptic.com/
 "He realized the fastest way to change is to laugh at your own
   folly -- then you can let go and quickly move on." (p. 70)
Dossy Shiobara
2008-12-12 11:11:49 UTC
Permalink
Post by Wei Cao
OK, I have compiled npgnash.dll successfully using the plugin.h I found in
http://bzr.savannah.gnu.org/lh/gnash/files/10398?file_id=win32-20060806180214-7b9ymp6ydt7o-1
with small modification.
Great news!
Post by Wei Cao
But I still want to know why it hasn't been included in source code
package released...
Innocent mistake by the release packager, I bet? It certainly wasn't
left out intentionally, I'm sure.
--
Dossy Shiobara | ***@panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
Loading...