mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
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>
This commit is contained in:
committed by
Christian Brabandt
parent
c15de972e8
commit
2730d3873f
134
nsis/Make_mvc.mak
Normal file
134
nsis/Make_mvc.mak
Normal file
@ -0,0 +1,134 @@
|
||||
#
|
||||
# Makefile for MS Windows for create self-installing exe of Vim.
|
||||
# 05/04/2024, Restorer restorer@mail2k.ru
|
||||
#
|
||||
|
||||
|
||||
#!INCLUDE .\Make_all.mak
|
||||
|
||||
.SUFFIXES :
|
||||
|
||||
!IFDEF PROGRAMW6432
|
||||
ProgFiles=%%PROGRAMFILES(x86)%%
|
||||
!ELSE
|
||||
ProgFiles=$(PROGRAMFILES)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF VIMSRC
|
||||
MKNSISFLAGS = /D"VIMSRC=$(VIMSRC)"
|
||||
!ENDIF
|
||||
|
||||
!IFDEF VIMRT
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /D"VIMRT=$(VIMRT)"
|
||||
!ENDIF
|
||||
|
||||
!IFDEF VIMTOOLS
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /D"VIMTOOLS=$(VIMTOOLS)"
|
||||
!ENDIF
|
||||
|
||||
!IFDEF GETTEXT
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /D"GETTEXT=$(GETTEXT)"
|
||||
!ENDIF
|
||||
|
||||
!IFDEF HAVE_UPX
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_UPX=$(HAVE_UPX)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF HAVE_NLS
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_NLS=$(HAVE_NLS)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF HAVE_MULTI_LANG
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF WIN64
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /DWIN64=$(WIN64)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF INCLUDE_LIBGCC
|
||||
MKNSISFLAGS = $(MKNSISFLAGS) /DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF X
|
||||
XX = /X"$(X:;=" /X")"
|
||||
!ENDIF
|
||||
|
||||
# If necessary, correct the full path of the NSIS compiler in the next line.
|
||||
# Please do not enclose the path in quotation marks.
|
||||
MKNSIS = $(ProgFiles)\NSIS
|
||||
|
||||
PS = powershell.exe
|
||||
RM = del /f /q
|
||||
RD = rmdir /s /q
|
||||
|
||||
MKNSISFLAGS = /INPUTCHARSET UTF8 $(MKNSISFLAGS)
|
||||
PSFLAGS = -NoLogo -NoProfile -Command
|
||||
|
||||
# Read MAJOR and MINOR from version.h.
|
||||
!IF ![for /F "tokens=2,3" %G in ( \
|
||||
'findstr /rc:"VIM_VERSION_MINOR[ ^]*[0-9^]" \
|
||||
/rc:"VIM_VERSION_MAJOR[ ^]*[0-9^]" ..\src\version.h') do \
|
||||
@if "VIM_VERSION_MAJOR"=="%G" (echo MAJOR=%H>>_ver.tmp) \
|
||||
else echo MINOR=%H>>_ver.tmp]
|
||||
! INCLUDE .\_ver.tmp
|
||||
! IF [$(RM) .\_ver.tmp]
|
||||
! ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Read PATCHLEVEL from version.c
|
||||
!IF ![for /F %G in ( \
|
||||
'findstr /nblc:"static int included_patches[^]" ..\src\version.c \
|
||||
^| (set /p "_t=" ^& set /a _t+=2 ^)') do \
|
||||
@cmd /q /c "for /F "skip=%G delims=, " %H in (..\src\version.c) do \
|
||||
(echo PATCH=%H>_patchlvl.tmp & exit /b)"]
|
||||
! INCLUDE .\_patchlvl.tmp
|
||||
! IF [$(RM) .\_patchlvl.tmp]
|
||||
! ENDIF
|
||||
!ENDIF
|
||||
!IF $(PATCH) < 10
|
||||
PATCH = 000$(PATCH)
|
||||
!ELSEIF $(PATCH) < 100
|
||||
PATCH = 00$(PATCH)
|
||||
!ELSEIF $(PATCH) < 1000
|
||||
PATCH = 0$(PATCH)
|
||||
!ENDIF
|
||||
|
||||
|
||||
all : makeinst
|
||||
|
||||
makeinst : prepare
|
||||
^"$(MKNSIS)\makensis.exe" $(MKNSISFLAGS) gvim.nsi $(XX)
|
||||
|
||||
prepare : unzipicons gvim_version.nsh license rename
|
||||
|
||||
unzipicons : icons.zip
|
||||
@ if exist %|fF\nul $(RD) %|fF
|
||||
@ $(PS) $(PSFLAGS) \
|
||||
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'; \
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$**\", \".\")
|
||||
|
||||
gvim_version.nsh : Make_mvc.mak
|
||||
@ 1> $@ echo:^# Generated from Makefile: define the version numbers
|
||||
@ 1>> $@ echo:^!ifndef __GVIM_VER__NSH__
|
||||
@ 1>> $@ echo:^!define __GVIM_VER__NSH__
|
||||
@ 1>> $@ echo:^!define VER_MAJOR $(MAJOR)
|
||||
@ 1>> $@ echo:^!define VER_MINOR $(MINOR)
|
||||
@ 1>> $@ echo:^!define PATCHLEVEL $(PATCH)
|
||||
@ 1>> $@ echo:^!endif
|
||||
|
||||
license : ..\lang\LICENSE.*.txt ..\LICENSE
|
||||
!@ $(PS) $(PSFLAGS) \
|
||||
Get-Content -Path '$**' -Encoding UTF8 ^| \
|
||||
Set-Content -Path '..\lang\$(**B).nsis.txt' -Enc Unicode -Force
|
||||
|
||||
rename :
|
||||
@ ..\tools\rename.bat "$(SRC)" "$(DST)" 1> nul
|
||||
|
||||
clean :
|
||||
@ if exist .\gvim_version.nsh $(RM) .\gvim_version.nsh
|
||||
@ if exist ..\lang\LICENSE*.nsis.txt $(RM) ..\lang\LICENSE*.nsis.txt
|
||||
@ if exist .\icons\nul $(RD) .\icons
|
||||
@ if exist .\gvim??.exe $(RM) .\gvim??.exe
|
||||
|
||||
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
|
95
nsis/Makefile
Normal file
95
nsis/Makefile
Normal file
@ -0,0 +1,95 @@
|
||||
#
|
||||
# Makefile for UNIX-like for create self-installing exe of Vim.
|
||||
# 15/12/2024, Restorer restorer@mail2k.ru
|
||||
#
|
||||
|
||||
|
||||
.SUFFIXES:
|
||||
.PHONY: all makeinst prepare rename clean
|
||||
|
||||
ifdef VIMSRC
|
||||
MKNSISFLAGS := -D"VIMSRC=$(VIMSRC)"
|
||||
endif
|
||||
|
||||
ifdef VIMRT
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMRT=$(VIMRT)"
|
||||
endif
|
||||
|
||||
ifdef VIMTOOLS
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMTOOLS=$(VIMTOOLS)"
|
||||
endif
|
||||
|
||||
ifdef GETTEXT
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -D"GETTEXT=$(GETTEXT)"
|
||||
endif
|
||||
|
||||
ifdef HAVE_UPX
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_UPX=$(HAVE_UPX)
|
||||
endif
|
||||
|
||||
ifdef HAVE_NLS
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_NLS=$(HAVE_NLS)
|
||||
endif
|
||||
|
||||
ifdef HAVE_MULTI_LANG
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
|
||||
endif
|
||||
|
||||
ifdef WIN64
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -DWIN64=$(WIN64)
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_LIBGCC
|
||||
MKNSISFLAGS := $(MKNSISFLAGS) -DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
|
||||
endif
|
||||
|
||||
ifdef X
|
||||
XX := -X"$(X:;=" -X")"
|
||||
endif
|
||||
|
||||
MAJOR != grep -E 'VIM_VERSION_MAJOR\s{2,}' ../src/version.h | \
|
||||
awk '{ printf "%d",$$3 }'
|
||||
MINOR != grep -E 'VIM_VERSION_MINOR\s{2,}' ../src/version.h | \
|
||||
awk '{ printf "%d",$$3 }'
|
||||
PATCH != awk '/number below this line/,/,/' ../src/version.c | \
|
||||
awk 'NR == 3 { printf "%04d",$$1 }' | sed -e 's/[ ,]//g'
|
||||
|
||||
MKNSISFLAGS := -INPUTCHARSET UTF8 $(MKNSISFLAGS)
|
||||
|
||||
all: makeinst
|
||||
|
||||
makeinst: prepare
|
||||
makensis $(MKNSISFLAGS) gvim.nsi $(XX)
|
||||
|
||||
prepare: unzipicons gvim_version.nsh license rename
|
||||
|
||||
unzipicons: icons.zip
|
||||
if test -d `basename $? .zip` ; then rm -rf `basename $? .zip` ; fi
|
||||
unzip $?
|
||||
|
||||
gvim_version.nsh: Makefile
|
||||
echo "# Generated from Makefile: define the version numbers" > $@
|
||||
echo "!ifndef __GVIM_VER__NSH__" >> $@
|
||||
echo "!define __GVIM_VER__NSH__" >> $@
|
||||
echo "!define VER_MAJOR $(MAJOR)" >> $@
|
||||
echo "!define VER_MINOR $(MINOR)" >> $@
|
||||
echo "!define PATCHLEVEL $(PATCH)" >> $@
|
||||
echo "!endif" >> $@
|
||||
|
||||
license: ../lang/LICENSE.*.txt ../LICENSE
|
||||
for lic in $? ; do \
|
||||
bn=`basename $$lic .txt` ; \
|
||||
awk 'sub("$$", "\r")' < $$lic | \
|
||||
iconv -f UTF-8 -t UTF-16 > ../lang/$$bn.nsis.txt ; \
|
||||
done
|
||||
|
||||
rename:
|
||||
../tools/rename.bat "$(SRC)" "$(DST)"
|
||||
|
||||
clean:
|
||||
if test -f gvim_version.nsh ; then rm -f gvim_version.nsh ; fi
|
||||
rm -f ../lang/LICENSE*.nsis.txt
|
||||
if test -d icons ; then rm -rf icons ; fi
|
||||
if test -f gvim??.exe ; then rm -f gvim??.exe ; fi
|
||||
|
||||
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
|
@ -3,22 +3,15 @@ Installation System (NSIS), available at http://nsis.sourceforge.net/
|
||||
|
||||
To build the installable .exe file:
|
||||
|
||||
1. Unpack three archives:
|
||||
PC sources
|
||||
PC runtime
|
||||
PC language files
|
||||
You can generate these from the Unix sources and runtime plus the extra
|
||||
archive (see the Makefile in the top directory).
|
||||
Preparatory stage
|
||||
|
||||
2. Go to the src directory and build:
|
||||
gvim.exe (the OLE version),
|
||||
vimrun.exe,
|
||||
install.exe,
|
||||
uninstall.exe,
|
||||
tee/tee.exe,
|
||||
xxd/xxd.exe
|
||||
1. Clone using the git tool the Vim repository or download its zip file
|
||||
available at:
|
||||
https://github.com/vim/vim
|
||||
|
||||
Then execute tools/rename.bat to rename the executables.
|
||||
2. Go to the "/src" directory and build the Vim editor, making sure to use the
|
||||
following variable values: "GUI=yes"; "OLE=yes"; "VIMDLL=yes". See
|
||||
INSTALLpc.txt and Make_mvc.mak for details.
|
||||
|
||||
3. Go to the GvimExt directory and build gvimext.dll (or get it from a binary
|
||||
archive). Both 64- and 32-bit versions are needed and should be placed
|
||||
@ -32,8 +25,8 @@ To build the installable .exe file:
|
||||
https://www.mediafire.com/file/9edk4g3xvfgzby0/diff4Vim.zip/file
|
||||
When will you have "diff.exe" put it in the "../.." directory (above the
|
||||
"vim91" directory, it's the same for all Vim versions). However, you can
|
||||
specify another directory by passing /DVIMTOOLS=<dir> option to the
|
||||
"makensis.exe" program via the command line.
|
||||
specify a different directory by specifying the appropriate makefile value.
|
||||
How to do this is described below.
|
||||
|
||||
5. For the terminal window to work in Vim, the library winpty is required.
|
||||
You can get it at the following url:
|
||||
@ -41,8 +34,8 @@ To build the installable .exe file:
|
||||
For the 32-bit version, rename "winpty.dll" from ia32/bin to "winpty32.dll",
|
||||
and for the 64-bit version — "winpty.dll" from x64/bin to "winpty64.dll".
|
||||
Put the renamed file and "winpty-agent.exe" in "../.." (above the "vim91"
|
||||
directory). However, you can specify another directory by passing
|
||||
/DVIMTOOLS=<dir> option to the "makensis.exe" program via the command line.
|
||||
directory). However, you can specify a different directory by specifying
|
||||
the appropriate makefile value. How to do this is described below.
|
||||
|
||||
6. To use stronger encryption, add the Sodium library. You can get it here:
|
||||
https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip
|
||||
@ -52,12 +45,7 @@ To build the installable .exe file:
|
||||
"../.." directory (above the "vim91" directory, where "diff.exe" and
|
||||
"winpty{32|64}.dll").
|
||||
|
||||
7. On MS Windows do "nmake.exe -f Make_mvc.mak uganda.nsis.txt" in runtime/doc.
|
||||
On Unix-like system do "make runtime/doc/uganda.nsis.txt" in top directory
|
||||
or "make uganda.nsis.txt" in runtime/doc. The created files
|
||||
"uganda.nsis.???" will be automatically converted to DOS file format.
|
||||
|
||||
8. Get gettext and iconv DLLs from the following site:
|
||||
7. Get gettext and iconv DLLs from the following site:
|
||||
https://github.com/mlocati/gettext-iconv-windows/releases
|
||||
Both 64- and 32-bit versions are needed.
|
||||
Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
|
||||
@ -74,35 +62,47 @@ To build the installable .exe file:
|
||||
libintl-8.dll
|
||||
libiconv-2.dll
|
||||
|
||||
The default <GETTEXT directory> is "..", however, you can specify another
|
||||
directory by passing /DGETTEXT=<dir> option to "makensis.exe" program via
|
||||
the command line.
|
||||
The default <GETTEXT directory> is "../..". However, you can specify a
|
||||
different directory by specifying the appropriate makefile value. How to do
|
||||
this is described below.
|
||||
|
||||
|
||||
Install NSIS if you didn't do that already.
|
||||
Download Unicode version the ShellExecAsUser plug-in for NSIS from:
|
||||
8. Install NSIS if you didn't do that already.
|
||||
Download Unicode version the ShellExecAsUser plug-in for NSIS from:
|
||||
https://nsis.sourceforge.io/ShellExecAsUser_plug-in
|
||||
and put ShellExecAsUser.dll to path\to\NSIS\Plugins\x86-unicode
|
||||
and put "ShellExecAsUser.dll" to path\to\NSIS\Plugins\x86-unicode
|
||||
|
||||
Installer assembly stage
|
||||
|
||||
Unpack the images:
|
||||
cd nsis
|
||||
unzip icons.zip or 7z x icons.zip (on Unix-like or MS Windows)
|
||||
WinRar.exe x icons.zip (on MS Windows)
|
||||
On MS Windows, open the Developer Command Prompt for VS and go to the
|
||||
"/nsis" directory and type the command
|
||||
nmake.exe -lf Make_mvc.mak [variables] all
|
||||
|
||||
Then build gvim.exe:
|
||||
cd nsis
|
||||
makensis.exe [options] gvim.nsi
|
||||
After the installer is created and you copy it to the desired location, run
|
||||
the following command in the "/nsis" directory
|
||||
nmake.exe -lf Make_mvc.mak clean
|
||||
|
||||
On UNIX-like systems, go to the "/nsis" directory and type the command
|
||||
make -f Makefile [variables] all
|
||||
|
||||
Options (not mandatory):
|
||||
/DVIMSRC=<dir> — directory where location of gvim_ole.exe, vimw32.exe,
|
||||
After the installer is created and you copy it to the desired location, run
|
||||
the following command in the "/nsis" directory
|
||||
make -f Makefile clean
|
||||
|
||||
Variables and their values available for building the installer (not mandatory):
|
||||
|
||||
"VIMSRC=<dir>" — directory where location of gvim_ole.exe, vimw32.exe,
|
||||
GvimExt/*, etc.
|
||||
/DVIMRT=<dir> — directory where location of runtime files
|
||||
/DVIMTOOLS=<dir> — directory where location of extra tools: diff.exe,
|
||||
winpty{32|64}.dll, winpty-agent.exe, libsodium.dll
|
||||
/DGETTEXT=<dir> — directory where location of gettext libraries
|
||||
/DHAVE_UPX=1 — additional compression of the installer. UPX program
|
||||
"VIMRT=<dir>" — directory where location of runtime files.
|
||||
"VIMTOOLS=<dir>" — directory where location of extra tools: diff.exe,
|
||||
winpty{32|64}.dll, winpty-agent.exe, libsodium.dll.
|
||||
"GETTEXT=<dir>" — directory where location of gettext libraries.
|
||||
"HAVE_UPX=1" — additional compression of the installer. UPX program
|
||||
must be installed.
|
||||
/DHAVE_NLS=0 — do not add native language support
|
||||
/DHAVE_MULTI_LANG=0 — to create an English-only the installer
|
||||
/DWIN64=1 — to create a 64-bit the installer
|
||||
"HAVE_NLS=0" — do not add native language support.
|
||||
"HAVE_MULTI_LANG=0" — to create an English-only the installer.
|
||||
"WIN64=1" — to create a 64-bit the installer.
|
||||
"X=<scriptcmd>" — executes scriptcmd in script. If multiple scriptcmd
|
||||
are specified, they are separated by a semicolon.
|
||||
Example "X=OutFile MyVim.exe;XPMode on"
|
||||
"MKNSIS=<dir>" — the directory where the "makensis.exe" program is
|
||||
located.
|
||||
|
143
nsis/gvim.nsi
143
nsis/gvim.nsi
@ -1,6 +1,6 @@
|
||||
# NSIS file to create a self-installing exe for Vim.
|
||||
# It requires NSIS version 3.0 or later.
|
||||
# Last Change: 2024 Mar 20
|
||||
# Last Change: 2025 Jan 05
|
||||
|
||||
Unicode true
|
||||
|
||||
@ -14,19 +14,19 @@ Unicode true
|
||||
|
||||
# Location of runtime files
|
||||
!ifndef VIMRT
|
||||
!define VIMRT ".."
|
||||
!define VIMRT "..\runtime"
|
||||
!endif
|
||||
|
||||
# Location of extra tools: diff.exe, winpty{32|64}.dll, winpty-agent.exe, etc.
|
||||
!ifndef VIMTOOLS
|
||||
!define VIMTOOLS ..\..
|
||||
!define VIMTOOLS "..\.."
|
||||
!endif
|
||||
|
||||
# Location of gettext.
|
||||
# It must contain two directories: gettext32 and gettext64.
|
||||
# See README.txt for detail.
|
||||
!ifndef GETTEXT
|
||||
!define GETTEXT ${VIMRT}
|
||||
!define GETTEXT ${VIMTOOLS}
|
||||
!endif
|
||||
|
||||
# If you have UPX, use the switch /DHAVE_UPX=1 on the command line makensis.exe.
|
||||
@ -74,6 +74,8 @@ Unicode true
|
||||
!include "nsDialogs.nsh"
|
||||
!include "Sections.nsh"
|
||||
!include "x64.nsh"
|
||||
!include "StrFunc.nsh"
|
||||
${StrRep}
|
||||
|
||||
# See https://nsis.sourceforge.io/LogicLib
|
||||
;FileExists is already part of LogicLib, but returns true for directories
|
||||
@ -246,6 +248,9 @@ Var vim_nsd_mouse
|
||||
Var vim_compat_stat
|
||||
Var vim_keymap_stat
|
||||
Var vim_mouse_stat
|
||||
!if ${HAVE_NLS}
|
||||
Var lng_usr
|
||||
!endif
|
||||
|
||||
|
||||
# Reserve files
|
||||
@ -423,6 +428,7 @@ Section "$(str_section_exe)" id_section_exe
|
||||
File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
|
||||
File ..\vimtutor.bat
|
||||
File ..\README.txt
|
||||
File /oname=LICENSE.txt ..\LICENSE
|
||||
File ..\uninstall.txt
|
||||
File ${VIMRT}\*.vim
|
||||
|
||||
@ -621,110 +627,23 @@ SectionGroupEnd
|
||||
Section "$(str_section_nls)" id_section_nls
|
||||
SectionIn 1 3
|
||||
|
||||
#; FIXME: When adding new translations, do not forget to make changes here.
|
||||
SetOutPath $0
|
||||
!if /FileExists ..\README.dax.txt
|
||||
${If} $Language = ${LANG_DANISH}
|
||||
File ..\README.dax.txt
|
||||
${EndIf}
|
||||
SetOutPath $INSTDIR
|
||||
!if /FileExists "..\lang\README.*.txt"
|
||||
File ..\lang\README.*.txt
|
||||
CopyFiles /SILENT /FILESONLY $INSTDIR\README.$lng_usr.txt \
|
||||
$INSTDIR\vim${VER_MAJOR}${VER_MINOR}\README.$lng_usr.txt
|
||||
Delete $INSTDIR\README.*.txt
|
||||
!endif
|
||||
!if /FileExists ..\README.nlx.txt
|
||||
${If} $Language = ${LANG_DUTCH}
|
||||
File ..\README.nlx.txt
|
||||
${EndIf}
|
||||
!if /FileExists "..\lang\LICENSE.??.txt"
|
||||
File ..\lang\LICENSE.??.txt
|
||||
!if /FileExists "..\lang\LICENSE.??_??.txt"
|
||||
File ..\lang\LICENSE.??_??.txt
|
||||
!endif
|
||||
!if /FileExists ..\README.dex.txt
|
||||
${If} $Language = ${LANG_GERMAN}
|
||||
File ..\README.dex.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists ..\README.itx.txt
|
||||
${If} $Language = ${LANG_ITALIAN}
|
||||
File ..\README.itx.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists ..\README.jax.txt
|
||||
${If} $Language = ${LANG_JAPANESE}
|
||||
File ..\README.jax.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists ..\README.rux.txt
|
||||
${If} $Language = ${LANG_RUSSIAN}
|
||||
File ..\README.rux.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists ..\README.srx.txt
|
||||
${If} $Language = ${LANG_SERBIAN}
|
||||
File ..\README.srx.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists ..\README.cnx.txt
|
||||
${If} $Language = ${LANG_SIMPCHINESE}
|
||||
File ..\README.cnx.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists ..\README.twx.txt
|
||||
${If} $Language = ${LANG_TRADCHINESE}
|
||||
File ..\README.twx.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists ..\README.trx.txt
|
||||
${OrIf} $Language = ${LANG_TURKISH}
|
||||
File ..\README.trx.txt
|
||||
${EndIf}
|
||||
!endif
|
||||
#; FIXME: When adding new translations, do not forget to make changes here.
|
||||
SetOutPath $0\doc
|
||||
!if /FileExists "${VIMRT}\doc\uganda.dax"
|
||||
${If} $Language = ${LANG_DANISH}
|
||||
File ${VIMRT}\doc\uganda.dax
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.nlx"
|
||||
${If} $Language = ${LANG_DUTCH}
|
||||
File ${VIMRT}\doc\uganda.nlx
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.dex"
|
||||
${If} $Language = ${LANG_GERMAN}
|
||||
File ${VIMRT}\doc\uganda.dex
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.itx"
|
||||
${If} $Language = ${LANG_ITALIAN}
|
||||
File ${VIMRT}\doc\uganda.itx
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.jax"
|
||||
${If} $Language = ${LANG_JAPANESE}
|
||||
File ${VIMRT}\doc\uganda.jax
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.rux"
|
||||
${If} $Language = ${LANG_RUSSIAN}
|
||||
File ${VIMRT}\doc\uganda.rux
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.srx"
|
||||
${If} $Language = ${LANG_SERBIAN}
|
||||
File ${VIMRT}\doc\uganda.srx
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.cnx"
|
||||
${If} $Language = ${LANG_SIMPCHINESE}
|
||||
File ${VIMRT}\doc\uganda.cnx
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.twx"
|
||||
${If} $Language = ${LANG_TRADCHINESE}
|
||||
File ${VIMRT}\doc\uganda.twx
|
||||
${EndIf}
|
||||
!endif
|
||||
!if /FileExists "${VIMRT}\doc\uganda.trx"
|
||||
${If} $Language = ${LANG_TURKISH}
|
||||
File ${VIMRT}\doc\uganda.trx
|
||||
${EndIf}
|
||||
CopyFiles /SILENT /FILESONLY $INSTDIR\LICENSE.$lng_usr.txt \
|
||||
$INSTDIR\vim${VER_MAJOR}${VER_MINOR}\LICENSE.$lng_usr.txt
|
||||
Delete $INSTDIR\LICENSE.*.txt
|
||||
!endif
|
||||
|
||||
SetOutPath $0\lang
|
||||
File /r /x Makefile ${VIMRT}\lang\*.*
|
||||
SetOutPath $0
|
||||
@ -883,6 +802,20 @@ Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
!endif
|
||||
|
||||
!if ${HAVE_NLS}
|
||||
ClearErrors
|
||||
System::Call 'kernel32::GetUserDefaultLocaleName(t.r19, *i${NSIS_MAX_STRLEN})'
|
||||
StrCmp $R9 "zh-cn" coincide 0
|
||||
StrCmp $R9 "zh-tw" 0 part
|
||||
coincide:
|
||||
System::Call 'User32::CharLower(t r19 r19)*i${NSIS_MAX_STRLEN}'
|
||||
${StrRep} $lng_usr "$R9" "-" "_"
|
||||
Goto done
|
||||
part:
|
||||
StrCpy $lng_usr $R9 2
|
||||
done:
|
||||
!endif
|
||||
|
||||
${If} $INSTDIR == ${DEFAULT_INSTDIR}
|
||||
# Check $VIM
|
||||
ReadEnvStr $3 "VIM"
|
||||
|
@ -3,4 +3,5 @@
|
||||
!define __GVIM_VER__NSH__
|
||||
!define VER_MAJOR 9
|
||||
!define VER_MINOR 1
|
||||
!define PATCHLEVEL 0
|
||||
!endif
|
||||
|
@ -18,17 +18,17 @@ allowable length of strings. For example:
|
||||
drop-down lists on the .vimrc page - 55 characters.
|
||||
Characters in this case mean characters of the English alphabet.
|
||||
|
||||
If you do not yet have a translated "uganda.txt" file and a main "README.txt"
|
||||
If you do not yet have a translated "LICENSE" file and/or a main "README.txt"
|
||||
file, set the following values:
|
||||
|
||||
for the license file
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
|
||||
for the readme.txt file
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
|
||||
Once you have the translations of these files, then set the values for these
|
||||
variables similarly to what is done in the other translation files.
|
||||
Also add the appropriate entries to the "gvim.nsi" file as done for other
|
||||
languages.
|
||||
|
||||
Translation files should be located in the "lang" subdirectory of the root
|
||||
directory. The name of the files is as follows: "README.xx.txt", where xx is the
|
||||
language code according to ISO639.
|
||||
|
@ -19,15 +19,15 @@ LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall"
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_DANISH} "${VIMRT}\doc\uganda.nsis.dax"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_DANISH} "..\lang\LICENSE.da.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_DANISH} "README.dax.txt"
|
||||
#LangString vim_readme_file ${LANG_DANISH} "README.da.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_DUTCH} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_DUTCH} "${VIMRT}\doc\uganda.nsis.nlx"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_DUTCH} "..\lang\LICENSE.nl.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_DUTCH} "README.nlx.txt"
|
||||
#LangString vim_readme_file ${LANG_DUTCH} "README.nl.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -21,7 +21,7 @@ LangString ^UninstallCaption ${LANG_ENGLISH} \
|
||||
# License file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file ${LANG_ENGLISH} "${VIMRT}\doc\uganda.nsis.txt"
|
||||
LicenseLangString page_lic_file ${LANG_ENGLISH} "..\lang\LICENSE.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# README.txt file, which is opened after installation {{{1
|
||||
|
@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_GERMAN} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_GERMAN} "${VIMRT}\doc\uganda.nsis.dex"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_GERMAN} "..\lang\LICENSE.de.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_GERMAN} "README.dex.txt"
|
||||
#LangString vim_readme_file ${LANG_GERMAN} "README.de.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_GREEK} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_GREEK} "${VIMRT}\doc\uganda.nsis.elx"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_GREEK} "..\lang\LICENSE.el.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_GREEK} "README.elx.txt"
|
||||
#LangString vim_readme_file ${LANG_GREEK} "README.el.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -21,15 +21,13 @@ LangString ^UninstallCaption ${LANG_ITALIAN} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_ITALIAN} "${VIMRT}\doc\uganda.nsis.itx"
|
||||
LicenseLangString page_lic_file ${LANG_ITALIAN} "..\lang\LICENSE.it.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_ITALIAN} "README.itx.txt"
|
||||
LangString vim_readme_file ${LANG_ITALIAN} "README.it.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -31,15 +31,15 @@ LangString ^InstallBtn ${LANG_JAPANESE} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_JAPANESE} "${VIMRT}\doc\uganda.nsis.jax"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_JAPANESE} "..\lang\LICENSE.ja.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_JAPANESE} "README.jax.txt"
|
||||
#LangString vim_readme_file ${LANG_JAPANESE} "README.ja.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -21,13 +21,13 @@ LangString ^UninstallCaption ${LANG_RUSSIAN} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file ${LANG_RUSSIAN} "${VIMRT}\doc\uganda.nsis.rux"
|
||||
LicenseLangString page_lic_file ${LANG_RUSSIAN} "..\lang\LICENSE.ru.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file ${LANG_RUSSIAN} "README.rux.txt"
|
||||
LangString vim_readme_file ${LANG_RUSSIAN} "README.ru.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_SERBIAN} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_SERBIAN} "${VIMRT}\doc\uganda.nsis.srx"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_SERBIAN} "..\lang\LICENSE.sr.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_SERBIAN} "README.srx.txt"
|
||||
#LangString vim_readme_file ${LANG_SERBIAN} "README.sr.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -22,16 +22,16 @@ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \
|
||||
# "${VIMRT}\doc\uganda.nsis.cnx"
|
||||
# "..\lang\LICENSE.zh_cn.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.cnx.txt"
|
||||
#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.zh_cn.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -22,16 +22,16 @@ LangString ^UninstallCaption ${LANG_TRADCHINESE} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_TRADCHINESE} \
|
||||
# "${VIMRT}\doc\uganda.nsis.twx"
|
||||
# "..\lang\LICENSE.zh_tw.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_TRADCHINESE} "README.twx.txt"
|
||||
#LangString vim_readme_file ${LANG_TRADCHINESE} "README.zh_tw.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
|
@ -20,15 +20,15 @@ LangString ^UninstallCaption ${LANG_TURKISH} \
|
||||
# Translated license file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_TURKISH} "${VIMRT}\doc\uganda.nsis.trx"
|
||||
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
|
||||
#LicenseLangString page_lic_file ${LANG_TURKISH} "..\lang\LICENSE.tr.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# Translated README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file 0 "README.txt"
|
||||
#LangString vim_readme_file ${LANG_TURKISH} "README.trx.txt"
|
||||
#LangString vim_readme_file ${LANG_TURKISH} "README.tr.txt"
|
||||
|
||||
##############################################################################
|
||||
|
||||
|
Reference in New Issue
Block a user