Skip to content
Snippets Groups Projects
Commit 76761ff7 authored by Éloïs's avatar Éloïs
Browse files

Merge branch 'fix/1414' into 'dev'

[fix] #1414 desktop variant must not need system nodejs

See merge request !1321
parents fb457364 647b081c
No related branches found
No related tags found
1 merge request!1321[fix] #1414 desktop variant must not need system nodejs
...@@ -11,5 +11,35 @@ cd "$(dirname "${DUNITER_DIRECTORY}")" >/dev/null ...@@ -11,5 +11,35 @@ cd "$(dirname "${DUNITER_DIRECTORY}")" >/dev/null
DUNITER_DIRECTORY="${PWD}"; DUNITER_DIRECTORY="${PWD}";
popd >/dev/null popd >/dev/null
# Execute NW duniter_desktop() {
"${DUNITER_DIRECTORY}"/node_modules/.bin/nw "${DUNITER_DIRECTORY}"
local NODE
if [ -z "$DEV_MODE" ]; then
### Production mode
if [[ -e $DUNITER_DIRECTORY/bin/node ]]; then
NODE=$DUNITER_DIRECTORY/bin/node
else
echo "Node.js is not embedded in this version of Duniter"
return
fi;
else
### Cheating with DEV mode
DUNITER_DIR=`pwd`
NODE=node
fi
VERSION=`$NODE -v`
if [[ $VERSION != v10* ]]; then
echo "$NODE v10 is required";
else
# Execute NW
$NODE "${DUNITER_DIRECTORY}"/node_modules/.bin/nw "${DUNITER_DIRECTORY}"
fi;
}
duniter_desktop
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment