Определение параметров текущей ОС во время выполнения
This commit is contained in:
23
examples/core/02_current-system/current_system.cpp
Normal file
23
examples/core/02_current-system/current_system.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include <myx/core/config.hpp>
|
||||
#include <myx/core/current_system.hpp>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
//NOLINTNEXTLINE
|
||||
#define CMLIB_PROJECT_NAME "myxlib"
|
||||
|
||||
namespace MC = myx::core;
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
MC::CurrentSystem& currentSystem = MC::CurrentSystem::instance();
|
||||
qDebug() << "Current OS: " << QString::fromStdString( currentSystem.os() );
|
||||
qDebug() << "OS distrib: " << QString::fromStdString( currentSystem.distribution() );
|
||||
qDebug() << "OS variant: " << QString::fromStdString( currentSystem.variant() );
|
||||
qDebug() << "OS version: " << QString::fromStdString( currentSystem.version() );
|
||||
|
||||
return( 0 );
|
||||
} // main
|
Reference in New Issue
Block a user