-
Notifications
You must be signed in to change notification settings - Fork 411
Building Breach from Source
Breach is composed of breach_core
the core Javascript implementation that runs on top of the ExoBrowser. The ExoBrowser embeds the Chromium Content Module and exposes its API directly in a NodeJS context throught V8 native bindings.
First to do is therefore to build the ExoBrowser itself. To do so you can refer to this wiki article: Building the ExoBrowser.
You can also find binary release of the ExoBrowser here: ExoBrowser Releases
Once you have successfully built and run the ExoBrowser, you can create a tarball containing the following list of files from out/Release
:
linux:
- exo_browser
- exo_browser.pak
- exo_browser_resources.pak
- icudtl.dat
- lib/
- libffmpegsumo.so
- libosmesa.so
- libyuv.a
- resources/
- shell/
darwin:
- ExoBrwoser.app/
In the following section we'll refer to that file as exo_browser.tar.gz
- clone
[email protected]:breach/breach_core.git
From there, you can already run Breach directly using the ExoBrowser and specifying the scripts to be executed to be the content of breach_core
.
On linux
:
/path/to/exo_browser --raw /path/to/breach_core
On darwin
:
/path/to/ExoBrowser.app/Contents/MacOS/ExoBrowser --raw ~/path/to/breach_core
Be careful, on darwin
there are known issues related to the fact of running the ExoBrowser executable directly from the command line instead of through the open
command or the standard appplication icon. (see crbug 380199)
Advanced uses: The ExoBrowser by default looks for a shell
directory located next to its executable on linux
or in the application package on darwin
(ExoBrowser.app/Contents/Resources/shell
) and executes its content at startup. The default shell content is a very basic browser implementation using directly the ExoBrowser APIs.
Another strategy to properly run Breach directly from the ExoBrowser is to replace the content of the shell/
directory by the content of breach_core
.
There are two scripts in dist/
that are in charge of packaging Breach as a fully functional app on linux
and darwin
. They do exactly what was describe in the previous section, they package breach_core
within the shell
directory of the ExoBrowser
build they are given as argument.
The two scripts are executable from the Makefile with the following commands:
On linux
:
make dist_linux ARCH=x64 EXO_BROWSER=/path/to/exo_browser.tar.gz
On darwin
:
make dist_linux ARCH=ia32 EXO_BROWSER=/path/to/exo_browser.tar.gz
After packaging breach_core
, these scripts proceed with packaging the files in a certain directory structure on linux
appropriate to be auto-updated, and then perform a few renamings. Finally they attempt to sign the release build so that, if properly signed, it's ready for use within the auto-update system.