Commit 76761ff7 authored by Éloïs's avatar Éloïs

Merge branch 'fix/1414' into 'dev'

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

See merge request nodes/typescript/duniter!1321
parents fb457364 647b081c
......@@ -11,5 +11,35 @@ cd "$(dirname "${DUNITER_DIRECTORY}")" >/dev/null
DUNITER_DIRECTORY="${PWD}";
popd >/dev/null
# Execute NW
"${DUNITER_DIRECTORY}"/node_modules/.bin/nw "${DUNITER_DIRECTORY}"
duniter_desktop() {
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment