ebeast: electron + beast



Hi Stefan,

I've just pushed the 'ebeast' branch onto github.

Beware, the branch *might* see non-linear rebasing in the future.

It contains the start of an electron based Beast UI ('ebeast') plus Bse JS bindings.

Here's a short rundown of the contents:

ebeast/:
Makefile.am     - build rules for 'run', 'app', 'package.json'
main.js         - the main electron 'executable' it pops up a content window
ebeast.html     - HTML + JS for the ebeast content window, just test code so far
package.json    - metadata required by electron, generated from package.json.in

ebeast/v8bse/:
v8bse.node      - Bse JS bindings, compiled as node.js module (for dlopen)
binding.gyp     - build info for node-gyp, the build tool for v8bse.node
Makefile.am     - generates v8bse.cc and binding.gyp
nodemodule.cc   - manual binding code
V8Stub.py       - aidacc generator for C++ → JS binding code, based on v8pp
v8bse.cc        - code generated by V8Stub.py
v8pp/           - V8 JS binding project using C++11 templates, at the moment
                  this is a git submodule, we might change that later

Because we're now using git submodules, we need to tell git to pull the
submodules together with the git repo:
  git clone --recursive /opt/src/beast/  # pull repo + all submodules
Or to get a non-empty v8pp/ dir in an existing repo:
  git submodule update --init --recursive # update all submodules

About the build rules in ebeast/:

make all
Currently this just gives short usage info, nothing builds by default, so the
normal build isn't affected by ebeast or any of its dependencies.

make app
Generates package.json from all the build info we have in the Makefiles. Then
this will download and locally install electron + electron build tools. The only
thing needed for this to work is npm. After that, v8bse.node is built using
aidacc and the electron build tools.

make run
Given a successful 'make app' build, this will simply preload libbse (to avoid
picking up an old installed library from /usr/lib etc) and start the ebeast
electron app. So far, ebeast.html is displayed in a desktop window and shows
version information. But that's already a full fledged desktop app:

- The ebeast.html window renders its contents from HTML + CSS.

- The version information retrieved is gathered from javascript.

- The info about Bse and Vorbis are already pulled from the Bse bindings.

- You can start the developer console in the window via the menu or by pressing
  "Shift+Ctrl+i". The Console can be used to inspect the HTML DOM tree just
  like its possible in Chrome or Firefox, and the Javascript console can use
  the generated Bse bindings. At the console, just type:
        Bse.server.get_version()

The bindings still need work wrg to vectors, object identity, signals, int64_t
and probably other bugs. But in principle the object system, methods and
properties are basically working now.

Please give 'make run -C ebeast' a try and provide feedback. I've tried to set
things up to be used and built as easily as possible. The next step here is to
make use of electron-packager to implement 'make install -C ebeast'.

About v8pp, I had to fork the original project at https://github.com/pmed/v8pp/
to submit pull requests for a couple bugs, and a few extensions needed by Bse.
As long as not all of those are merged, ebeast/v8bse/v8pp/ just points to the
'for-beast' branch of my fork at https://github.com/tim-janik/v8pp/.
Updates to the 'for-beast' branch will almost always be non-linear in order
to follow the upstream project.


-- 
Yours sincerely,
Tim Janik

https://testbit.eu/timj/
Free software author.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]