Change nppPluginList.dll installation locaion
From %LOCALAPPDATA%\Ntepad++\plugins\Config\ to %PROGRAMDATA%\Ntepad++\plugins\Config\
This commit is contained in:
parent
775d204ef9
commit
15ef9bd052
@ -68,7 +68,6 @@ SectionGroup "Plugins" Plugins
|
||||
${MementoSectionEnd}
|
||||
|
||||
${MementoSection} "Decent Spell-Checking" DSpellCheck
|
||||
Call setPathAndOptions
|
||||
|
||||
Delete "$INSTDIR\plugins\DSpellCheck.dll"
|
||||
Delete "$INSTDIR\plugins\DSpellCheck\DSpellCheck.dll"
|
||||
@ -78,12 +77,12 @@ SectionGroup "Plugins" Plugins
|
||||
SetOutPath "$PLUGIN_INST_PATH\DSpellCheck"
|
||||
!ifdef ARCH64
|
||||
File "..\bin64\plugins\DSpellCheck\DSpellCheck.dll"
|
||||
SetOutPath "$PLUGIN_CONF_PATH\Hunspell"
|
||||
SetOutPath "$USER_PLUGIN_CONF_PATH\Hunspell"
|
||||
File "..\bin64\plugins\Config\Hunspell\en_US.aff"
|
||||
File "..\bin64\plugins\Config\Hunspell\en_US.dic"
|
||||
!else
|
||||
File "..\bin\plugins\DSpellCheck\DSpellCheck.dll"
|
||||
SetOutPath "$PLUGIN_CONF_PATH\Hunspell"
|
||||
SetOutPath "$USER_PLUGIN_CONF_PATH\Hunspell"
|
||||
File "..\bin\plugins\Config\Hunspell\en_US.aff"
|
||||
File "..\bin\plugins\Config\Hunspell\en_US.dic"
|
||||
!endif
|
||||
@ -114,7 +113,7 @@ ${MementoSectionEnd}
|
||||
|
||||
${MementoSection} "Plugins Admin" PluginsAdmin
|
||||
SetOverwrite on
|
||||
SetOutPath $PLUGIN_CONF_PATH
|
||||
SetOutPath $ALLUSERS_PLUGIN_CONF_PATH
|
||||
!ifdef ARCH64
|
||||
File "..\bin64\nppPluginList.dll"
|
||||
!else
|
||||
@ -128,6 +127,7 @@ SectionGroup un.Plugins
|
||||
Delete "$INSTDIR\plugins\NppExport.dll"
|
||||
Delete "$INSTDIR\plugins\NppExport\NppExport.dll"
|
||||
RMDir "$INSTDIR\plugins\NppExport"
|
||||
|
||||
Delete "$PLUGIN_INST_PATH\NppExport\NppExport.dll"
|
||||
RMDir "$PLUGIN_INST_PATH\NppExport"
|
||||
SectionEnd
|
||||
@ -137,14 +137,14 @@ SectionGroup un.Plugins
|
||||
Delete "$INSTDIR\plugins\NppConverter\NppConverter.dll"
|
||||
RMDir "$INSTDIR\plugins\NppConverter"
|
||||
Delete "$PLUGIN_INST_PATH\NppConverter\NppConverter.dll"
|
||||
RMDir "PLUGIN_INST_PATH\NppConverter"
|
||||
RMDir "$PLUGIN_INST_PATH\NppConverter"
|
||||
SectionEnd
|
||||
|
||||
Section un.MimeTools
|
||||
Delete "$INSTDIR\plugins\mimeTools.dll"
|
||||
Delete "$INSTDIR\plugins\mimeTools\mimeTools.dll"
|
||||
RMDir "$INSTDIR\plugins\mimeTools"
|
||||
Delete "PLUGIN_INST_PATH\mimeTools\mimeTools.dll"
|
||||
Delete "$PLUGIN_INST_PATH\mimeTools\mimeTools.dll"
|
||||
RMDir "$PLUGIN_INST_PATH\mimeTools"
|
||||
SectionEnd
|
||||
|
||||
@ -156,16 +156,17 @@ SectionGroup un.Plugins
|
||||
SectionEnd
|
||||
|
||||
Section un.DSpellCheck
|
||||
|
||||
Delete "$INSTDIR\plugins\DSpellCheck.dll"
|
||||
Delete "$INSTDIR\plugins\DSpellCheck\DSpellCheck.dll"
|
||||
Delete "$PLUGIN_INST_PATH\DSpellCheck\DSpellCheck.dll"
|
||||
Delete "$UPDATE_PATH\plugins\Config\DSpellCheck.ini"
|
||||
Delete "$PLUGIN_CONF_PATH\DSpellCheck.ini"
|
||||
Delete "$ALLUSERS_PLUGIN_CONF_PATH\DSpellCheck.ini"
|
||||
Delete "$INSTDIR\plugins\Config\Hunspell\en_US.aff"
|
||||
Delete "$PLUGIN_CONF_PATH\Hunspell\en_US.aff"
|
||||
Delete "$USER_PLUGIN_CONF_PATH\Hunspell\en_US.aff"
|
||||
Delete "$INSTDIR\plugins\Config\Hunspell\en_US.dic"
|
||||
Delete "$PLUGIN_CONF_PATH\Hunspell\en_US.dic"
|
||||
Delete "$USER_PLUGIN_CONF_PATH\Hunspell\en_US.dic"
|
||||
RMDir /r "$INSTDIR\plugins\Config" ; Remove Config folder recursively only if empty
|
||||
RMDir /r "$PLUGIN_CONF_PATH\Config" ; Remove Config folder recursively only if empty
|
||||
RMDir /r "$ALLUSERS_PLUGIN_CONF_PATH\Config" ; Remove Config folder recursively only if empty
|
||||
RMDir "$INSTDIR\plugins\DSpellCheck"
|
||||
SectionEnd
|
||||
|
||||
@ -194,5 +195,6 @@ ${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Section un.PluginsAdmin
|
||||
Delete "$PLUGIN_CONF_PATH\nppPluginList.dll"
|
||||
Delete "$PLUGIN_CONF_PATH\nppPluginList.dll" ; delete 7.6 version's left
|
||||
Delete "$ALLUSERS_PLUGIN_CONF_PATH\nppPluginList.dll"
|
||||
SectionEnd
|
||||
|
@ -27,9 +27,13 @@
|
||||
|
||||
Var UPDATE_PATH
|
||||
Var PLUGIN_INST_PATH
|
||||
Var PLUGIN_CONF_PATH
|
||||
Var USER_PLUGIN_CONF_PATH
|
||||
Var ALLUSERS_PLUGIN_CONF_PATH
|
||||
Function setPathAndOptions
|
||||
${If} $UPDATE_PATH == ""
|
||||
${OrIf} $PLUGIN_INST_PATH == ""
|
||||
${OrIf} $USER_PLUGIN_CONF_PATH == ""
|
||||
${OrIf} $ALLUSERS_PLUGIN_CONF_PATH == ""
|
||||
Goto initUpdatePath
|
||||
${ELSE}
|
||||
Goto alreadyDone
|
||||
@ -44,26 +48,42 @@ initUpdatePath:
|
||||
SetOutPath "$INSTDIR\"
|
||||
|
||||
${If} $noUserDataChecked == ${BST_CHECKED}
|
||||
|
||||
File "..\bin\doLocalConf.xml"
|
||||
StrCpy $PLUGIN_INST_PATH "$INSTDIR\plugins"
|
||||
StrCpy $PLUGIN_CONF_PATH "$INSTDIR\plugins\Config"
|
||||
StrCpy $ALLUSERS_PLUGIN_CONF_PATH "$INSTDIR\plugins\Config"
|
||||
StrCpy $USER_PLUGIN_CONF_PATH "$INSTDIR\plugins\Config"
|
||||
CreateDirectory $PLUGIN_INST_PATH\config
|
||||
${ELSE}
|
||||
|
||||
IfFileExists $INSTDIR\doLocalConf.xml 0 +2
|
||||
Delete $INSTDIR\doLocalConf.xml
|
||||
|
||||
; "%PROGRAMDATA%\Notepad++\plugins"
|
||||
ReadEnvStr $0 "ALLUSERSPROFILE"
|
||||
StrCpy $PLUGIN_INST_PATH "$0\Notepad++\plugins"
|
||||
StrCpy $ALLUSERS_PLUGIN_CONF_PATH "$0\Notepad++\plugins\Config"
|
||||
|
||||
StrCpy $PLUGIN_CONF_PATH "$APPDATA\${APPNAME}\plugins\Config"
|
||||
StrCpy $USER_PLUGIN_CONF_PATH "$APPDATA\${APPNAME}\plugins\Config"
|
||||
StrCpy $UPDATE_PATH "$APPDATA\${APPNAME}"
|
||||
CreateDirectory $UPDATE_PATH\plugins\config
|
||||
${EndIf}
|
||||
|
||||
WriteIniStr "$INSTDIR\uninstall.ini" "Uninstall" "UPDATE_PATH" $UPDATE_PATH
|
||||
WriteIniStr "$INSTDIR\uninstall.ini" "Uninstall" "PLUGIN_INST_PATH" $PLUGIN_INST_PATH
|
||||
WriteIniStr "$INSTDIR\uninstall.ini" "Uninstall" "USER_PLUGIN_CONF_PATH" $USER_PLUGIN_CONF_PATH
|
||||
WriteIniStr "$INSTDIR\uninstall.ini" "Uninstall" "ALLUSERS_PLUGIN_CONF_PATH" $ALLUSERS_PLUGIN_CONF_PATH
|
||||
|
||||
alreadyDone:
|
||||
FunctionEnd
|
||||
|
||||
Function un.setPathAndOptions
|
||||
ReadINIStr $UPDATE_PATH "$INSTDIR\uninstall.ini" "Uninstall" "UPDATE_PATH"
|
||||
ReadINIStr $PLUGIN_INST_PATH "$INSTDIR\uninstall.ini" "Uninstall" "PLUGIN_INST_PATH"
|
||||
ReadINIStr $USER_PLUGIN_CONF_PATH "$INSTDIR\uninstall.ini" "Uninstall" "USER_PLUGIN_CONF_PATH"
|
||||
ReadINIStr $ALLUSERS_PLUGIN_CONF_PATH "$INSTDIR\uninstall.ini" "Uninstall" "ALLUSERS_PLUGIN_CONF_PATH"
|
||||
FunctionEnd
|
||||
|
||||
Function copyCommonFiles
|
||||
SetOverwrite off
|
||||
SetOutPath "$UPDATE_PATH\"
|
||||
|
@ -39,6 +39,8 @@ doesExist:
|
||||
StrCpy $doLocalConf "true"
|
||||
noneExist:
|
||||
;MessageBox MB_OK "doLocalConf == $doLocalConf"
|
||||
|
||||
Call un.setPathAndOptions
|
||||
FunctionEnd
|
||||
|
||||
Function un.onUninstSuccess
|
||||
@ -245,6 +247,7 @@ Section Uninstall
|
||||
Delete "$INSTDIR\SourceCodePro-BoldIt.ttf"
|
||||
Delete "$INSTDIR\NppHelp.chm"
|
||||
Delete "$INSTDIR\doLocalConf.xml"
|
||||
Delete "$INSTDIR\uninstall.ini"
|
||||
|
||||
${If} $doLocalConf == "false"
|
||||
Call un.doYouReallyWantToKeepData
|
||||
|
@ -1070,7 +1070,6 @@ INT_PTR CALLBACK PluginsAdminDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
{
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user