Skip to content

Helium Browser for Windows [!! WIP, DO NOT USE !!]

License

GPL-3.0, BSD-3-Clause licenses found

Licenses found

GPL-3.0
LICENSE
BSD-3-Clause
LICENSE.ungoogled_chromium
Notifications You must be signed in to change notification settings

imputnet/helium-windows

helium-windows

Windows packaging for helium-chromium.

Credits

This repo is based on ungoogled-chromium-windows, but is pretty heavily modified for Helium. Huge shout-out to everyone behind ungoogled-chromium, they made working with Chromium infinitely easier.

Free code signing provided by SignPath.io, certificate by SignPath Foundation

Code signing policy

Committers, reviewers and approvers: @imputnet

License

All code, patches, modified portions of imported code or patches, and any other content that is unique to Helium and not imported from other repositories is licensed under GPL-3.0. See LICENSE.

Any content imported from other projects retains its original license (for example, any original unmodified code imported from ungoogled-chromium remains licensed under their BSD 3-Clause license).

Building

Setting up Visual Studio

Follow the "Visual Studio" section of the official Windows build instructions.

  • Make sure to read through the entire section and install/configure all the required components.
  • If your Visual Studio is installed in a directory other than the default, you'll need to set a few environment variables to point the toolchains to your installation path. (Copied from instructions for Electron)
    • vs2019_install = DRIVE:\path\to\Microsoft Visual Studio\2019\Community (replace 2019 and Community with your installed versions)
    • WINDOWSSDKDIR = DRIVE:\path\to\Windows Kits\10
    • GYP_MSVS_VERSION = 2019 (replace 2019 with your installed version's year)

Other build requirements

IMPORTANT: Currently, the MAX_PATH path length restriction (which is 260 characters by default) must be lifted in for our Python build scripts. This can be lifted in Windows 10 (v1607 or newer) with the official installer for Python 3.6 or newer (you will see a button at the end of installation to do this). See Issue #345 for other methods for older Windows versions.

  1. Setup the following:
    • 7-Zip
    • Python 3.8 or above
      • Can be installed using WinGet or the Microsoft Store.
      • If you don't plan on using the Microsoft Store version of Python:
        • Check "Add python.exe to PATH" before install.
        • At the end of the Python installer, click the button to lift the MAX_PATH length restriction.
        • Disable the python3.exe and python.exe aliases in Settings > Apps > Advanced app settings > App execution aliases. They will typically be referred to as "App Installer". See this question on stackoverflow.com to understand why.
        • Ensure that your Python directory either has a copy of Python named "python3.exe" or a symlink linking to the Python executable.
      • The httplib2 module at version 0.22.0. This can be installed using pip install httplib2==0.22.0.
    • Make sure to lift the MAX_PATH length restriction, either by clicking the button at the end of the Python installer or by following these instructions.
    • Git (to fetch all required ungoogled-chromium scripts)
      • During setup, make sure "Git from the command line and also from 3rd-party software" is selected. This is usually the recommended option.

Building

Run in Developer Command Prompt for VS (as administrator):

git clone --recurse-submodules https://github.com/imputnet/helium-windows.git
cd helium-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

A zip archive and an installer will be created under 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 (which is during build.py), it can be fixed by removing build\download_cache and re-running the build instructions.
  • If the build fails at any other point during build.py, it can be fixed by removing everything under build other than build\download_cache and re-running the build instructions. This will clear out all the code used by the build, and any files generated by the build.

An efficient way to delete large amounts of files is using Remove-Item PATH -Recurse -Force. Be careful however, files deleted by that command will be permanently lost.

Developer info

First-time setup

  1. Setup MSYS2
  2. Run the following in a "MSYS2 MSYS" shell:
pacman -S quilt python3 vim tar
# By default, there doesn't seem to be a vi command for less, quilt edit, etc.
ln -s /usr/bin/vim /usr/bin/vi

Updating patches and pruning list

  1. Start Developer Command Prompt for VS and MSYS2 MSYS shell and navigate to source folder
    1. Developer Command Prompt for VS
      • cd c:\path\to\repo\helium-windows
    2. MSYS2 MSYS
      • cd /path/to/repo/helium-windows
      • You can use Git Bash to determine the path to this repo
      • Or, you can find it yourself via /<drive letter>/<path with forward slashes>
  2. Clone sources Developer Command Prompt for VS
    • python3 helium-chromium\utils\clone.py -o build\src
  3. Check for rust version change (see below)
  4. Update pruning list Developer Command Prompt for VS
    • python3 helium-chromium\devutils\update_lists.py -t build\src --domain-regex helium-chromium\domain_regex.list
  5. Update patches MSYS2 MSYS
    1. Setup patches and shell to update patches
      • ./devutils/update_patches.sh merge
      • source devutils/set_quilt_vars.sh
    2. Go into the source tree
      • cd build/src
    3. Use quilt to refresh patches. See ungoogled-chromium's docs/developing.md section "Updating patches" for more details
    4. Go back to repo root
      • cd ../..
    5. Remove all patches introduced by helium-chromium
      • ./devutils/update_patches.sh unmerge
    6. Sanity checking for consistency in series file
      • ./devutils/check_patch_files.sh
  6. Use Git to add changes and commit

Update dependencies

NOTE: For all steps, update downloads.ini accordingly.

  1. Check the LLVM GitHub for the latest version of LLVM.
    1. Download LLVM-*-win64.exe file.
    2. Get the SHA-512 checksum using sha512sum in MSYS2 MSYS.
  2. Check the esbuild version in file build/src/third_party/devtools-frontend/src/DEPS and find the closest release in the esbuild GitHub to it.
  3. Check the ninja version in file build/src/third_party/devtools-frontend/src/DEPS and find the closest release in the ninja GitHub to it.
    1. Download the ninja-win.zip file.
    2. Get the SHA-512 checksum using sha512sum in MSYS2 MSYS.
  4. Check the Git GitHub for the latest version of Git.
    1. Get the SHA-256 checksum for PortableGit-<version>-64-bit.7z.exe.
  5. Check for commit hash changes of src submodule in third_party/microsoft_dxheaders (e.g. using GitHub https://github.com/chromium/chromium/tree/<version>/third_party/microsoft_dxheaders).
    1. Replace version with the Chromium version in helium-chromium/chromium_version.txt.
  6. Check the node version changes in third_party/node/update_node_binaries (e.g. using GitHub https://github.com/chromium/chromium/tree/<version>/third_party/node/update_node_binaries).
    1. Download the "Standalone Binary" version from the NodeJS website.
    2. Get the SHA-512 checksum using sha512sum in MSYS2 MSYS.
  7. Check for version changes of windows rust crate (third_party/rust/windows_x86_64_msvc/).
    1. Download rust crate zip file.
    2. Get the SHA-512 checksum using sha512sum in MSYS2 MSYS.
    3. Update patches/ungoogled-chromium/windows/windows-fix-building-with-rust.patch accordingly.

Update rust

  1. Check RUST_REVISION constant in file tools/rust/update_rust.py in build root.
    • Example: Revision could be f7b43542838f0a4a6cfdb17fbeadf45002042a77
  2. Get date for nightly rust build from the Rust GitHub page: https://github.com/rust-lang/rust/commit/f7b43542838f0a4a6cfdb17fbeadf45002042a77
    1. Replace RUST_REVISION with the obtained value
    2. Adapt downloads.ini accordingly
    • Example: The above revision corresponds to the nightly build date 2025-03-14 (YYYY-mm-dd)
  3. Download nightly rust build from: https://static.rust-lang.org/dist/<build-date>/rust-nightly-x86_64-pc-windows-msvc.tar.gz
    1. Replace build-date with the obtained value
    2. Get the SHA-512 checksum using sha512sum in MSYS2 MSYS.
    3. Extract archive
    4. Execute rustc\bin\rustc.exe -V to get rust version string
    5. Adapt patches\ungoogled-chromium\windows\windows-fix-building-with-rust.patch accordingly
  4. Download nightly rust build from: https://static.rust-lang.org/dist/<build-date>/rust-nightly-i686-pc-windows-msvc.tar.gz
    1. Replace build-date with the obtained value
    2. Get the SHA-512 checksum using sha512sum in MSYS2 MSYS.
  5. Download nightly rust build from: https://static.rust-lang.org/dist/<build-date>/rust-nightly-aarch64-pc-windows-msvc.tar.gz
    1. Replace build-date with the obtained value
    2. Get the SHA-512 checksum using sha512sum in MSYS2 MSYS.

About

Helium Browser for Windows [!! WIP, DO NOT USE !!]

Resources

License

GPL-3.0, BSD-3-Clause licenses found

Licenses found

GPL-3.0
LICENSE
BSD-3-Clause
LICENSE.ungoogled_chromium

Stars

Watchers

Forks

Sponsor this project