Native Install Windows Batch File Doesn't Propagate Command Line Arguments

When using the native plugins in Gradle 2.2, one can install executables into a subdirectory under the build/install. Inside the executable specific subdirectory, a shell script is created that delegates down to the lib subdirectory where the required libraries and executable actually resides. On Linux, the bash script sets LD_LIBRARY_PATH and calls the executable using ‘@*’ to proxy any command line arguments to the script down to the executable. However, on Windows, the batch file doesn’t use “%*” to proxy the command line arguments. Thus, any command line arguments given to the batch file are not given to the executable.

As a workaround on Windows, one can just call the executable directly. The batch file doesn’t set the equivalent of LD_LIBRARY_PATH because on Windows executables look in the directory containing the executable for libraries. Thus, the batch file is superfluous. I assume it only exists for consistency with the Linux side where the bash script is needed to define the LD_LIBRARY_PATH.