Building Pale Moon: Apple Macintosh

These instructions are for building Pale Moon 28.9.* and 29.0.0+ and assumes you want to build the latest release.

Prerequisites

  • Xcode version 8 or higher and command line tools
  • Python 2.7.3 to 2.7.latest
  • Exactly Autoconf 2.13
  • yasm 1.2.0 or higher
  • Plenty of free disk space
  • At least 8 GB RAM free depending on number of processor cores (limit using the
    mk_add_options MOZ_MAKE_FLAGS="-jN"
    option)
  • MacOS X 10.7 SDK (can be acquired from GitHub)
  • General system requirements for running the application itself

Getting the Source

The Pale Moon source code along with the Unified XUL Platform are available on Github.

These instructions assume you are going to create a directory in your home directory (~) called palemoon-source. You can, of course, put the source code anywhere you want as long as the path does not contain any spaces.

Using git

This is the simplest method and git is bundled with Xcode.

  • Install Xcode command line tools
  • Open a terminal shell and change directory to the desired source location, e.g.
    cd ~/palemoon-source/
  • Execute the following commands:
    git clone https://github.com/MoonchildProductions/Pale-Moon.git ./
    git submodule init && git submodule update
    git checkout release && git submodule update
    
  • Proceed to Build Dependencies below.

Using the source archives

This requires downloading source archives from both the Pale Moon and Unified XUL Repository and is more complicated:

  • Navigate to the release page on the Pale Moon repository and download the tar.gz archive for Pale Moon.
  • Extract the source code to the desired location e.g.
    ~/palemoon-source
  • Then using the link in "Built with the Unified XUL Platform - {Month} {Day}, {Year} release" navigate to the matching UXP release page and download the tar.gz archive for the platform source code.
  • Extract that archive to the platform directory inside the Pale Moon source directory e.g.
    ~/palemoon-source/platform

NOTE: You will need to extract the contents of the Pale-Moon-XXX or UXP-XXX directory to the locations indicated above.

This is not recommended for Machintosh. However, if you obtain the source archives in a non-tar form e.g. zip or 7z then you will have to correct file permissions on the source tree.

chmod -R 744 palemoon-source

Build Dependencies

Install MacPorts

Install the required build dependencies by executing the following commands:

port install autoconf213
port install yasm

# If your MacOS is missing python or it is too old
port install python27

Build Instructions

Configure

Create a file called .mozconfig in the source folder you cloned or unpacked the source to. Make sure it contains at least the following for a close-to-official build:

.mozconfig file

# Standard build options for Pale Moon
ac_add_options --enable-application=palemoon
ac_add_options --enable-optimize=-O2
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --disable-eme
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
ac_add_options --with-macos-sdk=/Path/to/SDKs/MacOSX10.7.sdk

# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1

# Uncomment if using clang++ from Xcode 10 or higher
# export CXX="/usr/bin/clang++ -std=gnu++11 -stdlib=libc++"

Note: LESS IS MORE! There are some pre-made build configs out there that have a lot of options listed, often with insane resulting build configurations. Do not use those and stick to the instructions here.

Build

Start the build:

./mach build

Be patient. Building could take a long time. Your Mac will be fully occupied compiling and linking the browser (you can expect 100% CPU usage throughout and lots of memory use - provide ample cooling) and you should not be using it for anything else that is intensive at this time. Especially memory-intensive applications should be avoided because it can cause issues with the linker (memory fragmentation) resulting in a very unstable browser.

Strip/Package

After building is completed, you can take the resulting binaries for a test run in the object directory directly (see the on-screen instructions at the end of the build process) but it will not be complete yet. You need to strip and package the browser to integrate additional code, pack up the omnijar files, and have a ready-to-use browser. You do this by running:

./mach package
This will create a properly packaged disk image in your object folder under the Pale Moon source folder. e.g. for Mac 64bit:
~/palemoon-source/obj-x86_64-apple-darwin{kernel-version}/dist/palemoon-{version}.mac64.dmg

Site design and Branding © 2020 Moonchild Productions - All rights reserved
Any other content, brand names or logos are copyright or trademark to their respective owners.
Policies: Cookies - User Content - Privacy.

The Pale Moon Developer Site is powered by Project Selene 1.0.0a1.