LibOS is a modern C++17 library that makes OS-specific features cross-platform.
Ever tried to get Windows version after Windows 8? Or to send keystrokes on all most popular platforms? Then you must understand what a pain it is. Those wondering "What the hell is an X server and do I have it???" welcome to use our library!
- OS and Kernel Info
- Keyboard Input
Documentation can be found here. Work in progress.
If you use keyboard features on Linux, you need to install libxtst-dev
:
sudo apt-get install libxtst-dev
P.S: most likely it's already installed
There are 2 ways to install the library for your convenience:
- CMake (prefered)
- Header-only
-
Download sources
git clone https://github.com/gavrilikhin-d/libos
-
Make
build
directory in repo's root foldermkdir build cd build
-
Configure CMake
With GUI:ccmake ..
Without GUI:
cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
-
Build
cmake --build .
-
Install
sudo cmake --install .
Just #include
files from os/header-only
as needed.
NOTE: Compile with
-std=c++17
or greater.
NOTE: When compiling on Linux, link
-lX11 -lXtst
if you are usingos/header-only/keyboard.hpp
.
Please fork this repository and contribute back using pull requests. Features can be requested using issues. All code, comments, and critiques are greatly appreciated.