1. As a guide for users that just want to do what I did, with less troubleshooting.
2. The official build instructions seem out of date, specifically in what to do about Python 2.7, so perhaps this guide will help update them.
NOTES:
* This guide allows you to build Pale Moon without using root at all (except to install standard Debian packages) and without disturbing anything outside your home folder.
* This guide assumes you have created folders at ~/src and ~/bin and put ~/bin on your $PATH. If you haven't, run mkdir -p ~/src and mkdir -p ~/bin first, and see a guide like this one to add ~/bin to your $PATH. It will also result in a folder being created/overwritten at ~/opt/python2.7, so be careful if you're already using that for... some reason.
* This guide doesn't concern itself with "installing" Pale Moon. All I wanted to achieve was to see the browser running, and running "./mach run" within the PM source folder at the end qualifies in my book. So, this won't put icons in your menus, or anything like that. Someone else can write that part, if they wish. :)
* There's a chance that I haven't listed every required apt package, since I just ran this on my main desktop, rather than a brand new Debian install, but hopefully it shouldn't be too difficult to determine if any additional ones are required.
I followed the official build instructions from https://developer.palemoon.org/build/linux/ - specifically the exact version archived below:
* web.archive.org link
* archive.ph link
and adapted them to work on my system, which is a pretty typical Debian 12 install (with MATE, if that matters).
My adapted guide:
1. Get dependencies
This is the ONLY step you need to perform as root.
Code: Select all
apt install autoconf2.13 build-essential libasound2-dev libbz2-dev libdbus-glib-1-dev libegl1-mesa-dev libgconf2-dev \
libgtk-3-dev libgtk2.0-dev libpulse-dev libsqlite3-dev libssl-dev libx11-xcb-dev libxt-dev yasm zip zlib1g-dev
* "libssl-dev" is required to build Python 2.7's "_ssl" module, which is required to avoid the cryptic "ImportError: cannot import name HTTPSHandler" error when running "./mach build" later.
* The packages specified here are the same as in the official build instructions (at time of archiving that page), minus "python2.7" and "python-dbus", but plus "libgtk-3-dev".
2. Get Python 2.7
By building Python 2.7 from source and installing it inside the home folder, we avoid having to disturb the system at all.
Symlinking from ~/bin is done to put it on $PATH. The mach scripts will specifically check for either "python2.7" or "python", NOT "python2".
Code: Select all
cd ~/src
wget -q -O - https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz | tar -xJ
cd Python-2.7.18
./configure --prefix="$HOME/opt/python2.7"
make -j5
make install
cd ~/bin
ln -s ~/opt/python2.7/bin/python2.7
Code: Select all
cd ~/src
git clone https://repo.palemoon.org/MoonchildProductions/Pale-Moon.git
cd Pale-Moon
git submodule init && git submodule update
git checkout release && git submodule update
I used the EXACT ".mozconfig file" shown in the official build instructions, reproduced below.
Code: Select all
cat > .mozconfig
Code: Select all
# Clear this if not a 64bit build
_BUILD_64=1
# Set GTK Version to 2 or 3
_GTK_VERSION=3
# Standard build options for Pale Moon
ac_add_options --enable-application=palemoon
ac_add_options --enable-optimize="-O2 -w"
ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --enable-av1
ac_add_options --enable-jxl
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-pthreads
# 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
# Processor architecture specific build options
if [ -n "$_BUILD_64" ]; then
ac_add_options --x-libraries=/usr/lib64
else
ac_add_options --x-libraries=/usr/lib
fi
export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION
5. Build
Code: Select all
./mach build
6. Run
Code: Select all
./mach run
Code: Select all
git clean -e /.mozconfig -ndx