This patch changes the start-msvcX batch file to suit our needs.
First, it adds a 64-bit-aware-when-running-in-a-32-bit-process guess-msvc.bat.
Second, it adds the option to run 'make' immediately by providing arguments.
The default make arguments contain the following:
Targets build, package: these are needed to build an actual package we can use.
This includes generating manifest and packaging omni.ja, among others.
INNER_MAKE_PACKAGE=true, when the package target is run it will normally create
a zip file that contains the completed package.
Since we grab the staging folder we don't need the zip file.
So instead of running the actual packaging command we 'run' true instead.
(See .\toolkit\mozapps\installer\packager.mk in the FF source for more details)
--- start-msvcx.bat.org	2010-08-17 23:01:48 +0200
+++ start-msvcx.bat	2011-11-04 15:28:02 +0100
@@ -7,7 +7,7 @@
 echo "Mozilla tools directory: %MOZBUILDDIR%"
 
 REM Get MSVC paths
-call "%MOZBUILDDIR%guess-msvc.bat"
+call "%MOZBUILDDIR%guess-msvc-x64.bat"
 
 REM Use the "new" moztools-static
 set MOZ_TOOLS=%MOZBUILDDIR%moztools
@@ -84,4 +84,8 @@
     )
 )
 
-start /d "%USERPROFILE%" "" "%MOZILLABUILD%"\msys\bin\bash --login -i
+if "%1"=="" (
+	start /d "%USERPROFILE%" "" "%MOZILLABUILD%"\msys\bin\bash --login -i"
+) else (
+	cd "%USERPROFILE%" && "%MOZILLABUILD%"\msys\bin\bash --login -i -c "cd "%1" && "%2" "%3" -f client.mk build && "%2" "%3" -C obj-* package INNER_MAKE_PACKAGE=true"
+)
