Skip to content

Instantly share code, notes, and snippets.

@TimJMartin
Created October 19, 2015 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimJMartin/6a1c8b5b34aa6fd8c8a9 to your computer and use it in GitHub Desktop.
Save TimJMartin/6a1c8b5b34aa6fd8c8a9 to your computer and use it in GitHub Desktop.
Install node 4.2.1
Use HTML and main.js from electron getting started guide
Configure package.json to include:
"dependencies": {
"gdal": "naturalatlas/node-gdal#win-node-4.2.1"
}
Then install electron rebuild which recompiles native node modules.
npm install --save-dev electron-rebuild
Then install node gdal using
npm install gdal
Because the win4.2.1 version is not a binary this will need to build and takes some time.
If it successfully builds you then need to run the electron-rebuild
node_modules\.bin\electron-rebuild.cmd --version 0.34.0 --node-module-version 0.0.1
There is no output from rebuild but it should complete without errors.
Then you need to install electron
npm install electron-prebuilt
Once installed you can then run the app
node_modules\electron-prebuilt\dist\electron.exe .
Big thanks to Wilhelam Berg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment