-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
esy
at version 0.6.0+
git clone https://github.com/revery-ui/revery
cd revery
esy install
esy build
If your build takes too much time then you can pre-install some libraries:
brew install cmake
brew install libpng ragel
We use a version of esy-skia that require python
2 or a binary called python
but still v2. We haven't merged upstream where they require python
3.
Install the following packages with your package manager of choice:
cmake
ragel
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-dev
libbz2-dev
m4
xorg-dev
libglu1-mesa-dev
libharfbuzz-dev
libgtk-3-dev
libfontconfig1-dev
nasm
clang
NOTE:
reason-fontkit
(a dependency ofrevery
) requiresharfbuzz
1.7.7+. This meansrevery
requires Ubuntu 18.10+ (or you can installlibharfbuzz-dev@1.8.8
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
./_esy
and~/.esy
directories and re-runningesy install
andesy 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.
clang
libasan
libpng-devel
bzip2-devel
xorg-x11-server-devel
mesa-libGLU-devel
harfbuzz-devel
libXext-devel
fontconfig-devel
nasm
m4
-
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
) requiresharfbuzz
1.7.7+. This meansrevery
requires Fedora 29+
NOTE: Currently
esy-skia
requires Python 2 to install. If your version of Fedora lacks that, you may need to installpython27
.
libpng
libxcursor
libxi
libxinerama
libxrandr
harfbuzz
glu
gtk3
-
fontconfig
(required by reason-font-manager might be removed in the next release) nasm
clang
NOTE: if esy fail with
shasum
not found try to run withPATH=/usr/bin/core_perl:$PATH esy
instead 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:
esy
requires building from an Administrator prompt (eithercmd.exe
orPowershell
).
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' install
esy '@examples' run
Check out our examples to see how they work!
You can also build the example app for JavaScript by running:
esy '@js' install
esy '@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.