I have both Visual-Studio 2005 (VS8) and Visual Studio 2008 (VS9) installed on my machine and got SDK6.1, and .NET 2.0 and 3.5. Well, I thought I should be able to build it easily but I was wrong.
Browsing my windows SDK installation directories, I could see versions 5.0, 6.0A, and 6.1 on my box, but none of these were expected by firefox scripts. Finally, I had to hack these scripts little to make them work for me.
Here is the sequence of steps I did to create custom built firefox installer. Most of these steps are same as build-and-install guidelines and I only added about the problems I encountered.
- Downloaded source code from here. Let's call this source-root.
- Downloaded mozilla-setup-1.3.exe and installed it. Let this be called build-root.
- Created mozconfig-custom config file in my source-root similar to FireFox's default release configuration. You can find such configuration here.
- Exported MOZCONFIG envrionment variable with value set to config file created in step above.
- I used objdir as suggested by the configuration guidelines.
- I ran start-msvc9.bat inside build-root and got an error saying 'unexpected version 5 at this time'.
- start-msvc9.bat internally uses guess-msvc.bat which guesses the installed VC and SDK versions. As I told earlier, there is a mismatch in expectation and script wanted v6.0 for SDK, but I have got 6.0A and 6.1. It surely failed to guess this time.
- So, I edited guess-msvc.bat so that it will search for v6.1.
- Run start-msvc9.bat again, and got another error 'Framework32\v2.0.50727 unexpected'.
- start-msvc9.bat calls vcvars32.bat of VS9 installation and vcvars32 is screwing up PATH variable.
- It seems that VS9 installation did not correctly prepare vcvars32.bat. So, I modified vcvars32.bat file to correctly prepare PATH variable. This file prepares VC environment and adds required directories in PATH. It had
- SET FrameworkDir=Framework32
- SET FrameworkVersion=v2.0.50727
- something similar to SET PATH=%PATH%;%FrameworkDir%\%FrameworkVersion%;
- I modified these three statements and corrected PATH.
- Run start-msvc9.bat again
- I got a bash shell (I quickly set my favorite aliases).
- Run 'make -f client.mk build'
- It asked me to run 'dos2unix.py' and convert all files to have unix style endings. Fine, ran it, failed, ran again, failed, ran again. Succeeded finally.
- Run 'make -f client.mk build'.
- It ran for a while and then bailed out saying 'No rule to make xyz.html0000664'.
- For some strange reason, 0000664 was appended to several files and MakeFile.in has got a rule for xyz.html only. So, I renamed these files back to 'xyz.html'.
- Run make command again.
- Voila, Successful build.
- I ran the executable inside my 'objdir\dist', and it worked like a charm. It used all my original bookmarks too.
- Now, I want to make an installer as given in the pages.
- Run 'make -C objdir/browser/installer installer'
- OOOHHH HHHOOO. I got it inside my 'objdir/dist/install/sea'.
Sure, it would really be wonderful if there is a single sln file and we just open and click Build-NOW. We just love it, wont we? But we dont get things for free, we have to make it ourselves.
1 comment:
I am running into similar issues when I try to build Lightning 0.9 on vista x64.
Can you list out the changes you did in guess-msvc.bat?
Post a Comment