winss is a small suite of tools for Windows that is designed to be as close to its counterpart S6 as possible using native Windows features. It's core function is to allow process supervision but it provides tools to supervise a collection of processes, handle logging, and also administration.
Using this framework it is simple to handle complex scenarios with little code such as adding/removing services and starting/stopping services in a particular sequence. There is no requirement to change an application to handle events like traditional Windows services. winss can handle simple console applications the way it should have been.
You will find documentation for using winss on the Read the Docs site.
These instructions will get you a copy of winss up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy winss on a live system.
The following are required to build and test winss.
A step by step guide for getting winss development environment running.
- Fork the winss repo.
- Clone the forked copy using
git clone https://github.com/username/winss.git
- Run
premake5 vs2015
in the src folder. - Open The
WindowsSupervisionSuite.sln
in Visual Studio. - Build Debug or Release.
Using an elevated command prompt:
choco install opencppcoverage
pip install cpplint
In the build\bin\x64\Debug
directory there will be a winss-test.exe
.
Details on the command line options can be found here.
To run with code coverage then use OpenCppCoverage.exe
installed as part of
the optional prerequisites.
OpenCppCoverage.exe --modules=winss --sources=lib\winss\* --export_type=cobertura:build\coverage.xml -q -- build\bin\x64\Debug\winss-test.exe --gtest_output=xml:build\testresults.xml
There is a powershell script that can automate this for you:
powershell .\tools\Run-Tests.ps1
winss follows the Google C++ Style Guide.
To check then use cpplint
cpplint --extension=hpp,cpp --headers=hpp --filter=-build/c++11 <filename>
Or use the powershell script with an optional filename:
powershell .\tools\Run-Lint.ps1 [FILENAME]
These instructions will get you a copy of winss up and running on your local machine using a production version.
- Visual C++ Redistributable for Visual Studio 2015 needs to be installed.
Download the latest Release build to your local system and add the directory to the %PATH%.
- Easylogging++ - for logging.
- The Lean Mean C++ Option Parser - for parsing command line options.
- JSON for Modern C++ - for reading/writing JSON.
- HowardHinnant/date - for converting to and from ISO 8601 strings with millisecond precision.
- Google Test - for testing/mocking.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the Apache License - see the LICENSE.md file for details