Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1005007 of Windows 8

  • Revision slug: Windows_8
  • Revision title: Windows 8
  • Revision id: 1005007
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment bug 920205 no "$" to indicate shell prompt

Revision Content

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 https://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 https://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool.

The Windows 8 Consumer Preview setup is no longer available from https://windows.microsoft.com/en-US/windows-8/download and https://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 https://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 the base OS, all the dependencies, source, and build in a 30GB partition. For memory, 2GB should be considered the minimum. More memory will yeild better performance.

Install Developer Tools

As with the existing Windows 7 development steps, you'll need to install a number of prerequisites.

(required) Visual Studio 2012 or Visual Studio 2013

Visual Studio Express can be downloaded from https://www.microsoft.com/visualstudio/11/en-us/downloads. The download there is just a simple installer that 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 https://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:

ac_add_options --disable-webgl
ac_add_options --disable-gamepad

(optional) Windows SDK

Download and install the Windows 8 SDK from https://msdn.microsoft.com/en-us/windows/hardware/hh852363. But the Windows SDK isn't technically required (the files in Visual Studio 2011 will suffice). 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.

Theoretically, you can install the Windows 7 (or 7.1) SDK as a substitute. If you want to install the 7.1 SDK, the download you want is at https://www.microsoft.com/download/en/details.aspx?id=8279.

(optional) Outlook 2010 MAPI Header Files

If you want to build Thunderbird or Seamonkey, you also need the Outlook 2010 MAPI Header Files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 if you use the Windows 8 SDK. This is because that SDK doesn't contain the MAPI headers any more.

Compiling

Start up your compilation environment by running start-msvc11.bat from mozilla-build (if you are using Visual Studio 2012). You should see output resembling the following:

"Mozilla tools directory: C:\mozilla-build\"
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 (x86)\Windows Kits\8.0\
Windows SDK version: 8.0
Using VC 2012 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: (with mozilla-build >=1.9.x you can skip this step. It will generate automatically an object folder and a mozinfo.json file with autodetected options)

# This specifies the directory where 
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff

# Uncomment the following line if you want to build with debugging code enabled:
#ac_add_options --enable-debug

# uncomment the following if you did NOT install the DirectX SDK:
#ac_add_options --disable-webgl
#ac_add_options --disable-angle
#ac_add_options --disable-gamepad

Then, you should be able to build and run Firefox by running the following commands in the mozilla-central directory.  Building for the first time may take an hour or more, depending on your hardware!

./mach build
./mach run

Compiling Firefox for Windows 8 Touch ("Metro style")

To build Firefox with the Windows 8 "Metro" style interface enabled, you must install the Windows 8 SDK and the DirectX SDK.  If you are using any version of Visual Studio Express, you may need to install additional libraries.  For details, see the Windows 8 Integration wiki page.

To enable the Metro feature, add the following line to your .mozconfig:

ac_add_options --enable-metro

Then build and run Firefox as above, and use the "Relaunch in Windows 8 Style" button in the menu to switch to the "Metro" interface.

Since WIndows 8 isn't officially supported yet, there may be a 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!

Revision Source

<p>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.</p>

<h2 id="Installing_Windows_8">Installing Windows 8</h2>

<p>Installing Windows 8 is accomplished following the instructions on the download site and onscreen.</p>

<p>Windows 8 Pro can be obtained from <a href="https://windows.microsoft.com/en-US/windows/download-shop" title="https://windows.microsoft.com/en-US/windows/download-shop">https://windows.microsoft.com/en-US/windows/download-shop</a>. 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 <a href="https://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool" title="https://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool">https://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool</a>.</p>

<p>The Windows 8 Consumer Preview setup is no longer available from <a class="external" href="https://windows.microsoft.com/en-US/windows-8/download" title="https://windows.microsoft.com/en-US/windows-8/download">https://windows.microsoft.com/en-US/windows-8/download</a> and <a class="external" href="https://windows.microsoft.com/en-US/windows-8/iso" title="https://windows.microsoft.com/en-US/windows-8/iso">https://windows.microsoft.com/en-US/windows-8/iso</a>. Both links redirect to the "download-shop" page above.</p>

<p>If you want to run Windows 8 on Virtualbox, one resource to do this is at <a class="external" href="https://www.groovypost.com/howto/install-windows-8-vm-virtualbox/" title="https://www.groovypost.com/howto/install-windows-8-vm-virtualbox/">https://www.groovypost.com/howto/install-windows-8-vm-virtualbox/</a>. (The page was posted in September 2011 before the current release of Windows 8 Pro and may be out-of-date.)</p>

<p>As for hardware resources of the VM or Virtualbox, you should be able to fit the base OS, all the dependencies, source, and build in a 30GB partition. For memory, 2GB should be considered the minimum. More memory will yeild better performance.</p>

<h2 id="Install_Developer_Tools">Install Developer Tools</h2>

<p>As with the existing Windows 7 development steps, you'll need to install a number of prerequisites.</p>

<h3 id="(required)_Visual_Studio_2012_or_Visual_Studio_2013">(required) Visual Studio 2012 or Visual Studio 2013</h3>

<p>Visual Studio Express can be downloaded from <a href="https://www.microsoft.com/visualstudio/11/en-us/downloads" title="https://www.microsoft.com/visualstudio/11/en-us/downloads">https://www.microsoft.com/visualstudio/11/en-us/downloads</a>. The download there is just a simple installer that will download and install the real components. When you install VS2012, have something else to do because it takes a long time.</p>

