2015-11-13 21:39:38 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
|
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
|
|
|
ROOT=$(dirname $(dirname $(realpath "$0")))
|
|
|
|
else
|
|
|
|
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
export NODE_ENV=development
|
|
|
|
export VSCODE_DEV=1
|
|
|
|
export ELECTRON_ENABLE_LOGGING=1
|
|
|
|
export ELECTRON_ENABLE_STACK_DUMPING=1
|
|
|
|
|
|
|
|
# Prepare
|
|
|
|
cd $ROOT ; node node_modules/gulp/bin/gulp.js electron
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
2015-11-26 16:03:29 +08:00
|
|
|
cd $ROOT; ./.build/electron/Electron.app/Contents/MacOS/Electron . $*
|
2015-11-13 21:39:38 +08:00
|
|
|
else
|
2015-11-26 16:03:29 +08:00
|
|
|
cd $ROOT; ./.build/electron/electron . $*
|
2015-11-13 21:39:38 +08:00
|
|
|
fi
|