macOS packaging for ungoogled-chromium.
Download binaries from the Contributor Binaries website.
Source Code: It is recommended to use a tag via git checkout
(see building instructions below). You may also use master
, but it is for development and may not be stable.
- macOS 10.15+
- Xcode 12
- Homebrew
- Perl (for creating a
.dmg
package) - Node.js
- Install Ninja via Homebrew:
brew install ninja
- Install GNU coreutils (for
greadlink
in packaging script):brew install coreutils
- Install GNU readline:
brew install readline
- Install the data compression tools xz and zlib:
brew install xz zlib
- Unlink binutils to use the one provided with Xcode:
brew unlink binutils
- Install Node.js:
brew install node
- Restart your Terminal
First, ensure the Xcode application is open. Then, run the following:
git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-macos.git
cd ungoogled-chromium-macos
# Replace TAG_OR_BRANCH_HERE with a tag or branch name
git checkout --recurse-submodules TAG_OR_BRANCH_HERE
./build.sh
A .dmg
should appear in build/
NOTE: If the build fails, you must take additional steps before re-running the build:
- If the build fails while downloading the Chromium source code, it can be fixed by removing
build/downloads_cache
and re-running the build instructions. - If the build fails at any other point after downloading, it can be fixed by removing
build/src
and re-running the build instructions.
- Start the process and set the environment variables
./devutils/update_patches.sh merge
bash
source devutils/set_quilt_vars.sh
- Setup Chromium source
mkdir -p build/{src,download_cache}
./ungoogled-chromium/utils/downloads.py retrieve -i ungoogled-chromium/downloads.ini downloads.ini -c build/download_cache
./ungoogled-chromium/utils/downloads.py unpack -i ungoogled-chromium/downloads.ini downloads.ini -c build/download_cache build/src
cd build/src
-
Use
quilt
to refresh all patches:quilt push -a --refresh
- If an error occurs, go to the next step. Otherwise, skip to Step 5.
-
Use
quilt
to fix the broken patch:- Run
quilt push -f
- Edit the broken files as necessary by adding (
quilt edit ...
orquilt add ...
) or removing (quilt remove ...
) files as necessary- When removing large chunks of code, remove each line instead of using language features to hide or remove the code. This makes the patches less susceptible to breakages when using quilt's refresh command (e.g. quilt refresh updates the line numbers based on the patch context, so it's possible for new but desirable code in the middle of the block comment to be excluded.). It also helps with readability when someone wants to see the changes made based on the patch alone.
- Refresh the patch:
quilt refresh
- Go back to Step 3.
- Run
-
Run
../../ungoogled-chromium/devutils/validate_config.py
-
Run
quilt pop -a
-
Validate that patches are applied correctly
cd ../..
./ungoogled-chromium/devutils/validate_patches.py -l build/src -s patches/series.merged
-
Remove all patches introduced by ungoogled-chromium:
./devutils/update_patches.sh unmerge
-
Ensure patches/series is formatted correctly, e.g. blank lines
-
Sanity checking for consistency in series file:
./devutils/check_patch_files.sh
-
Use git to add changes and commit
See LICENSE