Windows 8 will eventually support compiling mozilla-central and related repositories and products. This page documents the steps to get a working Windows 8 development environment.
Installing Windows 8
Installing Windows 8 is accomplished following the instructions on the download site and onscreen.
Windows 8 Pro can be obtained from http://windows.microsoft.com/en-US/windows/download-shop. An ISO image of the Windows 8 installation can be downloaded if you prefer, and installed on a bootable usb device using the 'Windows 7 USB/DVD download tool' at http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool.
The Windows 8 Consumer Preview setup is no longer available from http://windows.microsoft.com/en-US/windows-8/download and http://windows.microsoft.com/en-US/windows-8/iso. Both links redirect to the "download-shop" page above.
If you want to run Windows 8 on Virtualbox, one resource to do this is at http://www.groovypost.com/howto/install-windows-8-vm-virtualbox/. (The page was posted in September, 2011 before the current release of Windows 8 Pro and may be out-of-date.)
As for hardware resources of the VM or Virtualbox, you should be able to fit in the base OS, all the dependencies, source and build in a 30GB partition. For memory, 2GB should be considered the minimum. As always, give it as much as you can.
Install Developer Tools
As with the existing Windows 7 development steps, you'll need to install a number of prerequisites.
(required) Visual Studio 2012
Visual Studio 2012 can be downloaded from https://www.microsoft.com/visualstudio/11/en-us/downloads. The download there is just a simple installer which will download and install the real components. When you install VS2012, have something else to do because it takes a long time.
For now, installation of the full Visual Studio is required. Eventually, compiling on Visual Studio Express should be possible. Bug 701050 has more.
(required) mozilla-build Bundle
The latest mozilla-build is required.
(optional) DirectX SDK
Download and install the DirectX SDK from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812.
If you don't install the DirectX SDK, add the following to your .mozconfig:
(optional) Windows SDK
The Windows SDK is a little tricky for Windows 8. Currently, the Windows 8 SDK is only available to MSDN subscribers. If you have access, you can grab it from MSDN under the filename en_windows_developer_preview_wdk_x86_x64_741966.zip. You will likely find it under the Windows Developer Preview section listed as Windows Developer Preview WDK (x86 and x64).
Theoretically, you can install the Windows 7 (or 7.1) SDK as a substitute. But, the Windows SDK isn't technically required (the files in Visual Studio 2011 will suffice). If you want to install this SDK, the download you want is at http://www.microsoft.com/download/en/details.aspx?id=8279. Like Visual Studio, this is a web downloader, so the bulk of the downloading is performed while running the installer. The default install options should be sufficient.
Start up your compilation environment by running
start-msvc11.bat from mozilla-build. You should see output resembling the following:
"Mozilla tools directory: C:\mozilla-build\"
Visual C++ 10 Express directory: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
Visual C++ 11 directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
Visual C++ 11 Express directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
Windows SDK directory: C:\Program Files\Microsoft SDKs\Windows\v7.1\
Windows SDK version: 7.1
Using VC 2011 built-in SDK
Mozilla build environment: MSVC version 11.
Now, you'll need to fetch mozilla-central:
$ cd /c/dev $ hg clone https://hg.mozilla.org/mozilla-central
Then, create your .mozconfig:
. $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-debug # Set the number after -j to the number of cores in your machine mk_add_options MOZ_MAKE_FLAGS="-s -j4" ac_add_options --enable-debug # add the following if you did NOT install the DirectX SDK ac_add_options --disable-angle
Then, you should be able to build:
$ ./build/pymake/make.py -f client.mk configure $ ./build/pymake/make.py -C obj-ff-debug
Since WIndows 8 isn't officially supported yet, there may be breakage. But, the tree has been known to compile. If you run into errors, look for bugs here. If you see an issue not reported, please file a bug!