blob: 3bb32d423ae9119c9706c19fce9e3d57c6f00045 [file] [log] [blame]
Restorer51c94b62024-03-24 09:41:18 +00001This builds a one-click install for Vim for MS Windows using the Nullsoft
Bram Moolenaar6199d432017-10-14 19:05:44 +02002Installation System (NSIS), available at http://nsis.sourceforge.net/
Bram Moolenaar071d4272004-06-13 20:20:40 +00003
Restorer51c94b62024-03-24 09:41:18 +00004To build the installable .exe file:
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
RestorerZ2730d382025-01-17 14:04:44 +01006Preparatory stage
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
RestorerZ2730d382025-01-17 14:04:44 +010081. Clone using the git tool the Vim repository or download its zip file
9 available at:
10 https://github.com/vim/vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
RestorerZ2730d382025-01-17 14:04:44 +0100122. Go to the "/src" directory and build the Vim editor, making sure to use the
13 following variable values: "GUI=yes"; "OLE=yes"; "VIMDLL=yes". See
14 INSTALLpc.txt and Make_mvc.mak for details.
Bram Moolenaar6199d432017-10-14 19:05:44 +020015
Bram Moolenaar071d4272004-06-13 20:20:40 +0000163. Go to the GvimExt directory and build gvimext.dll (or get it from a binary
Bram Moolenaar6199d432017-10-14 19:05:44 +020017 archive). Both 64- and 32-bit versions are needed and should be placed
18 as follows:
19 64-bit: src/GvimExt/gvimext64.dll
20 32-bit: src/GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +000021
Martin Tournoij251c1e22022-10-08 17:15:28 +0100224. Get a "diff.exe" program. If you skip this the built-in diff will always
Restorer51c94b62024-03-24 09:41:18 +000023 be used (which is fine for most users).
Bram Moolenaar071d4272004-06-13 20:20:40 +000024 You can find one in previous Vim versions or in this archive:
Restorer51c94b62024-03-24 09:41:18 +000025 https://www.mediafire.com/file/9edk4g3xvfgzby0/diff4Vim.zip/file
26 When will you have "diff.exe" put it in the "../.." directory (above the
27 "vim91" directory, it's the same for all Vim versions). However, you can
RestorerZ2730d382025-01-17 14:04:44 +010028 specify a different directory by specifying the appropriate makefile value.
29 How to do this is described below.
Bram Moolenaard2ec51f2018-12-02 13:58:00 +010030
Restorer51c94b62024-03-24 09:41:18 +0000315. For the terminal window to work in Vim, the library winpty is required.
32 You can get it at the following url:
33 https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
34 For the 32-bit version, rename "winpty.dll" from ia32/bin to "winpty32.dll",
35 and for the 64-bit version — "winpty.dll" from x64/bin to "winpty64.dll".
36 Put the renamed file and "winpty-agent.exe" in "../.." (above the "vim91"
RestorerZ2730d382025-01-17 14:04:44 +010037 directory). However, you can specify a different directory by specifying
38 the appropriate makefile value. How to do this is described below.
Bram Moolenaar071d4272004-06-13 20:20:40 +000039
RestorerZ2680a072024-03-20 20:15:51 +0100406. To use stronger encryption, add the Sodium library. You can get it here:
41 https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip
42 Unpack the archive. Put the "libsodium.dll" from
43 path/to/libsodium/Win32/Release/v143/dynamic for the 32‐bit version or
44 path/to/libsodium/X64/Release/v143/dynamic for the 64‐bit version in the
45 "../.." directory (above the "vim91" directory, where "diff.exe" and
Restorer51c94b62024-03-24 09:41:18 +000046 "winpty{32|64}.dll").
RestorerZ2680a072024-03-20 20:15:51 +010047
RestorerZ2730d382025-01-17 14:04:44 +0100487. Get gettext and iconv DLLs from the following site:
Bram Moolenaar6199d432017-10-14 19:05:44 +020049 https://github.com/mlocati/gettext-iconv-windows/releases
50 Both 64- and 32-bit versions are needed.
51 Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
52 DLLs and place them as follows:
53
54 <GETTEXT directory>
55 |
56 + gettext32/
57 | libintl-8.dll
58 | libiconv-2.dll
59 | libgcc_s_sjlj-1.dll
60 |
Restorer51c94b62024-03-24 09:41:18 +000061 + gettext64/
Bram Moolenaar6199d432017-10-14 19:05:44 +020062 libintl-8.dll
63 libiconv-2.dll
64
RestorerZ2730d382025-01-17 14:04:44 +010065 The default <GETTEXT directory> is "../..". However, you can specify a
66 different directory by specifying the appropriate makefile value. How to do
67 this is described below.
Bram Moolenaar6199d432017-10-14 19:05:44 +020068
RestorerZ2730d382025-01-17 14:04:44 +0100698. Install NSIS if you didn't do that already.
70 Download Unicode version the ShellExecAsUser plug-in for NSIS from:
Restorer51c94b62024-03-24 09:41:18 +000071 https://nsis.sourceforge.io/ShellExecAsUser_plug-in
RestorerZ2730d382025-01-17 14:04:44 +010072 and put "ShellExecAsUser.dll" to path\to\NSIS\Plugins\x86-unicode
Bram Moolenaar4a228972021-05-01 22:41:39 +020073
RestorerZ2730d382025-01-17 14:04:44 +010074Installer assembly stage
Bram Moolenaar071d4272004-06-13 20:20:40 +000075
RestorerZ2730d382025-01-17 14:04:44 +010076 On MS Windows, open the Developer Command Prompt for VS and go to the
77 "/nsis" directory and type the command
78 nmake.exe -lf Make_mvc.mak [variables] all
Bram Moolenaar24877cf2019-01-10 21:51:48 +010079
RestorerZ2730d382025-01-17 14:04:44 +010080 After the installer is created and you copy it to the desired location, run
81 the following command in the "/nsis" directory
82 nmake.exe -lf Make_mvc.mak clean
83
84 On UNIX-like systems, go to the "/nsis" directory and type the command
85 make -f Makefile [variables] all
Restorer51c94b62024-03-24 09:41:18 +000086
RestorerZ2730d382025-01-17 14:04:44 +010087 After the installer is created and you copy it to the desired location, run
88 the following command in the "/nsis" directory
89 make -f Makefile clean
90
91Variables and their values available for building the installer (not mandatory):
92
93 "VIMSRC=<dir>" — directory where location of gvim_ole.exe, vimw32.exe,
Restorer51c94b62024-03-24 09:41:18 +000094 GvimExt/*, etc.
RestorerZ2730d382025-01-17 14:04:44 +010095 "VIMRT=<dir>" — directory where location of runtime files.
96 "VIMTOOLS=<dir>" — directory where location of extra tools: diff.exe,
97 winpty{32|64}.dll, winpty-agent.exe, libsodium.dll.
98 "GETTEXT=<dir>" — directory where location of gettext libraries.
99 "HAVE_UPX=1" — additional compression of the installer. UPX program
Restorer51c94b62024-03-24 09:41:18 +0000100 must be installed.
RestorerZ2730d382025-01-17 14:04:44 +0100101 "HAVE_NLS=0" — do not add native language support.
102 "HAVE_MULTI_LANG=0" — to create an English-only the installer.
103 "WIN64=1" — to create a 64-bit the installer.
RestorerZ54585fd2025-07-01 21:30:21 +0200104 "ARM64=1" — to create the installer for ARM64. The WIN64 variable
105 must be set to 1.
RestorerZ2730d382025-01-17 14:04:44 +0100106 "X=<scriptcmd>" — executes scriptcmd in script. If multiple scriptcmd
107 are specified, they are separated by a semicolon.
108 Example "X=OutFile MyVim.exe;XPMode on"
109 "MKNSIS=<dir>" — the directory where the "makensis.exe" program is
110 located.