mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 21:26:38 +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 \
|
--asar \
|
||||||
--icon="assets/icon.icns" \
|
--icon="assets/icon.icns" \
|
||||||
--overwrite \
|
--overwrite \
|
||||||
--out=release/
|
--out=$(dir $@)
|
||||||
|
|
||||||
release/Etcher-linux-ia32: .
|
release/Etcher-linux-ia32: .
|
||||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||||
@ -23,7 +23,7 @@ release/Etcher-linux-ia32: .
|
|||||||
--ignore="$(ELECTRON_IGNORE)" \
|
--ignore="$(ELECTRON_IGNORE)" \
|
||||||
--asar \
|
--asar \
|
||||||
--overwrite \
|
--overwrite \
|
||||||
--out=release/
|
--out=$(dir $@)
|
||||||
|
|
||||||
release/Etcher-linux-x64: .
|
release/Etcher-linux-x64: .
|
||||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||||
@ -33,7 +33,7 @@ release/Etcher-linux-x64: .
|
|||||||
--ignore="$(ELECTRON_IGNORE)" \
|
--ignore="$(ELECTRON_IGNORE)" \
|
||||||
--asar \
|
--asar \
|
||||||
--overwrite \
|
--overwrite \
|
||||||
--out=release/
|
--out=$(dir $@)
|
||||||
|
|
||||||
release/Etcher-win32-ia32: .
|
release/Etcher-win32-ia32: .
|
||||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||||
@ -44,7 +44,7 @@ release/Etcher-win32-ia32: .
|
|||||||
--icon="assets/icon.ico" \
|
--icon="assets/icon.ico" \
|
||||||
--asar \
|
--asar \
|
||||||
--overwrite \
|
--overwrite \
|
||||||
--out=release/
|
--out=$(dir $@)
|
||||||
|
|
||||||
release/Etcher-win32-x64: .
|
release/Etcher-win32-x64: .
|
||||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||||
@ -55,26 +55,34 @@ release/Etcher-win32-x64: .
|
|||||||
--icon="assets/icon.ico" \
|
--icon="assets/icon.ico" \
|
||||||
--asar \
|
--asar \
|
||||||
--overwrite \
|
--overwrite \
|
||||||
--out=release/
|
--out=$(dir $@)
|
||||||
|
|
||||||
release/installers/Etcher.dmg: release/Etcher-darwin-x64 package.json
|
release/installers/Etcher.dmg: release/Etcher-darwin-x64 package.json
|
||||||
$(ELECTRON_BUILDER) "$</$(APPLICATION_NAME).app" \
|
$(ELECTRON_BUILDER) "$</$(APPLICATION_NAME).app" \
|
||||||
--platform=osx \
|
--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
|
release/installers/Etcher-x64.exe: release/Etcher-win32-x64 package.json
|
||||||
$(ELECTRON_BUILDER) $< \
|
$(ELECTRON_BUILDER) $< \
|
||||||
--platform=win \
|
--platform=win \
|
||||||
--out=release/installers/win-x64
|
--out=$(dir $@)win-x64
|
||||||
mv release/installers/win-x64/Etcher\ Setup.exe $@
|
mv $(dir $@)win-x64/Etcher\ Setup.exe $@
|
||||||
rmdir release/installers/win-x64
|
rmdir $(dir $@)win-x64
|
||||||
|
|
||||||
release/installers/Etcher.exe: release/Etcher-win32-ia32 package.json
|
release/installers/Etcher.exe: release/Etcher-win32-ia32 package.json
|
||||||
$(ELECTRON_BUILDER) $< \
|
$(ELECTRON_BUILDER) $< \
|
||||||
--platform=win \
|
--platform=win \
|
||||||
--out=release/installers/win-ia32
|
--out=$(dir $@)win-ia32
|
||||||
mv release/installers/win-ia32/Etcher\ Setup.exe $@
|
mv $(dir $@)win-ia32/Etcher\ Setup.exe $@
|
||||||
rmdir release/installers/win-ia32
|
rmdir $(dir $@)win-ia32
|
||||||
|
|
||||||
package-osx: release/Etcher-darwin-x64
|
package-osx: release/Etcher-darwin-x64
|
||||||
package-linux: release/Etcher-linux-ia32 release/Etcher-linux-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
|
package-all: package-osx package-linux package-win32
|
||||||
|
|
||||||
installer-osx: release/installers/Etcher.dmg
|
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-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:
|
clean:
|
||||||
rm -rf release/
|
rm -rf release/
|
||||||
|
@ -3,23 +3,20 @@ Publishing Etcher
|
|||||||
|
|
||||||
This is a small guide to package and publish Etcher to all supported operating systems.
|
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
|
```sh
|
||||||
npm install --force
|
make release
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the following command to package Etcher
|
The resulting installers will be saved to `release/installers`.
|
||||||
|
|
||||||
```sh
|
|
||||||
make installer-all
|
|
||||||
```
|
|
||||||
|
|
||||||
The resulting packages will be saved to `release/installers`.
|
|
||||||
|
|
||||||
You can run `make clean` to start in a fresh state.
|
You can run `make clean` to start in a fresh state.
|
||||||
|
@ -5,9 +5,9 @@ package.ignore
|
|||||||
appveyor.yml
|
appveyor.yml
|
||||||
bower.json
|
bower.json
|
||||||
gulpfile.js
|
gulpfile.js
|
||||||
installers.json
|
|
||||||
screenshot.png
|
screenshot.png
|
||||||
tests
|
tests
|
||||||
|
release
|
||||||
lib/scss
|
lib/scss
|
||||||
node_modules/electron-mocha
|
node_modules/electron-mocha
|
||||||
node_modules/electron-builder
|
node_modules/electron-builder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user