Permalink
Browse files

Add --cef option to link with CEF

https://github.com/tiliado/valacef

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
  • Loading branch information...
fenryxo committed Dec 19, 2017
1 parent ca088c5 commit 75cf4aca3aee4fc590b53ffa165ece146648abb1
Showing with 30 additions and 7 deletions.
  1. +5 −5 setup_nuvolacdk.sh
  2. +15 −1 src/nuvolakit-runner/gui/AboutDialog.vala
  3. +10 −1 wscript
@@ -6,11 +6,11 @@ else
WAF_CONFIGURE=" --webkitgtk-supports-mse --branding=cdk "
. setup_env.sh
export DIORITE_PATH="$DIORITE_PATH"
export PKG_CONFIG_PATH="$DIORITE_PATH/build:/app/lib/pkgconfig:$PKG_CONFIG_PATH"
export VAPIDIR="$DIORITE_PATH/build"
export C_INCLUDE_PATH="$DIORITE_PATH/build"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIORITE_PATH/build:/app/lib"
export LIBRARY_PATH="$DIORITE_PATH/build"
export PKG_CONFIG_PATH="$DIORITE_PATH/build:$VALACEF_PATH/build:/app/lib/pkgconfig:$PKG_CONFIG_PATH"
export VAPIDIR="$DIORITE_PATH/build:$VALACEF_PATH/build"
export C_INCLUDE_PATH="$DIORITE_PATH/build:$VALACEF_PATH/build"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIORITE_PATH/build:$VALACEF_PATH/build:/app/lib"
export LIBRARY_PATH="$DIORITE_PATH/build:$VALACEF_PATH/build"
export NUVOLA_ICON="eu.tiliado.NuvolaCdk"
export DATADIR="/app/share"
export DIORITE_TESTGEN="$DIORITE_PATH/testgen.py"
@@ -43,6 +43,11 @@ public void print_version_info(FileStream output, WebApp? web_app)
output.printf("Revision %s\n", Nuvola.get_revision());
output.printf("Diorite %s\n", Drt.get_version());
output.printf("WebKitGTK %u.%u.%u\n", WebKit.get_major_version(), WebKit.get_minor_version(), WebKit.get_micro_version());
#if HAVE_CEF
output.printf("Chromium %s\n", Cef.get_chromium_version());
#else
output.printf("Chromium N/A\n");
#endif
output.printf("libsoup %u.%u.%u\n", Soup.get_major_version(), Soup.get_minor_version(), Soup.get_micro_version());
}
@@ -156,10 +161,19 @@ public class AboutDialog: Gtk.Dialog
WebKit.get_major_version(), WebKit.get_minor_version(), WebKit.get_micro_version()));
label.selectable = true;
grid.attach(label, 0, 6, 2, 1);
label = new Gtk.Label("Web Engine: Chromium " +
#if HAVE_CEF
Cef.get_chromium_version()
#else
"N/A"
#endif
);
label.selectable = true;
grid.attach(label, 0, 7, 2, 1);
label = new Gtk.Label("Network Library: libsoup %u.%u.%u".printf(
Soup.get_major_version(), Soup.get_minor_version(), Soup.get_micro_version()));
label.selectable = true;
grid.attach(label, 0, 7, 2, 1);
grid.attach(label, 0, 78, 2, 1);
grid.show_all();
box.add(grid);
}
11 wscript
@@ -220,6 +220,7 @@ def options(ctx):
ctx.add_option('--noappindicator', action='store_false', default=True, dest='appindicator', help="Don't build functionality dependent on libappindicator")
ctx.add_option('--webkitgtk-supports-mse', action='store_true', default=False, dest='webkit_mse',
help="Use only if you are absolutely sure that your particular build of the WebKitGTK library supports Media Source Extension (as of 2.15.3, it is disabled by default)")
ctx.add_option('--cef', action='store_true', default=False, dest='cef', help="Build experimental CEF backend.")
def configure(ctx):
add_version_info(ctx)
@@ -336,6 +337,11 @@ def configure(ctx):
if ctx.options.appindicator:
pkgconfig(ctx, 'appindicator3-0.1', 'APPINDICATOR', '0.4')
vala_def(ctx, "APPINDICATOR")
ctx.env.have_cef = ctx.options.cef
if ctx.options.cef:
pkgconfig(ctx, 'valacef', 'VALACEF', '3.0')
pkgconfig(ctx, 'valacefgtk', 'VALACEFGTK', '3.0')
vala_def(ctx, "HAVE_CEF")
# Define HAVE_WEBKIT_X_YY Vala compiler definitions
webkit_version = tuple(int(i) for i in ctx.check_cfg(modversion='webkit2gtk-4.0').split(".")[0:2])
@@ -451,14 +457,17 @@ def build(ctx):
if ctx.env.with_appindicator:
packages += " appindicator3-0.1"
uselib += " APPINDICATOR"
if ctx.env.have_cef:
packages += " valacef valacefgtk"
uselib += " VALACEF VALACEFGTK"
for vapi in ("glib-2.0", "webkit2gtk-web-extension-4.0"):
patch('/usr/share/vala-0.38/vapi/%s.vapi' % vapi, "vapi/%s.patch" % vapi, '%s.vapi' % vapi)
cp_if_found('/usr/share/vala-0.38/vapi/%s.deps' % vapi, '%s.deps' % vapi)
ctx(features = "checkvaladefs", source = ctx.path.ant_glob('**/*.vala'),
definitions="FLATPAK TILIADO_API WEBKIT_SUPPORTS_MSE GENUINE UNITY APPINDICATOR EXPERIMENTAL NUVOLA_RUNTIME"
+ " NUVOLA_ADK NUVOLA_CDK")
+ " NUVOLA_ADK NUVOLA_CDK HAVE_CEF")
ctx.add_group()
valalib(

0 comments on commit 75cf4ac

Please sign in to comment.