mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
Merge pull request #79 from resin-io/feat/osx-installer
Implement OS X installer
This commit is contained in:
commit
8529e7fac5
19
Makefile
19
Makefile
@ -1,9 +1,11 @@
|
||||
ELECTRON_PACKAGER=./node_modules/.bin/electron-packager
|
||||
ELECTRON_BUILDER=./node_modules/.bin/electron-builder
|
||||
ELECTRON_IGNORE=$(shell cat package.ignore | tr "\\n" "|" | sed "s/.$$//")
|
||||
ELECTRON_VERSION=0.36.0
|
||||
APPLICATION_NAME="Etcher"
|
||||
|
||||
release/Etcher-darwin-x64: .
|
||||
$(ELECTRON_PACKAGER) . "Etcher" \
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
--platform=darwin \
|
||||
--arch=x64 \
|
||||
--version=$(ELECTRON_VERSION) \
|
||||
@ -14,7 +16,7 @@ release/Etcher-darwin-x64: .
|
||||
--out=release/
|
||||
|
||||
release/Etcher-linux-ia32: .
|
||||
$(ELECTRON_PACKAGER) . "Etcher" \
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
--platform=linux \
|
||||
--arch=ia32 \
|
||||
--version=$(ELECTRON_VERSION) \
|
||||
@ -24,7 +26,7 @@ release/Etcher-linux-ia32: .
|
||||
--out=release/
|
||||
|
||||
release/Etcher-linux-x64: .
|
||||
$(ELECTRON_PACKAGER) . "Etcher" \
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
--platform=linux \
|
||||
--arch=x64 \
|
||||
--version=$(ELECTRON_VERSION) \
|
||||
@ -34,7 +36,7 @@ release/Etcher-linux-x64: .
|
||||
--out=release/
|
||||
|
||||
release/Etcher-win32-ia32: .
|
||||
$(ELECTRON_PACKAGER) . "Etcher" \
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
--platform=win32 \
|
||||
--arch=ia32 \
|
||||
--version=$(ELECTRON_VERSION) \
|
||||
@ -45,7 +47,7 @@ release/Etcher-win32-ia32: .
|
||||
--out=release/
|
||||
|
||||
release/Etcher-win32-x64: .
|
||||
$(ELECTRON_PACKAGER) . "Etcher" \
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
--platform=win32 \
|
||||
--arch=x64 \
|
||||
--version=$(ELECTRON_VERSION) \
|
||||
@ -60,5 +62,12 @@ package-linux: release/Etcher-linux-ia32 release/Etcher-linux-x64
|
||||
package-win32: release/Etcher-win32-ia32 release/Etcher-win32-x64
|
||||
package-all: package-osx package-linux package-win32
|
||||
|
||||
release/installers/Etcher.dmg: release/Etcher-darwin-x64 package.json
|
||||
$(ELECTRON_BUILDER) "$</$(APPLICATION_NAME).app" \
|
||||
--platform=osx \
|
||||
--out=release/installers
|
||||
|
||||
installer-osx: release/installers/Etcher.dmg
|
||||
|
||||
clean:
|
||||
rm -rf release/
|
||||
|
@ -6,7 +6,7 @@ This is a small guide to package and publish Resin Etcher to all supported opera
|
||||
Packaging
|
||||
---------
|
||||
|
||||
You need to install [wine](https://www.winehq.org) to package the application for Windows.
|
||||
You need to install [wine](https://www.winehq.org) and [nsis](http://nsis.sourceforge.net/Main_Page) to package the application for Windows.
|
||||
|
||||
Make sure you install npm dependencies with `--force` since there might be optional dependencies for an operating system not equal to the host that will not make it to the package otherwise:
|
||||
|
||||
@ -17,15 +17,9 @@ npm install --force
|
||||
Run the following command to package Resin Etcher
|
||||
|
||||
```sh
|
||||
# all supported operating systems
|
||||
make package-all
|
||||
|
||||
# or a single operating system
|
||||
make package-osx
|
||||
make package-linux
|
||||
make package-win32
|
||||
make installer-osx
|
||||
```
|
||||
|
||||
The resulting packages will be saved to `release/`.
|
||||
The resulting packages will be saved to `release/installers`.
|
||||
|
||||
You can run `make clean` to start in a fresh state.
|
||||
|
BIN
assets/osx/installer.png
Normal file
BIN
assets/osx/installer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
assets/osx/installer@2x.png
Normal file
BIN
assets/osx/installer@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
13
package.json
13
package.json
@ -16,6 +16,18 @@
|
||||
},
|
||||
"author": "Juan Cruz Viotti <juan@resin.io>",
|
||||
"license": "Apache-2.0",
|
||||
"builder": {
|
||||
"osx" : {
|
||||
"title": "Etcher",
|
||||
"background": "assets/osx/installer.png",
|
||||
"icon": "assets/icon.icns",
|
||||
"icon-size": 110,
|
||||
"contents": [
|
||||
{ "x": 415, "y": 225, "type": "link", "path": "/Applications" },
|
||||
{ "x": 140, "y": 225, "type": "file" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"elevator": "^1.0.0",
|
||||
"removedrive": "^1.0.0"
|
||||
@ -37,6 +49,7 @@
|
||||
"devDependencies": {
|
||||
"angular-mocks": "^1.4.7",
|
||||
"electron-mocha": "^0.8.0",
|
||||
"electron-builder": "^2.6.0",
|
||||
"electron-packager": "^5.1.1",
|
||||
"electron-prebuilt": "^0.36.4",
|
||||
"gulp": "^3.9.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user