Technical shading @ Animal Logic. Special interest in lens simulation. To quote Matt Pharr: 'It seemed worth writing up at the time.'

# On installing visual studio command line tools on a build server

When writing c++ shaders, I often need to compile them for various operating system flavours. Windows is always the sore thumb of the lot, so I spent some time finding a better way to deal with this.

Instead of emulating windows on linux/macOS, I rent a windows server instead (at vultr.com).

Launch a command prompt:

Install Chocolatey (a life-saving package manager for windows - who knew the time would come!?)

Install the visual studio build tools:

And load the visual studio command line tools environment (64bit in this case):

Et voila, a build environment has been set up with minimal effort. All that needs to be done now is to compile whatever you needed to compile, zip it up and send it back to your local machine.

Apart from these packages, I also install these tools before launching into the VS command line environment:

The .net framework (Pathed requirement):

wget - to download e.g the Arnold API (I uploaded the relevant API’s to a Dropbox for easy access):

Pathed - a tool for easy adding to the %PATH% envvar. I dislike setx since it concatenates after 1024 characters like it’s 1975.

A tool to refresh the current environment, so the additions to %PATH% are loaded:

Git:

7zip: