nsis: Fix indentation and alignment issues in gvim.nsi
related: #18440 Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
05e44e978f
commit
f9feda2d6d
@ -1,6 +1,7 @@
|
||||
# NSIS file to create a self-installing exe for Vim.
|
||||
# It requires NSIS version 3.0 or later.
|
||||
# Last Change: 2025 Feb 24
|
||||
# Last Change: 2025-08-30
|
||||
#
|
||||
|
||||
Unicode true
|
||||
|
||||
@ -253,8 +254,10 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The Vim Project"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" \
|
||||
"Vi Improved - A Text Editor"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" \
|
||||
"${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
|
||||
VIProductVersion "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
|
||||
|
||||
# Global variables
|
||||
@ -269,7 +272,6 @@ Var vim_mouse_stat
|
||||
Var lng_usr
|
||||
!endif
|
||||
|
||||
|
||||
# Reserve files
|
||||
ReserveFile ${VIMSRC}\installw32.exe
|
||||
|
||||
@ -561,8 +563,7 @@ Section "$(str_section_edit_with)" id_section_editwith
|
||||
!define LIBRARY_SHELL_EXTENSION
|
||||
!define LIBRARY_X64
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${VIMSRC}\GvimExt\gvimext64.dll" \
|
||||
"$0\GvimExt64\gvimext.dll" "$0"
|
||||
"${VIMSRC}\GvimExt\gvimext64.dll" "$0\GvimExt64\gvimext.dll" "$0"
|
||||
!undef LIBRARY_X64
|
||||
!undef LIBRARY_SHELL_EXTENSION
|
||||
${EndIf}
|
||||
@ -572,8 +573,7 @@ Section "$(str_section_edit_with)" id_section_editwith
|
||||
ClearErrors
|
||||
!define LIBRARY_SHELL_EXTENSION
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${VIMSRC}\GvimExt\gvimext.dll" \
|
||||
"$0\GvimExt32\gvimext.dll" "$0"
|
||||
"${VIMSRC}\GvimExt\gvimext.dll" "$0\GvimExt32\gvimext.dll" "$0"
|
||||
!undef LIBRARY_SHELL_EXTENSION
|
||||
|
||||
# We don't have a separate entry for the "Open With..." menu, assume
|
||||
@ -620,21 +620,18 @@ Section "$(str_section_vim_rc)" id_section_vimrc
|
||||
${Else}
|
||||
StrCpy $1 "$1 -vimrc-behave unix"
|
||||
${EndIf}
|
||||
|
||||
SectionEnd
|
||||
|
||||
##########################################################
|
||||
SectionGroup $(str_group_plugin) id_group_plugin
|
||||
Section "$(str_section_plugin_home)" id_section_pluginhome
|
||||
SectionIn 1 3
|
||||
|
||||
# use ShellExecAsUser below instead
|
||||
# StrCpy $1 "$1 -create-directories home"
|
||||
SectionEnd
|
||||
|
||||
Section "$(str_section_plugin_vim)" id_section_pluginvim
|
||||
SectionIn 3
|
||||
|
||||
StrCpy $1 "$1 -create-directories vim"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
@ -665,11 +662,9 @@ Section "$(str_section_nls)" id_section_nls
|
||||
File /r /x Makefile ${VIMRT}\lang\*.*
|
||||
SetOutPath $0
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext${BIT}\libintl-8.dll" \
|
||||
"$0\libintl-8.dll" "$0"
|
||||
"${GETTEXT}\gettext${BIT}\libintl-8.dll" "$0\libintl-8.dll" "$0"
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext${BIT}\libiconv-2.dll" \
|
||||
"$0\libiconv-2.dll" "$0"
|
||||
"${GETTEXT}\gettext${BIT}\libiconv-2.dll" "$0\libiconv-2.dll" "$0"
|
||||
!if ${INCLUDE_LIBGCC}
|
||||
!if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
|
||||
# Install libgcc_s_sjlj-1.dll only if it is needed.
|
||||
@ -726,7 +721,9 @@ Section -call_install_exe
|
||||
ReadEnvStr $3 "COMSPEC"
|
||||
Call GetHomeDir
|
||||
Pop $4
|
||||
ShellExecAsUser::ShellExecAsUser "" "$3" '/c "cd /d "$4" & mkdir vimfiles & cd vimfiles & mkdir colors compiler doc ftdetect ftplugin indent keymap plugin syntax"' SW_HIDE
|
||||
ShellExecAsUser::ShellExecAsUser "" "$3" '/c "cd /d "$4" & mkdir vimfiles \
|
||||
& cd vimfiles & mkdir colors compiler doc ftdetect ftplugin indent \
|
||||
keymap plugin syntax"' SW_HIDE
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
@ -740,7 +737,6 @@ SectionEnd
|
||||
!macroend
|
||||
|
||||
Section -post
|
||||
|
||||
# Get estimated install size
|
||||
SectionGetSize ${id_section_exe} $3
|
||||
${If} ${SectionIsSelected} ${id_section_console}
|
||||
@ -779,7 +775,8 @@ Section -post
|
||||
!insertmacro SaveSectionSelection ${id_section_startmenu} "select_startmenu"
|
||||
!insertmacro SaveSectionSelection ${id_section_editwith} "select_editwith"
|
||||
!insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc"
|
||||
!insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome"
|
||||
!insertmacro SaveSectionSelection ${id_section_pluginhome} \
|
||||
"select_pluginhome"
|
||||
!insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim"
|
||||
!if ${HAVE_NLS}
|
||||
!insertmacro SaveSectionSelection ${id_section_nls} "select_nls"
|
||||
@ -821,7 +818,8 @@ Function .onInit
|
||||
|
||||
!if ${HAVE_NLS}
|
||||
ClearErrors
|
||||
System::Call 'kernel32::GetUserDefaultLocaleName(t.r19, *i${NSIS_MAX_STRLEN})'
|
||||
System::Call \
|
||||
'kernel32::GetUserDefaultLocaleName(t.r19, *i${NSIS_MAX_STRLEN})'
|
||||
StrCmp $R9 "zh-cn" coincide 0
|
||||
StrCmp $R9 "zh-tw" coincide 0
|
||||
StrCmp $R9 "pt-br" 0 part
|
||||
@ -865,7 +863,8 @@ Function .onInit
|
||||
!insertmacro LoadSectionSelection ${id_section_startmenu} "select_startmenu"
|
||||
!insertmacro LoadSectionSelection ${id_section_editwith} "select_editwith"
|
||||
!insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc"
|
||||
!insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome"
|
||||
!insertmacro LoadSectionSelection ${id_section_pluginhome} \
|
||||
"select_pluginhome"
|
||||
!insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim"
|
||||
!if ${HAVE_NLS}
|
||||
!insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
|
||||
@ -923,7 +922,6 @@ Function SetCustom
|
||||
GetFunctionAddress $3 ValidateCustom
|
||||
nsDialogs::OnBack $3
|
||||
|
||||
|
||||
# 1st group - Compatibility
|
||||
${NSD_CreateGroupBox} 0u 0u 296u 44u $(str_msg_compat_title)
|
||||
Pop $3
|
||||
@ -948,7 +946,6 @@ Function SetCustom
|
||||
${EndIf}
|
||||
${NSD_CB_SetSelectionIndex} $vim_nsd_compat $4
|
||||
|
||||
|
||||
# 2nd group - Key remapping
|
||||
${NSD_CreateGroupBox} 0u 48u 296u 44u $(str_msg_keymap_title)
|
||||
Pop $3
|
||||
@ -967,7 +964,6 @@ Function SetCustom
|
||||
${EndIf}
|
||||
${NSD_CB_SetSelectionIndex} $vim_nsd_keymap $4
|
||||
|
||||
|
||||
# 3rd group - Mouse behavior
|
||||
${NSD_CreateGroupBox} 0u 95u 296u 44u $(str_msg_mouse_title)
|
||||
Pop $3
|
||||
@ -1035,12 +1031,16 @@ FunctionEnd
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_batch} $(str_desc_batch)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_group_icons} $(str_desc_icons)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_desktop} $(str_desc_desktop)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_startmenu} $(str_desc_start_menu)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_editwith} $(str_desc_edit_with)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_startmenu} \
|
||||
$(str_desc_start_menu)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_editwith} \
|
||||
$(str_desc_edit_with)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_vimrc} $(str_desc_vim_rc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} \
|
||||
$(str_desc_plugin_home)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} \
|
||||
$(str_desc_plugin_vim)
|
||||
!if ${HAVE_NLS}
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls)
|
||||
!endif
|
||||
@ -1077,7 +1077,6 @@ Section "un.$(str_unsection_register)" id_unsection_register
|
||||
SectionEnd
|
||||
|
||||
Section "un.$(str_unsection_exe)" id_unsection_exe
|
||||
|
||||
StrCpy $0 "$INSTDIR"
|
||||
|
||||
# Delete gettext and iconv DLLs
|
||||
@ -1233,10 +1232,16 @@ SectionEnd
|
||||
# Description for Uninstaller Sections
|
||||
|
||||
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_register} $(str_desc_unregister)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_register} \
|
||||
$(str_desc_unregister)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_exe} $(str_desc_rm_exe)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_ungroup_plugin} $(str_desc_rm_plugin)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_home} $(str_desc_rm_plugin_home)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_vim} $(str_desc_rm_plugin_vim)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_rootdir} $(str_desc_rm_rootdir)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_home} \
|
||||
$(str_desc_rm_plugin_home)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_vim} \
|
||||
$(str_desc_rm_plugin_vim)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_rootdir} \
|
||||
$(str_desc_rm_rootdir)
|
||||
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
||||
|
||||
# vi:set ts=8 sw=2 sts=2 tw=79 wm=0 ft=nsis:
|
||||
|
||||
Reference in New Issue
Block a user