Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 1 | This builds a one-click install for Vim for MS Windows using the Nullsoft |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 2 | Installation System (NSIS), available at http://nsis.sourceforge.net/ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 3 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 4 | To build the installable .exe file: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 5 | |
| 6 | 1. 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 | |
| 13 | 2. Go to the src directory and build: |
| 14 | gvim.exe (the OLE version), |
| 15 | vimrun.exe, |
| 16 | install.exe, |
Bram Moolenaar | 38f1eea | 2019-09-27 14:19:09 +0200 | [diff] [blame] | 17 | uninstall.exe, |
Bram Moolenaar | d2ec51f | 2018-12-02 13:58:00 +0100 | [diff] [blame] | 18 | tee/tee.exe, |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 19 | xxd/xxd.exe |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 20 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 21 | Then execute tools/rename.bat to rename the executables. |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 22 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 23 | 3. Go to the GvimExt directory and build gvimext.dll (or get it from a binary |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 24 | 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 28 | |
Martin Tournoij | 251c1e2 | 2022-10-08 17:15:28 +0100 | [diff] [blame] | 29 | 4. Get a "diff.exe" program. If you skip this the built-in diff will always |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 30 | be used (which is fine for most users). |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 31 | You can find one in previous Vim versions or in this archive: |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 32 | 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 Moolenaar | d2ec51f | 2018-12-02 13:58:00 +0100 | [diff] [blame] | 37 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 38 | 5. 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 46 | |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 47 | 6. 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 |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 53 | "winpty{32|64}.dll"). |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 54 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 55 | 7. 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 59 | |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 60 | 8. Get gettext and iconv DLLs from the following site: |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 61 | 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 | | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 73 | + gettext64/ |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 74 | libintl-8.dll |
| 75 | libiconv-2.dll |
| 76 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 77 | 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 Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 80 | |
| 81 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 82 | Install NSIS if you didn't do that already. |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 83 | Download Unicode version the ShellExecAsUser plug-in for NSIS from: |
| 84 | https://nsis.sourceforge.io/ShellExecAsUser_plug-in |
| 85 | and put ShellExecAsUser.dll to path\to\NSIS\Plugins\x86-unicode |
Bram Moolenaar | 4a22897 | 2021-05-01 22:41:39 +0200 | [diff] [blame] | 86 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 87 | |
Bram Moolenaar | 24877cf | 2019-01-10 21:51:48 +0100 | [diff] [blame] | 88 | Unpack the images: |
| 89 | cd nsis |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 90 | unzip icons.zip or 7z x icons.zip (on Unix-like or MS Windows) |
| 91 | WinRar.exe x icons.zip (on MS Windows) |
Bram Moolenaar | 24877cf | 2019-01-10 21:51:48 +0100 | [diff] [blame] | 92 | |
Bram Moolenaar | 4d8f476 | 2021-06-27 15:18:56 +0200 | [diff] [blame] | 93 | Then build gvim.exe: |
Bram Moolenaar | 24877cf | 2019-01-10 21:51:48 +0100 | [diff] [blame] | 94 | cd nsis |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame^] | 95 | makensis.exe [options] gvim.nsi |
| 96 | |
| 97 | Options (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 |