Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
/ libos Public archive

Cross-platform OS features in C++

License

Notifications You must be signed in to change notification settings

gavrilikhin-d/libos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibOS

Linux macOS Windows Documentation License

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!

Features

  • OS and Kernel Info
  • Keyboard Input

Documentation

Documentation can be found here. Work in progress.

Dependencies

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

Getting started

There are 2 ways to install the library for your convenience:

  • CMake (prefered)
  • Header-only

CMake

  1. Download sources

    git clone https://github.com/gavrilikhin-d/libos
    
  2. Make build directory in repo's root folder

    mkdir build
    cd build
    
  3. Configure CMake
    With GUI:

    ccmake ..
    

    Without GUI:

    cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
    
  4. Build

    cmake --build .
    
  5. Install

    sudo cmake --install .
    

Header-only

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 using os/header-only/keyboard.hpp.

Contributing

Please fork this repository and contribute back using pull requests. Features can be requested using issues. All code, comments, and critiques are greatly appreciated.