Scripts for setting up and running MSVC in Wine on Linux
This is a reproducible Dockerfile for cross compiling with MSVC on Linux, usable as base image for CI style setups.
This downloads and unpacks the necessary Visual Studio components using the same installer manifests as Visual Studio 2017/2019's installer uses. Downloading and installing it requires accepting the license, available at https://go.microsoft.com/fwlink/?LinkId=2086102 for the currently latest version.
As Visual Studio isn't redistributable, the resulting docker image isn't either.
Build the docker image like this:
docker build .
After building the docker image, there are 4 directories with tools, in
/opt/msvc/bin/, for all architectures out of
arm64, that should be added to the PATH before building with it.
The installer scripts also work fine without docker; just run the following two commands:
The unpacking requires recent versions of msitools (0.98) and libgcab (1.2); sufficiently new versions are available in e.g. Ubuntu 19.04.