mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-26 04:36:35 +00:00
Merge pull request #220 from resin-io/feat/win32-sign
Setup code-signing in Windows
This commit is contained in:
commit
8187fdf4db
8
.gitignore
vendored
8
.gitignore
vendored
@ -30,3 +30,11 @@ bower_components
|
|||||||
|
|
||||||
# Compiled Electron releases
|
# Compiled Electron releases
|
||||||
etcher-release/
|
etcher-release/
|
||||||
|
|
||||||
|
# Certificates
|
||||||
|
*.spc
|
||||||
|
*.pvk
|
||||||
|
*.p12
|
||||||
|
*.cer
|
||||||
|
*.crt
|
||||||
|
*.pem
|
||||||
|
14
Makefile
14
Makefile
@ -10,6 +10,16 @@ COMPANY_NAME="Resinio Ltd"
|
|||||||
SIGN_IDENTITY_OSX="Rulemotion Ltd (66H43P8FRG)"
|
SIGN_IDENTITY_OSX="Rulemotion Ltd (66H43P8FRG)"
|
||||||
S3_BUCKET="resin-production-downloads"
|
S3_BUCKET="resin-production-downloads"
|
||||||
|
|
||||||
|
sign-win32 = osslsigncode sign \
|
||||||
|
-certs certificate.crt.pem \
|
||||||
|
-key certificate.key.pem \
|
||||||
|
-h sha1 \
|
||||||
|
-t http://timestamp.comodoca.com \
|
||||||
|
-n "$(APPLICATION_NAME) - $(ETCHER_VERSION)"\
|
||||||
|
-in $(1) \
|
||||||
|
-out $(dir $(1))Signed.exe \
|
||||||
|
&& mv $(dir $(1))Signed.exe $(1)
|
||||||
|
|
||||||
etcher-release/Etcher-darwin-x64: .
|
etcher-release/Etcher-darwin-x64: .
|
||||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||||
--platform=darwin \
|
--platform=darwin \
|
||||||
@ -72,6 +82,7 @@ etcher-release/Etcher-win32-x86: .
|
|||||||
--overwrite \
|
--overwrite \
|
||||||
--out=$(dir $@)
|
--out=$(dir $@)
|
||||||
mv $(dir $@)Etcher-win32-ia32 $@
|
mv $(dir $@)Etcher-win32-ia32 $@
|
||||||
|
$(call sign-win32,$@/Etcher.exe)
|
||||||
|
|
||||||
etcher-release/Etcher-win32-x64: .
|
etcher-release/Etcher-win32-x64: .
|
||||||
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
|
||||||
@ -91,6 +102,7 @@ etcher-release/Etcher-win32-x64: .
|
|||||||
--version-string.InternalName="$(APPLICATION_NAME)" \
|
--version-string.InternalName="$(APPLICATION_NAME)" \
|
||||||
--overwrite \
|
--overwrite \
|
||||||
--out=$(dir $@)
|
--out=$(dir $@)
|
||||||
|
$(call sign-win32,$@/Etcher.exe)
|
||||||
|
|
||||||
etcher-release/installers/Etcher-darwin-x64.dmg: etcher-release/Etcher-darwin-x64 package.json
|
etcher-release/installers/Etcher-darwin-x64.dmg: etcher-release/Etcher-darwin-x64 package.json
|
||||||
$(ELECTRON_BUILDER) "$</$(APPLICATION_NAME).app" \
|
$(ELECTRON_BUILDER) "$</$(APPLICATION_NAME).app" \
|
||||||
@ -113,6 +125,7 @@ etcher-release/installers/Etcher-win32-x64.exe: etcher-release/Etcher-win32-x64
|
|||||||
--out=$(dir $@)win32-x64
|
--out=$(dir $@)win32-x64
|
||||||
mv $(dir $@)win32-x64/Etcher\ Setup.exe $@
|
mv $(dir $@)win32-x64/Etcher\ Setup.exe $@
|
||||||
rmdir $(dir $@)win32-x64
|
rmdir $(dir $@)win32-x64
|
||||||
|
$(call sign-win32,$@)
|
||||||
|
|
||||||
etcher-release/installers/Etcher-win32-x86.exe: etcher-release/Etcher-win32-x86 package.json
|
etcher-release/installers/Etcher-win32-x86.exe: etcher-release/Etcher-win32-x86 package.json
|
||||||
$(ELECTRON_BUILDER) $< \
|
$(ELECTRON_BUILDER) $< \
|
||||||
@ -120,6 +133,7 @@ etcher-release/installers/Etcher-win32-x86.exe: etcher-release/Etcher-win32-x86
|
|||||||
--out=$(dir $@)win32-x86
|
--out=$(dir $@)win32-x86
|
||||||
mv $(dir $@)win32-x86/Etcher\ Setup.exe $@
|
mv $(dir $@)win32-x86/Etcher\ Setup.exe $@
|
||||||
rmdir $(dir $@)win32-x86
|
rmdir $(dir $@)win32-x86
|
||||||
|
$(call sign-win32,$@)
|
||||||
|
|
||||||
package-osx: etcher-release/Etcher-darwin-x64
|
package-osx: etcher-release/Etcher-darwin-x64
|
||||||
package-linux: etcher-release/Etcher-linux-x86 etcher-release/Etcher-linux-x64
|
package-linux: etcher-release/Etcher-linux-x86 etcher-release/Etcher-linux-x64
|
||||||
|
@ -12,6 +12,7 @@ Prequisites
|
|||||||
- [nsis (for Windows)](http://nsis.sourceforge.net/Main_Page)
|
- [nsis (for Windows)](http://nsis.sourceforge.net/Main_Page)
|
||||||
- [XCode (for OS X)](https://developer.apple.com/xcode://developer.apple.com/xcode/)
|
- [XCode (for OS X)](https://developer.apple.com/xcode://developer.apple.com/xcode/)
|
||||||
- [AWS CLI (for uploading packages)](https://aws.amazon.com/cli://aws.amazon.com/cli/)
|
- [AWS CLI (for uploading packages)](https://aws.amazon.com/cli://aws.amazon.com/cli/)
|
||||||
|
- [osslsigncode (for signing the Windows installers)](https://sourceforge.net/projects/osslsigncode/)
|
||||||
|
|
||||||
If you're going to generate installers for another platform than the one you're currently running, make sure you force-install all NPM dependencies, so optional dependencies marked for a certain operating system get installed regardless of the host operating system
|
If you're going to generate installers for another platform than the one you're currently running, make sure you force-install all NPM dependencies, so optional dependencies marked for a certain operating system get installed regardless of the host operating system
|
||||||
|
|
||||||
@ -36,6 +37,14 @@ Signing
|
|||||||
|
|
||||||
The application will be signed automatically using this certificate when packaging for OS X.
|
The application will be signed automatically using this certificate when packaging for OS X.
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
1. Get access to our code signing certificate and decryption key as a Resin.io employee by asking for it to the relevant people.
|
||||||
|
|
||||||
|
2. Place the cert and key in the root of the Etcher repository naming them `certificate.crt.pem` and `certificate.key.pem`, respectively.
|
||||||
|
|
||||||
|
The application and installer will be signed automatically using these certificates when packaging for Windows.
|
||||||
|
|
||||||
Packaging
|
Packaging
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user