From 52f47d7b618bc965a546fed16b94c1615674cb7b Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 15 Jun 2016 11:26:22 -0400 Subject: [PATCH] Check for python in build scripts (#485) This dependency is not used directly by our build scripts, but its used by `node-gyp` when building native modules, and its much nicer to show a warning early on than having to halt the build script in the middle for missing this dependency (specially on Windows systems). Signed-off-by: Juan Cruz Viotti --- scripts/build/darwin.sh | 5 +++++ scripts/build/linux.sh | 5 +++++ scripts/build/windows.bat | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/scripts/build/darwin.sh b/scripts/build/darwin.sh index af38423c..f04f439c 100755 --- a/scripts/build/darwin.sh +++ b/scripts/build/darwin.sh @@ -32,6 +32,11 @@ if ! command -v bower 2>/dev/null; then exit 1 fi +if ! command -v python 2>/dev/null; then + echo "Dependency missing: python" 1>&2 + exit 1 +fi + ELECTRON_OSX_SIGN=./node_modules/.bin/electron-osx-sign ELECTRON_PACKAGER=./node_modules/.bin/electron-packager SIGN_IDENTITY_OSX="Developer ID Application: Rulemotion Ltd (66H43P8FRG)" diff --git a/scripts/build/linux.sh b/scripts/build/linux.sh index a3e18484..8e9783d7 100755 --- a/scripts/build/linux.sh +++ b/scripts/build/linux.sh @@ -37,6 +37,11 @@ if ! command -v upx 2>/dev/null; then exit 1 fi +if ! command -v python 2>/dev/null; then + echo "Dependency missing: python" 1>&2 + exit 1 +fi + if [ "$#" -ne 1 ]; then echo "Usage: $0 " 1>&2 exit 1 diff --git a/scripts/build/windows.bat b/scripts/build/windows.bat index 83fae4bc..218fab69 100644 --- a/scripts/build/windows.bat +++ b/scripts/build/windows.bat @@ -86,6 +86,13 @@ if %ERRORLEVEL% neq 0 ( exit /b 1 ) +:: Check that asar is installed. +where python >nul 2>nul +if %ERRORLEVEL% neq 0 ( + echo Dependency missing: python 1>&2 + exit /b 1 +) + ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Global variables :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::