Skip to content

Instantly share code, notes, and snippets.

View gist:c52c2261ff3671ccbd32

Before you start you need a Mingw-w64 toolchain for Linux, try installing the mingw-w64 package (Ubuntu, Suse, Fedora?) or get it from the Mingw-w64 website.

Build dependencies

$ mkdir deps-mingw
$ cd deps-mingw
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw32-w64-cross-travis.toolchain.cmake ../third-party/
$ make
$ cd ..
@equalsraf
equalsraf / gist:4685f7aef022a36c26d5
Last active Nov 15, 2017
Building Neovim with MSVC 2015
View gist:4685f7aef022a36c26d5

Check the pull request for the changes and the main issue for discussion. If you run into trouble check the Known Errors section at the end, or drop me a comment.

Requirements

  • MSVC 2015, cl should report > 19.*
  • Python 2 (required by libuv to get gyp) - python 3 will not work, see the issue
  • Git (required by libuv to get gyp)
  • libintl
  • You might need the Windows 10 SDK to be installed (unverified, please drop me a comment in #810, specially if you are in Windows8 or lower.)
@equalsraf
equalsraf / NeovimCygwin.md
Last active Feb 9, 2018
Neovim in Cygwin
View NeovimCygwin.md

TLDR; no, libuv doesn't work in Cygwin just yet, see at the bottom.

Requirements

I tested using the master branch (9d3449852bd35c9283948186d0259c1bf73b8579 or later)

I installed the following in the cygwin setup

  • gcc-c++ make cmake pkg-config libtool
View appveyor_poke.py
#!/usr/bin/python3
#
# Little script to check if Appveyor is stuck
#
# The return code is (2) if the build is considered stuck, (0) if not
# stuck, and (1) for other errors
import json
import sys
import requests
View neovim_executable.md

executable()

os_can_exe() used by executable() actually checks PATHEXT. Behaviour in Vim is:

executable('no_such_file') returns 0
executable('file') returns 1 if file.bat,file.exe,etc exist ($PATHEXT)
executable('file.bat')returns 1
executable('file.exe')returns 1

This could lead to the misconception that, for example, executable("file.bat") being 1 implies that system(["file.bat"]) is expected to succeed, which is not true. But this is an issue with system([]) in windows and not with executable(). The notion of executable in Windows is fundamentaly a shell concept, because unlike UNIX there no notion of shebang and permission bits, that allows execution of non binary files.

@equalsraf
equalsraf / neovim-escaping.md
Last active Oct 16, 2017
Figuring out neovim windows escaping issues
View neovim-escaping.md

The problem

I thought this was fixed earlier, but the following fails to execute if shell=cmd.exe

:echo system('cd /d "c:\Windows"')

Take the following script

@equalsraf
equalsraf / neovim_system_string.md
Last active Nov 18, 2018
Notes on neovim system('...') in Windows for #6359
View neovim_system_string.md

Vim's system('string') interface is not always straightforward in Windows, its behaviour can be downright unexpected involves an intricate set of options. Its primary purpose its to execute a command in the shell (see &shell) in simple terms we can think that calling system('some command') is equivalent to spawning a process with the following arguments

[&shell, &shellcmdflag, 'some command']

and sometimes this might be true but it also might not. Consider the following examples (I'm running in gVim 7.4/Windows 8)

@equalsraf
equalsraf / 7059.md
Last active Aug 13, 2017
cmd.exe vs msys2 shell
View 7059.md

CMake Generators

CMake has two generatores using Make for windows.

  • MinGW Makefiles expects to run from the cmd shell (uses mingw32-make)
@equalsraf
equalsraf / windows-nvim-build.md
Last active Dec 6, 2018
New instructions for building nvim in Windows
View windows-nvim-build.md

[WIP]

Windows/MSYS2

In Windows we build using the toolchain provided by MSYS2 - the resulting binaries DO NOT link against the MSYS2 runtime.

Start by installing the necessary dependencies

@equalsraf
equalsraf / neovim-haiku.md
Last active Oct 8, 2017
Try to build neovim in haiku
View neovim-haiku.md

TLDR; it did not work, apparently the major blocker is libuv support

1. dependencies (i.e. nvim's third-party/)

Haiku already has some deps, lets use its packages. But for libvterm, etc we need to use third-party

mkdir .deps
cd .deps
You can’t perform that action at this time.