Skip to content

Build Batch Explorer yourself

ascobie edited this page Feb 19, 2019 · 4 revisions

1. Prerequisites

  1. Install node.js version 10 or greater. Download
  2. Install python 3.6 (doesn't need to be in the path if that breaks your environment)
  3. Install python 2.7 (Recommended not to set in your path). Then run npm config set python <path/to/your/python2/install>
  4. Have a Visual Studio 2015+ installed(For Windows only and recommended to have VS 2017+)
  5. Alternatively to 3. and 4. you can use npm install -g windows-build-tools

Why python 2? Unfortunately building native dependencies for NodeJS uses node-gyp which was written for python 2. see issue.

You can view the steps the Azure DevOps CI has to setup the build:

2. Clone the repo

  • At stable branch git clone -b stable https://github.com/Azure/BatchExplorer
  • Or for the latest changes git clone https://github.com/Azure/BatchExplorer

Move to the directory cd BatchExplorer

3. Build the app with the all in one command line (Windows only)

Call this command and it will check you have everything setup correctly and build the app.

.\scripts\install\install-windows

You can skip all the other steps

4. Install the dependencies

npm install
pip3 install -r python/requirements.txt # or pip if on windows or only have python 3.6 installed

4.5 Setup some configuration (Only in certain cases)

If you didn't install python in the path, you will need to let Batch Explorer know where it is. Set an environment variable called BL_PYTHON_PATH with the path to the python executable. Batch Explorer will first look to see if this environment variable is set. If it's not, it will try python3 and then python to find an installation of python 3.6

5. Build and run the application

# Make an executable, this will bundle all needed dependencies including node and python
npm run build-and-pack

# Manual
npm run build:prod
npm run electron:prod

# To debug errors
npm run build
npm run electron

Clone this wiki locally