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
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
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 ;-)
yes but the previous link was too generic... i downloaded the source of Netscape :)
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
That's great!
Thanks for the information.
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
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.
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.
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.
After project build I get dll library. How do I make xpi extension out of that?
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 WellKnownProgIds? = {
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.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.
Hi,
This page should really be updated since you moved to Mercurial.