diff --git a/README.md b/README.md index 2d08850..ad9d79a 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,11 @@ bower install npm run start ``` +## Creating Releases + +To create distributables for Neuro simply run `npm run package-` where platform is one of `linux`, `win`, or +`mac`. Note for Mac there may be some extra signing process but I'm not sure since I've never used it, caveat emptor. + ## Features Neuro is a minimal client created in the same spirit as Ranvier: unopinionated but with sane examples for you to build diff --git a/index.html b/index.html index 921d285..e8db8c3 100644 --- a/index.html +++ b/index.html @@ -50,7 +50,9 @@ diff --git a/package.json b/package.json index aceadae..579866c 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,15 @@ "client" ], "scripts": { - "start": "electron ." + "start": "electron .", + "package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds", + "package-win": "electron-packager . --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=Neuro --version-string.FileDescription=Neuro --version-string.ProductName=\"Neuro\"", + "package-linux": "electron-packager . --overwrite --platform=linux --arch=x64 --icon=assets/icons/png/1024x1024.png --prune=true --out=release-builds" }, "author": "Shawn Biddle ", "license": "MIT", "devDependencies": { - "electron": "~1.6.2" + "electron": "~1.6.2", + "electron-packager": "^8.7.2" } } diff --git a/src/neuro-app/neuro-app.html b/src/neuro-app/neuro-app.html index 557bffe..c619d4f 100644 --- a/src/neuro-app/neuro-app.html +++ b/src/neuro-app/neuro-app.html @@ -252,7 +252,11 @@ return; } - if ((message === 'quit' || message === 'exit') && (!this.websocket || this.websocket.readyState === 3)) { + if ( + require && + (message === 'quit' || message === 'exit') && + (!this.websocket || this.websocket.readyState === 3) + ) { require('electron').remote.getCurrentWindow().close(); }