Skip to content

Commit

Permalink
feat(nsis): do not prompt user to close app before installing on update
Browse files Browse the repository at this point in the history
Close #1368
  • Loading branch information
develar committed Mar 15, 2017
1 parent 912fd0d commit e5682a0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"sanitize-filename": "^1.6.1",
"semver": "^5.3.0",
"stat-mode": "^0.2.2",
"ts-jsdoc": "^1.0.7",
"ts-jsdoc": "^1.1.0",
"tunnel-agent": "^0.6.0",
"update-notifier": "^2.1.0",
"uuid-1345": "^0.99.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@
${if} $3 != "${APP_EXECUTABLE_FILENAME}"
${nsProcess::FindProcess} "${APP_EXECUTABLE_FILENAME}" $R0
${If} $R0 == 0
${if} ${Updated}
Goto doStopProcess
${endif}
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "${PRODUCT_NAME} is running. $\r$\nClick OK to close it and continue with ${MODE}." /SD IDOK IDOK doStopProcess
Quit
doStopProcess:
DetailPrint "Closing running ${PRODUCT_NAME} ..."
${nsProcess::KillProcess} "${APP_EXECUTABLE_FILENAME}" $R0
DetailPrint "Waiting for ${PRODUCT_NAME} to close."
Sleep 2000
Quit
doStopProcess:
DetailPrint "Closing running ${PRODUCT_NAME} ..."
${nsProcess::KillProcess} "${APP_EXECUTABLE_FILENAME}" $R0
DetailPrint "Waiting for ${PRODUCT_NAME} to close."
Sleep 2000
${EndIf}
${nsProcess::Unload}
${endIf}
Expand Down
2 changes: 1 addition & 1 deletion test/src/ExtraBuildTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test.ifAll.ifLinuxOrDevMac("prepackaged", app({
}
}))

test.ifAll.ifDevOrWinCi("override targets in the config", app({
test.ifAll.ifDevOrLinuxCi("override targets in the config", app({
targets: linuxDirTarget,
}, {
packed: async (context) => {
Expand Down
22 changes: 8 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1079,10 +1079,10 @@ electron-macos-sign@~1.6.0:
plist "^2.0.1"

end-of-stream@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.2.0.tgz#bce82685eab6262e2a780ae740e6334027c01622"
version "1.4.0"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206"
dependencies:
once "~1.3.0"
once "^1.4.0"

entities@~1.1.1:
version "1.1.1"
Expand Down Expand Up @@ -2412,12 +2412,6 @@ once@^1.3.0, once@^1.4.0:
dependencies:
wrappy "1"

once@~1.3.0:
version "1.3.3"
resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
dependencies:
wrappy "1"

optimist@^0.6.1, optimist@~0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
Expand Down Expand Up @@ -2673,8 +2667,8 @@ readable-stream@^1.1.8, readable-stream@~1.1.9:
string_decoder "~0.10.x"

readable-stream@^2.0.0, readable-stream@^2.0.5:
version "2.2.3"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.3.tgz#9cf49463985df016c8ae8813097a9293a9b33729"
version "2.2.5"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.5.tgz#a0b187304e05bab01a4ce2b4cc9c607d5aa1d606"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0"
Expand Down Expand Up @@ -3196,9 +3190,9 @@ ts-babel@^2.0.0:
markdown-it "^8.3.1"
source-map-support "^0.4.11"

ts-jsdoc@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/ts-jsdoc/-/ts-jsdoc-1.0.7.tgz#69e05f4aabc18afc9a053737b788d3395473fca6"
ts-jsdoc@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ts-jsdoc/-/ts-jsdoc-1.1.0.tgz#7154f08c4740adaa5cf69c2fcdfa7ba9f187a1b7"
dependencies:
bluebird-lst "^1.0.1"
chalk "^1.1.3"
Expand Down

0 comments on commit e5682a0

Please sign in to comment.