My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
CompilingThePlugin  
Instructions on checking out and compiling the source code.
Updated Oct 18, 2009 by leeor.ah...@gmail.com

What you'll need

  • An SVN client - such as TortoiseSVN for Windows.
  • The Mozilla source code - get it here.
  • Microsoft's Visual Studio - I used VS 2008.

Optionally, to sign XPIs and updates:

  • McCoy
  • Network Security Services (NSS) - from the NSS Mozilla FTP site, make sure you get the Windows package.
  • Netscape Portable Runtime (NPR) - from the NPR Mozilla FTP site, make sure you get the Windows package.
  • Microsoft's tool to import PVK files - pvkimprt.exe

Compiling the source

  • Head over to the sources repository and follow the guidelines to check out a copy of the code from the SVN repository.
  • I placed the Mozilla sources in c:\src\mozilla, you will need to change the include directories of the project if you places the sources in a different location.
  • The 'easiest' way to get all the include files is to actually build the Mozilla sources, which is not that easy, but follow this guide.
  • Build the plugin.

To sign the XPI

Useful articles about signing XPIs:

Important:

  • 7z cannot created signed XPIs. It's good enough for unsigned XPIs, but it will not be able to create proper signed XPIs.

Signing

Create the directory structure you desire under a folder named 'signed'

c:\tools\nss-3.9\bin\signtool.exe -d <certificate-path> -k <certificate-nickname> -p <password> signed

Creating the XPI

From within the 'signed' folder execute:

c:\mozilla-build\info-zip\zip <XPI-name> META-INF\zigbert.rsa
c:\mozilla-build\info-zip\zip -r -D <XPI-name> * -x META-INF\zigbert.rsa
Comment by roeyco...@gmail.com, Jan 11, 2009

Hi Leeor, could you please specify exactly which Mozilla source code archive you mean? a direct ftp link would be good...

sorry for bothering you :) Roey

Comment by project member leeor.ah...@gmail.com, Jan 12, 2009

One of the reasons I direct ppl to the mozilla ftp site is so that they can always download the latest version's sources.

ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0.5/source/ is the 3.0.5 sources.

And don't worry about it ;-)

Comment by roeyco...@gmail.com, Jan 12, 2009

yes but the previous link was too generic... i downloaded the source of Netscape :)

Comment by roeyco...@gmail.com, Jan 13, 2009

Hello, i managed to compile the source by adding these directories to the VC++ Include Dirs (assuming you extracted the source into c:\mozilla) :

C:\mozilla\nsprpub\pr\include\obsolete

C:\mozilla\nsprpub\pr\src\md\mac

C:\mozilla\nsprpub\pr\include

C:\mozilla\modules\plugin\base\public

C:\mozilla\embedding\browser\activex\src\pluginhostctrl\pluginsdk_include

so i don't think there's a need to compile the whole Mozilla source.

Roey

Comment by project member leeor.ah...@gmail.com, Jan 13, 2009

That's great!

Thanks for the information.

Comment by er.prave...@gmail.com, Feb 11, 2009

Hi Leeor,

Can you please help me how to download the source code as I wish to build the same for my project.

Thanks in advance.

regards, Praveen

Comment by project member leeor.ah...@gmail.com, Feb 11, 2009

Hi Praven,

You need to check the code out of the SVN repository using an SVN client. The information you need can be found on the 'Source' tab of this site.

Please use the Google Group set up for this project for help and questions regarding the project. It's at http://groups.google.com/group/ff-activex-host.

Leeor.

Comment by project member leeor.ah...@gmail.com, Feb 11, 2009

Using an SVN client you can download a copy of all the files, no need to do it for each one.

Again, please use the Google group for asking assistance.

Comment by clayli...@gmail.com, Feb 20, 2009

xcomp-config.h is missing in my build environment from the source links by Roey above. I have to use Gecko SDK http://forums.mozillazine.org/viewtopic.php?f=27&t=169114 to get xcomp-config.h, that's all for me to build.

Comment by ger...@gmail.com, Jun 8, 2009

After project build I get dll library. How do I make xpi extension out of that?

Comment by amitkuma...@gmail.com, Jul 2, 2009

But I am not able to display activex control but I can see see that activex control on IE not in fire fox. I am telling you the steps. 1) Downloaded the source code from svn repository and makes the changes a) In file active.cpp static const char TrustedLocations? = {"http://localhost:1205/ff-activex-hostWeb/TestActiveXControl.htm"};(url of test app using activex) static const unsigned int numTrustedLocations = 1; b)In file axhost.cpp

static const char WellKnownProgIds? = {
"ProTestActiveX.UserControl1?" };(this is my progid find from registry)
static const char WellKnownClsIds? = {
"E2CBBFDD-2F66-4011-83D2-0B59EEFC61EA"
};(this is my clsid find from registry)
2) For compiling the source code I downloaded xulrunner-1.9.0.11.en-US.win32.sdk 3) then visual studio 2008 editor Projects->ffactivex properties->C/C++->general->Additional Include directory I set the path of xulrunner-1.9.0.11.en-US.win32.sdk include folder path Now after compiling I get the npffax.dll in release folder. 4) I copied this dll to activex plugin folder but I am not able to see active x control .Could you please tell me whats wrong here.

Comment by project member leeor.ah...@gmail.com, Jul 2, 2009

The same way I asked previous commenters, please use the Google discussion group for technical issues. This is not the place for these questions. The group also has information that could help you with your problem.

You are not supposed to use the whole URL, just the hostname.

Comment by roeyco...@gmail.com, May 25, 2011

Hi,

This page should really be updated since you moved to Mercurial.

Powered by Google Project Hosting