mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:10:43 +07:00
[build scripts] less destructive way of detecting whether the IDE is running
GitOrigin-RevId: 17dcb70786edc640d96f80e330de31726771db2b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dc1ed5323f
commit
1701cd036b
@@ -1342,6 +1342,29 @@ done:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function un.PSEnum
|
||||
${If} $2 == "$INSTDIR\bin\${PRODUCT_EXE_FILE}"
|
||||
${OrIf} $2 == "$INSTDIR\jbr\bin\java.exe"
|
||||
StrCpy $R1 "[$0] $2"
|
||||
DetailPrint "$R1"
|
||||
StrCpy $0 ""
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function un.checkIfIDEIsRunning
|
||||
GetFunctionAddress $R0 un.PSEnum
|
||||
check_processes:
|
||||
DetailPrint "Enumerating processes"
|
||||
StrCpy $R1 ""
|
||||
PS::Enum $R0
|
||||
${If} $R1 == ""
|
||||
Return
|
||||
${EndIf}
|
||||
MessageBox MB_OKCANCEL|MB_ICONQUESTION|MB_TOPMOST "$(application_running)" IDOK check_processes
|
||||
Abort
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function un.deleteDirectoryWithParent
|
||||
RMDir /R "$0"
|
||||
RMDir "$0\.." ; delete a parent directory if empty
|
||||
@@ -1380,7 +1403,6 @@ Function un.ConfirmDeleteSettings
|
||||
${GetParent} $INSTDIR $R1
|
||||
${UnStrRep} $R1 $R1 '\' '\\'
|
||||
!insertmacro INSTALLOPTIONS_WRITE "DeleteSettings.ini" "Field 1" "Text" "$(prompt_delete_settings)"
|
||||
${UnStrRep} $R1 $INSTDIR '\' '\\'
|
||||
!insertmacro INSTALLOPTIONS_WRITE "DeleteSettings.ini" "Field 2" "Text" $R1
|
||||
!insertmacro INSTALLOPTIONS_WRITE "DeleteSettings.ini" "Field 3" "Text" "$(text_delete_settings)"
|
||||
!insertmacro INSTALLOPTIONS_WRITE "DeleteSettings.ini" "Field 4" "Text" "$(confirm_delete_caches)"
|
||||
@@ -1405,34 +1427,6 @@ Function un.ConfirmDeleteSettings
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function un.isIDEInUse
|
||||
IfFileExists $R0 0 done
|
||||
CopyFiles $R0 "$R0_copy"
|
||||
ClearErrors
|
||||
Delete $R0
|
||||
IfFileExists $R0 done
|
||||
CopyFiles "$R0_copy" $R0
|
||||
done:
|
||||
Delete "$R0_copy"
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function un.checkIfIDEInUse
|
||||
remove_previous_installation:
|
||||
StrCpy $R0 "$INSTDIR\bin\${PRODUCT_EXE_FILE}"
|
||||
Call un.isIDEInUse
|
||||
IfErrors remove_dialog 0
|
||||
StrCpy $R0 "$INSTDIR\jbr\bin\java.exe"
|
||||
Call un.isIDEInUse
|
||||
IfErrors remove_dialog done
|
||||
remove_dialog:
|
||||
MessageBox MB_OKCANCEL|MB_ICONQUESTION|MB_TOPMOST "$(application_running)" IDOK remove_previous_installation IDCANCEL cancel
|
||||
cancel:
|
||||
Abort
|
||||
done:
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Section "Uninstall"
|
||||
DetailPrint "baseRegKey: $baseRegKey"
|
||||
|
||||
@@ -1440,7 +1434,7 @@ Section "Uninstall"
|
||||
${GetParent} "$INSTDIR" $INSTDIR
|
||||
DetailPrint "Uninstalling from: $INSTDIR"
|
||||
|
||||
Call un.checkIfIDEInUse
|
||||
Call un.checkIfIDEIsRunning
|
||||
|
||||
Call un.customUninstallActions
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ gradleApiVersion=8.14
|
||||
gradleTAPI.jacksonCoreVersion=2.17.2
|
||||
jdkBuild=17.0.15b1381.5
|
||||
launcherBuild=252.16037
|
||||
nsisBuild=3.11
|
||||
nsisBuild=3.11-1
|
||||
restarterBuild=243.6005
|
||||
runtimeBuild=21.0.7b1034.51
|
||||
snapDockerImage=registry.jetbrains.team/p/ij/docker-hub/jetbrains/snapcraft@sha256:0059496b7a941e27937bc523621a336bddc1327de8dcd03f6b0bd0b57892ce43
|
||||
|
||||
@@ -31,6 +31,7 @@ compile the binaries, get required plugins, and pack everything together.
|
||||
- `Include/UAC.nsh`
|
||||
- `Plugins/x86-unicode/AccessControl.dll`
|
||||
- `Plugins/x86-unicode/ExecDos.dll`
|
||||
- `Plugins/x86-unicode/PS.dll`
|
||||
- `Plugins/x86-unicode/ShellLink.dll`
|
||||
- `Plugins/x86-unicode/UAC.dll`
|
||||
3. Zip the 'NSIS' directory.
|
||||
@@ -38,7 +39,8 @@ compile the binaries, get required plugins, and pack everything together.
|
||||
5. Update the version of 'nsisBuild' in community/build/dependencies/dependencies.properties.
|
||||
|
||||
Plugin pages; for reference:
|
||||
- [UAC](https://nsis.sourceforge.io/UAC_plug-in)
|
||||
- [Access Control](https://nsis.sourceforge.io/AccessControl_plug-in)
|
||||
- [ExecDos](https://nsis.sourceforge.io/ExecDos_plug-in)
|
||||
- [PS](https://nsis.sourceforge.io/PS_plug-in)
|
||||
- [ShellLink](https://nsis.sourceforge.io/ShellLink_plug-in)
|
||||
- [UAC](https://nsis.sourceforge.io/UAC_plug-in)
|
||||
|
||||
Reference in New Issue
Block a user