infra/BUILDING_OLD.md
NOTE: This document is out of date, and kept for historical purposes only. You should follow the docs located HERE
The scripts assume the Chromium source is at $HOME/chromiums/src/ and Thorium is at $HOME/thorium/. You may have to 'sudo chmod +x' the scripts to make them executable.
./trunk.sh. This will update and sync the sources and at the end it will download the PGO profile for Chromium for all platforms. The file will be downloaded to //chromium/src/chrome/build/pgo_profiles/*.profdata with the actual file name looking something like 'chrome-linux-main-1632505958-ddbb37bcdfa7dbd7b10cf3a9b6a5bc45e7a958a6.profdata', which should be added to the end of args.gn as per below../setup.sh. This will copy all the files and patches to the needed locations and drop you to //chromium/src.gn args out/thorium and the contents of 'args.gn' in the root of this repo should be copy/pasted into the editor. Note that for Windows, Mac, ChromiumOS, or Android there are seperate *_args.gn files for those platforms. --Include your api keys here at the top or leave blank, and edit the last line to point to the actual path and file name of '*.profdata'./build.sh (--help for help). For Windows, use build_win.sh or autoninja -C out\thorium chrome chromedriver thorium_shell setup mini_installer -j8 The -j# can be changed to limit or increase the number of jobs (generally should be the number of CPU cores on your machine)~/bin/thorium/chrome, the content_shell with ~/bin/thorium/thorium_shell, or chromedriver with ~/bin/thorium/chromedriver../thordeb.sh (--help for help). A nice .deb file will now be in out/thorium and you can install it with sudo dpkg -i *.deb It will be called 'thorium-browser-stable_$VERSIONNUMBER_amd64.deb', and will be installed to /opt/chromium.org/thorium/. For Windows, just run the mini_installer.exe. \ NOTE: To get back to "Trunk", i.e. to revert all changes in order to build vanilla Chromium or to update your checkout, just run ./trunk.sh again.
NOTE: To compile without AVX, simply go to //chromium/src/build/config/compiler/BUILD.gn, search for avx, and replace avx with sse3 or sse4.
UPDATE: Thorium now has API Keys baked in but the instructions below are the same if you are building it yourself as I will not include the keys here. | args.gn exclude API Keys (you can get them yourself) and the PGO profile path is different for each Chromium version (only needed when building). (See above.)
Happy Thorium Building!