-
Notifications
You must be signed in to change notification settings - Fork 15
Build Instructions for Windows
- A PC with Windows 8.1 or later OS and Haswell or later CPU as host machine.
- Setup the build environment on Windows as https://crosswalk-project.org/contribute/building_crosswalk.html.
- Install Visual Studio 2013 Update 5.
- Update your Git global config to get rid of the CRLF to LF issues:
git config --global core.safecrlf true
git config --global core.autocrlf input
Generate the .gclient
file by executing following command:
gclient config --spec=solutions=[{'name':'src','url':'https://github.com/crosswalk-project/crosswalk-extensions-sdk.git','deps_file':'DEPS','managed':True,'custom_deps':{'extensions':'https://github.com/crosswalk-project/realsense-extensions-crosswalk.git'}}]
Or you can create the .gclient
file by copying/pasting the following text into it:
solutions = [
{ 'name' : 'src',
'url' : 'https://github.com/crosswalk-project/crosswalk-extensions-sdk.git',
'deps_file' : 'DEPS',
'managed' : True,
'custom_deps' : {
'extensions' : 'https://github.com/crosswalk-project/realsense-extensions-crosswalk.git'
}
}
]
Then sync the solution:
gclient sync
After code fetched, enter src
directory:
cd src
Generate project by gn
:
gn gen out\Release_x64 --args="is_debug=false"
- Remove
is_debug=false
from--args
if you want a Debug build. - The CPU arch will be detected automatically, if you need build 32-bit binary on 64-bit system, append
target_cpu=x86
to--args
.
In src
directory, execute:
ninja -C out\Release_x64 dist
After build succeeds, the extension DLLs are generated in out\Release_x64
directory. Currently they include enhanced_photography.dll
, face.dll
, hand.dll
and scene_perception.dll
.
It also generates the extensions with crosswalk-app-tools hooks and npm files under out\Release_x64\realsense_extensions
.
The Depth Enabled Photography, Face and Scene Perception extensions require R200 camera. The Hand Tracking extension requires SR300 (or old F200) camera. Please install the RealSense camera driver (DCM), RealSense SDK (RSSDK) runtime and fetch a copy of Crosswalk for Windows on that device.
Install Camera driver for R200, F200 or SR300.
Install RSSDK runtime 8.0.24.6528 from http://registrationcenter-download.intel.com/akdlm/irc_nas/8516/intel_rs_sdk_runtime_8.0.24.6528.exe
Download Crosswalk for Windows from https://download.01.org/crosswalk/releases/crosswalk/windows/beta/19.49.514.1/crosswalk64-19.49.514.1.zip. Please note this is a x64 build. So you need to use x64 build of extensions with it.
Launch sample
C:\path\to\crosswalk\xwalk.exe --use-rs-video-capture --external-extensions-path=C:\path\to\src\out\Release_x64 C:\path\to\src\extensions\sample\src\manifest.json
Please refer to https://crosswalk-project.org/documentation/windows/run_on_windows.html for more information.
- Debugging C++: use Visual Studio to attach to xwalk extension process
- Debugging JavaScript: launch
xwalk.exe
with--remote-debugging-port=9222
and navigate Chrome tolocalhost:9222
- Alternatively, you can launch
xwalk.exe
with--enable-inspector
and right-click to inspect an element.
Please refer to https://crosswalk-project.org/documentation/windows/web_inspector_debugging.html for more information.
- Please refer to https://developers.google.com/closure/utilities/docs/linter_howto to install
gjslint
- Please make sure
gjslint
(Google Closure Lint) is in your PATH. - Please change directory to
extensions
and execute..\tools\lint.py
to lint current change. Use--base=hash
to lint the change comparing to previous git commit.
Install crosswalk-app-tools:
npm install -g crosswalk-app-tools
You may need to install WiX Toolset. Please refer to https://github.com/crosswalk-project/crosswalk-app-tools for details.
Make sure you have crosswalk-pkg
installed correctly by checking the version:
crosswalk-pkg -v
It should be 0.10.3
or later.
Download Crosswalk Windows build from https://download.01.org/crosswalk/releases/crosswalk/windows/beta/19.49.514.1/crosswalk64-19.49.514.1.zip. and set the XWALK_HOME
environment variable pointing to crosswalk zip. e.g:
set XWALK_HOME=C:\path\to\crosswalk64-19.49.514.1.zip
In src
directory, please make sure the project is already generated, then build sample app by executing:
ninja -C out\Release_x64 sample_app
After build succeeds, the sample app installer org.crosswalk_project.rs_sample_with_rssdk_runtime_<version>.msi
is generated under out\Release_x64
directory.