Patch 8.2.2822 (after 8.2.2821)
Problem: MS-Windows: unnessarily loading libraries when unregistering OLE.
Solution: Also skip loading libraries when invoked with "-unregister". Run
Vim for README.txt with user privileges.
Files: src/main.c, nsis/gvim.nsi, nsis/README.txt
*** ../vim-8.2.2821/src/main.c 2021-05-01 17:45:59.992682570 +0200
--- src/main.c 2021-05-01 21:05:40.729861319 +0200
***************
*** 162,171 ****
}
#endif
#ifdef MSWIN
! // Need to find "-register" before loading any libraries.
for (i = 1; i < argc; ++i)
! if (STRICMP(argv[i] + 1, "register") == 0
! && (argv[i][0] == '-' || argv[i][0] == '/'))
{
found_register_arg = TRUE;
break;
--- 162,172 ----
}
#endif
#ifdef MSWIN
! // Need to find "-register" and "-unregister" before loading any libraries.
for (i = 1; i < argc; ++i)
! if ((STRICMP(argv[i] + 1, "register") == 0
! || STRICMP(argv[i] + 1, "unregister") == 0)
! && (argv[i][0] == '-' || argv[i][0] == '/'))
{
found_register_arg = TRUE;
break;
*** ../vim-8.2.2821/nsis/gvim.nsi 2021-02-26 20:25:31.723748646 +0100
--- nsis/gvim.nsi 2021-05-01 22:40:10.514104669 +0200
***************
*** 119,127 ****
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_LICENSEPAGE_CHECKBOX
! !define MUI_FINISHPAGE_RUN "$0\gvim.exe"
!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
- !define MUI_FINISHPAGE_RUN_PARAMETERS "-R $\"$0\README.txt$\""
# This adds '\Vim' to the user choice automagically. The actual value is
# obtained below with CheckOldVim.
--- 119,127 ----
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_LICENSEPAGE_CHECKBOX
! !define MUI_FINISHPAGE_RUN
! !define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication
!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
# This adds '\Vim' to the user choice automagically. The actual value is
# obtained below with CheckOldVim.
***************
*** 300,305 ****
--- 300,310 ----
Exch $0 # put $0 on top of stack, restore $0 to original value
FunctionEnd
+ Function LaunchApplication
+ SetOutPath $0
+ ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" "-R $"$0\README.txt$""
+ FunctionEnd
+
##########################################################
Section "$(str_section_old_ver)" id_section_old_ver
SectionIn 1 2 3 RO
*** ../vim-8.2.2821/nsis/README.txt 2019-09-27 14:17:41.000000000 +0200
--- nsis/README.txt 2021-05-01 22:37:54.950765345 +0200
***************
*** 32,43 ****
5. Get a "diff.exe" program. If you skip this the built-in diff will always
be used (which is fine for most users). If you do have your own
! "diff.exe" put it in the "../.." directory (above the "vim81" directory,
it's the same for all Vim versions).
You can find one in previous Vim versions or in this archive:
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
! 6 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim81"
directory). This is required for the terminal window.
7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
--- 32,43 ----
5. Get a "diff.exe" program. If you skip this the built-in diff will always
be used (which is fine for most users). If you do have your own
! "diff.exe" put it in the "../.." directory (above the "vim82" directory,
it's the same for all Vim versions).
You can find one in previous Vim versions or in this archive:
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
! 6 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim82"
directory). This is required for the terminal window.
7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
***************
*** 66,71 ****
--- 66,74 ----
Install NSIS if you didn't do that already.
Also install UPX, if you want a compressed file.
+ Download and include the ShellExecAsUser.dll Unicode version which can be
+ sourced from:
https://nsis.sourceforge.io/ShellExecAsUser_plug-in
+
Unpack the images:
cd nsis
*** ../vim-8.2.2821/src/version.c 2021-05-01 17:45:59.996682556 +0200
--- src/version.c 2021-05-01 21:06:49.217668866 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2822,
/**/
--
hundred-and-one symptoms of being an internet addict:
211. Your husband leaves you...taking the computer with him and you
call him crying, and beg him to bring the computer back.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///