arpadboda commented on a change in pull request #694: MINIFICPP-1091 - Updated 
Windows.md
URL: https://github.com/apache/nifi-minifi-cpp/pull/694#discussion_r357649404
 
 

 ##########
 File path: Windows.md
 ##########
 @@ -17,29 +17,70 @@
 
 ## Requirements
 
-Apache NiFi MiNiFi C++ has been built on Window Server 2016, 2019, and Windows 
10 operating systems. Since the project is CMAKE focused we suggest building via
-Visual Studio 2017 or our ms_build.bat script. In order to build the MSI, 
please install the [WiX Toolset](https://wixtoolset.org/)
+Apache NiFi MiNiFi C++ has been built on Window Server 2016, 2019, and Windows 
10 operating systems. The project is CMake focused we suggest building via
+Visual Studio 2017 or our `win_build_vs.bat` script.
 
-The project previously required OpenSSL to be installed. If you follow our 
build procedures, below, you will not need to install that dependency. Further, 
any MSI
-distributable requires that systems install the [Visual Studio 2010 
redistributables](https://www.microsoft.com/en-us/download/details.aspx?id=26999&irgwc=1&OCID=AID681541_aff_7593_312327&tduid=(ir__2dz2dkkuookfr3a22jsv1zgwwn2xmb9vrhvzwmdq00)
+The project previously required OpenSSL to be installed. If you follow our 
build procedures, below, you will not need to install that dependency.
+
+### Required software
+
+ - Visual Studio 2017
+ - [CMake](https://cmake.org/download/)
+ - [Git](https://git-scm.com/download/win)
+ - (Optional) [WiX Toolset](https://wixtoolset.org/releases/) (only for 
building the MSI)
+ - (Optional) JDK (only for JNI support)
+
+### JNI support
+Though the project is written in C++, JNI functionality supports running Java 
processors stored in NiFi Archives. These can be run
+in a much smaller memory footprint and consumer fewer resources. If your 
systems do not support Java or you do not want a JDK installed, please use 
non-JNI builds.
 
 ## Building with Visual Studio 
 
-In order to support Visual Studio you must install [plugins capable of 
building 
CMAKE](https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/). 
We also advise
+In order to support Visual Studio you must install [plugins capable of 
building 
CMake](https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/). 
We also advise
 installing WiX and Visual Studio Command Prompt via the marketplace. To do 
this please go to the Tools Menu, followed by Extensions and Updates. Once the 
popup displays you
-may install additional features from Online sources in the Online menui.
+may install additional features from Online sources in the Online menu.
 
-Once you have CMAKE support available please select the appropriate target. A 
file named CMakeSettings.json provides a few base configurations, 
x64-RelWithDebInfo, x64-Release,
-x64-RelWithDebInfo-WithJNI, and x64-Release-WithJNI. Though the project is 
written in C++, JNI functionality supports running Java processors stored in 
NiFi Archives. These can be run
-in a much smaller memory footprint and consumer fewer resources. If your 
systems do not support Java or you do not want a JDK installed, please select 
the non JNI targets.
+A file named CMakeSettings.json provides the CMake configuration.
 
-CMAKE must generate its cache, under Cache in the CMake Menu. After that is 
complete go to 'Build Only' under the CMAKE menu. Due to limitations in Visual 
Studio's CMAKE support, it is advised
-that you build minifi.lib then minifiexe targets. Once you have built these 
targets, you may use the cpack command to build your MSI. If you are building 
with JNI functionality the MSI will be
+CMake must generate its cache, under Cache in the CMake Menu. After that is 
complete go to 'Build Only' under the CMake menu. Due to limitations in Visual 
Studio's CMake support, it is advised
+that you build `minifi.lib` then `minifiexe` targets. Once you have built 
these targets, you may use the `cpack` command to build your MSI. If you are 
building with JNI functionality the MSI will be
 significantly larger ( about 160 MB ) since it contains the base NARs to run 
the standard set of Apache NiFi processors. 
 
 ## Building via the build script
 
-The preferred way of building the project is via the win_build_vs.bat script 
found in our root source folder. You must supply a single command, the build 
directory. Typically you create a directory
-with CMAKE and build in that referencing your CMAKE tree. Simply supply 
win_build_vs.bat an argument like 'build' as the name of your build directory 
and it will create this directory building the 
-project within it. If WiX is installed cpack will create your MSI in the 
chosen build directory.
+The preferred way of building the project is via the `win_build_vs.bat` script 
found in our root source folder. Its first parameter is mandatory, the 
directory in which it will build the project. `build` is a good default choice 
for this.
+
+After the build directory it will take optional parameters modifying the CMake 
configuration used in the build:
+
+| Argument | Effect |
+|----------|------------------------------------------------|
+| /T | Disables tests |
+| /P | Enables MSI creation |
+| /K | Enables Kafka extension |
+| /J | Enables JNI |
+| /64 | Creates 64-bit build instead of a 32-bit one |
+| /D | Builds RelWithDebInfo build instead of Release |
+
+Examples:
+ - 32-bit build with kafka, disabling tests, enabling MSI creation: 
`win_build_vs.bat build /T /K /P`
+ - 64-bit build with JNI, with debug symbols: `win_build_vs.bat build /64 /J 
/D`
 
 Review comment:
   I think our docs shouldn't (even implicitly) recommend building 32 and 64 
bit binaries to the same there, so I would prefer changing the 1st arg to 
"build64" here. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to