<p>For now, installation of the full Visual Studio is required. Eventually, compiling on Visual Studio Express should be possible. <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=701050" title="https://bugzilla.mozilla.org/show_bug.cgi?id=701050">Bug 701050</a> has more.</p>

<h3 id="(required)_mozilla-build_Bundle">(required) mozilla-build Bundle</h3>

<p>The <a href="https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe">latest mozilla-build</a><span class="external"> is required</span>.</p>

<h3 id="(optional)_DirectX_SDK">(optional) DirectX SDK</h3>

<p>Download and install the DirectX SDK from <a class="external" href="https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=6812" title="https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=6812">https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=6812</a>.</p>

<p>If you don't install the DirectX SDK, add the following to your .mozconfig:</p>

<p style="margin-left: 40px;"><code>ac_add_options --disable-webgl<br />
 ac_add_options --disable-gamepad</code></p>

<h3 id="(optional)_Windows_SDK">(optional) Windows SDK</h3>

<p>Download and install the Windows 8 SDK from&nbsp;<a href="https://msdn.microsoft.com/en-us/windows/hardware/hh852363" title="https://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx">https://msdn.microsoft.com/en-us/windows/hardware/hh852363</a>. But the Windows SDK isn't technically required (the files in Visual Studio 2011 will suffice). 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.</p>

<p>Theoretically, you can install the Windows 7 (or 7.1) SDK as a substitute. If you want to install the 7.1 SDK, the download you want is at <a class="external" href="https://www.microsoft.com/download/en/details.aspx?id=8279" title="https://www.microsoft.com/download/en/details.aspx?id=8279">https://www.microsoft.com/download/en/details.aspx?id=8279</a>.</p>

<h3 id="(optional)_Outlook_2010_MAPI_Header_Files">(optional) Outlook 2010 MAPI Header Files</h3>

<p>If you want to build Thunderbird or Seamonkey, you also need the Outlook 2010 MAPI Header Files from <a href="https://www.microsoft.com/en-us/download/details.aspx?id=12905" title="https://www.microsoft.com/en-us/download/details.aspx?id=12905">https://www.microsoft.com/en-us/download/details.aspx?id=12905</a> if you use the Windows 8 SDK. This is because that SDK doesn't contain the MAPI headers any more.</p>

<h2 id="Compiling">Compiling</h2>

<p>Start up your compilation environment by running <code>start-msvc11.bat</code> from mozilla-build (if you are using Visual Studio 2012). You should see output resembling the following:</p>

<blockquote>
<p><code>"Mozilla tools directory: C:\mozilla-build\"<br />
 Visual C++ 11 directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\<br />
 Visual C++ 11 Express directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\<br />
 Windows SDK directory: C:\Program Files (x86)\Windows Kits\8.0\<br />
 Windows SDK version: 8.0<br />
 Using VC 2012 built-in SDK<br />
 Mozilla build environment: MSVC version 11.</code></p>
</blockquote>

<p>Now, you'll need to fetch mozilla-central:</p>

<pre>
cd /c/dev
hg clone <a class="external" href="https://hg.mozilla.org/mozilla-central">https://hg.mozilla.org/mozilla-central</a><span id="cke_bm_69S" style="display:none"><span id="cke_bm_75S" style="display:none">&nbsp;</span></span>
</pre>

<p>Then, create your .mozconfig: (with mozilla-build &gt;=1.9.x you can <strong>skip </strong>this step. It will generate automatically an object folder and a mozinfo.json file with autodetected options)</p>

<pre>
# This specifies the directory where 
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff

# Uncomment the following line if you want to build with debugging code enabled:
#ac_add_options --enable-debug

# uncomment the following if you did NOT install the DirectX SDK:
#ac_add_options --disable-webgl
#ac_add_options --disable-angle
#ac_add_options --disable-gamepad
</pre>

<p>Then, you should be able to build and run Firefox by running the following commands in the mozilla-central directory.&nbsp; Building for the first time may take an hour or more, depending on your hardware!</p>

<pre>
./mach build
./mach run
</pre>

<h3 id="Compiling_Firefox_for_Windows_8_Touch_(Metro_style)">Compiling Firefox for Windows 8 Touch ("Metro style")</h3>

<p>To build Firefox with the <a href="https://support.mozilla.org/en-US/kb/how-do-i-install-windows-8-metro-style-firefox">Windows 8 "Metro" style interface</a> enabled, you <strong>must </strong>install the Windows 8 SDK and the DirectX SDK.&nbsp; If you are using any version of Visual Studio Express, you may need to install additional libraries.&nbsp; For details, see the <a href="https://wiki.mozilla.org/Firefox/Windows_8_Integration">Windows 8 Integration</a> wiki page.</p>

<p>To enable the Metro feature, add the following line to your .mozconfig:</p>

<pre>
ac_add_options --enable-metro
</pre>

<p>Then build and run Firefox as above, and use the "Relaunch in Windows 8 Style" button in the menu to switch to the "Metro" interface.</p>

<p>Since WIndows 8 isn't officially supported yet, there may be a breakage. But the tree has been known to compile. If you run into errors, look for bugs <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=687213" title="https://bugzilla.mozilla.org/show_bug.cgi?id=687213">here.</a> If you see an issue not reported, please file a bug!</p>
Revert to this revision