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

Wireshark-dev: [Wireshark-dev] Automated Windows build setup? (Chocolatey?)

From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Wed, 25 Nov 2015 20:01:33 +0100
Hi,

Has there been any progress/work on an automated Windows environment
setup? On Debian/Ubuntu it is as easy as "apt-get build-dep wireshark".
Chocolatey seems the way to go, although it does not seem to check file
integrity.

Attached is what I use to provision a clean Windows 7 x64 VM with
Chocolatey installed (rename to .cmd). Now I am kind of stuck with
getting Qt5(.3.1) automatically installed for x64 msvc2013, Chocolatey
has no such package (only for x86).

Does anyone have a better automated tool to setup a Wireshark
development environment for Windows? The last message I see about a
script is from 2013
(https://www.wireshark.org/lists/wireshark-dev/201312/msg00041.html).
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl
@echo off
Z:

:: 2015-11-04
:: https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html

::chocolatey feature enable -n allowGlobalConfirmation

:: 2.2.1 Powershell 2.0 is required, win7 includes is already.

:: 2.2.2
:: TODO Install chocolaty

echo 2.2.3 MSVC
:: approved version:    12.0.21005.1 (2014-11-24)
:: unapproved version:  12.0.31101.0 (2015-06-24)
cinst -y VisualStudioCommunity2013 -version 12.0.31101.0

:: 2.2.4 Qt
:: TODO file not found ?!!!
::cinst -y qt-sdk-windows-x86-msvc2013_opengl -version 5.3.2
::cinst -y qt-sdk-windows-x64-msvc2012_opengl -version 5.3.2
:: svn co https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/ wireshark-win32-libs
:: svn co https://anonsvn.wireshark.org/wireshark-win64-libs/trunk/packages/ wireshark-win64-libs

echo 2.2.5 Cygwin
cinst -y cygwin -version 2.2.1
:: what about cyg-get or sed asciidoc ... -source cygwin?
cinst -y winflexbison -version 2.4.3.20140715

echo 2.2.6 Python2
cinst -y python2 -version 2.7.10

echo 2.2.7 Git (optional)
cinst -y git -version 2.6.2

:: 2.2.8 Install and prepare sources
:: Assume git at Z:\wireshark\

:: README.cmake step 0
echo README.cmake step 0 cmake (minver 3.1.3)
cinst -y cmake -version 3.1.3

:: 2.2.9 set env / README.cmake step 1
::wsenv.cmd

:: README.cmake step 2+3
::cd \wireshark
::mkdir build
::cd build

:: README.cmake step 4
::cmake -G "Visual Studio 12 Win64" ..

:: README.cmake step 5
::msbuild /m /p:Configuration=RelWithDebInfo wireshark.sln
set CYGWIN=nodosfilewarning
set WIRESHARK_BASE_DIR=Z:\
::set WIRESHARK_TARGET_PLATFORM=win32
set WIRESHARK_TARGET_PLATFORM=win64
::set QT5_BASE_DIR=C:\Qt\5.4.1\5.4\msvc2013_opengl
set QT5_BASE_DIR=C:\Qt\Qt5.3.0\5.3\msvc2013
set PLATFORM=x64

:: Need vcvarsall as last because it uses "goto:eof"
::"\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64