-
-
Notifications
You must be signed in to change notification settings - Fork 197
Building & Installing
Install esy
esy is like npm for native code. If you don't have it already, install it by running:
npm install -g esy
NOTE: Revery requires
esyat version 0.6.0+
git clone https://github.com/revery-ui/reverycd reveryesy installesy build
If your build takes too much time then you can pre-install some libraries:
brew install cmakebrew install libpng ragel
We use a version of esy-skia that require python2 or a binary called python but still v2. We haven't merged upstream where they require python3.
Install the following packages with your package manager of choice:
cmakeragel
Depending on your distribution you may also need to install nasm. If you get failure because a .h is not found make sure to have installed the dev version of the package. For instance libfontconfig1-dev often it has -dev or -devel suffix.
If you haven't installed it already build-essential is required for some basic build tools.
libpng-devlibbz2-devm4xorg-devlibglu1-mesa-devlibharfbuzz-devlibgtk-3-devlibfontconfig1-devnasmclang
NOTE:
reason-fontkit(a dependency ofrevery) requiresharfbuzz1.7.7+. This meansreveryrequires Ubuntu 18.10+ (or you can install[email protected]by adding 'cosmic' packages to your sources, but proceed with caution since you can break other packages this way)
NOTE: On more recent versions of Ubuntu, you may get a build error regarding libpangoft2. To fix this, first try adding the following to the root of your
package.json:"resolutions": { "esy-harfbuzz": "github:Et7f3/esy-harfbuzz#4309597b403374fe65868e8971c114555c96c6e4" },If this doesn't work, try deleting your
./_esyand~/.esydirectories and re-runningesy installandesy build. If the error persists, feel free to open an issue.
If you haven't installed it already @development-tools is required for some basic build tools.
clanglibasanlibpng-develbzip2-develxorg-x11-server-develmesa-libGLU-develharfbuzz-devellibXext-develfontconfig-develnasmm4-
libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel libXxf86vm-devel- Possibly needed on newer Fedora versions. -
perl-Digest-SHA- Only if missingshasum.
NOTE:
reason-fontkit(a dependency ofrevery) requiresharfbuzz1.7.7+. This meansreveryrequires Fedora 29+
NOTE: Currently
esy-skiarequires Python 2 to install. If your version of Fedora lacks that, you may need to installpython27.
libpnglibxcursorlibxilibxineramalibxrandrharfbuzzglugtk3-
fontconfig(required by reason-font-manager might be removed in the next release) nasmclang
NOTE: if esy fail with
shasumnot found try to run withPATH=/usr/bin/core_perl:$PATH esyinstead ofesy. (You might get this error in docker).
(For unknown reason gtk3 is not found inside docker when we are a non-root user. I can't manage to install esy as root but it is not recommended through)
Revery depends on esy-skia which requires Microsoft Visual Studio 2017 VC Tools.
This can be installed in one of two ways:
- NPM:
npm install -g windows-build-tools -
chocolately:choco install visualstudio2017buildtools visualstudio2017-workload-vctools -y
NOTE:
esyrequires building from an Administrator prompt (eithercmd.exeorPowershell).
Make sure to check the specific requirements for your Linux distribution, above.
NOTE: Hardware acceleration is not enabled by default in WSL (instead, WSL will fall-back to a software renderer). This is problematic for performance - for that reason, we recommend building and running Revery natively on Windows instead of with WSL. For more info see: (https://github.com/Microsoft/WSL/issues/637 and a potential workaround)
After building, you can run the example app by running:
esy '@examples' installesy '@examples' run
Check out our examples to see how they work!
You can also build the example app for JavaScript by running:
esy '@js' installesy '@js' run
And navigating your browser to the locally hosted URL.
Tests can be run with:
esy b dune runtest
Benchmarks can be built & run with:
esy '@bench' run
Documentation can be built & run with:
esy '@doc' run
NOTE: This will start an http-server at localhost; open a URL at the specified address to the view latest docs.