Help: Newbie needs some TLC Please

View: New views
4 Messages — Rating Filter:   Alert me  

Help: Newbie needs some TLC Please

by graniteglory :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am a newbie and its my first time trying to embed gecko into my
application.

1. This is my very first time seen Mozilla source code/structure/
directory and so on.
2. downloaded "mozilla-1.9.1" and ran "make client.mk build"
3. I can not find MFCEmbed anywhere including "mozilla-1.9.1/embedding/
tests"
4. Other tests (winEmbed, wxEmbed) do not compile correctly or VC++
project does not convert or work
5. My environment is VC++ 10 beta 1 (I want to use Lambda and
Concurrency runtime).
6. I searched google and read mozilla developer document. It is
confusing and not very up to date.

My task

1. Just want to embed a browser window in my application window like
IE control but I want to use native gecko API calls instead of IE
wrapper.
2. I do not need to debug into firefox or gecko.
3. My app is built using VC++ 10 and WTL.
4. My app and only my app needs to be on VC++ 10. I also have VC++ 9
and used it to compile firefox using "start-msvc9" shell.

My question:

1. Do I need to download firefox source code for this task ?
2. What source/tool do I need ?
2.1 (yes or no) firefox-3.5.3.source.tar.bz2 (ftp://ftp.mozilla.org/
pub/mozilla.org/firefox/releases/latest-3.5/source/)
2.2 (yes or no) xulrunner-1.9.1.3.en-US.win32.sdk.zip ()
2.3 (yes or no) gecko-sdk-i586-pc-msvc ()
2.4 (yes or no) MozillaBuildSetup-Latest.exe (ftp://ftp.mozilla.org/
pub/mozilla.org/mozilla/libraries/win32/)
3. Is there simple gecko sample application with VC solution/project
where I can look how to do ? Is it MFCEmbed or winEmbed ?
4. Is there binary Win32 gecko I can get without compiling firefox
myself for embedding task ?
5. If it's too lengthy tutorial I am asking, where can I find
preferably step-by-step newbie instruction I can read about ?
6. Could I please get dummy's guide to getting a sample VC++ project
complied and running ?

Thanks very much for reading.
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding

Re: Help: Newbie needs some TLC Please

by Benjamin Smedberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/26/09 4:49 AM, graniteglory wrote:

> 3. I can not find MFCEmbed anywhere including "mozilla-1.9.1/embedding/
> tests"

MFCEmbed was very old, unmaintained and broken code and has been removed.

> 4. Other tests (winEmbed, wxEmbed) do not compile correctly or VC++
> project does not convert or work

wxEmbed is also unmaintained and broken, and has been removed in later versions.

winEmbed does work, last I checked, but I don't know about any VC++ project
file: it probably only builds with the standard mozilla makefiles.

> 6. I searched google and read mozilla developer document. It is
> confusing and not very up to date.

Which document did you read?

> 1. Do I need to download firefox source code for this task ?

Not necessarily, I think you can probably just use the
https://developer.mozilla.org/En/Gecko_SDK and prebuilt XULRunner binaries.

> 2.4 (yes or no) MozillaBuildSetup-Latest.exe (ftp://ftp.mozilla.org/
> pub/mozilla.org/mozilla/libraries/win32/)

If you are using MSVC projects to build your code, you probably don't need
mozillabuild.

> 3. Is there simple gecko sample application with VC solution/project
> where I can look how to do ? Is it MFCEmbed or winEmbed ?

No, there is not. But you can probably get things working by reading the
winEmbed code and copying the bits that are relevant to you and creating
your own MSVC project file. See https://developer.mozilla.org/en/XPCOM_Glue
for the compile and linker flags you'd need to use.

Note that this is not a common usage any more, so there aren't going to be a
lot of examples out there to follow. Feel free to ask followup questions in
this newsgroup if you get stuck.

> 4. Is there binary Win32 gecko I can get without compiling firefox
> myself for embedding task ?

Yes, it's called XULRunner.

--BDS
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding

Re: Help: Newbie needs some TLC Please

by graniteglory :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> winEmbed does work, last I checked, but I don't know about any VC++ project
> file: it probably only builds with the standard mozilla makefiles.

Surprising... Does this mean there is no sample project that will
compile correctly under VC++ within mozilla ?
Anyways, then how can I compile winEmbed using "start-msvc9" shell ?
************ winEmbed does not compile under VC++ 9 IDE
*******************


> > 6. I searched google and read mozilla developer document. It is
> > confusing and not very up to date.
>
> Which document did you read?

Gecko Embedding Basics
and embedding projects documentation that links.
anything related to sample codes are all confusing and not up to date
whatsoever.
And I am not the only one who say it is out of date.

> > 1. Do I need to download firefox source code for this task ?
>
> Not necessarily, I think you can probably just use thehttps://developer.mozilla.org/En/Gecko_SDKand prebuilt XULRunner binaries.
>
> > 2.4 (yes or no) MozillaBuildSetup-Latest.exe (ftp://ftp.mozilla.org/
> > pub/mozilla.org/mozilla/libraries/win32/)
>
> If you are using MSVC projects to build your code, you probably don't need
> mozillabuild.

Anything related to building with VC++ 9 is very vague.

> > 3. Is there simple gecko sample application with VC solution/project
> > where I can look how to do ? Is it MFCEmbed or winEmbed ?
>
> No, there is not. But you can probably get things working by reading the
> winEmbed code and copying the bits that are relevant to you and creating
> your own MSVC project file. Seehttps://developer.mozilla.org/en/XPCOM_Glue
> for the compile and linker flags you'd need to use.
>
> Note that this is not a common usage any more, so there aren't going to be a
> lot of examples out there to follow. Feel free to ask followup questions in
> this newsgroup if you get stuck.

I just can't believe that there is no sample code that works correctly
with VC++ 9 when it comes to embedding.
I have to jump through hoops to get a sample code compile with VC++ 9.
Hmmm....

> > 4. Is there binary Win32 gecko I can get without compiling firefox
> > myself for embedding task ?

I assumed incorrectly that once firefox is installed I should be able
to get a gecko embedding sample to work without anything.
As it is, I have:

"hg clone http://hg.mozilla.org/releases/mozilla-1.9.1/ 191src"

and built it... no sample that works...

I wanted to ask whether there is a packaged distribution binary to
include for embedding and other update issue along side with existing
firefox installation if any.
At this point, I am fast losing confidence if I can even get this
within reasonable time.

Apparently, embedding mozilla/gecko within c++ app is more difficult
and larger topic than I have initially imagined.
According to several postings like:

----
http://www.nabble.com/embedding-build-in-firefox-3.*---xulrunner-1.9--td21849094.html
http://groups.google.com/group/mozilla.dev.embedding/browse_thread/thread/31a22e981127c878
----

Please someone clarify.
Thanks very much
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding

Re: Help: Newbie needs some TLC Please

by graniteglory :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Woohoo !

I guess I found my answer and here it is for someone who may be
looking for the same.

Tada... Super excellent example...

https://wiki.mozilla.org/Embedding/NewApi/Win32

It even works with VC++ 10 B2.

Thanks for All the Fish.
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding