How to Build the environment of XPCOM in Windows XP

Source: Internet
Author: User

How to Build the environment of XPCOM in Windows XP

1. Download xulrunner-1.8.0.4.en-US.win32.zip
And extract it in the appropriate folder, for example 'C:/XXX/
Xulrunner-1.8.0.4 '.

2. Download gecko-sdk-win32-msvc-1.8.0.4.zip
And extract it in the appropriate folder, for example 'C:/XXX/xulrunner-1.8.0.4/
Gecko-sdk-1.8.0.4 '.

3. Click 'My Computer 'By the right button
Of mouse, and select 'properties' menu item.

4. Select 'advanced 'tab page in
Dialog, please refer the figure-1 below.


Figure-1

5. Click 'Environment variables 'button and
Add 'C:/XXX/xulrunner-1.8.0.4/gecko-sdk-1.8.0.4/bin' into the environment
Variable of 'path', and then click OK until closing all dialogs.

6. Download wintools.zip
And extract 'wintools/buildtools/Windows/bin/x86/glib-1.2.dll, libIDL-0.6.dll'
Into 'C:/XXX/xulrunner-1.8.0.4/gecko-sdk-1.8.0.4/bin'. If you are a perfectionist,
Please extract 'buildtools/Windows/lib/glib-1.2.lib, libIDL-0.6.lib'
'C:/XXX/xulrunner-1.8.0.4/gecko-sdk-1.8.0.4/lib 'J.

OK, if you there any '*. IDL' files
Generate '*. H' and' *. xpt ', now you can try.

For instance:

C:/YYY> xpidl.exe-M header-I c:/XXX/xulrunner-1.8.0.4/gecko-sdk-1.8.0.4/IDL
Imycomponent. IDL

C:/YYY> xpidl.exe-M typelib-I c:/XXX/xulrunner-1.8.0.4/gecko-sdk-1.8.0.4/IDL
Imycomponent. IDL

Notice:

Xxx indicates the root directory of xulrunner-1.8.0.4
And YYY contains the '*. IDL'. For this case, it is imycomponent. IDL.

When you finish buiding, 'imycomponent. H'
And 'imycomponent. xpt' are found in the current directory. Otherwise, please
Recheck the related configuration!

7. Download mozilla-win32-1.8b1.zip
And unpack it into appropriate folder. For example, 'c:/XXX/xulrunner-1.8.0.4/mozilla-1.8b1 '.

8. If you '*. dll' and '*. xpt' are available
Now, please copy them into 'C:/XXX/xulrunner-1.8.0.4/mozilla-1.8b1/components ',
Then use 'regxpcom.exe 'to register them into Mozilla.

For example:

C:> regxpcom.exe-X "C:/XXX/xulrunner-1.8.0.4/mozilla-1.8b1/components"

Notice:

1. If the path already des blackspaces, the double
Quotation (") must be used.

2. When you meet the trouble with
Following errors, please use xpidl.exe to regenerate '*. H' and' *. xpt 'in
Your environment. As you know, some samples utilize the new/old version to do
That, and will not wholly match your configuration for ever.

"Can not initialize XPCOM glue"

"Can not aquire component
Registrar"

"Registration failed:
(C1f30001) files/Mozilla"

"Can not initialize XPCOM glue"

"Can not aquire component
Registrar"

"Registration failed:
(C1f30001) Mozilla/components"

8. If all JavaScript and HTML files are
Ready, please use Mozilla to open and check the result.

 

[Summarization and Suggestions]

1. It only introduces howto for Mozilla
Browser, but it is common way to other, such as Firefox, etc.

2. Please keep aware that the versions
Between Mozilla and Geck-SDK had better be coherent, otherwise it maybe brings
About some unknown issues (free source codes are free for anythings including
Bugsj ).

3. If you can not decide whether or not
Registeration is successful, please use xpcomviewer
Into your browser to check.

4. If you fail to register XPCOM after
Invoking regxpcom.exe, please add an empty file '. autoreg' in the same ill/Firefox
Folder. For instance, 'c:/XXX/xulrunner-1.8.0.4/mozilla-1.8b1 'or 'C:/Program
Files/Mozilla Firefox '. Try it again.

5. When you compile your source codes, you
Must take aware of macros and libs depended. For example, if Mozilla or Firefox
Is used to load your program, pleaseDo
Not
DefineXpcom_glueAnd only link
XPCOM. Lib xpcomglue_s.lib, Otherwise
Xpcomglue. Lib is available. In some special cases, you must add nspr4.lib for
Former, however, you must try you best to avoid this scenario. Moreover, if you
Want to be compatible to the old version of browser, please addMozilla_strict_apiFor preprocesser. I
Stronugly recommend that you had better read the related notices before you test.

6. Please do you best to find the proper SDK
When you decide to build environement. If xulrunner-SDK and gecko-SDK have
Been integrated in the package, and it is luckyj.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.