1. Hardware
Certainly more powerful computer you have, more faster building your will get then, consider two cores CPU and 4G RAM will be sufficient. Also i suggest to have two hdds, the first for source, compiler, build tools and the second for output.
2. Virtual drive
If you have more RAM it is good to make virtual drives, no need second hdd then.
3. Software
3.0 OS
For msvc build win7+ is required,, and assuming you have x64
3.1 Git
Download at https://git-scm.com and install, i did not try portable, but you can i think.
3.2 Compiler
I do not like regular Visual Studio, with its junk and onlineness requirement, so i do not use it. Good Microsoft cares for me too, and made available good build tools without junk. They are in the iso file, and ready for usage anywhere, no need to do install. Download, unpack or mount iso. EWDK with Visual Studio Build Tools 15.6
May want to delete files vctip.exe in "Program Files\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64" and same on x86, they leak data to internet (spyware and telemetry)
3.3 DirectX SDK
Download june 2010 and install
3.4 Mozilla build tools
i use version 3.2 But for building on winxp the latest version is 2.2 You are to craft own bat file for use with alternate compiler. Write your actual paths there and put inside MozillaBuild floder (C:\mozilla-build).
assume EWDK on G:
@ECHO OFF
SET TOOLCHAIN=32-bit
SET MOZILLABUILD=%~dp0
SET MOZ_TOOLS=%MOZILLABUILD%moztools
SET INCLUDE="G:\Program Files\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\include";"G:\Program Files\Windows Kits\10\Include\10.0.16299.0\shared";"G:\Program Files\Windows Kits\10\Include\10.0.16299.0\um";"G:\Program Files\Windows Kits\10\Include\10.0.16299.0\winrt";"G:\Program Files\Windows Kits\10\Include\10.0.16299.0\ucrt"
SET LIB="G:\Program Files\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\lib\x86";"G:\Program Files\Windows Kits\10\Lib\10.0.16299.0\um\x86";"G:\Program Files\Windows Kits\10\Lib\10.0.16299.0\ucrt\x86"
SET PATH="G:\Program Files\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x86";"G:\Program Files\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64";"G:\Program Files\Windows Kits\10\bin\10.0.16299.0\x86";%PATH%
%MOZILLABUILD%msys\bin\bash --login -i
(bat file may be need rewrite)
3.5 Other software
For virtual drive SoftPerfect RAM drive free
4. Source
4.0 Download source
Your are type commands in the command line, i prefer far manager
assume you installed git on c:\dev\git
C:\dev\git\bin\git clone --no-checkout https://github.com/roytam1/UXP.git
you will get new folder UXP where there actual source packed inside .git folder
4.1 .mozconfig
Enter to the UXP folder and create there text file named .mozconfig this will be your building config
mk_add_options MOZ_OBJDIR=d:/dev/uxp.32
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-release
ac_add_options --enable-application=application/basilisk
ac_add_options --enable-optimize="-O2 -GF"
ac_add_options --enable-jemalloc
ac_add_options --disable-debug
ac_add_options --disable-accessibility
ac_add_options --disable-necko-wifi
ac_add_options --disable-skia
ac_add_options --disable-tests
ac_add_options --disable-webrtc
ac_add_options --disable-webspeech
WIN32_REDIST_DIR="G:\Program Files\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.13.26020\x86\Microsoft.VC141.CRT"
WIN_UCRT_REDIST_DIR="G:\Program Files\Windows Kits\10\Redist\ucrt\DLLs\x86"
Pay attentions on this things
4.1.1 MOZ_OBJDIR
This is where it will get built files, may out anything valid path, prefer another hdd or ramdrive.
4.1.2 --enable-application
This choose what it will build basilisk-serpent or palemoon-newmoon, or other thing any anotherapp\anotherstuff
4.1.3 MOZ_MAKE_FLAGS
Usually when you build all computer power you have is ocuppied, therefore you hardly can do other things, however with mk_add_options MOZ_MAKE_FLAGS="-j1" it will build slower time but for example you can play heavy 3d game in the same time.
4.2 Unpack source and apply changes
Unpack source for custom branch (assume custom is right branch in roytams source)
C:\dev\git\bin\git checkout custom
apply patches if needed or edit files by hand
C:\dev\git\bin\git apply --ignore-whitespace file.patch
4.3 Save changes to the git
If you not going to publish dont bother, thoug i can write about.
5. Building
launch your bat file inside mozillabuild (look 3.4)
assume you source folder in C:\dev\uxp
type cd /c/dev/uxp then enter
type .\mach build then enter
So it begins, if you set another destination drive building will stop with message:
1:23.14 ValueError: path is on drive c:, start on drive d:
1:23.18 *** Fix above errors and then restart with\
Well, let them fix: edit the following file
d:\dev\uxp.32\_virtualenv\Lib\ntpath.py
go to the lin 527 and put # signs, this will cancel the stupid code
# else:
# raise ValueError("path is on drive %s, start on drive %s"
# % (path_prefix, start_prefix))
Keep then _virtualenv to not bother with this again
If you get error you can look for details in D:\dev\uxp.32\.mozbuild\last_log.json
That's all for now, happy building...