Skip to content

Motahare-rfm/QtService

 
 

Repository files navigation

QtService for Qt5 and Qt6

To make your Qt5 or Qt6 software as Windows service or Linux and Mac OSX daemon. It replaces the qtservice package available at https://github.com/qtproject/qt-solutions/tree/master/qtservice

Features

  • Cross platform example on how to make a Windows service, Linux and Mac OSX daemon.
  • Compatible with Qt5 and Qt6.
  • All the required scripts for Windows, Linux and and Mac OSX to create, remove, start and stop the service.
  • The example can be run in a Windows, Linux and Mac OSX console to test.

How to use it

Fill the QCMainClass.cpp and QCMainClass.h with your code, that is all.

Script4Linux folder scripts

The folder contains the following files:

File Description
InstallAsService.sh Install the service
QtServiceTest.service The service file
RemoveAsService.sh Remove the service
ServiceAsConsole.sh Start the example in a console with keyboard support. Press 'q' to stop.
ServiceRestart.sh Restart the service
ServiceStart.sh Start the service
ServiceStop.sh Stop the service

Script4MacOSX folder scripts

The folder contains the following files:

File Description
InstallAsService.sh Install the service
QtServiceTest.plist The service file
RemoveAsService.sh Remove the service
ServiceAsConsole.sh Start the example in a console with keyboard support. Press 'q' to stop.
ServiceRestart.sh Restart the service
ServiceStart.sh Start the service
ServiceStop.sh Stop the service

Script4Windows folder scripts

The folder contains the following files:

File Description
InstallAsService.bat Install the service
RemoveAsService.bat Remove the service
ServiceAsConsole.bat Start the example in a console with keyboard support. Press 'q' to stop.
ServiceRestart.bat Restart the service
ServiceStart.bat Start the service
ServiceStop.bat Stop the service

License

LGPL

About

QtService is little framework to create Windows services and Linux daemons using Qt5 and Qt6

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 80.1%
  • Shell 9.1%
  • QMake 5.7%
  • Batchfile 5.1%