Posted by Fox on 11 Oct 2007 at 11:48 am | Tagged as: Firefox features
Required bits one important prerequisite of constructing a SDK is the obvious and necessary skill of identifying and packaging required files. As an example, one can create a directory under “embedding” called config, and the directory can further hold several makefiles:
- basebrowser-unix;
- basebrowser-win.
An identical format is followed in the XPInstall packager. But in this case study, there is only one named XPI package. Once the build is completed, you can change the directory into mozilla/embedding/config, and perform a make. Your actions will create a directory in DIST called Embed. This incorporates all the necessary base support required to initialise a web browser. At a point during the start of your application, it will become necessary to initialize (XPCOM). Be sure to switch it off when you exit. It is also important to perform other initializations in order to start up event queues and load some string bundles, all of which can be referred to as generic ad have been housed in a static library you can simply call on anytime.
When you build mozilla/embedding/base/, a static library on windows referred to as baseembed_s.lib is created. Simply link this library to your application. Two other required functions are:
- nsresult NS_InitEmbedding;
- nsresult NS_TermEmbedding.
Their usefulness is vivid for all to see. The aPath parameter will be routed to NS_InitXPCOM. It is of uttermost importance to call NS_InitEmbedding from the main thread of your application or else it will not perform.