Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Attempted to build NSIS installer for 2.6.3

From: John Dill <John.Dill@xxxxxxxxxxxxxxxxx>
Date: Tue, 2 Oct 2018 21:52:58 +0000
>From: Gerald Combs <gerald@xxxxxxxxxxxxx>
>Sent: Tuesday, October 2, 2018 3:39 PM
>To: John Dill; Developer support list for Wireshark
>Subject: Re: [Wireshark-dev] Attempted to build NSIS installer for 2.6.3
>
>What do `file /bin/asciidoctor` and `head -n1 /bin/asciidoctor` (assuming that c:\cygwin64 is Cygwin's root path) print from a bash >prompt? If it's something like
>
>/bin/asciidoctor: Ruby script, ASCII text executable

Yes

>and
>
>#!/usr/bin/ruby

and double Yes

>then that probably won't work from CMake since it's not a Windows executable or a batch file. You can confirm this by trying to run >`C:\cygwin64\bin\asciidoctor --version` from a non-Cygwin Command Prompt or a Powershell prompt. You might be able to work >around this by placing an asciidoctor.bat wrapper script somewhere in your path that contains something like the following:
>
>----
>echo off
>c:\cygwin64\bin\ruby /usr/bin/asciidoctor %*
>----
>
>There are lots of things that work inside Cygwin but not from Windows such as shebangs and symlinks, which is one of the reasons
>we've been migrating away from it.

I was able to run "C:\cygwin64\bin\ruby C:\cygwin64\bin\asciidoctor --version" from the cmd prompt and it seems to output the
proper text string.

I created an asciidoctor.bat in C:\cygwin64\bin like you suggested and put it in the list as a higher priority than asciidoctor

@echo off
ruby /bin/asciidoctor %*

FIND_PROGRAM(ASCIIDOCTOR_EXECUTABLE
    NAMES
        asciidoctorj
        asciidoctor.bat
        asciidoctor
    PATHS
        /bin
        /usr/bin
        /usr/local/bin
        ${CYGWIN_INSTALL_PATH}/bin
        ${CHOCOLATEY_BIN_PATH}
    DOC "Path to Asciidoctor or AsciidoctorJ"
)

This allowed the initial cmake command to finish referencing asciidoctor.bat in 

The msbuild /m ... Wireshark.sln went fine, and now I'm at nsis_package_prep.vcxproj.

It makes it down to generate_user-guide.xml.vcxproj where it tries to run

"C:\Program Files\CMake\bin\cmake.exe" -E env TZ=UTC ASCIIDOCTORJ_OPTS="-Xmx800m" C:/cygwin64/bin/asciidoctor.bat --attribute build_dir=C:/Users/DillJA/Desktop/wsbuild64/docbook --require C:/Users/DillJA/Desktop/wireshark/docbook/asciidoctor-macros/commaize-block.rb --require C:/Users/DillJA/Desktop/wireshark/docbook/asciidoctor-macros/cveidlink-inline-macro.rb --require C:/Users/DillJA/Desktop/wireshark/docbook/asciidoctor-macros/wsbuglink-inline-macro.rb --require C:/Users/DillJA/Desktop/wireshark/docbook/asciidoctor-macros/wssalink-inline-macro.rb --backend docbook --out-file user-guide.xml C:/Users/DillJA/Desktop/wireshark/docbook/user-guide.asciidoc

and it has a problem with the include statements in user-guide.asciidoc

  asciidoctor : error : user-guide.asciidoc: line 4: include file not found: /cygdrive/c/Users/DillJA/Desktop/wsbuild64/docbook/C:/Users/DillJA/Desktop/wireshark/docbook/C:/Users/DillJA/Desktop/wireshark/docbook/attributes.asciidoc

The rest of the errors seem to correspond to each 'include::' statements in user-guide.asciidoc.

I'll have to pick this up tomorrow.  Thanks for the help, appreciate it.
John D.