diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-10-01 13:05:00 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-10-01 13:14:11 (GMT) |
commit | 90055ade3899ffa1d0ee700d218a259b39052270 (patch) | |
tree | 7869a90f4a9445a3e6bdee990473ce13b3ce3399 /Swift/Packaging | |
parent | 5a91a3ef54c00a6d4d960725f2ff84b5e0c43cab (diff) | |
download | swift-90055ade3899ffa1d0ee700d218a259b39052270.zip swift-90055ade3899ffa1d0ee700d218a259b39052270.tar.bz2 |
Detect running Swift before running NSIS installer.
Resolves: #229
Diffstat (limited to 'Swift/Packaging')
-rw-r--r-- | Swift/Packaging/nsis/swift.nsi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/Packaging/nsis/swift.nsi b/Swift/Packaging/nsis/swift.nsi index 6a5be12..6d6b907 100644 --- a/Swift/Packaging/nsis/swift.nsi +++ b/Swift/Packaging/nsis/swift.nsi @@ -33,7 +33,13 @@ SetCompressor lzma !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES - +section "isrunning" + FindProcDLL::FindProc "Swift.exe" + IntCmp $R0 1 0 notRunning + MessageBox MB_OK|MB_ICONEXCLAMATION "Swift is running. Please close it first" /SD IDOK + Abort + notRunning: +SectionEnd # default section start section "Main install" @@ -104,6 +110,8 @@ Section -Prerequisites endRuntime: SectionEnd + + section "autostart" MessageBox MB_YESNO "Would you like Swift to run at startup?" /SD IDYES IDNO endAutostart WriteRegStr HKEY_CURRENT_USER "Software\Microsoft\Windows\CurrentVersion\Run" "Swift" "$INSTDIR\Swift.exe" |