I'm trying to build mozzilla in order to see a good example
application of XPCOM. I read somewhere (http://www.ibm.com/
developerworks/webservices/library/co-xpcom3.html) that this was a
good way to get a working version. However, that website seemed to be
out of date.
I would like to get some sort of "hello world" type of application of
XPCOM on which I could conduct further experiements.
Any suggestions about how I should get started?
In trying to build an example app., I've been trying to build firefox
following the directions at
http://developer.mozilla.org/en/docs/Build_Documentation
I'm downloaded the zip file with the source and I'm trying to build on
Windows XP. I have cygwin and MSVC 6.0 installed. When I run:
make -f client.mk
I get the output shown below. It looks like the first problem is
/d/ComponentFrameworks/XPCOM/mozilla/browser/config/version.txt
cannot be found. What creates that file? Any ideas how to fix that?
The bigger question is, is there a better way to get a simple working
example of XPCOM?
thanks,
Chris
==========================
Adding client.mk options from /cygdrive/d/ComponentFrameworks/XPCOM/
mozilla/.mozconfig:
MOZ_CO_PROJECT=browser
cd /d/ComponentFrameworks/XPCOM/mozilla
/d/ComponentFrameworks/XPCOM/mozilla/configure
In configure...
Adding configure options from /cygdrive/d/ComponentFrameworks/XPCOM/
mozilla/.mozconfig:
--disable-optimize
--enable-debug
--disable-tests
--disable-static
--enable-shared
--enable-win32-target
--with-windows-version=500
--enable-application=browser
loading cache ./config.cache
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking build system type... i686-pc-mingw32
checking for gcc... (cached) cl
checking whether the C compiler (cl ) works... yes
checking whether the C compiler (cl ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether cl accepts -g... (cached) no
checking for c++... (cached) cl
checking whether the C++ compiler (cl ) works... yes
checking whether the C++ compiler (cl ) is a cross-compiler... no
checking whether we are using GNU C++... (cached) no
checking whether cl accepts -g... (cached) no
checking for ranlib... (cached) ranlib
checking for ml... (cached) /c/cygwin/bin/as
checking for ar... (cached) ar
checking for ld... (cached) link
checking for strip... (cached) strip
checking for windres... (cached) windres
checking for gawk... (cached) gawk
checking for midl... (cached) midl
checking for midl flags... none needed
checking how to run the C preprocessor... cl
checking for mmintrin.h... (cached) no
checking how to run the C preprocessor... cl
checking how to run the C++ preprocessor... (cached) /lib/cpp
checking for a BSD compatible install... (cached) ''\'''\''\'\'''\''/
bin/install -c'\''\'\'''\'''\'''
checking whether ln -s works... (cached) no
checking for perl5... (cached) /bin/perl
checking for minimum required perl version >= 5.004... 5.006001
checking for full perl installation... yes
checking for doxygen... (cached) /c/cygwin/bin/doxygen
checking for whoami... (cached) /c/cygwin/bin/whoami
checking for autoconf... (cached) /bin/autoconf
checking for unzip... (cached) /d/mozilla-build//info-zip/unzip
checking for zip... (cached) /d/mozilla-build//info-zip/zip
checking for makedepend... no
checking for xargs... (cached) /bin/xargs
checking for make... (cached) /local/bin/make
checking for X... (cached) no
checking for 64-bit OS... no
cat: /d/ComponentFrameworks/XPCOM/mozilla/browser/config/version.txt:
No such file or directory
creating browser/Makefile
can't read /d/ComponentFrameworks/XPCOM/mozilla/browser/Makefile.in:
No such file or directory
creating browser/app/Makefile
can't read /d/ComponentFrameworks/XPCOM/mozilla/browser/app/
Makefile.in: No such file or directory
creating browser/app/profile/extensions/Makefile
can't read /d/ComponentFrameworks/XPCOM/mozilla/browser/app/profile/
extensions/Makefile.in: No such file or directory
creating browser/base/Makefile
can't read /d/ComponentFrameworks/XPCOM/mozilla/browser/base/
Makefile.in: No such file or directory
Makefile
...several other similar messages regarding Makefile.in
creating chrome/tools/chromereg/Makefile
can't read /d/ComponentFrameworks/XPCOM/mozilla/chrome/tools/
chromereg/
Makefile.in: No such file or directory
updating cache ./config.cache
creating ./config.status
creating config/autoconf.mk
creating config/doxygen.cfg
creating xpfe/global/buildconfig.html
creating toolkit/content/buildconfig.html
creating toolkit/components/passwordmgr/resources/content/contents.rdf
creating toolkit/mozapps/contents-content.rdf
creating gfx/gfx-config.h
gfx/gfx-config.h is unchanged
creating netwerk/necko-config.h
netwerk/necko-config.h is unchanged
creating xpcom/xpcom-config.h
xpcom/xpcom-config.h is unchanged
creating xpcom/xpcom-private.h
xpcom/xpcom-private.h is unchanged
configuring in nsprpub
running /bin/sh /d/ComponentFrameworks/XPCOM/mozilla/nsprpub/
configure --disable-optimize --enable-debug --disable-tests --
disable-
static --enable-shared --enable-win32-target --with-windows-
version=500 --enable-application=browser --with-dist-prefix=d:/
ComponentFrameworks/XPCOM/mozilla/dist --with-mozilla --cache-
file=.././config.cache --srcdir=/d/ComponentFrameworks/XPCOM/mozilla/
nsprpub
/d/ComponentFrameworks/XPCOM/mozilla/nsprpub/configure:
ac_add_options: command not found
loading cache .././config.cache
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking build system type... i686-pc-mingw32
checking for cl... (cached) cl
configure: error: Missing OS_TARGET for i686-pc-mingw32. Use --
enable-
win32-target to set.
configure: error: /d/ComponentFrameworks/XPCOM/mozilla/nsprpub/
configure failed for nsprpub
*** Fix above errors and then restart with "make -f
client.mk build"
make: *** [/d/ComponentFrameworks/XPCOM/mozilla/Makefile] Error 1
Instead, I will download and attempt to build Firefox as an example of
XPCOM. Again, if anyone has a better suggestion, please let me know.
thanks,
chris
> I would like to get some sort of "hello world" type of application of
> XPCOM on which I could conduct further experiements.
>
> Any suggestions about how I should get started?
Perhaps you should try to download the Gecko SDK via
http://developer.mozilla.org/en/docs/Gecko_SDK
But depending on what you really want to do with XPCOM you should
perhaps try to build XULRunner instead.
About the ZIP source: you didn't say which file you actually downloaded
but I guess it would be simpler to download the sources using CVS, for
your purpose probably from the MOZILLA_1_8_BRANCH or one of the releases.
Cheers,
Peter.
Peter, the mozilla package I downloaded and tried to build was the
1.8b1 tar file.
I downloaded firefox (2.0.0.7) and started a build. It went for a
while (~ 1 hour) but eventually there was a compilation error:
DownloadManager.cpp(2333) : error C2520: conversion from unsigned
__int64 to double not implemented, use signed __int64
Instead of debugging the problem here, I will probably take your
suggestion of building Gecko or XULRunner instead.
I am interested in XPCOM for:
-as a basis for component framework
-it's scriptability features
-it's cross-platform (linux & windows) aspect
-remote component access
So if one or the other of the Gecko or XULRunner projects demostrates
these features (and/or others I might not be thinking about right
now), I would choose the one that better demostrates the features. If
they are more or less equal in that regard, I would choose the simpler
project.
Based on those needs, which project do you think would be better? Is
one significantly more complex than the other?
Thanks,
Chris
Forgot to mention...the languages in which I will use XPCOM are
primarily C++ and C.
Oh yes, that must be really old and surely is obsolete.
>> I downloaded firefox (2.0.0.7) and started a build. It went for a
>> while (~ 1 hour) but eventually there was a compilation error:
>>
>> DownloadManager.cpp(2333) : error C2520: conversion from unsigned
>> __int64 to double not implemented, use signed __int64
That might have been fixed by the patch in
https://bugzilla.mozilla.org/show_bug.cgi?id=305073
so it will be in Firefox 2.0.0.8.
>> Instead of debugging the problem here, I will probably take your
>> suggestion of building Gecko or XULRunner instead.
>>
>> I am interested in XPCOM for:
>> -as a basis for component framework
>> -it's scriptability features
>> -it's cross-platform (linux & windows) aspect
I'm not really qualified to answer this but to me it seems that these three
are met by XPCOM, and that you can get either by downloading the Gecko SDK
(and then run against the libraries of Firefox or XULRunner) or compiling
XULRunner (and the SDK with it) yourself.
>> -remote component access
Not sure what this means.
> Forgot to mention...the languages in which I will use XPCOM are
> primarily C++ and C.
C++ is possible, sure, using it in plain C doesn't make much sense to me.
Peter.