Skip to content

Latest commit

 

History

History
109 lines (57 loc) · 4.22 KB

INSTALL.md

File metadata and controls

109 lines (57 loc) · 4.22 KB

Install

The library does not provides pre-build binaries or provides an installation package. To install the binary files on the system, the source code must be compiled and copied to the appropriate directory.

The following steps show how to install the library:

  1. Download the source code from an existing tags and extract the content to a local directory (for example c:\projects\win32Arduino or ~/dev/win32Arduino).

  2. Build the source code according to the Build Steps instructions specified in this document.

  3. Navigate to the build directory and execute the 'install' command for your platform:

    1. On Windows, enter cmake --build . --config Release --target INSTALL.
    2. On Linux, enter sudo make install.

Build

This section explains how to compile and build the software and how to get a development environment ready.

Prerequisites

Software Requirements

The following software must be installed on the system for compiling source code:

Linux Requirements

These are the base requirements to build and use win32Arduino:

  • GNU-compatible Make or gmake
  • POSIX-standard shell
  • A C++98-standard-compliant compiler

Windows Requirements

  • Microsoft Visual C++ 2010 or newer

Build steps

The win32Arduino library uses the CMake build system to generate a platform-specific build environment. CMake reads the CMakeLists.txt files that you'll find throughout the directories, checks for installed dependencies and then generates files for the selected build system.

To build the software, execute the following steps:

  1. Download the source code from an existing tags and extract the content to a local directory (for example c:\projects\win32Arduino or ~/dev/win32Arduino).

  2. Generate the project files for your build system using the following commands:

mkdir build
cd build
cmake ..
  1. Build the source code:
    1. On Windows, run cmake --build . --config Release or open win32Arduino.sln with Visual Studio.
    2. On Linux, run make command.

Build options

The following table shows the available build option:

Name Type Default Usage
CMAKE_INSTALL_PREFIX STRING See CMake documentation Defines the installation folder of the library.
BUILD_SHARED_LIBS BOOL OFF Enable/disable the generation of shared library makefiles
WIN32ARDUINO_BUILD_TEST BOOL OFF Enable/disable the generation of unit tests target.
WIN32ARDUINO_BUILD_DOC BOOL OFF Enable/disable the generation of API documentation target.
WIN32ARDUINO_BUILD_SAMPLES BOOL OFF Build all samples projects

To enable a build option, run the following command at cmake configuration time:

cmake -D<BUILD-OPTION-NAME>=ON ..

Testing

win32Arduino comes with unit tests which help maintaining the product stability and level of quality.

Test are build using the Google Test v1.8.0 framework. For more information on how googletest is working, see the google test documentation primer.

Test are disabled by default and must be manually enabled. See the Build Options for details on activating unit tests.

Test are automatically build when building the solution.

To run tests, open a shell prompt and browse to the build/bin folder and run win32arduino_unittest executable. For Windows users, the executable is located in build\bin\Release.

Test results are saved in junit format in file win32arduino_unittest.x86.debug.xml or win32arduino_unittest.x86.release.xml depending on the selected configuration.

The latest test results are available at the beginning of the README.md file.