Generate installers and archives for x86 and AMD64 CPU architecture using Visual C++ 2019 build tools.
Inspired by https://github.com/vim/vim-win32-installer project and home grew scripts.
Recent versions use ninja.exe
to parallel builds of packages dependencies and
Vim. Build creates both platform version x86 and amd64 of Vim.
Bram Moolenaar passed away 2023 August 3rd at the age of 62 Bram Moolenaar was author and maintainer of Vim for 30 years. A group of volunteers started caring for Vim project since.
Thank you Bram for all you did in this world! «Que la terre vous soit légère» (“May the earth rest lightly on you”).
- Git: https://git-scm.com
- Curl: https://curl.haxx.se/download.html
- 7-Zip: http://www.7-zip.org/
You can also use curl
found inside Git installation in place of Windows
native one.
Install 7-Zip version matching operating system architecture. On x86 system, installs 32bit version. On x64/AMD64 system, installs 64bit version.
- MSYS2: http://www.msys2.org/
In order to generate file uganda.nsis.txt
, a suite of Unix tools is required.
MSYS2 is expected to be installed at C:\msys64
. Basic installation is enough,
only bash, GNU make, uniq.exe and sed.exe are used while generating
uganda.nsis.txt
This is heavy requirement for such a light task. TODO: embed sed.exe and do text transformation in dosbatch script.
It is not possible to fetch and extract Python software just for building Vim.
Python 2.7 is expected to be installed in C:\Python27
. Python 3.12 is
expected to be installed in C:\Program Files\Python312
.
Visual C++ 2015 compiler can be downloaded free of charge on this page: http://landinghub.visualstudio.com/visual-cpp-build-tools. This is the direct download link:
Install Visual Studio 2017 Community edition. You need to create a (free) account at Microsoft.
Install Visual Studio 2019 Community edition. You need to create a (free) account at Microsoft.
Open a DOS prompt and go to project root. Run DOS prompt as normal user, not as administrator.
First create a virtualenv in .venv
folder to further get runtime
dependencies. Then install dependencies:
py -3 -m venv .venv
.venv\Scripts\activate.bat
pip install -r requirements.txt
download.bat
It can take a long depending of network connection speed.
List and version of GVim/Vim dependencies used for build and packages:
- UPX 4.2.3
- GetText 0.21 and iconv 1.16
- LuaBinaries 5.1.4
- WinPTY 0.4.3
- Libsodium 1.0.19
- dmake 4.12.2.2
- Perl 5.32.1
- Tcl 8.6.11
- Ruby 3.2.2
- ninja 1.11.1
- NSIS 3.09
Racket 7.9 does not compile due to a missing include header in distribution.
To prepare all required software for building GVim/Vim at next step, run:
7z x downloads\ninja-win.zip ninja.exe
configure.bat
ninja packages
It is possible to only prepare a specific package:
- UPX:
ninja upx
to unzip UPX for NSI package creation phase. - GetText:
ninja winpty
to extract GetText archive. - Lua:
ninja lua_x86 lua_x64
to extract Lua archive. - Perl:
ninja perl_x86 perl_x64
to extract and compile Perl. - Tcl:
ninja tcl_x86 tcl_x64
to extract and compile Tcl. - Ruby:
ninja ruby_x86 ruby_x64
to extract and compile Ruby.
Not that Ruby needs to be compiled using VisualStudio before being able to compile GVim/Vim. There is not ready to use archive for Ruby + VisualStudio. Ruby preparation is the longest of all tasks.
ninja gvim
You shall now have files gvim-9.1.xxx-ARCH.exe
and gvim-9.1.xxx-ARCH.zip
in
root folder.
By default a patch to embed Lua DLL in final delivery is incorporated in this project.
You can add custom patches in patch
directory.