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 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 6 | Preparatory stage |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 7 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 8 | 1. Clone using the git tool the Vim repository or download its zip file |
| 9 | available at: |
| 10 | https://github.com/vim/vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 11 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 12 | 2. 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 Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 15 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 16 | 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] | 17 | 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 21 | |
Martin Tournoij | 251c1e2 | 2022-10-08 17:15:28 +0100 | [diff] [blame] | 22 | 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] | 23 | be used (which is fine for most users). |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 24 | You can find one in previous Vim versions or in this archive: |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 25 | 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 |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 28 | specify a different directory by specifying the appropriate makefile value. |
| 29 | How to do this is described below. |
Bram Moolenaar | d2ec51f | 2018-12-02 13:58:00 +0100 | [diff] [blame] | 30 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 31 | 5. 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" |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 37 | directory). However, you can specify a different directory by specifying |
| 38 | the appropriate makefile value. How to do this is described below. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 39 | |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 40 | 6. 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 |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 46 | "winpty{32|64}.dll"). |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 47 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 48 | 7. Get gettext and iconv DLLs from the following site: |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 49 | 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 | | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 61 | + gettext64/ |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 62 | libintl-8.dll |
| 63 | libiconv-2.dll |
| 64 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 65 | 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 Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 68 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 69 | 8. Install NSIS if you didn't do that already. |
| 70 | Download Unicode version the ShellExecAsUser plug-in for NSIS from: |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 71 | https://nsis.sourceforge.io/ShellExecAsUser_plug-in |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 72 | and put "ShellExecAsUser.dll" to path\to\NSIS\Plugins\x86-unicode |
Bram Moolenaar | 4a22897 | 2021-05-01 22:41:39 +0200 | [diff] [blame] | 73 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 74 | Installer assembly stage |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 75 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 76 | 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 Moolenaar | 24877cf | 2019-01-10 21:51:48 +0100 | [diff] [blame] | 79 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 80 | 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 |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 86 | |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 87 | 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 | |
| 91 | Variables and their values available for building the installer (not mandatory): |
| 92 | |
| 93 | "VIMSRC=<dir>" — directory where location of gvim_ole.exe, vimw32.exe, |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 94 | GvimExt/*, etc. |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 95 | "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 |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 100 | must be installed. |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 101 | "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. |
RestorerZ | 54585fd | 2025-07-01 21:30:21 +0200 | [diff] [blame] | 104 | "ARM64=1" — to create the installer for ARM64. The WIN64 variable |
| 105 | must be set to 1. |
RestorerZ | 2730d38 | 2025-01-17 14:04:44 +0100 | [diff] [blame] | 106 | "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. |