Microsoft Visual C++ toolkit build instructions

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
Post Reply
nrthomas
Posts: 1988
Joined: February 9th, 2003, 3:25 pm

Post by nrthomas »

See <a href="http://bugzilla.mozilla.org/attachment.cgi?id=143726&action=view">bug 143726</a> for information on how it was disabled for mingw builds.
User avatar
TierMann
Posts: 184
Joined: March 29th, 2004, 10:18 am
Location: Sitting here, posting to fourms.
Contact:

Post by TierMann »

Thanks :>
I'll give this a try tonight.

Just something I noticed while applying the patch...
The "proper fix" version is allready in the cvs from 4-20-2004, but it will still need to be reworked to take it out all together since it's just checking for MingW.

This is the actual patch they used in cvs with a couple mods http://bugzilla.mozilla.org/attachment. ... ction=view

So you can see where I had to take out for IE Migration with VC++ Toolkit.

Would have been simpler if they just made a switch for it..
Ex: --disable-migration=IE,Opera

I'm gonna pull the latest cvs and see if this works.

I might not have it built until tomorrow.

--
Building now.
Also patched to fix Extension Downloading and "Save as" for cached images. (not needed to compile but I like to have them working)
--

Woot! The build finished and it runs.

This means that the environment and patches described in this thread do indeed build you a firefox 0.8+ with the freely available MS Tools.
User avatar
TierMann
Posts: 184
Joined: March 29th, 2004, 10:18 am
Location: Sitting here, posting to fourms.
Contact:

Post by TierMann »

I've just found out something interesting.

Maybe someone can confirm this with my newest build or one they've done in the same environment.

It no longer seems to require msvcp71.dll .... only needs msvcr71.dll.
I've checked this with DLL Explorer and it's not dependant on it.

This is a nice bonus if it's true. I'll only have to package the one outside dll in builds then.
User avatar
Anthracks
Posts: 168
Joined: July 13th, 2003, 2:06 pm
Location: Boston, MA

Post by Anthracks »

With regard to that Thunderbird error message, were you by any chance trying to do a static build? Tbird doesn't currently support them, and gives linker errors similar to that one when you try.
green13
Posts: 82
Joined: February 28th, 2004, 9:59 am

Post by green13 »

TierMann
Would you mind be a bit more explicit on exactly how you overcame the IEmigration hurdle - what did you patch exactly? Did you do it manually or using the patch command w/ a bugfix?
User avatar
TierMann
Posts: 184
Joined: March 29th, 2004, 10:18 am
Location: Sitting here, posting to fourms.
Contact:

Post by TierMann »

green13 wrote:TierMann
Would you mind be a bit more explicit on exactly how you overcame the IEmigration hurdle - what did you patch exactly? Did you do it manually or using the patch command w/ a bugfix?


There's no actual bug fix for VC++ tools so I just used that patch ( http://bugzilla.mozilla.org/attachment. ... ction=view ) as a reference to find where I needed to be.

What I did was manually comment out the ifdef's for mingw concerning the IE profile migration.
This also involves changing the elif statements below them to ifdef.

Example:

Code: Select all

//Original code

 #if defined(XP_WIN) && !defined(__MINGW32__)
 #include "nsIEProfileMigrator.h"
 #elif defined(XP_MACOSX)
 #include "nsSafariProfileMigrator.h"

//Patched code

// #if defined(XP_WIN) && !defined(__MINGW32__)
// #include "nsIEProfileMigrator.h"
 #if defined(XP_MACOSX)
 #include "nsSafariProfileMigrator.h"


I'll have a more detailed manual patch shortly.
---------------

And yes, I must have done a static build on Thunderbird.
Thanks for the info. I don't usually build TB but I'll give it another try tonight just to see if it works with VC++ Tools so it can be confirmed. I might need to disable XUL.
User avatar
TierMann
Posts: 184
Joined: March 29th, 2004, 10:18 am
Location: Sitting here, posting to fourms.
Contact:

Post by TierMann »

Here's what I did.

Code: Select all

--- browser/components/build/nsModule.cpp - Line 52

 #include "nsOperaProfileMigrator.h"
 #include "nsPhoenixProfileMigrator.h"
 #include "nsSeamonkeyProfileMigrator.h"
-#if defined(XP_WIN) && !defined(__MINGW32__)
-#include "nsIEProfileMigrator.h"
+#if defined(XP_MACOSX)
-#elif defined(XP_MACOSX)
 #include "nsSafariProfileMigrator.h"


--------- Line 78
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPhoenixProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSeamonkeyProfileMigrator)
-#if defined(XP_WIN) && !defined(__MINGW32__)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
+ #if defined(XP_MACOSX)
- #elif defined(XP_MACOSX)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafariProfileMigrator)

--------- Line 125
     NS_PROFILEMIGRATOR_CONTRACTID,
     nsProfileMigratorConstructor },
 
-#if defined(XP_WIN) && !defined(__MINGW32__)
-   { "Internet Explorer (Windows) Profile Migrator",
-     NS_WINIEPROFILEMIGRATOR_CID,
-     NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie",
-     nsIEProfileMigratorConstructor },

+#if defined(XP_MACOSX)
-#elif defined(XP_MACOSX)
  { "Safari Profile Migrator",

===================================================================
--- browser/components/migration/Makefile.in - Line 45
 
 include $(topsrcdir)/config/rules.mk
 
+# Needed for preprocessor removal of IE Profile Migrator label - bug 236901
ifeq ($(OS_ARCH),WINNT))
-ifdef GNU_CXX
DEFINES += -DNO_IE_MIGRATOR=1
-endif
endif


