Wireshark mailing list archives

Re: Cmake on windows


From: Pascal Quantin <pascal () wireshark org>
Date: Fri, 6 Mar 2020 14:04:14 +0100

Le ven. 6 mars 2020 à 14:02, Dario Lombardo <lomato () gmail com> a écrit :



On Fri, Mar 6, 2020 at 12:44 PM Pascal Quantin <pascal () wireshark org>
wrote:



Le ven. 6 mars 2020 à 12:28, Dario Lombardo <lomato () gmail com> a écrit :

I am sorry, I still don't understand, I beg your pardon.
You said

your machine does not have the MSVC redistributable copied in the
wireshark-libs folder (as explained in the developer guide) while it is
required for the NSIS installer.

But I cannot find any point in the developer guide where it is explained
that the MSVC redistributable has to be copied somewhere, nor I know how to
do it myself without a more detailed explanation.


This is why I said it used to be more visible in the documentation .
We used to have to download vcredist_x86.exe or vcredist_x64.exe from
Microsoft website and copy it in the Wireshark-win32-libs or
Wireshark-win64-libs folder. It is no more required because the
redistributables are bundled in the MSVC 2019 community edition (for
example mine is located by CMake in C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Redist/MSVC/14.24.28127).

I now realize that you have 2 errors: one about the VCINSTALLDIR (root
cause of your NSIS issue) and one about MERGE_MODULE_DIR (for WiX). Sorry
for not seeing this earlier.

As found in our CMakeLists.txt file:

# Try to find the Redist folder in VCINSTALLDIR which is set by
vcvarsall.bat.
# If it is not set, query it within the registry. VS2015 looks for the
"VC7" key
# in two locations (four if you count HKCU instead of HKLM). However,
VS2017
# does not use "VC7" (it sets a directory relative to
vsdevcmd_start.bat). As
# both versions do set "VS7", use that instead.
find_path(VCINSTALLDIR Redist PATHS
"$ENV{VCINSTALLDIR}"

"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;${_msvs_version}]\\VC"

"[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\VisualStudio\\SxS\\VS7;${_msvs_version}]\\VC"
NO_DEFAULT_PATH
)
file(TO_NATIVE_PATH "${VCINSTALLDIR}" VCINSTALLDIR_NATIVE)
message(STATUS "Using VCINSTALLDIR: ${VCINSTALLDIR_NATIVE}")

That's what Gerald indicated in his message.

When I open the MSVC 2019 command prompt, and type 'set VCINSTALLDIR', I
get as expected:
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\

What do you get?


Unfortunately the builder doesn't print anything with that command


https://github.com/crondaemon/wireshark/runs/490180639?check_suite_focus=true

see the "set" step.


Si it seems like it is not running the MSVC 2019 command prompt that takes
care of setting the various environment variables.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: