It's simpler to just rely on what Appveyor already provides in its system
images. Appveyor doesn't provide a 32-bit msys2 build, but AFAIK, anyone
needing that can compile it themselves.
Avoid listing gcc-g++ in the Cygwin setup commands because it apparently
breaks the Cygwin toolchain (i.e. missing stddef.h error):
https://ci.appveyor.com/project/rprichard/winpty/builds/19875792
* Remove the "version suffix" and BUILD_INFO.txt mechanisms, which I
believe no one uses except winpty itself. Instead, a suffix can be
added in the VERSION.txt file.
* Instead of passing the version and commit info as a preprocessor macro
when building every C++ file, write the info into a GenVersion.h
header that is only included by WinptyVersion.cc.
* Instead of writing a BUILD_INFO.txt in ship.py, pass COMMIT_HASH=<hash>
to make.
These changes accomplish two things:
* People who build a tag from source won't see a "<ver>-dev" suffix
anymore.
* Changing the version or the commit will correctly rebuild the version
object files (and only those object files). It will also relink every
binary.
Fixes https://github.com/rprichard/winpty/issues/72
- Fix a typo in the 7-Zip default paths.
- Change env["Path"] to env["PATH"]. Python is case-sensitive, and "Path"
isn't working. Windows itself seems to prefer "Path". I'm guessing
Python is converting "Path" to "PATH" for platform interoperability.
With MSVC, converting an empty macro value with STRINGIFY doesn't seem to
work. (Maybe it's producing nothing rather than the blank literal, ""?)
Work around it by allowing __none__ as a substitute for blank.
* Reorder ship targets to prefer MSYS, then MSYS2, then Cygwin
The MSYS build is much more likely to fail, both because its Cygwin
environment is poor (e.g. no C++11, no std::wstring) and because its
MinGW environment is poor (e.g. missing/broken SDDL APIs)
* Use PowerShell instead of the pefile module, because it's much faster,
even with the extra overhead of starting PowerShell.
* For MSYS, instead of disabling parallel make, use mingw32-make.exe.
Apparently, with this change, it's necessary to use forward slashes when
passing the PREFIX to make, so change that as well.