Categories
Mozilla

MozillaBuild Fun

MozillaBuild is awesome since it saves a ton of time creating a build environment. The older cygwin based system wasn’t exactly an intuitive process. The downside of the change is those stupid tricks you knew, no longer apply in some cases.

For example a cvs checkout over SSH. Once upon a time you could follow the instructions to have it remember your ssh key so you don’t have to enter a password every 30 seconds. I simply had this in a batch file along with a bunch of environmental variables.

for /f "tokens=1,2,3* delims=; " %%a in (‘ssh-agent -c’) do if "%%a"=="setenv" set %%b=%%c
set HOME=/cygdrive/c/cygwin/home/USERNAME
ssh-add ~/.ssh/id_dsa
start /b /wait cmd.exe
ssh-agent -k
exit

That’s no longer useful. I was able to find a new way to do this thanks to Myk. He did it for MSVC7, I’m using MSVC8:

Add %MOZILLABUILD%\msys\bin\SSH-agent into the MYSYS Shell line in the batch script to launch your build environment. For example:

start "MSYS Shell – MSVC8 Environment" %MOZILLABUILD%\msys\bin\ssh-agent "%MOZILLABUILD%\msys\bin\rxvt" -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn "Lucida Console" -tn msys -geometry 80×25 -e /bin/bash –login -i

Then in your MSYS shell enter:

ssh-add ~/.ssh/id_dsa

Now you can sit back and enjoy a cvs checkout without needing to enter your password all the time. That makes things a lot easier.

I was strongly considering using my Mac Mini to build, but it’s a rev1, and the thought of using a 4200 RPM drive for something like compiling something like this made me change my mind.