Trying to build from master/trunk on the repository using these instructions will fail.
To build your own copy of Pale Moon from source on Windows, using the free version of Visual Studio 2012, you will need to do the following.
Most of these instructions are universal for building x86 and x64, so I will indicate differences required for x64 at the steps they are required.
Install prerequisites
- Make sure you have powerful enough hardware running Windows 7 SP1 or above (at least dual-core full-fledged processor, at least 4GB of Ram (8 or more recommended), at least 20GB of free disk space). Don't try to build on a laptop. If you are even considering doing this, stop. You need a development-class computer to build Pale Moon.
- Visual Studio 2012 Express: http://www.microsoft.com/en-us/download/details.aspx?id=34673
Launch VS2012 after installation to initialize the environment, start the IDE and get the latest updates (Update 4 at the time of this writing). Launch after updating to finish up the update, after which you can close the IDE. For x64 builds, make sure you install the x64 build tools.
(Note: You will be asked to register with Microsoft when launching it the first time. If you want to continue using VS2012 Express after 30 days, I strongly recommend you do so immediately and get it out of the way. Skipping this step will give you a 30-day evaluation period after which VS2012 Express will cease to work.) - June 2010 DirectX SDK: http://www.microsoft.com/download/en/details.aspx?id=6812
When installing, make sure to also install the runtime libraries (do not uncheck them). Samples and documentation are optional.
(Note that other versions of the DirectX SDK on Microsoft's Developer Center that claim to have been released after June 2010 are actually older versions that are misdated, some of which will result in an error if you try and download them due to the installer files themselves having been removed from the MS servers. There will not be any further standalone DirectX SDKs released by MS, since DirectX has been transitioned from an independent distribution model to an integrated (into Windows and Visual Studio) model, and the DirectX SDK is now integrated into the Windows 8 SDK (which is bundled with Visual Studio as of VS2012). The reason that we require the June SDK even on newer Win7+VS2012 systems is because ANGLE depends on D3DX9, but MS considers D3DX to have been obsoleted by newer technologies and therefore VS2012 doesn't include the d3dx9.h and d3dx9tex.h headers that are required to compile ANGLE.)
Caveat:
If installation fails with an "S1023" error, execute the following commands to remove the VC++ 2010 redistributable libraries from your computer:Then install the DirectX SDK again. After installation has completed, you can re-install the VC++ redistributable libraries from http://www.microsoft.com/download/en/details.aspx?id=26999Code: Select all
MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5} MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}
- The MozillaBuild 1.10 package: https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.10.0.exe
Install it in the recommended location, or a different path that has no spaces in it.
The "latest" package will not work, since Python has been upgraded in 1.11+ that has breaking changes with the build system used in the Pale Moon source tree.
Get the source
Download the source from http://www.palemoon.org/sourcecode.shtml
Unpack the source code (using 7-zip) to a path that does not contain spaces, e.g. c:\palemoon-source
This source tree will contain everything needed for both x86 and x64 builds of Pale Moon (they share the same release source code).
Configure
Create a file called .mozconfig in the source folder you unpacked the source in.
(Yes, that is {dot}mozconfig -- don't omit the . at the start. Also make sure it's not .mozconfig.txt or something crooked like that. If you are hiding extensions of known file types, fix that first in folder options because it's a PITA when trying to do this kind of thing)
Make sure it contains at least the following for a close-to-official build:
For x86 (32-bit):
Code: Select all
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
ac_add_options --enable-optimize="-O2"
ac_add_options --enable-jemalloc
WIN32_REDIST_DIR=$VCINSTALLDIR/redist/x86/Microsoft.VC110.CRT
Code: Select all
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
ac_add_options --enable-optimize="-O2"
ac_add_options --enable-jemalloc
ac_add_options --enable-shared-js
WIN32_REDIST_DIR=$VCINSTALLDIR/redist/x64/Microsoft.VC110.CRT
- Go to C:\mozilla-build (or wherever you extracted to mozilla build tools) and run start-shell-msvc2012.bat
This will open a UNIX-like shell with the compile environment set up for Visual Studio 2012. Please do not use the -x64 batch file even if you are on a 64-bit operating system when building x86.
The -x64 batch file is for launching a 64-bit build environment and building a 64-bit browser using a 64-bit compiler. So for creating an x64 build of Pale Moon, run start-shell-msvc2012-x64.bat - In the shell, cd to your pale moon source directory, e.g. cd /c/palemoon-source if you installed the source in C:\palemoon-source
- Start the build:./mach build
- Be patient. Building will take a long time. Your PC 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 and have a ready-to-use browser. You do this by running ./mach package
This will create a properly packaged .zip file in your object folder under the Pale Moon source folder. e.g.:
C:\palemoon-source\obj-i686-pc-mingw32\dist\palemoon-{version}.en-US.win32.zip (for x86)
Building a self-extracting installer
If you want to build a self-extracting installer, similar to the off-line installers offered in official builds, you will have to do give the following command:
./mach installer
This will create a self-extracting installer in your object folder under the Pale Moon source folder. e.g.:
C:\palemoon-source\obj-i686-pc-mingw32\dist\install\sea\palemoon-{version}.en-US.win32.installer.exe (for x86)