Fix "Edit with Notepad++" context menu needs restarting OS issue
Fix context menu disappears issue while update. It works with https://github.com/notepad-plus-plus/nppShell/pull/14 to fix https://github.com/notepad-plus-plus/nppShell/issues/13 It fixes also the added dependency of the service "Application Information". Fix #13446, fix #13457pull/13461/head
parent
508b3fabd6
commit
e28db05754
|
@ -262,50 +262,32 @@ FunctionEnd
|
||||||
|
|
||||||
!include "nsisInclude\themes.nsh"
|
!include "nsisInclude\themes.nsh"
|
||||||
|
|
||||||
!include "StrFunc.nsh"
|
|
||||||
${Using:StrFunc} StrStr
|
|
||||||
|
|
||||||
Var muiVerbStr
|
|
||||||
Var nppSubStr
|
|
||||||
|
|
||||||
${MementoSection} "Context Menu Entry" explorerContextMenu
|
${MementoSection} "Context Menu Entry" explorerContextMenu
|
||||||
|
|
||||||
SetOverwrite try
|
SetOverwrite try
|
||||||
SetOutPath "$INSTDIR\contextmenu\"
|
SetOutPath "$INSTDIR\contextMenu\"
|
||||||
|
|
||||||
!ifdef ARCH64
|
!ifdef ARCH64
|
||||||
File /oname=$INSTDIR\contextmenu\NppShell.msix "..\bin64\NppShell.msix"
|
File /oname=$INSTDIR\contextMenu\NppShell.msix "..\bin64\NppShell.msix"
|
||||||
File /oname=$INSTDIR\contextmenu\NppShell.dll "..\bin64\NppShell.x64.dll"
|
File /oname=$INSTDIR\contextMenu\NppShell.dll "..\bin64\NppShell.x64.dll"
|
||||||
!else ifdef ARCHARM64
|
!else ifdef ARCHARM64
|
||||||
File /oname=$INSTDIR\contextmenu\NppShell.msix "..\binarm64\NppShell.msix"
|
File /oname=$INSTDIR\contextMenu\NppShell.msix "..\binarm64\NppShell.msix"
|
||||||
File /oname=$INSTDIR\contextmenu\NppShell.dll "..\binarm64\NppShell.arm64.dll"
|
File /oname=$INSTDIR\contextMenu\NppShell.dll "..\binarm64\NppShell.arm64.dll"
|
||||||
!else
|
!else
|
||||||
; We need to test which arch we are running on, since 32bit exe can be run on both 32bit and 64bit Windows.
|
; We need to test which arch we are running on, since 32bit exe can be run on both 32bit and 64bit Windows.
|
||||||
${If} ${RunningX64}
|
${If} ${RunningX64}
|
||||||
; We are running on 64bit Windows, so we need the msix as well, since it might be Windows 11.
|
; We are running on 64bit Windows, so we need the msix as well, since it might be Windows 11.
|
||||||
File /oname=$INSTDIR\contextmenu\NppShell.msix "..\bin64\NppShell.msix"
|
File /oname=$INSTDIR\contextMenu\NppShell.msix "..\bin64\NppShell.msix"
|
||||||
File /oname=$INSTDIR\contextmenu\NppShell.dll "..\bin64\NppShell.x64.dll"
|
File /oname=$INSTDIR\contextMenu\NppShell.dll "..\bin64\NppShell.x64.dll"
|
||||||
${Else}
|
${Else}
|
||||||
; We are running on 32bit Windows, so no need for the msix file, since there is no way this could even be upgraded to Windows 11.
|
; We are running on 32bit Windows, so no need for the msix file, since there is no way this could even be upgraded to Windows 11.
|
||||||
File /oname=$INSTDIR\contextmenu\NppShell.dll "..\bin\NppShell.x86.dll"
|
File /oname=$INSTDIR\contextMenu\NppShell.dll "..\bin\NppShell.x86.dll"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
!endif
|
!endif
|
||||||
Exec 'regsvr32 /s "$INSTDIR\contextmenu\NppShell.dll"'
|
|
||||||
|
|
||||||
; Make sure old NppShell dll's are unregistered and removed
|
Exec 'regsvr32 /s "$INSTDIR\contextMenu\NppShell.dll"'
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_01.dll"'
|
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_02.dll"'
|
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_03.dll"'
|
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_04.dll"'
|
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_05.dll"'
|
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_06.dll"'
|
|
||||||
Delete "$INSTDIR\NppShell_01.dll"
|
|
||||||
Delete "$INSTDIR\NppShell_02.dll"
|
|
||||||
Delete "$INSTDIR\NppShell_03.dll"
|
|
||||||
Delete "$INSTDIR\NppShell_04.dll"
|
|
||||||
Delete "$INSTDIR\NppShell_05.dll"
|
|
||||||
Delete "$INSTDIR\NppShell_06.dll"
|
|
||||||
|
|
||||||
${MementoSectionEnd}
|
${MementoSectionEnd}
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,6 @@ Function un.onUninstSuccess
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
!include "StrFunc.nsh"
|
|
||||||
${Using:StrFunc} UnStrStr
|
|
||||||
|
|
||||||
Var muiVerbStrUn
|
|
||||||
Var nppSubStrUn
|
|
||||||
|
|
||||||
Section un.explorerContextMenu
|
Section un.explorerContextMenu
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_01.dll"'
|
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_01.dll"'
|
||||||
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_02.dll"'
|
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_02.dll"'
|
||||||
|
|
|
@ -7,11 +7,6 @@
|
||||||
name="Notepad++"
|
name="Notepad++"
|
||||||
type="win32"
|
type="win32"
|
||||||
/>
|
/>
|
||||||
<msix xmlns="urn:schemas-microsoft-com:msix.v1"
|
|
||||||
publisher="CN=Notepad++"
|
|
||||||
packageName="NotepadPlusPlus"
|
|
||||||
applicationId="NotepadPlusPlus"
|
|
||||||
/>
|
|
||||||
<description>Notepad++</description>
|
<description>Notepad++</description>
|
||||||
<dependency>
|
<dependency>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
|
|
Loading…
Reference in New Issue