Skip to content

Commit

Permalink
This commit adds the windows installer to the OVS tree.
Browse files Browse the repository at this point in the history
Requirements are the following:
Visual Studio Community 2013
WiX Toolset 3.9
Microsoft_VC120_CRT_x86.msm

More detailed information on the requirements and build instructions
can be found under:
https://github.com/cloudbase/ovs-windows-installer/blob/master/README.rst

To run and make the installer issue the following:

./boot.sh
./configure CC=./build-aux/cccl LD="`which link`" \
LIBS="-lws2_32 -liphlpapi" --prefix="C:/openvswitch/usr" \
--localstatedir="C:/openvswitch/var" --sysconfdir="C:/openvswitch/etc" \
--with-pthread="C:/pthread" --with-vstudiotarget="Release"

make clean && make -j16 windows_installer

To uninstall one could use the following Powershell commandlets:
$app = Get-WmiObject -Class Win32_Product | Where-Object `
 { $_.Name -match "Open Vswitch" }

$app.Uninstall()

Signed-off-by: Alin Gabriel Serdean <[email protected]>
Co-authored-by: Alessandro Pilotti <[email protected]>
Signed-off-by: Alessandro Pilotti <[email protected]>
Signed-off-by: Gurucharan Shetty <[email protected]>
  • Loading branch information
2 people authored and shettyg committed Jun 7, 2015
1 parent d8485a9 commit d183efc
Show file tree
Hide file tree
Showing 28 changed files with 1,493 additions and 41 deletions.
8 changes: 4 additions & 4 deletions INSTALL.Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,17 @@ You can open the extensions.sln file in the IDE and build the solution.

* The kernel datapath can be compiled from command line as well. The top
level 'make' will invoke building the kernel datapath, if the
'--with-vstudioddk' argument is specified while configuring the package.
'--with-vstudiotarget' argument is specified while configuring the package.
For example,

% ./configure CC=./build-aux/cccl LD="`which link`" \
LIBS="-lws2_32 -liphlpapi" --prefix="C:/openvswitch/usr" \
--localstatedir="C:/openvswitch/var" --sysconfdir="C:/openvswitch/etc" \
--with-pthread="C:/pthread" --enable-ssl \
--with-openssl="C:/OpenSSL-Win32" --with-vstudioddk="<WDK to use>"
--with-openssl="C:/OpenSSL-Win32" --with-vstudiotarget="<target type>"

Possible values for "<WDK to use>" are:
"Win8.1 Debug", "Win8.1 Release", "Win8 Debug" and "Win8 Release".
Possible values for "<target type>" are:
"Debug" and "Release"

Installing the Kernel module
----------------------------
Expand Down
7 changes: 5 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,13 @@ CLEANFILES += manpage-dep-check
if VSTUDIO_DDK
ALL_LOCAL += ovsext_make
ovsext_make: datapath-windows/ovsext.sln
MSBuild.exe datapath-windows/ovsext.sln /target:Build /property:Configuration="$(VSTUDIO_CONFIG)"
MSBuild.exe datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8$(VSTUDIO_CONFIG)"
MSBuild.exe datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8.1$(VSTUDIO_CONFIG)"

CLEAN_LOCAL += ovsext_clean
ovsext_clean: datapath-windows/ovsext.sln
MSBuild.exe datapath-windows/ovsext.sln /target:Clean /property:Configuration="$(VSTUDIO_CONFIG)"
MSBuild.exe datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8$(VSTUDIO_CONFIG)"
MSBuild.exe datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8.1$(VSTUDIO_CONFIG)"
endif

dist-hook: $(DIST_HOOKS)
Expand Down Expand Up @@ -377,3 +379,4 @@ include tutorial/automake.mk
include vtep/automake.mk
include datapath-windows/automake.mk
include datapath-windows/include/automake.mk
include windows/automake.mk
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ build_script:
- C:\MinGW\msys\1.0\bin\bash -lc "cp /c/pthreads-win32/Pre-built.2/dll/x86/*.dll /c/openvswitch/."
- C:\MinGW\msys\1.0\bin\bash -lc "mv /bin/link.exe /bin/link_copy.exe"
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./boot.sh"
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -liphlpapi\" --with-pthread=C:/pthreads-win32/Pre-built.2 --with-openssl=C:/OpenSSL-Win32 --with-vstudioddk=\"Win8.1 Debug\""
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -liphlpapi\" --with-pthread=C:/pthreads-win32/Pre-built.2 --with-openssl=C:/OpenSSL-Win32 --with-vstudiotarget=\"Debug\""
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make"
50 changes: 25 additions & 25 deletions datapath-windows/ovsext.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Package", "Package", "{6BA8554E-AE50-49B0-9C98-4592447FEF8D}"
EndProject
Expand All @@ -12,32 +12,32 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ovsext", "ovsext\ovsext.vcx
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Win8 Debug|x64 = Win8 Debug|x64
Win8 Release|x64 = Win8 Release|x64
Win8.1 Debug|x64 = Win8.1 Debug|x64
Win8.1 Release|x64 = Win8.1 Release|x64
Win8.1Debug|x64 = Win8.1Debug|x64
Win8.1Release|x64 = Win8.1Release|x64
Win8Debug|x64 = Win8Debug|x64
Win8Release|x64 = Win8Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8 Debug|x64.Build.0 = Win8 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8 Release|x64.ActiveCfg = Win8 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8 Release|x64.Build.0 = Win8 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1 Debug|x64.ActiveCfg = Win8.1 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1 Debug|x64.Build.0 = Win8.1 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1 Release|x64.ActiveCfg = Win8.1 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1 Release|x64.Build.0 = Win8.1 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8 Debug|x64.Build.0 = Win8 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8 Release|x64.ActiveCfg = Win8 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8 Release|x64.Build.0 = Win8 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8 Release|x64.Deploy.0 = Win8 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1 Debug|x64.ActiveCfg = Win8.1 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1 Debug|x64.Build.0 = Win8.1 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1 Debug|x64.Deploy.0 = Win8.1 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1 Release|x64.ActiveCfg = Win8.1 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1 Release|x64.Build.0 = Win8.1 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1 Release|x64.Deploy.0 = Win8.1 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1Debug|x64.ActiveCfg = Win8.1 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1Debug|x64.Build.0 = Win8.1 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1Release|x64.ActiveCfg = Win8.1 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8.1Release|x64.Build.0 = Win8.1 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Debug|x64.ActiveCfg = Win8 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Debug|x64.Build.0 = Win8 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.ActiveCfg = Win8 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.Build.0 = Win8 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1Debug|x64.ActiveCfg = Win8.1 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1Debug|x64.Build.0 = Win8.1 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1Debug|x64.Deploy.0 = Win8.1 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1Release|x64.ActiveCfg = Win8.1 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1Release|x64.Build.0 = Win8.1 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8.1Release|x64.Deploy.0 = Win8.1 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8Debug|x64.ActiveCfg = Win8 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8Debug|x64.Build.0 = Win8 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8Debug|x64.Deploy.0 = Win8 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8Release|x64.ActiveCfg = Win8 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8Release|x64.Build.0 = Win8 Release|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win8Release|x64.Deploy.0 = Win8 Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
16 changes: 7 additions & 9 deletions m4/openvswitch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,14 @@ dnl OVS_CHECK_WINDOWS
dnl
dnl Configure Visual Studio solution build
AC_DEFUN([OVS_CHECK_VISUAL_STUDIO_DDK], [
AC_ARG_WITH([vstudioddk],
[AS_HELP_STRING([--with-vstudioddk=version_type],
[Visual Studio DDK version type e.g. Win8.1 Release])],
AC_ARG_WITH([vstudiotarget],
[AS_HELP_STRING([--with-vstudiotarget=target_type],
[Target type: Debug/Release])],
[
case "$withval" in
"Win8.1 Release") ;;
"Win8.1 Debug") ;;
"Win8 Release") ;;
"Win8 Debug") ;;
*) AC_MSG_ERROR([No good Visual Studio configuration found]) ;;
"Release") ;;
"Debug") ;;
*) AC_MSG_ERROR([No valid Visual Studio configuration found]) ;;
esac
VSTUDIO_CONFIG=$withval
Expand All @@ -139,7 +137,7 @@ AC_ARG_WITH([vstudioddk],
)
AC_SUBST([VSTUDIO_CONFIG])
AC_DEFINE([VSTUDIO_DDK], [1], [System uses the Visual Studio DDK version module.])
AC_DEFINE([VSTUDIO_DDK], [1], [System uses the Visual Studio build target.])
AM_CONDITIONAL([VSTUDIO_DDK], [test -n "$VSTUDIO_CONFIG"])
])

Expand Down
191 changes: 191 additions & 0 deletions windows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

ovs-windows-installer/Binaries.wxs
ovs-windows-installer/Symbols.wxs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
x64/
build/
bld/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

#NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml

# NuGet Packages Directory
packages/*
## TODO: If the tool you use requires repositories.config uncomment the next line
#!packages/repositories.config

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
!packages/build/

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/
48 changes: 48 additions & 0 deletions windows/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Open vSwitch Windows installer
==============================

This project generates a MSI installer for Open vSwitch on Windows, including
CLI executables, services and the Hyper-V vswitch forwarding extension.

Requirements
------------

Visual Studio 2013 community, professional, premium or ultimate edition
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Visual Studio Community 2013 is freely available at:
https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

WiX Toolset 3.9
^^^^^^^^^^^^^^^

Download and install from:
http://wixtoolset.org/releases/v3.9/stable

Microsoft_VC120_CRT_x86.msm
^^^^^^^^^^^^^^^^^^^^^^^^^^^

This Windows merge module is available with Visual Studio and contains the
Visual C++ 2013 x86 runtime redistributables files.
Copy the file in the *Redist* directory.

Open vSwitch installer
----------------------

The installer will be generated under the following path:
* windows\ovs-windows-installer\bin\Release\OpenvSwitch.msi

Note: the kernel driver needs to be signed.


Build instructions
------------------

Build the solution in the Visual Studio IDE or via command line:

msbuild ovs-windows-installer.sln /p:Platform=x86 /p:Configuration=Release

Silent installation
-------------------

msiexec /i OpenvSwitch.msi ADDLOCAL=OpenvSwitchCLI,OpenvSwitchDriver /l*v log.txt
Loading

0 comments on commit d183efc

Please sign in to comment.