User Tools

Site Tools


crosswalk_development

Crosswalk development

Here is described only development OF Crosswalk and NOT WITH Crosswalk. In other words: how do I build and develop Crosswalk package.

Helpful paths

/home/development/chromiumdev/crosswalk/src/xwalk/runtime/android/core_internal/src/org/xwalk/core/internal/XWalkViewInternal.java

/home/development/chromiumdev/crosswalk/src/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera.java

Helpful reading

From Crosswalk project

From Chromium project

Misc

Fetching sources

The fetching procedure is described in depot_tools tutorial. Here is my short description.

Fetch depot_tools:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Add the path of depot_tools to PATH environment variable:

export PATH=$PATH:/path/to/depot_tools

After that go to an empty directory, where the source should be downloaded and fetch chromium for android:

fetch android

(fetch chromium or fetch ios are possible too, but we need only android)

If you are on linux and fetching the code for the first time, then you’ll need to run:

cd src && ./build/install-build-deps.sh

And finally:

gclient sync

This will pull all dependencies of the Chromium src checkout. You will need to run this any time you update the main src checkout, including when you switch branches.

Crosswalk 23 and later. GN setup

All things after the line were not done by me. Currently it is simply a “plan”.


The following is copied from Crosswalk - Android build instructions

In order to build Crosswalk, you need to have at least two lines in your settings to pull some default variables we set:

# important: WITH 'src' at the line end (in the official guide without!) 
cd /path/to/crosswalk-checkout/src 
gn args out/Default

A text editor will be shown, where you must add the following line:

import("//xwalk/build/android.gni")
target_os = "android"

You can add other settings after this statement, such as is_debug = false for a release build or target_arch = “x64” to create a 64-bit IA build. By default, target_arch is set to arm, which creates a 32-bit ARM build.

Once you have done this once, you can later call gn gen out/Default to just regenerate the ninja files based on your existing settings if you need to (most of the time, this will be done automatically for you when building).

See Chromium's page about GN for more information, including other common settings.

Building Crosswalk

Now we can build Crosswalk:

cd C:\path\to\crosswalk-checkout\src
ninja -C YOUR-BUILD-DIR xwalk

YOUR-BUILD-DIR can be freely choosen, for example: “out/Default”.

Changed files

Because of my wrong configuration (clang was enabled), so some files could not be compiled. This files were changed by me:

/home/development/chromiumdev/crosswalk/src/xwalk/runtime/browser/xwalk_content_browser_client.h
/home/development/chromiumdev/crosswalk/src/xwalk/runtime/browser/android/net/xwalk_url_request_job_factory.h
/home/development/chromiumdev/crosswalk/src/xwalk/extensions/common/android/xwalk_extension_android.h
/home/development/chromiumdev/crosswalk/src/xwalk/runtime/browser/android/xwalk_content.h
/home/development/chromiumdev/crosswalk/src/xwalk/runtime/browser/android/net/xwalk_url_request_job_factory.h

 
crosswalk_development.txt · Last modified: by 127.0.0.1