blob: c0b0376bfcb7163380397bafc7b7c3d712a8f710 [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
61. Unpack three archives:
7 PC sources
8 PC runtime
9 PC language files
10 You can generate these from the Unix sources and runtime plus the extra
11 archive (see the Makefile in the top directory).
12
132. Go to the src directory and build:
14 gvim.exe (the OLE version),
15 vimrun.exe,
16 install.exe,
Bram Moolenaar38f1eea2019-09-27 14:19:09 +020017 uninstall.exe,
Bram Moolenaard2ec51f2018-12-02 13:58:00 +010018 tee/tee.exe,
Restorer51c94b62024-03-24 09:41:18 +000019 xxd/xxd.exe
Bram Moolenaar071d4272004-06-13 20:20:40 +000020
Restorer51c94b62024-03-24 09:41:18 +000021 Then execute tools/rename.bat to rename the executables.
Bram Moolenaar6199d432017-10-14 19:05:44 +020022
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233. Go to the GvimExt directory and build gvimext.dll (or get it from a binary
Bram Moolenaar6199d432017-10-14 19:05:44 +020024 archive). Both 64- and 32-bit versions are needed and should be placed
25 as follows:
26 64-bit: src/GvimExt/gvimext64.dll
27 32-bit: src/GvimExt/gvimext.dll
Bram Moolenaar071d4272004-06-13 20:20:40 +000028
Martin Tournoij251c1e22022-10-08 17:15:28 +0100294. Get a "diff.exe" program. If you skip this the built-in diff will always
Restorer51c94b62024-03-24 09:41:18 +000030 be used (which is fine for most users).
Bram Moolenaar071d4272004-06-13 20:20:40 +000031 You can find one in previous Vim versions or in this archive:
Restorer51c94b62024-03-24 09:41:18 +000032 https://www.mediafire.com/file/9edk4g3xvfgzby0/diff4Vim.zip/file
33 When will you have "diff.exe" put it in the "../.." directory (above the
34 "vim91" directory, it's the same for all Vim versions). However, you can
35 specify another directory by passing /DVIMTOOLS=<dir> option to the
36 "makensis.exe" program via the command line.
Bram Moolenaard2ec51f2018-12-02 13:58:00 +010037
Restorer51c94b62024-03-24 09:41:18 +0000385. For the terminal window to work in Vim, the library winpty is required.
39 You can get it at the following url:
40 https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
41 For the 32-bit version, rename "winpty.dll" from ia32/bin to "winpty32.dll",
42 and for the 64-bit version — "winpty.dll" from x64/bin to "winpty64.dll".
43 Put the renamed file and "winpty-agent.exe" in "../.." (above the "vim91"
44 directory). However, you can specify another directory by passing
45 /DVIMTOOLS=<dir> option to the "makensis.exe" program via the command line.
Bram Moolenaar071d4272004-06-13 20:20:40 +000046
RestorerZ2680a072024-03-20 20:15:51 +0100476. To use stronger encryption, add the Sodium library. You can get it here:
48 https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip
49 Unpack the archive. Put the "libsodium.dll" from
50 path/to/libsodium/Win32/Release/v143/dynamic for the 32‐bit version or
51 path/to/libsodium/X64/Release/v143/dynamic for the 64‐bit version in the
52 "../.." directory (above the "vim91" directory, where "diff.exe" and
Restorer51c94b62024-03-24 09:41:18 +000053 "winpty{32|64}.dll").
RestorerZ2680a072024-03-20 20:15:51 +010054
Restorer51c94b62024-03-24 09:41:18 +0000557. On MS Windows do "nmake.exe -f Make_mvc.mak uganda.nsis.txt" in runtime/doc.
56 On Unix-like system do "make runtime/doc/uganda.nsis.txt" in top directory
57 or "make uganda.nsis.txt" in runtime/doc, and be sure to convert the file
58 "uganda.nsis.txt" to DOS file format.
Bram Moolenaar071d4272004-06-13 20:20:40 +000059
RestorerZ2680a072024-03-20 20:15:51 +0100608. Get gettext and iconv DLLs from the following site:
Bram Moolenaar6199d432017-10-14 19:05:44 +020061 https://github.com/mlocati/gettext-iconv-windows/releases
62 Both 64- and 32-bit versions are needed.
63 Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
64 DLLs and place them as follows:
65
66 <GETTEXT directory>
67 |
68 + gettext32/
69 | libintl-8.dll
70 | libiconv-2.dll
71 | libgcc_s_sjlj-1.dll
72 |
Restorer51c94b62024-03-24 09:41:18 +000073 + gettext64/
Bram Moolenaar6199d432017-10-14 19:05:44 +020074 libintl-8.dll
75 libiconv-2.dll
76
Restorer51c94b62024-03-24 09:41:18 +000077 The default <GETTEXT directory> is "..", however, you can specify another
78 directory by passing /DGETTEXT=<dir> option to "makensis.exe" program via
79 the command line.
Bram Moolenaar6199d432017-10-14 19:05:44 +020080
81
Bram Moolenaar071d4272004-06-13 20:20:40 +000082Install NSIS if you didn't do that already.
Restorer51c94b62024-03-24 09:41:18 +000083Download Unicode version the ShellExecAsUser plug-in for NSIS from:
84 https://nsis.sourceforge.io/ShellExecAsUser_plug-in
85and put ShellExecAsUser.dll to path\to\NSIS\Plugins\x86-unicode
Bram Moolenaar4a228972021-05-01 22:41:39 +020086
Bram Moolenaar071d4272004-06-13 20:20:40 +000087
Bram Moolenaar24877cf2019-01-10 21:51:48 +010088Unpack the images:
89 cd nsis
Restorer51c94b62024-03-24 09:41:18 +000090 unzip icons.zip or 7z x icons.zip (on Unix-like or MS Windows)
91 WinRar.exe x icons.zip (on MS Windows)
Bram Moolenaar24877cf2019-01-10 21:51:48 +010092
Bram Moolenaar4d8f4762021-06-27 15:18:56 +020093Then build gvim.exe:
Bram Moolenaar24877cf2019-01-10 21:51:48 +010094 cd nsis
Restorer51c94b62024-03-24 09:41:18 +000095 makensis.exe [options] gvim.nsi
96
97Options (not mandatory):
98 /DVIMSRC=<dir> — directory where location of gvim_ole.exe, vimw32.exe,
99 GvimExt/*, etc.
100 /DVIMRT=<dir> — directory where location of runtime files
101 /DVIMTOOLS=<dir> — directory where location of extra tools: diff.exe,
102 winpty{32|64}.dll, winpty-agent.exe, libsodium.dll
103 /DGETTEXT=<dir> — directory where location of gettext libraries
104 /DHAVE_UPX=1 — additional compression of the installer. UPX program
105 must be installed.
106 /DHAVE_NLS=0 — do not add native language support
107 /DHAVE_MULTI_LANG=0 — to create an English-only the installer
108 /DWIN64=1 — to create a 64-bit the installer