A follow up to 0faacaa7c8 to cover the stop button within the launcher
and terminating Syncthing on shutdown/exit. To find the relevant connection
the connection settings are searched for a local URL where the port matches
the port from the Syncthing process log.
If there's a configured and local Syncthing connection and we're on a
non-UNIX platform which doesn't support SIGTERM (basically Windows) it
makes sense to use the REST-API instead. That's likely better than just
terminating the process forcefully.
This doesn't cover the stop button within the launcher settings yet because
from this context is isn't clear which connection is relevant as there can
be multiple tray icons/widgets but only one settings page.
* Use a process group / job object via Boost.Process to be able to
terminate sub processes as well
* Do not try to stop the process gracefully under Windows by posting
WM_CLOSE because this has no effect on Syncthing anyways
* See https://github.com/Martchus/syncthingtray/issues/94
Before this change syncthingwidgets unconditionally included the header
from libsyncthing so it couldn't be used as stand-alone library if
libsyncthing was disabled.
So far the backend libraries' include paths were relative within this
repository. This means the header files could not be used at their
installed location.
This change replaces them with "<>" includes to fix that problem and adds
a new include directory so building everything at once still works.
With this change it should be easier to actually split some parts into
another repository if this one would become too big.
* Pass program and arguments directly
* Prevent failure on white space in executable path
* Use own parser for arguments
* Make libsyncthing accessible from launcher
Add new SyncthingLauncher class which lauches Syncthing
under the hood via external SyncthingProcess or using
libsyncthing.
Note: Launching via libsyncthing is still experimental.