XULRunner* for Intel® VTune™ Amplifier XE

By Kirill Rogozhin,

Published:06/15/2015   Last Updated:06/15/2015

This page contains source code links and instructions for building XULRunner* package shipped as a part of Intel® VTune™ Amplifier XE product.

THE DOCUMENT CONTAINS INFORMATION RELATED TO XULRUNNER 34.0.5

XULRUNNER SOURCES
XULRUNNER PATCHES
MAC OS BUILD
WINDOWS BUILD
LINUX BUILD
USEFUL LINKS

XULRUNNER SOURCES

    XULRunner 34.0.5 sources can be downloaded here:
    http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/34.0.5/

XULRUNNER PATCHES

    Patches for xulrunner 34.0.5 are located in the attached xulrunner_34.0.5_patches_vtune.zip archive.
    You may replace original source files by the files from the 'patches' or apply .diff-files
    Affect OS X* builds only:
        mozilla-release/widget/cocoa/nsChildView.h
                                     nsChildView.mm
                                     nsCocoaWindow.h
                                     nsCocoaWindow.mm
    Affect Windows* (x86 and x86_64) debug builds only:
        mozilla-release/embedding/browser/nsWebBrowser.cpp

   Affect Linux* builds only (to enable compilation on Red Hat Enterprise* Linux 5):
        mozilla-release/xpcom/threads/ThreadStackHelper.cpp
        mozilla-release/configure.in

 

    The patches have the following bugs submitted in XUL bugzilla*:
    https://bugzilla.mozilla.org/show_bug.cgi?id=1154676     (comes to firefox 40)
    https://bugzilla.mozilla.org/show_bug.cgi?id=1158786
    https://bugzilla.mozilla.org/show_bug.cgi?id=1162581     

OS X* BUILD

(On OS X, only x86_64 XUL version is built)
    Build environment:
       OS X Yosemite* (10.10.2)
       binutils-2.22
       gcc-4.9.2
       python27
       yasm_1.3.0

    To build XUL:
    1. Set path to the compiler and tools:
        > export PATH=/opt/binutils-2.22/bin:/opt/gcc-4.9.2/bin:/opt/python27/bin:/usr/local/bin/:$PATH 
    2. Unpack XUL sources to 'mozilla-release' in the home directory.
    3. Apply XUL patches pointed above.
    4. Create a build directory next to 'mozilla-release', 'release', for example, and start the XUL build configuration:
        > ../mozilla-release/configure --prefix=`pwd`/../release > conf_log.txt 2>&1
    5. Build XUL:
        > make -j8
    6. To get XUL package and SDK, use the corresponding commands below:
        > make package
        > make sdk
    7. Copy binaries/libs/res from SDK folders to component folders (xulrunner34/darwin/x86_64).
        (To create include.zip, zip the include directory from XUL SDK)

