visual-studioyasmmpir

Automated way to install vsyasm


I'm trying to create an automated way to build mpir on Windows with Microsoft C++. One required step seems to be to install vsyasm, so my current mini-project is to create an automated way to do that, i.e. something that can be done by a batch file or program without human intervention.

The vsyasm readme suggests three methods:

a. put these files in the MSBUILD customisation directory,
which is typically at:

  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations

or:

  C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations

b. put them in a convenient location and set this path in the
   'Build Customisations Search Path' in the Visual Studio
 'Projects and Solutions|VC++ Project Settings' item in
 the 'Tools|Options' menu;

c. put them in a convenient location and set this path in the
   'Build Customisation dialogue (discussed later).

The first is blocked by Windows security. Are there any ways around that that don't require manual intervention?

The second and third directly require manual intervention. Are there any automated equivalents, particularly if you want to end up building the project from the command line instead of within the IDE?

Are there any other options I'm missing?


Solution

  • As far as I can tell, there simply is no repeatable way to install vsyasm. There is, however, a repeatable way to build mpir with the command line compiler, and this is the way I recommend doing it: forget about Visual Studio integration, download plain old yasm, rename it to simply yasm.exe, put it somewhere in your path, run vcvarsx86_amd64.bat and:

    cd \mpir-2.6.0\win
    configure.bat
    make.bat