installer: check if PascalABCNET.exe is running (fix #378)
This commit is contained in:
parent
b364f75db4
commit
747430e388
|
|
@ -3,6 +3,7 @@ OutFile "..\Release\PascalABCNETMiniSetup.exe"
|
||||||
!include PascalABCNET_head.nsh
|
!include PascalABCNET_head.nsh
|
||||||
!include PascalABCNET_sections_min.nsh
|
!include PascalABCNET_sections_min.nsh
|
||||||
!include PascalABCNET_end.nsh
|
!include PascalABCNET_end.nsh
|
||||||
|
!include "nsProcess.nsh"
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
IfFileExists "$WINDIR\Microsoft.NET\Framework\v4.0.30319\System.dll" +3 0
|
IfFileExists "$WINDIR\Microsoft.NET\Framework\v4.0.30319\System.dll" +3 0
|
||||||
|
|
@ -11,4 +12,11 @@ Function .onInit
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
Goto exit
|
Goto exit
|
||||||
exit:
|
exit:
|
||||||
|
checkprocess:
|
||||||
|
${nsProcess::FindProcess} "PascalABCNET.exe" $R0
|
||||||
|
StrCmp $R0 0 0 notRunning
|
||||||
|
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(DESC_IsRunning) IDRETRY checkprocess IDCANCEL end
|
||||||
|
end:
|
||||||
|
Abort
|
||||||
|
notRunning:
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
@ -3,6 +3,7 @@ OutFile "..\Release\PascalABCNETSetup.exe"
|
||||||
!include PascalABCNET_head.nsh
|
!include PascalABCNET_head.nsh
|
||||||
!include PascalABCNET_sections.nsh
|
!include PascalABCNET_sections.nsh
|
||||||
!include PascalABCNET_end.nsh
|
!include PascalABCNET_end.nsh
|
||||||
|
!include "nsProcess.nsh"
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
IfFileExists "$WINDIR\Microsoft.NET\Framework\v4.0.30319\System.dll" +3 0
|
IfFileExists "$WINDIR\Microsoft.NET\Framework\v4.0.30319\System.dll" +3 0
|
||||||
|
|
@ -10,5 +11,12 @@ Function .onInit
|
||||||
Abort
|
Abort
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
Goto exit
|
Goto exit
|
||||||
exit:
|
exit:
|
||||||
|
checkprocess:
|
||||||
|
${nsProcess::FindProcess} "PascalABCNET.exe" $R0
|
||||||
|
StrCmp $R0 0 0 notRunning
|
||||||
|
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(DESC_IsRunning) IDRETRY checkprocess IDCANCEL end
|
||||||
|
end:
|
||||||
|
Abort
|
||||||
|
notRunning:
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
@ -51,7 +51,7 @@ SectionEnd
|
||||||
|
|
||||||
;Function .onInit
|
;Function .onInit
|
||||||
|
|
||||||
; !insertmacro MUI_LANGDLL_DISPLAY
|
|
||||||
|
|
||||||
;FunctionEnd
|
;FunctionEnd
|
||||||
|
|
||||||
|
|
@ -100,8 +100,8 @@ SectionEnd
|
||||||
LangString DESC_ConsoleCompiler_Desc ${LANG_ENGLISH} " "
|
LangString DESC_ConsoleCompiler_Desc ${LANG_ENGLISH} " "
|
||||||
LangString DESC_INTERNAL_ERROR_REPORT_Desc ${LANG_RUSSIAN} "Позволяет отправить разработчикам отчет о ошибках в работе компилятора"
|
LangString DESC_INTERNAL_ERROR_REPORT_Desc ${LANG_RUSSIAN} "Позволяет отправить разработчикам отчет о ошибках в работе компилятора"
|
||||||
LangString DESC_INTERNAL_ERROR_REPORT_Desc ${LANG_ENGLISH} " "
|
LangString DESC_INTERNAL_ERROR_REPORT_Desc ${LANG_ENGLISH} " "
|
||||||
LangString DESC_PT4_Desc ${LANG_RUSSIAN} "Электронный задачник Programming Taskbook Copyright (c)М.Э.Абрамян, 1998-2014"
|
LangString DESC_PT4_Desc ${LANG_RUSSIAN} "Электронный задачник Programming Taskbook Copyright (c)М.Э.Абрамян, 1998-2017"
|
||||||
LangString DESC_PT4_Desc ${LANG_ENGLISH} "Programming Taskbook Copyright (c) M.E. Abramyan, 1998-2014"
|
LangString DESC_PT4_Desc ${LANG_ENGLISH} "Programming Taskbook Copyright (c) M.E. Abramyan, 1998-2017"
|
||||||
LangString DESC_Samples_Desc ${LANG_RUSSIAN} "Файлы примеров"
|
LangString DESC_Samples_Desc ${LANG_RUSSIAN} "Файлы примеров"
|
||||||
LangString DESC_Samples_Desc ${LANG_ENGLISH} "Samples"
|
LangString DESC_Samples_Desc ${LANG_ENGLISH} "Samples"
|
||||||
LangString DESC_RusLoc_Desc ${LANG_RUSSIAN} "Поддержка русcкого языка"
|
LangString DESC_RusLoc_Desc ${LANG_RUSSIAN} "Поддержка русcкого языка"
|
||||||
|
|
@ -136,6 +136,8 @@ SectionEnd
|
||||||
LangString DESC_Remove ${LANG_ENGLISH} "Remove"
|
LangString DESC_Remove ${LANG_ENGLISH} "Remove"
|
||||||
LangString DESC_PT4Setup ${LANG_RUSSIAN} "Настройка задачника PT4"
|
LangString DESC_PT4Setup ${LANG_RUSSIAN} "Настройка задачника PT4"
|
||||||
LangString DESC_PT4Setup ${LANG_ENGLISH} "PT4 Setup"
|
LangString DESC_PT4Setup ${LANG_ENGLISH} "PT4 Setup"
|
||||||
|
LangString DESC_IsRunning ${LANG_RUSSIAN} "Невозможно начать установку, так как запущена среда PascalABC.NET. Закройте PascalABC.NET и нажмите Повторить"
|
||||||
|
LangString DESC_IsRunning ${LANG_ENGLISH} "PascalABC.NET is running. Please close it first"
|
||||||
LicenseLangString MUILicense ${LANG_RUSSIAN} "License.rtf"
|
LicenseLangString MUILicense ${LANG_RUSSIAN} "License.rtf"
|
||||||
LicenseLangString MUILicense ${LANG_ENGLISH} "License_en.rtf"
|
LicenseLangString MUILicense ${LANG_ENGLISH} "License_en.rtf"
|
||||||
|
|
||||||
|
|
|
||||||
28
ReleaseGenerators/nsProcess.nsh
Normal file
28
ReleaseGenerators/nsProcess.nsh
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
!define nsProcess::FindProcess `!insertmacro nsProcess::FindProcess`
|
||||||
|
|
||||||
|
!macro nsProcess::FindProcess _FILE _ERR
|
||||||
|
nsProcess::_FindProcess /NOUNLOAD `${_FILE}`
|
||||||
|
Pop ${_ERR}
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
|
!define nsProcess::KillProcess `!insertmacro nsProcess::KillProcess`
|
||||||
|
|
||||||
|
!macro nsProcess::KillProcess _FILE _ERR
|
||||||
|
nsProcess::_KillProcess /NOUNLOAD `${_FILE}`
|
||||||
|
Pop ${_ERR}
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
!define nsProcess::CloseProcess `!insertmacro nsProcess::CloseProcess`
|
||||||
|
|
||||||
|
!macro nsProcess::CloseProcess _FILE _ERR
|
||||||
|
nsProcess::_CloseProcess /NOUNLOAD `${_FILE}`
|
||||||
|
Pop ${_ERR}
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
|
!define nsProcess::Unload `!insertmacro nsProcess::Unload`
|
||||||
|
|
||||||
|
!macro nsProcess::Unload
|
||||||
|
nsProcess::_Unload
|
||||||
|
!macroend
|
||||||
BIN
Utils/NSIS/Unicode/Plugins/FindProcDLL.dll
Normal file
BIN
Utils/NSIS/Unicode/Plugins/FindProcDLL.dll
Normal file
Binary file not shown.
BIN
Utils/NSIS/Unicode/Plugins/nsProcess.dll
Normal file
BIN
Utils/NSIS/Unicode/Plugins/nsProcess.dll
Normal file
Binary file not shown.
Loading…
Reference in a new issue