User Tools

Site Tools


windows

Windows Build Instructions

Prerequisites

Install Visual Studio 2015 or Visual Studio 2013. All editions, including the free Community Edition, are supported.

Note: Ensure “C++ Common Tools” is selected. This option can be found under Programming languages → Visual C++ → Common Tools for Visual C++.

Install dependencies from the web and add to PATH

  • Python 2.7 (select “Install just for me”)
  • SCons (if SCons can't find Python, try installing 32 bit version of Python)
  • Download 7-Zip. Use the “.exe” version for “64-bit x64”. Run the setup.exe and make sure your 7-zip installation folder is part of your PATH.
  • Download cmake-3.6.0-rc1-win64-x64.msi from CMake. Make sure you install into a folder included in your PATH.
  • Optional: for reliable multi-threaded builds (the default), please install Pywin32. You'll need to pick the installer that matches your Python. For example, choose pywin32-220.win-amd64-py2.7.exe for amd64.

The following is an example command to update your PATH for building IoTivity, assuming all dependencies have been installed to their default locations on a 64-bit machine. Note: this command must be run from an administrator command prompt:

  setx  PATH   %PATH%;C:\Python27\;C:\Python27\Scripts;C:\Program Files\CMake\bin;C:\Program Files\7-Zip

Build

*Note: may have to set up proxy for https

Open a Command Prompt and use the “run.bat” convenience script to call into SCons.

 run build

Or call into SCons directly.

scons TARGET_OS=windows TARGET_ARCH=amd64 \
RELEASE=0 WITH_RA=0 TARGET_TRANSPORT=IP SECURED=1 WITH_TCP=0 \
BUILD_SAMPLE=ON LOGGING=OFF TEST=1

Windows Example Apps

Samples

Examples Description
SimpleServer and SimpleClient A basic sample for hosting, discovering and performing GET, PUT, POST and OBSERVE operations on a resource. We recommend that you start with these two apps.
MediaServer and WinUIClient WinUIClient is a Win32 GUI application for managing the MediaServer application. MediaServer is an application that allows remote control over the PC running the app: specifically volume and playback (play/pause) control
ProvisioningClient SampleServer_JustWorks SampleServer_RandomPin Example for demonstrating Provisioning Manager
OCServer and OCClient An advanced version of SimpleServer/SimpleClient for hosting, discovering and performing GET, PUT, POST and OBSERVE operations on a resource. Allows user to specify 1 of 20 different sequences.

Source Code Location

Source code location of the sample code:

 iotivity\resource\examples\

Provisioning Source code location of the sample code:

 iotivity\resource\csdk\security\provisioning\sample\

OCServer/OCClient Source code location of the sample code (works on Windows from this directory):

 iotivity\resource\csdk\stack\samples\linux\simpleclientserver\

Execution

How to execute samples (in two seperate windows):

 C:\path\to\iotivity\> run server
 C:\path\to\iotivity\> run client

 C:\path\to\iotivity\> run mediaserver
 C:\path\to\iotivity\> run winuiclient

{{:mediaserverwinuiclient.jpg?nolink&200|

 C:\path\to\iotivity\> run justworks    OR    run randompin
 C:\path\to\iotivity\> run provclient
windows.txt · Last modified: 2017/03/24 20:29 by Mats Wichmann