Difference between revisions of "Porting/Chromium/Electron"

From RCS Wiki
Jump to navigation Jump to search
(See Also chaiNNer)
(→‎Electron on ppc64le: IBM Ubuntu build script)
 
Line 4: Line 4:
  
 
[https://github.com/PF4Public/gentoo-overlay/tree/master/dev-util/electron/files/ppc64le Gentoo] also maintains a downstream ppc64le patchset.
 
[https://github.com/PF4Public/gentoo-overlay/tree/master/dev-util/electron/files/ppc64le Gentoo] also maintains a downstream ppc64le patchset.
 +
 +
[https://github.com/ppc64le/build-scripts/tree/master/e/electron IBM] also maintains build scripts for Ubuntu based on the Gentoo patchset.
  
 
== Installation on Debian via Bedrock ==
 
== Installation on Debian via Bedrock ==

Latest revision as of 10:58, 10 July 2023

Electron on ppc64le

The patches from Porting/Chromium can be used to build working binaries of the Electron framework. Upstreaming status: https://github.com/electron/electron/issues/15691

Gentoo also maintains a downstream ppc64le patchset.

IBM also maintains build scripts for Ubuntu based on the Gentoo patchset.

Installation on Debian via Bedrock

First, morph Debian to Bedrock (see the Bedrock documentation).

Then, do the following:

sudo brl fetch gentoo
sudo emerge --ask app-eselect/eselect-repository
sudo eselect repository enable pf4public
sudo emerge --sync
    # You'll get an error about git clone; do it manually:
    cd /bedrock/strata/gentoo/var/db/repos/pf4public/
    sudo /bedrock/cross/bin/git clone --depth 1 https://github.com/gentoo-mirror/pf4public.git .
sudo emerge --ask x11-libs/libnotify
sudo emerge --ask media-libs/lcms
sudo emerge --autounmask --ask dev-util/electron
sudo dispatch-conf
# Fix the version and checksum of Raptor's patch tarball in Gentoo's package. TODO: submit a patch.
sudo emerge --autounmask --ask dev-util/electron

Building

The build process is greatly simplified from Porting/Chromium due to Electron's built-in chromium patching mechanism. User:Shawnanastasio has created a fork of the electron repository that contains all the required patches at https://github.com/shawnanastasio/electron.

Prerequisites

Before building, you will need to set up your build environment. This includes setting the required environment variables, obtaining the dependencies, and building an llvm toolchain. You can follow the first part of the instructions at Porting/Chromium to accomplish this.

Building

The rest of the process closely mirrors the upstream Electron build instructions, but with a few additions.

# Checkout the forked electron code that contains the ppc64le patches
mkdir electron-gn && cd electron-gn
gclient config --name "src/electron" --unmanaged https://github.com/shawnanastasio/electron
gclient sync --with_branch_heads --with_tags

cd src
export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools

# Configure the build (debug)
gn args out/Debug

# PASTE IN EDITOR

import("//electron/build/args/debug.gn")

# disable unsupported features
enable_nacl = false
treat_warnings_as_errors = false

# configure clang toolchain
is_clang = true
clang_base_path = "/path/to/your/llvm_build"
clang_use_chrome_plugins = false

# workaround issue in old v8
use_jumbo_build = false

# END PASTE

# Build electron
ninja -C out/Debug electron
 

See Also