mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
Merge pull request #153 from resin-io/misc/makefile-release
Improve Makefile build process
This commit is contained in:
commit
59a62edc50
41
Makefile
41
Makefile
@ -13,7 +13,7 @@ release/Etcher-darwin-x64: .
|
||||
--asar \
|
||||
--icon="assets/icon.icns" \
|
||||
--overwrite \
|
||||
--out=release/
|
||||
--out=$(dir $@)
|
||||
|
||||
release/Etcher-linux-ia32: .
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
@ -23,7 +23,7 @@ release/Etcher-linux-ia32: .
|
||||
--ignore="$(ELECTRON_IGNORE)" \
|
||||
--asar \
|
||||
--overwrite \
|
||||
--out=release/
|
||||
--out=$(dir $@)
|
||||
|
||||
release/Etcher-linux-x64: .
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
@ -33,7 +33,7 @@ release/Etcher-linux-x64: .
|
||||
--ignore="$(ELECTRON_IGNORE)" \
|
||||
--asar \
|
||||
--overwrite \
|
||||
--out=release/
|
||||
--out=$(dir $@)
|
||||
|
||||
release/Etcher-win32-ia32: .
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
@ -44,7 +44,7 @@ release/Etcher-win32-ia32: .
|
||||
--icon="assets/icon.ico" \
|
||||
--asar \
|
||||
--overwrite \
|
||||
--out=release/
|
||||
--out=$(dir $@)
|
||||
|
||||
release/Etcher-win32-x64: .
|
||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||
@ -55,26 +55,34 @@ release/Etcher-win32-x64: .
|
||||
--icon="assets/icon.ico" \
|
||||
--asar \
|
||||
--overwrite \
|
||||
--out=release/
|
||||
--out=$(dir $@)
|
||||
|
||||
release/installers/Etcher.dmg: release/Etcher-darwin-x64 package.json
|
||||
$(ELECTRON_BUILDER) "$</$(APPLICATION_NAME).app" \
|
||||
--platform=osx \
|
||||
--out=release/installers
|
||||
--out=$(dir $@)
|
||||
|
||||
release/installers/Etcher-linux-x64.tar.gz: release/Etcher-linux-x64
|
||||
mkdir -p $(dir $@)
|
||||
tar -zcf $@ $<
|
||||
|
||||
release/installers/Etcher-linux-ia32.tar.gz: release/Etcher-linux-ia32
|
||||
mkdir -p $(dir $@)
|
||||
tar -zcf $@ $<
|
||||
|
||||
release/installers/Etcher-x64.exe: release/Etcher-win32-x64 package.json
|
||||
$(ELECTRON_BUILDER) $< \
|
||||
--platform=win \
|
||||
--out=release/installers/win-x64
|
||||
mv release/installers/win-x64/Etcher\ Setup.exe $@
|
||||
rmdir release/installers/win-x64
|
||||
--out=$(dir $@)win-x64
|
||||
mv $(dir $@)win-x64/Etcher\ Setup.exe $@
|
||||
rmdir $(dir $@)win-x64
|
||||
|
||||
release/installers/Etcher.exe: release/Etcher-win32-ia32 package.json
|
||||
$(ELECTRON_BUILDER) $< \
|
||||
--platform=win \
|
||||
--out=release/installers/win-ia32
|
||||
mv release/installers/win-ia32/Etcher\ Setup.exe $@
|
||||
rmdir release/installers/win-ia32
|
||||
--out=$(dir $@)win-ia32
|
||||
mv $(dir $@)win-ia32/Etcher\ Setup.exe $@
|
||||
rmdir $(dir $@)win-ia32
|
||||
|
||||
package-osx: release/Etcher-darwin-x64
|
||||
package-linux: release/Etcher-linux-ia32 release/Etcher-linux-x64
|
||||
@ -82,8 +90,15 @@ package-win32: release/Etcher-win32-ia32 release/Etcher-win32-x64
|
||||
package-all: package-osx package-linux package-win32
|
||||
|
||||
installer-osx: release/installers/Etcher.dmg
|
||||
installer-linux: release/installers/Etcher-linux-x64.tar.gz release/installers/Etcher-linux-ia32.tar.gz
|
||||
installer-win32: release/installers/Etcher-x64.exe release/installers/Etcher.exe
|
||||
installer-all: installer-osx installer-win32
|
||||
installer-all: installer-osx installer-linux installer-win32
|
||||
|
||||
release:
|
||||
rm -rf node_modules
|
||||
npm install --force
|
||||
npm test
|
||||
make installer-all
|
||||
|
||||
clean:
|
||||
rm -rf release/
|
||||
|
@ -3,23 +3,20 @@ Publishing Etcher
|
||||
|
||||
This is a small guide to package and publish Etcher to all supported operating systems.
|
||||
|
||||
Packaging
|
||||
---------
|
||||
Prequisites
|
||||
-----------
|
||||
|
||||
You need to install [wine](https://www.winehq.org) and [nsis](http://nsis.sourceforge.net/Main_Page) to package the application for Windows.
|
||||
- [wine](https://www.winehq.org)
|
||||
- [nsis](http://nsis.sourceforge.net/Main_Page)
|
||||
- [node](https://nodejs.org)
|
||||
- [GNU Make](https://www.gnu.org/software/make/)
|
||||
|
||||
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:
|
||||
Run the following command to make installers for all supported operating systems:
|
||||
|
||||
```sh
|
||||
npm install --force
|
||||
make release
|
||||
```
|
||||
|
||||
Run the following command to package Etcher
|
||||
|
||||
```sh
|
||||
make installer-all
|
||||
```
|
||||
|
||||
The resulting packages will be saved to `release/installers`.
|
||||
The resulting installers will be saved to `release/installers`.
|
||||
|
||||
You can run `make clean` to start in a fresh state.
|
||||
|
@ -5,9 +5,9 @@ package.ignore
|
||||
appveyor.yml
|
||||
bower.json
|
||||
gulpfile.js
|
||||
installers.json
|
||||
screenshot.png
|
||||
tests
|
||||
release
|
||||
lib/scss
|
||||
node_modules/electron-mocha
|
||||
node_modules/electron-builder
|
||||
|
Loading…
x
Reference in New Issue
Block a user