Skip to content

rgl/hello-world-electron

Repository files navigation

About

Build status

The classic Hello World. Electron flavoured.

Develop

Install WinGet.

Install Chocolatey.

Install MSYS2 and Node.js:

choco install -y msys2 --params="'/NoPath'"
choco install -y nodejs

Execute the following commands in a MSYS2 bash session.

Install the dependencies:

winget install --exact --id MichalTrojnara.osslsigncode

To use the updated PATH environment variable, which will now include the newly installed applications, exit the shell session, and open a new one.

Build and package:

make dist

NB This also creates an example code signing certification authority and uses it to sign the binaries.

List the dist app contents, and confirm it has the expected files:

npx asar list dist/win-unpacked/resources/app.asar

Verify the code signature:

osslsigncode verify \
    -in dist/win-unpacked/hello-world-electron.exe \
    -CAfile example-code-signing-ca-crt.pem
osslsigncode verify \
    -in dist/hello-world-electron-setup-1.3.0.exe \
    -CAfile example-code-signing-ca-crt.pem
osslsigncode verify \
    -in dist/hello-world-electron-1.3.0.msi \
    -CAfile example-code-signing-ca-crt.pem

Show the code signature:

NB The signature verification will fail when your host does not trust the example-code-signing CA.

pwsh -Command 'Import-Certificate example-code-signing-ca-crt.pem -CertStoreLocation Cert:/LocalMachine/Root'
pwsh -Command 'Get-AuthenticodeSignature dist/win-unpacked/hello-world-electron.exe | Format-List'
pwsh -Command 'Get-AuthenticodeSignature dist/hello-world-electron-setup-1.3.0.exe | Format-List'
pwsh -Command 'Get-AuthenticodeSignature dist/hello-world-electron-1.3.0.msi | Format-List'

References

About

The classic Hello World. Electron flavoured.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages