Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Source for MoziMeleon
Posted by: Mark Lodato
Date: April 29, 2003 10:30PM

Hey MonkeeSage,
Could you post the sources for your builds on your site? I want to start playing around with KM but your builds are so great, I don't want to sacrifice the features in your builds.

Thanks,
Mark

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: MonkeeSage
Date: May 02, 2003 01:45AM

Mark:

Sure thing. I've been moving into a new aprt. last few days and haven't had internet access, so forgive me for taking a couple days to reply.

I'll pack up my current source tree for the 1.4b build, and the batch file to set up your environment to grab mozilla off CVS & compile it (which you'll need for the moz libs that K-Meleon links to), and I'll write a short little instructions.

To get it all built and working you'll need Cygwin w/ dev tools installed (for mozilla), from http://www.cygwin.com , and MSVC++ (or MSDS) 6 or better (for the K-Meleon workspace and project files).

Give me about 20 minutes to get it all together and up the .zip package.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: MonkeeSage
Date: May 02, 2003 02:47AM
Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: asmpgmr
Date: May 02, 2003 02:44PM

MonkeeSage,

Maybe you should consider also posting the Mozilla include files and libraries (xpcom.lib baseembed_s.lib nspr4.lib plc4_s.lib) for both 1.2.1 and 1.4b so that downloading and building all of Mozilla isn't required.

By the way did you get a chance to test my favorites quicksearch lookup update yet ?

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: MonkeeSage
Date: May 03, 2003 05:16PM

asmpgmr:

The main mozilla libs are unfortunately dynamically linked with hundreds of other lib and idl files (a search from the top reveals 492 .lib files and 2,238 .idl files). About a third of the libs and a tenth of the idls look to be directly linked with the main libs. Plus one also needs the actual runtimes (dll), which are another 8-10 megs compressed. The package with all the necessary libs, idls, dlls and headers would be huge (I'd estimate anywhere from 30-60+ megs); too huge for my amount of web space I think.

About the favorites nicknames, I had forgoteen about that; I have been working on a little project I'm going to submit to the dev-list as a draft idea for .8 when it is relatively bug-free, so I've been spending most of my time working out the kinks in that. I'll do your favorites update today though, in the next few hours. I'll update the builds page when it is in.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: asmpgmr
Date: May 03, 2003 11:52PM

MonkeeSage,

That's too bad, there should definitely be a way to build K-Meleon (or any Gecko browser) without having to download and build all (or most) of Mozilla. There is a win32 Gecko SDK on the ftp site which has a bunch of .lib files but it doesn't have the needed header files which makes somewhat it useless.

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: Mark Lodato
Date: May 04, 2003 12:33AM

Hey, thanks a lot! I got the Mozilla CVS and I made all the changes you said, but I'm getting an error when I'm running 'make build_all'. Here's the last thing it says:

make[2]: Entering directory `/cygdrive/c/mozilla/mozilla/js/src'
rm -f js3250.dll
link /NOLOGO /DLL /OUT:js3250.dll /PDB:js3250.pdb /SUBSYSTEM:WINDOWS jsapi.obj jsarena.obj jsarray.obj jsatom.obj jsbool.obj jscntxt.obj jsdate.obj jsdbgapi.obj jsdhash.obj jsdtoa.obj jsemit.obj jsexn.obj jsfun.obj jsgc.obj jshash.obj jsinterp.obj jslock.obj jslog2.obj jslong.obj jsmath.obj jsnum.obj jsobj.obj jsopcode.obj jsparse.obj jsprf.obj jsregexp.obj jsscan.obj jsscope.obj jsscript.obj jsstr.obj jsutil.obj jsxdrapi.obj prmjtime.obj js3240.res /OPT:NOICF fdlibm/fdm.lib ../../dist/lib/nspr4.lib ../../dist/lib/plc4.lib ../../dist/lib/plds4.lib kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib
Creating library js3250.lib and object js3250.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
jsdbgapi.obj : error LNK2001: unresolved external symbol __js_LookupProperty
jsemit.obj : error LNK2001: unresolved external symbol __js_LookupProperty
jsfun.obj : error LNK2001: unresolved external symbol __js_LookupProperty
jsparse.obj : error LNK2001: unresolved external symbol __js_LookupProperty
js3250.dll : fatal error LNK1120: 1 unresolved externals
make[2]: *** [js3250.dll] Error 96
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla/js/src'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla/js'
make: *** [all] Error 2

(I ran make from the mozilla/js directory so that I could get the error quicker.)

Does anyone have any ideas on what the problem is?

Thanks again,
Mark

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: MonkeeSage
Date: May 04, 2003 01:32AM

Mark:

Try adding this line to env.bat (or entering it in the same command window that the batch file has already been run in):

set LDFLAGS=%LDFLAGS%;/NODEFAULTLIB:MSVCRT

If that has a problem try:

set LDFLAGS=%LDFLAGS%;/NODEFAULTLIB:mscvrt.lib


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: Mark Lodato
Date: May 04, 2003 02:03AM

Thanks for the quick reply!

I tried both and they both gave me the same thing:

link /NOLOGO /DLL /OUT:js3250.dll /PDB:js3250.pdb /SUBSYSTEM:WINDOWS jsapi.obj
jsarena.obj jsarray.obj jsatom.obj jsbool.obj jscntxt.obj jsdate.obj jsdbgapi.ob
j jsdhash.obj jsdtoa.obj jsemit.obj jsexn.obj jsfun.obj jsgc.obj jshash.obj jsin
terp.obj jslock.obj jslog2.obj jslong.obj jsmath.obj jsnum.obj jsobj.obj jsopcod
e.obj jsparse.obj jsprf.obj jsregexp.obj jsscan.obj jsscope.obj jsscript.obj jss
tr.obj jsutil.obj jsxdrapi.obj prmjtime.obj js3240.res /NODEFAULTLIB:MSVCRT;
/OPT:NOICF fdlibm/fdm.lib ../../dist/lib/nspr4.lib ../../dist/lib/plc4.lib ..
/../dist/lib/plds4.lib kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib
advapi32.lib
Creating library js3250.lib and object js3250.exp
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_NewCondVar
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_NewCondVar
jsstr.obj : error LNK2001: unresolved external symbol __imp__PR_NewLock
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_NewLock
jsarena.obj : error LNK2001: unresolved external symbol __imp__PR_NewLock
jsdtoa.obj : error LNK2001: unresolved external symbol __imp__PR_NewLock
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_NewLock
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_DestroyCondVar
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_DestroyCondVar
jsstr.obj : error LNK2001: unresolved external symbol __imp__PR_DestroyLock
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_DestroyLock
jsarena.obj : error LNK2001: unresolved external symbol __imp__PR_DestroyLock
jsdtoa.obj : error LNK2001: unresolved external symbol __imp__PR_DestroyLock
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_DestroyLock
jsgc.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jsobj.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jsstr.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jsarena.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jscntxt.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jsdtoa.obj : error LNK2001: unresolved external symbol __imp__PR_Unlock
jsobj.obj : error LNK2001: unresolved external symbol __imp__PR_WaitCondVar
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_WaitCondVar
jscntxt.obj : error LNK2001: unresolved external symbol __imp__PR_WaitCondVar
jsgc.obj : error LNK2001: unresolved external symbol __imp__PR_WaitCondVar
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_WaitCondVar
jsgc.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jsobj.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jsstr.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jsarena.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jscntxt.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jsdtoa.obj : error LNK2001: unresolved external symbol __imp__PR_Lock
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyCondVar
jsgc.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyCondVar
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyCondVar
jsobj.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyAllCondVar
jsapi.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyAllCondVar
jscntxt.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyAllCondVar
jsgc.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyAllCondVar
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_NotifyAllCondVar
jsscope.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsstr.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsobj.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsparse.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsregexp.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsatom.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jscntxt.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsfun.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsinterp.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
jsdbgapi.obj : error LNK2001: unresolved external symbol __js_LookupProperty
jsemit.obj : error LNK2001: unresolved external symbol __js_LookupProperty
jsfun.obj : error LNK2001: unresolved external symbol __js_LookupProperty
jsparse.obj : error LNK2001: unresolved external symbol __js_LookupProperty
jsscope.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
jsstr.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
jsfun.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
jsobj.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
jsparse.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
jsregexp.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
jslock.obj : error LNK2001: unresolved external symbol __imp__PR_GetCurrentThread
jsmath.obj : error LNK2001: unresolved external symbol _fd_atan2
jsmath.obj : error LNK2001: unresolved external symbol _fd_copysign
jsmath.obj : error LNK2001: unresolved external symbol _fd_pow
js3250.dll : fatal error LNK1120: 16 unresolved externals
/OPT:NOICF: not found
make[4]: *** [js3250.dll] Error 127
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/js/src'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla/js'
make[2]: *** [tier_2] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make: *** [build] Error 2

Hmmm.....

Mark

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: MonkeeSage
Date: May 04, 2003 03:58AM

Mark:

Ok, try this take out the LDFLAGS thing and change the line in the batch file from this:

set PATH=%PATH%;%MOZ_TOOLS%\bin;c:\cygwin\bin

To this:

set c:\cygwin\bin;PATH=%PATH%;%MOZ_TOOLS%\bin

And then add this line:

If that also doesn't work, you can try setting the MSVC compiler explicitly to make.exe and the linker to ld.exe with these reg scripts:

http://monkeesage.d2g.com/compiler.reg
http://monkeesage.d2g.com/linker.reg

Just change the lines to reflect your make and ld path (e.g., C:\Cygwin\bin\make.exe)

"Executable Path"="cl.exe"

And:

"Executable Path"="link.exe"

(Be sure to set them back to cl.exe and link.exe when you are done!).

Finally, If that doesn't work, try follow this site to a "t":

http://www.mozilla.org/build/win32.html


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: Mark Lodato
Date: May 04, 2003 06:15PM

Hmm. I have no idea what the problem was, but I just deleted my mozilla directory, then downloaded a nightly source. I didn't use any CVS, then just compiled it. It works fine now.

Your build seemd to work fine, except for these few errors:

C:\mozilla\k-meleon\history\hist_view.cpp(1137) : error C2065: 'MIIM_STRING' : undeclared identifier
C:\mozilla\k-meleon\ns_bookmarks\ns_bookmarks_edit.cpp(1744) : error C2065: 'MIIM_STRING' : undeclared identifier
C:\mozilla\k-meleon\ns_bookmarks\ns_bookmarks_utils.cpp(780) : error C2664: 'CreateDialogParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned in
t,long)'
None of the functions with this name in scope match the target type
op_edit.cpp
C:\mozilla\k-meleon\op_hotlist\op_edit.cpp(1520) : error C2065: 'MIIM_STRING' : undeclared identifier

Everything else compiled fine.

And, even though the thing still works, do you know if there's a way to get rid of these warnings:
../mozilla/dist/include\mozilla-config.h(34) : warning C4005: 'WIN32_LEAN_AND_MEAN' : macro redefinition
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxv_w32.h(72) : see previous definition of 'WIN32_LEAN_AND_MEAN'
../mozilla/dist/include\mozilla-config.h(40) : warning C4005: '_X86_' : macro redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windows.h(123) : see previous definition of '_X86_'
../mozilla/dist/include\mozilla-config.h(34) : warning C4005: 'WIN32_LEAN_AND_MEAN' : macro redefinition
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxv_w32.h(72) : see previous definition of 'WIN32_LEAN_AND_MEAN'
../mozilla/dist/include\mozilla-config.h(40) : warning C4005: '_X86_' : macro redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windows.h(123) : see previous definition of '_X86_'

Thanks again for all the help,
Mark

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: MonkeeSage
Date: May 04, 2003 10:05PM

Mark:

1. MIIM_STRING is a newer version of the MFT_STRING mask (it's menu related stuff). First try including windows.h at the top of the files having the problem and adding user32.lib as one of its link targets in the settings dialog (Link tab, select General or Input from the drop down menu).

If still no go, try just switching it to the depricated version (which will still work exactly the same), and change all the "MIIM_STRING" to "MFT_STRING".


2. Go to settings dialog, select the problem project (i.e., ns_bookmarks) from the list on the left, drop down the "Settings for:" menu on top of the list and choose All configurations. Activate the C/C++ tab to the right and select Code Generation from the drop down menu, and make sure you have these settings:

Processor: Blend *
Use run-time library: Multithreaded DLL
Calling convention: __cdecl *
Structure member alignment: 8 bytes *

Then switch to Optimizations from the drop down menu and make sure Inline function expansion is set to Only __inline. Hopefully that will fix the casting problem it was having with EditProc.


3. Comment line 34 & 40 of C:\mozilla\mozilla-source-1.4b\mozilla\dist\include\mozilla-config.h to get rid of the warnings about macro redefinitions for _X86_ and WIN32_LEAN_AND_MEAN.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: Mark Lodato
Date: May 05, 2003 02:53AM

Well, the windows.h thing didn't work (and user32.lib is included), so I changed it to MFT_STRING, and that solved that problem.

The other problem of casting is not solved, though. What does this error mean (I'm very new to programming)?

Thanks,
Mark

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: MonkeeSage
Date: May 05, 2003 03:38AM

Mark:

(I think) It is expecting

int (__cdecl *)(struct HWND__ *,unsigned int,unsigned in
t,long)

but it generating code for:

int (__stdcall *)(struct HWND__ *,unsigned int,unsigned in
t,long)

...and it's too stupid to figure it out...MSVC is so picky it is annoying at times...

Try setting Settings | C\C++ | Optimizations | Inline function expansion to Any suitable or Diable * and see if that works.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Source for MoziMeleon
Posted by: Mark Lodato
Date: May 05, 2003 02:33PM

Ahhh... it's still not working. Thanks for helping me with this, but you don't have to worry about it. I don't need to mess with the bookmarks plugin - I can just download your binary.

I appreciate the time you spent trying to help me with this, though!

Thanks anyway,
Mark

Options: ReplyQuote


K-Meleon forum is powered by Phorum.