WINDOWS* OS BUILD

    Build the environment as described here:
       https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites#Opening_a_build_command_prompt
    Windows Mozilla build tool can be downloaded here:
       https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe

    To build XUL:

    1. Install Mozilla build tool to 'mozilla-build' directory (for example on C:\).
    2. Unpack XUL sources to 'mozilla-release' on C: or D: disk (the path should not contain spaces and long folder names).
    3. Apply XUL patches pointed above.
    4. Create a build directory next to 'mozilla-release', for example (release32, release64, debug32, debug64).
    5. Create file 'mozconfig' in the XUL source directory 'mozilla-release' depending on the build (release32, release64, debug32, debug64) with the content:
        release32:
            mk_add_options MOZ_CO_PROJECT=xulrunner
            mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../release32
            mk_add_options MOZ_MAKE_FLAGS="-s -j8"
            mk_add_options WIN32_REDIST_DIR="C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.CRT/"
            ac_add_options --enable-jemalloc=no
          
        release64:
            mk_add_options MOZ_CO_PROJECT=xulrunner
            mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../release64
            mk_add_options MOZ_MAKE_FLAGS="-s -j8"
            mk_add_options WIN32_REDIST_DIR="C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.CRT/"
            ac_add_options --target=x86_64-pc-mingw32
            ac_add_options --host=x86_64-pc-mingw32
            ac_add_options --enable-jemalloc=no

        debug32:
            export MOZ_DEBUG_SYMBOLS=1
            mk_add_options MOZ_CO_PROJECT=xulrunner
            mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../debug32
            mk_add_options MOZ_MAKE_FLAGS="-s -j8"
            mk_add_options WIN32_REDIST_DIR="C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/Debug_NonRedist/x86/Microsoft.VC120.DebugCRT/"
            ac_add_options --enable-debug
            ac_add_options --disable-optimize
            ac_add_options --enable-debug-rtl
            ac_add_options --enable-debug-symbols
            ac_add_options --enable-jemalloc=no

        debug64:
            export MOZ_DEBUG_SYMBOLS=1
            mk_add_options MOZ_CO_PROJECT=xulrunner
            mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../debug64
            mk_add_options MOZ_MAKE_FLAGS="-s -j8"
            mk_add_options WIN32_REDIST_DIR="C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/Debug_NonRedist/x64/Microsoft.VC120.DebugCRT/"
            ac_add_options --enable-debug
            ac_add_options --disable-optimize
            ac_add_options --enable-debug-rtl
            ac_add_options --enable-debug-symbols
            ac_add_options --target=x86_64-pc-mingw32
            ac_add_options --host=x86_64-pc-mingw32
            ac_add_options --enable-jemalloc=no

    6. Start the build tool 'start-shell-msvc2013.bat' or 'start-shell-msvc2013-x64.bat' according to x86 or x86_64 build (from c:\mozilla-build).
    7. Change the current directory to the XUL source directory 'mozilla-release'. For example:
        $ cd /c/gecko34/mozilla-release
    8. Start the build:
        $ ./mach build
    9. To build XUL package, enter:
       $ ./mach package
    10. Copy binaries/libs/ja from XUL SDK folders to component folders (xulrunner34/win32/<32 or 64>/<debug or release>).
       (To create include.zip, zip the include directory from XUL SDK)

LINUX* OS BUILD

    Build environment:
       binutils-2.22
       gcc-4.9.2
       python27
       yasm_1.3.0

    To build XUL:
    1. Set path to the compiler and tools:
        > export PATH=/opt/binutils-2.22/bin:/opt/gcc-4.9.2/bin:/opt/python27/bin:/usr/local/bin/:$PATH
        > export LD_LIBRARY_PATH=/opt/gcc-4.9.2/lib:/usr/lib
    2. Unpack XUL sources to 'mozilla-release' in the home directory.
    3. Apply XUL patches pointed above.
    4. Create a build directory next to 'mozilla-release', according to the build configuration (release32, release64, debug32, debug64).
    5. Start the XUL build configuration from the build directory:
        > ../mozilla-release/configure --prefix=`pwd`/../release --enable-release --enable-application=xulrunner --disable-websms-backend --disable-gio --disable-directshow --disable-ffmpeg --disable-fmp4 --disable-wmf --disable-pulseaudio --disable-gstreamer --disable-eme --disable-system-extension-dirs --disable-crashreporter --disable-printing --disable-webspeech --disable-wave --disable-gamepad --disable-webrtc --disable-updater --disable-feeds --disable-sandbox --disable-tests --disable-gconf --enable-debug-symbols > conf_log.txt 2>&1

        Please note that some options cannot be used due to existing limitations: 
        --disable-webm (https://bugzilla.mozilla.org/show_bug.cgi?id=964484)
        --disable-opus (https://bugzilla.mozilla.org/show_bug.cgi?id=964528)

      5. Build XUL (from the build directory):
        > make -j8
    6. To get XUL package and SDK, use the corresponding commands below:
        > make package
        > make sdk
    7. Copy binaries/libs/res from SDK folders to component folders (xulrunner34/posix/<x86_64 or x86>).
        (To create include.zip, zip the include directory from XUL SDK)
  

USEFUL LINKS

https://developer.mozilla.org/en-US/docs/Simple_Firefox_build#Get_the_source
https://developer.mozilla.org/en/docs/Configuring_Build_Options
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites#Opening_a_build_command_prompt
https://developer.mozilla.org/en-US/docs/Document_Loading_-_From_Load_Start_to_Finding_a_Handler
https://developer.mozilla.org/en-US/docs/Mozilla/Gecko/Gecko_Embedding_Basics
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Glue
https://code.google.com/p/weaponry/wiki/BuildingXulrunner#Building_on_Windows_(XP)

Attachment Size
xulrunner-34-0-5-patches-vtune.zip 188.9 KB

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804