ungoogled-chromium-windows

repository·master·Indexed 25 days ago

https://github.com/ungoogled-software/ungoogled-chromium-windows

Windows packaging for ungoogled-chromium, featuring custom build scripts to create Windows binaries without using Google's pre-built binaries or depot_tools. Includes instructions for installation via WinGet, building from source using Visual Studio and Python 3.11+, and workflows for updating patches and pruning lists using MSYS2.

Tokens
1.1K
Snippets
3
Records
5
Agent score
32%

What's inside ungoogled-chromium-windows

  1. Update patches and pruning list

    master

    To update the project's patches and pruning list, you must coordinate between the Developer Command Prompt for VS and the MSYS2 MSYS shell.

    Workflow

    1. Retrieve Downloads (VS Prompt): mkdir "build\download_cache" python3 ungoogled-chromium\utils\downloads.py retrieve -i downloads.ini -c build\download_cache
    2. Clone Sources (VS Prompt): python3 ungoogled-chromium\utils\clone.py -o build\src
    3. Update Pruning List (VS Prompt): python3 ungoogled-chromium\devutils\update_lists.py -t build\src --domain-regex ungoogled-chromium\domain_regex.list
    4. Unpack Downloads (VS Prompt): python3 ungoogled-chromium\utils\downloads.py unpack -i downloads.ini -c build\download_cache build\src
    5. Apply Patches (VS Prompt): python3 ungoogled-chromium\utils\patches.py apply --patch-bin build\src\third_party\git\usr\bin\patch.exe build\src ungoogled-chromium\patches
    6. Refresh Patches with Quilt (MSYS2 Shell):
      • source devutils/set_quilt_vars.sh
      • cd build/src
      • Fix line breaks: grep -r ../../patches/ -e "+++" | awk '{print substr($2,3)}' | xargs dos2unix
      • Use quilt to refresh patches.
    7. Sanity Check (Repo Root): ./devutils/check_patch_files.sh
  2. Build ungoogled-chromium-windows from source

    master

    To build the project, you must use the Developer Command Prompt for VS as an administrator. The build process defaults to 64-bit binaries. To build 32-bit binaries, set target_cpu to "x86" in flags.windows.gn or pass the --x86 argument to build.py.

    Build Steps

    1. Clone the repository with submodules.
    2. Checkout a specific tag or branch (recommended to use a tag).
    3. Run the build and packaging scripts.

    If the build fails during Chromium source download, remove build\download_cache. If it fails at any other point, remove everything in build except build\download_cache.

    git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-windows.git
    cd ungoogled-chromium-windows
    # Replace TAG_OR_BRANCH_HERE with a tag or branch name
    git checkout --recurse-submodules TAG_OR_BRANCH_HERE
    python3 build.py
    python3 package.py
  3. Set up the build environment for Windows

    master

    The build process uses a custom workflow that avoids Google's depot_tools. Follow these requirements:

    1. Visual Studio

    Follow the official Windows build instructions for Visual Studio. If installed in a non-default directory, set these environment variables:

    • vs2019_install: Path to your Visual Studio installation (e.g., D:\path\to\Microsoft Visual Studio\2019\Community).
    • WINDOWSSDKDIR: Path to Windows Kits (e.g., D:\path\to\Windows Kits\10).
    • GYP_MSVS_VERSION: The year of your installed version (e.g., 2019).

    2. Python Requirements

    • Python 3.11 or above:
      • Add python.exe to PATH during installation.
      • Crucial: Lift the MAX_PATH length restriction using the installer button or registry.
      • Disable python3.exe and python.exe aliases in Windows 'App execution aliases' settings.
      • Ensure python3.exe exists in your Python directory (or is a symlink to python.exe).
    • Module: Install httplib2 version 0.22.0 via pip install httplib2==0.22.0.

    3. Other Tools

    • 7-Zip
    • Git: Ensure "Git from the command line and also from 3rd-party software" is selected during setup.
    • MAX_PATH: Ensure the 260-character path limit is lifted for the Python build scripts to function.