Difference between revisions of "Porting/Chromium/Electron"

From RCS Wiki
Jump to navigation Jump to search
(Add Category tag)
Line 2: Line 2:
 
The patches from [[Porting/Chromium]] can be used to build working binaries of the [https://electronjs.org/ Electron] framework.
 
The patches from [[Porting/Chromium]] can be used to build working binaries of the [https://electronjs.org/ Electron] framework.
 
Upstreaming status: https://github.com/electron/electron/issues/15691
 
Upstreaming status: https://github.com/electron/electron/issues/15691
 +
 +
[https://github.com/PF4Public/gentoo-overlay/tree/master/dev-util/electron/files/ppc64le Gentoo] also maintains a downstream ppc64le patchset.
  
 
== Building ==
 
== Building ==

Revision as of 23:23, 20 May 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.

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