patch 9.1.1029: the installer can be improved
Problem: the installer can be improved
Solution: update the installer with the correct README and LICENSE
files, improve the documentation, add a Makefile for the
installer, update the Makefiles (RestorerZ)
fixes: #16378
closes: #16378
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/GvimExt/gvimext.inf b/src/GvimExt/gvimext.inf
index 8b45bb1..d2faf0b 100644
--- a/src/GvimExt/gvimext.inf
+++ b/src/GvimExt/gvimext.inf
@@ -16,7 +16,7 @@
HKCR,*\shellex\ContextMenuHandlers\gvim
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved",{51EEE242-AD87-11d3-9C1E-0090278BBD99}
HKLM,Software\Vim\Gvim
-HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 6.0"
+HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 9.1"
[Strings]
ThisDll="gvimext.dll"
diff --git a/src/Makefile b/src/Makefile
index 7f26c90..84496b3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1182,6 +1182,9 @@
# Where to look for print resource files
PRINTSOURCE = ../runtime/print
+# Where to look translated README and LICENSE files
+TRANSSOURCE = ../lang
+
# If you are using Linux, you might want to use this to make vim the
# default vi editor, it will create a link from vi to Vim when doing
# "make install". An existing file will be overwritten!
@@ -2407,6 +2410,11 @@
chmod $(VIMSCRIPTMOD) $(SYS_INDOFF_FILE)
$(INSTALL_DATA) $(SCRIPTSOURCE)/optwin.vim $(SYS_OPTWIN_FILE)
chmod $(VIMSCRIPTMOD) $(SYS_OPTWIN_FILE)
+# install README and LICENCE files
+ $(INSTALL_DATA) ../README.txt $(DEST_RT)
+ chmod $(HELPMOD) $(DEST_RT)/README.txt
+ $(INSTALL_DATA) ../LICENSE $(DEST_RT)
+ chmod $(HELPMOD) $(DEST_RT)/LICENSE
# install the print resource files
cd $(PRINTSOURCE); $(INSTALL_DATA) *.ps $(DEST_PRINT)
cd $(DEST_PRINT); chmod $(FILEMOD) *.ps
@@ -2545,7 +2553,7 @@
# install the language specific files, if they were unpacked
-install-languages: languages $(DEST_LANG) $(DEST_KMAP)
+install-languages: languages $(DEST_LANG) $(DEST_KMAP) $(DEST_RT)
-$(SHELL) ./installman.sh install $(DEST_MAN_DA) "-da" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_DA_I) "-da" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_DA_U) "-da.UTF-8" $(INSTALLMANARGS)
@@ -2621,6 +2629,29 @@
$(INSTALL_DATA) $(KMAPSOURCE)/README.txt $(KMAPSOURCE)/*.vim $(DEST_KMAP); \
chmod $(FILEMOD) $(DEST_KMAP)/README.txt $(DEST_KMAP)/*.vim; \
fi
+# Installing translated README and LICENSE files
+ if test -d $(TRANSSOURCE) ; then \
+ if test -n "$(LANG)" ; then \
+ lngusr=$${LANG%%.*} ; \
+ elif test -n "$(LANGUAGE)" ; then \
+ lngusr=$${LANGUAGE%%:*} ; \
+ elif test -n "$(LC_MESSAGES)" ; then \
+ lngusr=$${LC_MESSAGES%%.*} ; \
+ fi; \
+ if test "$$lngusr" = "zh_TW" -o "$$lngusr" = "zh_CN" ; then \
+ lngusr=`echo $$lngusr | tr '[:upper:]' '[:lower:]'` ; \
+ elif test -n "$$lngusr" -a "$$lngusr" != "C" -a "$$lngusr" != "POSIX" ; then \
+ lngusr=$${lngusr%%_*} ; \
+ fi ; \
+ if test -f $(TRANSSOURCE)/README.$$lngusr.txt ; then \
+ $(INSTALL_DATA) $(TRANSSOURCE)/README.$$lngusr.txt $(DEST_RT) ; \
+ chmod $(HELPMOD) $(DEST_RT)/README.$$lngusr.txt ; \
+ fi ; \
+ if test -f $(TRANSSOURCE)/LICENSE.$$lngusr.txt ; then \
+ $(INSTALL_DATA) $(TRANSSOURCE)/LICENSE.$$lngusr.txt $(DEST_RT) ; \
+ chmod $(HELPMOD) $(DEST_RT)/LICENSE.$$lngusr.txt ; \
+ fi ; \
+ fi
# Install the icons for KDE, if the directory exists and the icon doesn't.
# Always when $(DESTDIR) is not empty.
@@ -2882,6 +2913,9 @@
-rm -f $(DEST_PLUG)/*.vim $(DEST_PLUG)/README.txt
-rmdir $(DEST_FTP) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)/cargo $(DEST_AUTO)/rust $(DEST_AUTO)
-rmdir $(DEST_IMPORT)/dist $(DEST_IMPORT)
+ -rm -f $(DEST_RT)/README.??.txt
+ -rm -f $(DEST_RT)/LICENSE.??.txt
+ -rm -f $(DEST_RT)/README.txt $(DEST_RT)/LICENSE
-rmdir $(DEST_PLUG) $(DEST_RT)
# This will fail when other Vim versions are installed, no worries.
-rmdir $(DEST_VIM)
diff --git a/src/version.c b/src/version.c
index 624147c..6e16a5e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1029,
+/**/
1028,
/**/
1027,