1@ECHO off 2 3set dbg=0 4set machine=ppro 5 6:getopt 7if "%~1"=="/d" (set dbg=1) & shift & goto getopt 8if "%~1"=="/m" (set machine=%2) & shift & shift & goto getopt 9 10rem These options are for testing only, always use 'ppro' (the default). The 11rem 'ansi-legacy' option has been removed since it is not needed on Windows. 12if "%machine%"=="ppro" goto success 13if "%machine%"=="ansi32" goto success 14echo "valid values for /m are [ppro, ansi32]" 15exit /b 1 16:success 17 18"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -property installationPath > vcpath.txt 19set /p vcpath=<vcpath.txt 20del vcpath.txt 21call "%vcpath%\VC\Auxiliary\Build\vcvarsall.bat" x86 22 23if not exist dist32 mkdir dist32 24if exist dist32\* del /q dist32\* 25 26cd ..\libmpdec 27copy /y Makefile.vc Makefile 28nmake clean 29nmake MACHINE=%machine% DEBUG=%dbg% 30 31copy /y "libmpdec-4.0.0.lib" ..\vcbuild\dist32 32copy /y "libmpdec-4.0.0.dll" ..\vcbuild\dist32 33copy /y "libmpdec-4.0.0.dll.lib" ..\vcbuild\dist32 34copy /y "libmpdec-4.0.0.dll.exp" ..\vcbuild\dist32 35copy /y "mpdecimal.h" ..\vcbuild\dist32 36 37cd ..\libmpdec++ 38copy /y Makefile.vc Makefile 39nmake clean 40nmake DEBUG=%dbg% 41 42copy /y "libmpdec++-4.0.0.lib" ..\vcbuild\dist32 43copy /y "libmpdec++-4.0.0.dll" ..\vcbuild\dist32 44copy /y "libmpdec++-4.0.0.dll.lib" ..\vcbuild\dist32 45copy /y "libmpdec++-4.0.0.dll.exp" ..\vcbuild\dist32 46copy /y "decimal.hh" ..\vcbuild\dist32 47 48cd ..\vcbuild 49