Browse Source

add assets and config for packaging

master
Paul Frazee 6 years ago
parent
commit
af5b5c5706
12 changed files with 61 additions and 4 deletions
  1. +15
    -0
      README.md
  2. +0
    -0
      app/icon.png
  3. +1
    -1
      app/index.js
  4. BIN
      assets/.DS_Store
  5. BIN
      assets/icon.pxm
  6. BIN
      assets/icon1024.png
  7. BIN
      assets/osx/installer.png
  8. BIN
      assets/osx/scuttlebot.icns
  9. BIN
      assets/win/scuttlebot.ico
  10. +15
    -3
      package.json
  11. +16
    -0
      packager.json
  12. +14
    -0
      scripts/make-icns.sh

+ 15
- 0
README.md View File

@ -0,0 +1,15 @@
# Electron Scuttlebot
Code for wrapping scuttlebot in a small Electron UI, and to create app packages and installers.
```
npm install -d
npm run build
npm run pack
```
Relevant docs:
- https://github.com/maxogden/electron-packager
- https://github.com/loopline-systems/electron-builder
- https://github.com/atom/electron/tree/master/docs

icon.png → app/icon.png View File


index.js → app/index.js View File


BIN
assets/.DS_Store View File


BIN
assets/icon.pxm View File


BIN
assets/icon1024.png View File

Before After
Width: 1024  |  Height: 1024  |  Size: 54 KiB

BIN
assets/osx/installer.png View File

Before After
Width: 1024  |  Height: 1024  |  Size: 54 KiB

BIN
assets/osx/scuttlebot.icns View File


BIN
assets/win/scuttlebot.ico View File

Before After

+ 15
- 3
package.json View File

@ -2,13 +2,25 @@
"name": "electron-scuttlebot",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "app/index.js",
"scripts": {
"start": "electron ."
"start": "electron .",
"clean": "rm -rf ./dist",
"clean:osx": "rm -rf ./dist/osx",
"clean:win": "rm -rf ./dist/win",
"build": "npm run clean && npm run build:osx && npm run build:win",
"build:icon": "./scripts/make-icns.sh assets/icon1024.png assets/osx/scuttlebot.icns",
"build:osx": "npm run clean:osx && electron-packager ./ \"Scuttlebot\" --out=dist/osx --platform=darwin --arch=x64 --ignore=node_modules/electron* --version=0.28.3 --icon=assets/osx/scuttlebot.icns",
"build:win": "npm run clean:win && electron-packager ./ \"Scuttlebot\" --out=dist/win --platform=win32 --arch=ia32 --ignore=node_modules/electron* --version=0.28.3 --icon=assets/win/scuttlebot.ico",
"pack": "npm run pack:osx && npm run pack:win",
"pack:osx": "electron-builder \"dist/osx/Scuttlebot.app\" --platform=osx --out=\"dist/osx\" --config=packager.json",
"pack:win": "electron-builder \"dist/win/Scuttlebot-win32\" --platform=win --out=\"dist/win\" --config=packager.json"
},
"author": "",
"author": "Paul Frazee <pfrazee@gmail.com>",
"license": "?",
"devDependencies": {
"electron-builder": "^2.0.0",
"electron-packager": "^4.1.3",
"electron-prebuilt": "^0.28.2"
},
"dependencies": {


+ 16
- 0
packager.json View File

@ -0,0 +1,16 @@
{
"osx" : {
"title": "Secure Scuttlebot",
"background": "assets/osx/installer.png",
"icon": "assets/osx/scuttlebot.icns",
"icon-size": 80,
"contents": [
{ "x": 438, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file" }
]
},
"win" : {
"title" : "Secure Scuttlebot",
"icon" : "assets/win/scuttlebot.ico"
}
}

+ 14
- 0
scripts/make-icns.sh View File

@ -0,0 +1,14 @@
#!/bin/sh
mkdir /tmp/icon.iconset
sips -z 16 16 $1 --out /tmp/icon.iconset/icon_16x16.png
sips -z 32 32 $1 --out /tmp/icon.iconset/icon_16x16@2x.png
sips -z 32 32 $1 --out /tmp/icon.iconset/icon_32x32.png
sips -z 64 64 $1 --out /tmp/icon.iconset/icon_32x32@2x.png
sips -z 128 128 $1 --out /tmp/icon.iconset/icon_128x128.png
sips -z 256 256 $1 --out /tmp/icon.iconset/icon_128x128@2x.png
sips -z 256 256 $1 --out /tmp/icon.iconset/icon_256x256.png
sips -z 512 512 $1 --out /tmp/icon.iconset/icon_256x256@2x.png
sips -z 512 512 $1 --out /tmp/icon.iconset/icon_512x512.png
cp $1 /tmp/icon.iconset/icon_512x512@2x.png
iconutil -c icns --output $2 /tmp/icon.iconset
rm -R /tmp/icon.iconset

Loading…
Cancel
Save