xref: /netbsd-src/external/bsd/zstd/dist/build/VS_scripts/README.md (revision 3117ece4fc4a4ca4489ba793710b60b0d26bab6c)
1*3117ece4SchristosCommand line scripts for Visual Studio compilation without IDE
2*3117ece4Schristos==============================================================
3*3117ece4Schristos
4*3117ece4SchristosHere are a few command lines for reference :
5*3117ece4Schristos
6*3117ece4Schristos### Build with Visual Studio 2013 for msvcr120.dll
7*3117ece4Schristos
8*3117ece4SchristosRunning the following command will build both the `Release Win32` and `Release x64` versions:
9*3117ece4Schristos```batch
10*3117ece4Schristosbuild.VS2013.cmd
11*3117ece4Schristos```
12*3117ece4SchristosThe result of each build will be in the corresponding `bin\Release\{ARCH}\` folder.
13*3117ece4Schristos
14*3117ece4SchristosIf you want to only need one architecture:
15*3117ece4Schristos- Win32: `build.generic.cmd VS2013 Win32 Release v120`
16*3117ece4Schristos- x64: `build.generic.cmd VS2013 x64 Release v120`
17*3117ece4Schristos
18*3117ece4SchristosIf you want a Debug build:
19*3117ece4Schristos- Win32: `build.generic.cmd VS2013 Win32 Debug v120`
20*3117ece4Schristos- x64: `build.generic.cmd VS2013 x64 Debug v120`
21*3117ece4Schristos
22*3117ece4Schristos### Build with Visual Studio 2015 for msvcr140.dll
23*3117ece4Schristos
24*3117ece4SchristosRunning the following command will build both the `Release Win32` and `Release x64` versions:
25*3117ece4Schristos```batch
26*3117ece4Schristosbuild.VS2015.cmd
27*3117ece4Schristos```
28*3117ece4SchristosThe result of each build will be in the corresponding `bin\Release\{ARCH}\` folder.
29*3117ece4Schristos
30*3117ece4SchristosIf you want to only need one architecture:
31*3117ece4Schristos- Win32: `build.generic.cmd VS2015 Win32 Release v140`
32*3117ece4Schristos- x64: `build.generic.cmd VS2015 x64 Release v140`
33*3117ece4Schristos
34*3117ece4SchristosIf you want a Debug build:
35*3117ece4Schristos- Win32: `build.generic.cmd VS2015 Win32 Debug v140`
36*3117ece4Schristos- x64: `build.generic.cmd VS2015 x64 Debug v140`
37*3117ece4Schristos
38*3117ece4Schristos### Build with Visual Studio 2015 for msvcr120.dll
39*3117ece4Schristos
40*3117ece4SchristosThis capability is offered through `build.generic.cmd` using proper arguments:
41*3117ece4Schristos
42*3117ece4Schristos**For Win32**
43*3117ece4Schristos```batch
44*3117ece4Schristosbuild.generic.cmd VS2015 Win32 Release v120
45*3117ece4Schristos```
46*3117ece4SchristosThe result of the build will be in the `bin\Release\Win32\` folder.
47*3117ece4Schristos
48*3117ece4Schristos**For x64**
49*3117ece4Schristos```batch
50*3117ece4Schristosbuild.generic.cmd VS2015 x64 Release v120
51*3117ece4Schristos```
52*3117ece4SchristosThe result of the build will be in the `bin\Release\x64\` folder.
53*3117ece4Schristos
54*3117ece4SchristosIf you want Debug builds, replace `Release` with `Debug`.
55*3117ece4Schristos
56*3117ece4Schristos### Build with Visual Studio 2017
57*3117ece4Schristos
58*3117ece4Schristos`build.VS2017.cmd`, contributed by [@HaydnTrigg](https://github.com/HaydnTrigg),
59*3117ece4Schristoswill build both the `Release Win32` and `Release x64` versions
60*3117ece4Schristosof the first VS2017 variant it finds, in this priority order :
61*3117ece4SchristosEnterprise > Professional > Community
62*3117ece4Schristos
63*3117ece4SchristosAlternatively, it's possible to target a specific version,
64*3117ece4Schristosusing appropriate script, such as `build.VS2017Enterprise.cmd` for example.
65