mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-19 21:07:18 +00:00

Sentry error reports showcase that elevation errors on Windows are one of the most frequent Windows errors. In order to perform Windows elevation, we ship compiled EXEs of a third party CLI elevation application (http://code.kliu.org/misc/elevate/) that has several limitations: - We have the scan the output of the script to determine if a user cancelled the elevation request, which causes all sorts of issues on computers where English is not the main language - The application displays a `cmd.exe` window for some milliseconds, which is bad UX, that we have to workaround by distributing a patched version of the tool - The CLI application has to be spawned, which seems to be problematic if users have anti-virus software, leading to hard to debug issues - We don't have any control if something goes wrong For these reasons, we decided to implement our own elevation mechanism in C++ as a Node.js add-on, based on the `elevate.exe` code we where previously using. Misc changes: - Introduce a `lib/shared/bindings.js` module to easily require local native add-ons - Install `cpplint` and configure it to lint C++ files Note that for practical reasons, the C++ code lives in this repository rather than in a separate module. We will release this functionality in a more accessible way in the future as part of the Etcher SDK project. Change-Type: patch Changelog-Entry: Fix uncaught errors when cancelling elevation requests on Windows when the system's language is not English. Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
# appveyor file
|
|
# http://www.appveyor.com/docs/appveyor-yml
|
|
|
|
image: Visual Studio 2015
|
|
|
|
cache:
|
|
- C:\Users\appveyor\.node-gyp
|
|
- '%AppData%\npm-cache'
|
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
|
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
|
- C:\Users\appveyor\AppData\Local\Temp\chocolatey -> appveyor.yml
|
|
|
|
# what combinations to test
|
|
environment:
|
|
global:
|
|
ELECTRON_NO_ATTACH_CONSOLE: true
|
|
nodejs_version: 6.1.0
|
|
matrix:
|
|
- TARGET_ARCH: x64
|
|
- TARGET_ARCH: x86
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
|
|
install:
|
|
- ps: Install-Product node $env:nodejs_version x64
|
|
- npm install -g npm@4.4.4
|
|
- choco install nsis -version 2.51
|
|
- choco install jq
|
|
- choco install curl
|
|
- set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;%PATH%
|
|
- set PATH=C:\Program Files (x86)\NSIS;%PATH%
|
|
- set PATH=C:\MinGW\bin;%PATH%
|
|
- set PATH=C:\MinGW\msys\1.0\bin;%PATH%
|
|
- pip install codespell==1.9.2 awscli cpplint
|
|
- make info
|
|
- make electron-develop
|
|
|
|
build: off
|
|
|
|
test_script:
|
|
- node --version
|
|
- npm --version
|
|
- make sanity-checks
|
|
- cmd: npm test
|
|
|
|
deploy_script:
|
|
- cmd: .\scripts\ci\deploy-appveyor.bat
|
|
|
|
notifications:
|
|
|
|
- provider: Webhook
|
|
url: https://webhooks.gitter.im/e/0becb34b32e20d389bb8
|
|
on_build_success: false
|
|
on_build_failure: true
|
|
on_build_status_changed: true
|