diff --git a/appdmg.json b/appdmg.json index 2c123c5..eb31a1e 100644 --- a/appdmg.json +++ b/appdmg.json @@ -5,6 +5,6 @@ "icon-size": 80, "contents": [ { "x": 448, "y": 344, "type": "link", "path": "/Applications" }, - { "x": 192, "y": 344, "type": "file", "path": "Node-RED-darwin-x64/Node-RED.app" } + { "x": 192, "y": 344, "type": "file", "path": "dist/Node-RED-darwin-x64/Node-RED.app" } ] } diff --git a/builder.json b/builder.json new file mode 100644 index 0000000..b1843e9 --- /dev/null +++ b/builder.json @@ -0,0 +1,16 @@ +{ + "osx" : { + "title": "Node-RED installer", + "background": "appbkg.png", + "icon": "nodered.icns", + "icon-size": 80, + "contents": [ + { "x": 438, "y": 344, "type": "link", "path": "/Applications" }, + { "x": 192, "y": 344, "type": "file" } + ] + }, + "win" : { + "title" : "Node-RED installer", + "icon" : "nodered.ico" + } +} diff --git a/nodered.ico b/nodered.ico new file mode 100644 index 0000000..b5e4502 Binary files /dev/null and b/nodered.ico differ diff --git a/nodered.png b/nodered.png old mode 100755 new mode 100644 diff --git a/package.json b/package.json index 8311a07..0ff65ac 100644 --- a/package.json +++ b/package.json @@ -8,14 +8,16 @@ "test": "echo \" Warning: no test specified \"", "clean": "rm -rf ./dist ", - "clean: osx": "rm -rf ./dist/osx", - "clean: win": "rm -rf ./dist/win", - "pack": "npm run pack : osx", - "pack: osx": "npm run clean:. osx && electron-packager electron-node-red Node-RED --out = dist/osx --icon=nodered.icns --platform=darwin --arch=x64 ", + "pack": "npm run pack:osx", + "pack:osx": "npm run clean && electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=dist", + "pack:win": "npm run clean && electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64 --out=dist", + + "build": "npm run build:osx", + "build:osx": "npm run pack:osx && appdmg appdmg.json dist/Node-RED.dmg", + "build:mac": "npm run pack:osx && electron-builder \"dist/Node-RED-darwin-x64\" --platform=osx --out=dist --config=builder.json", + "build:win": "npm run pack:win && electron-builder \"dist/Node-RED-win32-x64\" --platform=win --out=dist --config=builder.json" - "build": "npm run build : osx", - "build: osx": "npm run pack: osx && appdmg appdmg.json dist/NodeRED.dmg" }, "repository": { "type": "git",