screenoff is a really small command line tool to turn off the computer's screen.
Currently only Windows is supported.
Tested on Windows 7.
The program is cross-compiled via mingw-w64 on Mac OS X. It should also build with any C++ compiler on Windows, too (untested).
To cross-compile, follow these steps:
-
Adjust the paths in the toolchain file to point to the cross-compiler.
-
Create a temporary build directory (e.g.
build
) in the source file tree and change into it. -
Run cmake, e.g. via:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-x86_64-w64-mingw32.cmake
-
Run
make
or the according tool of your toolchain to compile the executable. -
Optional: Run
make package
to create a ZIP file for distribution.
Simply copy the executable screenoff.exe
from the ZIP file into any directory and run it either directly or via a shortcut.