=====================================================================
--- browser/components/migration/content/migration.xul - Line 83
 #endif
 #endif
 #ifdef XP_WIN
-#ifndef -DNO_IE_MIGRATOR=1
-      <radio id="ie"        label="&importFromIE.label;"        accesskey="&importFromIE.accesskey;"/>
-#endif

       <radio id="seamonkey" label="&importFromSeamonkey.label;" accesskey="&importFromSeamonkey.accesskey;"/>
       <radio id="dogbert"   label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
       <radio id="opera"     label="&importFromOpera.label;"     accesskey="&importFromOpera.accesskey;"/>
Index: browser/components/migration/src/Makefile.in

===================================================================
--- browser/components/migration/src/Makefile.in  - Line 75
            nsOperaProfileMigrator.cpp \
            $(NULL)
 
-ifeq ($(OS_ARCH)_$(GNU_CXX),WINNT_)
- DEFINES += -DPSTOREC_DLL=\"$(subst \,\\,$(WINDIR))\\system32\\pstorec.dll\"
 
- CPPSRCS += nsIEProfileMigrator.cpp \
-endif


This combined with the environment described earlier and the following mozconfig should give you a successful build with free VC++ Tools.

ac_add_options --disable-accessibility
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
Last edited by TierMann on April 24th, 2004, 7:02 pm, edited 2 times in total.
User avatar
TierMann
Posts: 184
Joined: March 29th, 2004, 10:18 am
Location: Sitting here, posting to fourms.
Contact:

Post by TierMann »

T-Bird just compiled fine with no patches using the following mozconfig...

Code: Select all

#TierMann Mozconfig

. $topsrcdir/mail/config/mozconfig

#I alternate between sets of opts.
#See zip names and enclosed mozconfigs for opts used.
#-------
#ac_add_options --enable-optimize="-O2x -G7 -arch:SSE"
ac_add_options --enable-optimize="-O2xp -G7 -arch:SSE"
#-------


#Used in all builds unless specified as "(Requested)" in the zip.
#-------
ac_add_options --disable-debug
ac_add_options --disable-accessibility
ac_add_options --disable-tests
ac_add_options --disable-pedantic
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-installer
ac_add_options --disable-ldap

export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
#-------


Tip: Do not disable shared or enable static.

------

Ok. So that's Firefox, Mozilla, and Thunderbird all buildable with MSVC++ Toolkit, and MS SDK's.
I feel like a pioneer. (as opposed to a sony :P)

Thanks, Everyone, For your input and help with this.
Mook
Posts: 1752
Joined: November 7th, 2002, 9:35 pm

Post by Mook »

Hmm
If anybody's adventurous, could you try grabbing comsupp.lib from VS6sp62.exe (bottom of page, Visual studio 6.0 Service pack 6) and see if it works?

Get it by using a command prompt,
vs6sp62 /T:C:\Temp /C
Then
expand C:\Temp\VS6sp61.cab /F:vc98\lib\comsupp.lib C:\

(replace C:\Temp with something that makes sense; also, the file will be dumped into C:\, so move it into something appropriate like C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib)

I don't actually know if the VC6 version would work though. And I imagine people who want to try this won't care about the IE migrator too much :p The decorated function names are in the .lib, but I'm not sure if it would be used by default.
poot.
User avatar
TierMann
Posts: 184
Joined: March 29th, 2004, 10:18 am
Location: Sitting here, posting to fourms.
Contact:

Post by TierMann »

That should work in theory.

I know the VS 2002 version and probably the retail 2003 versions work, so it's an option but...
The only thing there is I wanted to stick with what was freely available.
True the VS6sp6 is free, but it was intended for those who have VS6.

There's probably no problems with that though.
aebrahim
Posts: 1234
Joined: November 10th, 2002, 2:47 am
Location: Hong Kong
Contact:

Post by aebrahim »

TierMann wrote:True the VS6sp6 is free, but it was intended for those who have VS6.

There's probably no problems with that though.

I doubt it. Unfortunately, it's probably a violation of the EULA.
User avatar
TierMann
Posts: 184
Joined: March 29th, 2004, 10:18 am
Location: Sitting here, posting to fourms.
Contact:

Post by TierMann »

Hehe. Yeah.
I just meant that it should work as an alternative to patching.

I wouldn't do it unless I owned VS6. (Which I do)

Sorry. My communication skills need work. I'm a hermit.
User avatar
kindofabuzz
Posts: 3859
Joined: July 20th, 2003, 1:13 am
Location: Memphis, TN
Contact:

Post by kindofabuzz »

Any chance of a detailed walkthrough using the free tools?? =)
Collapse unwanted MozillaZine forum sections ** Give a man a fish and he will eat for a day; teach a man to fish and he will eat for a lifetime; give a man religion and he will die praying for a fish.
User avatar
Waldo
Posts: 596
Joined: July 29th, 2003, 8:21 am
Location: Cambridge, MA
Contact:

Post by Waldo »

kindofabuzz wrote:Any chance of a detailed walkthrough using the free tools?? =)

I'm attempting to replicate and documenting (probably to the point of anality) as I go...don't expect before the morning, tho, as it's already 1am for me, I have school starting at 8 and I need to be up earlier, I tend to oversleep semi-easily, and things tend to get hairy very quickly when certain people can't understand that I can't fall asleep until extremely late and realize I'm still awake.
Malakai
Posts: 172
Joined: July 15th, 2003, 3:11 pm
Location: Florida
Contact:

Post by Malakai »

FYI people there is a version 8.2 of the masm32 package.
Post Reply