[beast: 66/70] V8BSE: use electron/package.json to detect electron version without DISPLAY
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 66/70] V8BSE: use electron/package.json to detect electron version without DISPLAY
- Date: Tue, 28 Mar 2017 23:27:15 +0000 (UTC)
commit 05a38219ab34486f6050b6108cbf90a62da3cc0f
Author: Tim Janik <timj gnu org>
Date: Fri Mar 24 17:52:03 2017 +0100
V8BSE: use electron/package.json to detect electron version without DISPLAY
Electron fails to display anything if started as 'electron --version'
without $DISPLAY being set, which is likely to happen during build time.
Reading node_modules/electron/package.json is a quick way to extract
the electron version information without needing $DISPLAY.
See: https://github.com/electron/electron/issues/8757
Signed-off-by: Tim Janik <timj gnu org>
ebeast/v8bse/Makefile.am | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/ebeast/v8bse/Makefile.am b/ebeast/v8bse/Makefile.am
index 3a18310..9f8be99 100644
--- a/ebeast/v8bse/Makefile.am
+++ b/ebeast/v8bse/Makefile.am
@@ -35,10 +35,13 @@ CLEANFILES += v8bse.node
clean-local: clean-build
clean-build: ; rm -rf build/
NODE_GYP = $(strip \
- HOME=../node_modules/.electron-gyp \
+ sed -n '/^ \ "version":/s/.*"\([0-9.]\+\)".*/\1/p' ../node_modules/electron/package.json > $@.tmpev \
+ && ELECTRON_VERSION=`grep '^[0-9.]\+$$' $@.tmpev` \
+ && rm $@.tmpev \
+ && HOME=../node_modules/.electron-gyp \
CXX="$(CXX)" CXXFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)" \
../node_modules/.bin/node-gyp \
- --target=$(shell ../node_modules/electron/dist/electron --version) \
+ --target="$$ELECTRON_VERSION" \
$(if $(findstring 1, $(V)) , --verbose) \
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]