Merge: Windows: path, PATH, and exec improvements
authorJean Privat <jean@pryen.org>
Mon, 20 Mar 2017 20:08:59 +0000 (16:08 -0400)
committerJean Privat <jean@pryen.org>
Mon, 20 Mar 2017 20:08:59 +0000 (16:08 -0400)
This PR further improves Windows support in the Nit standard library and testing tools:

* Improve Windows path manipulation and standardize the solution. On Windows, services working on path strings first replace all `\` by `/`. This allows sharing the main code with other OS, data copy should be limited since only the first operation on a string should update it.
  All `file` services depending on the path separator should have been updated, except for `relpath`. Note that there is still no special treatment for FS root like `C:/`, so further work is needed.
* Support for Windows' PATH where the separator is `;`.
* Fix pipes left open on the parent side after `CreateProcess`.
* Intro a basic skip list for MINGW64 Windows system with projects that are either incompatible (cocoa & ios) or not available with msys2 and that I don't plan to configure manually on the test server in the near future.

There are still issues (including an int overflow in `Float::to_s`), but this PR allows a few larger projects to work on Windows. With #2390 gamnit projects can be compiled entirely from a Windows machine (or cross-compiled).

---

The unit tests are marked `~~~nitish` because they are only valid when `is_windows == true`. Maybe we could have a `~~~nitwindows` or something like that for such tests in the future. Note that you can set `-D is_windows=true` to try them (but not on nitunit sadly).

The Jenkins Windows test server is currently broken. I'll see if I can fix it, otherwise, I'll share the results form my test server later.

Pull-Request: #2391
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>


Trivial merge