cwh42 / libyui

libyui

Home Page:http://doc.opensuse.org/projects/libyui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LibYUI - The Base Library

Build Status Coverage Status

Libyui is a widget abstraction library providing Qt, GTK and ncurses frontends. Originally it was developed for YaST but it can be used in any independent project.

This part contains the base abstraction layer which is implemented in several target frontends.

Selecting the used UI-plugin

By default LibYUI tries to load any of the available UI-plugins in this order:

  • Qt:

    • if $DISPLAY is set
    • NCurses is user-selected and stdout is not a TTY
  • Gtk:

    • if $DISPLAY is set and Qt is not available,
    • a GTK-based desktop environment is detected from the environment variable XDG_CURRENT_DESKTOP
    • any of the above pre-conditions are met and NCurses is user-selected, but stdout is not a TTY
  • NCurses:

    • if $DISPLAY is not set and stdout is a TTY
    • Qt and Gtk are not available and stdout is a TTY

This can be overridden by either:

  • specifing one of the switches on the command-line of the program

    • --gtk,
    • --ncurses, or
    • --qt
  • setting the environment variable YUI_PREFERED_BACKEND to one of

    • gtk,
    • ncurses, or
    • qt

If a command-line switch is given to the program, the setting from the environment variable will be overridden by the UI-plugin chosen with the switch.

If the user-selected UI-plugin is not installed on the system, an installed UI-plugin will be chosen by the above criteria.

Building

Libyui uses CMake, driven by a slightly complex set of CMakefiles. For reproducible builds it is best to use the libyui-rake Ruby gem like the Jenkins CI jobs do.

It can be installed from rubygems.org using this command (Ruby needs to be installed in the system):

gem install libyui-rake

Then to build the package run:

rake osc:build

Versioning

Changing SONAME_MAJOR in VERSION.cmake currently means that you must also change so_version in libyui.spec and also in all other libyui-*.spec files in the other repositories. Yes, such a design is suboptimal.

This is because the program-libyui API is not distinct from the libyui-plugin API.

About

libyui

http://doc.opensuse.org/projects/libyui

License:GNU General Public License v3.0


Languages

Language:C++ 94.7%Language:CMake 3.8%Language:C 1.5%Language:Ruby 0.0%Language:Shell 0.0%Language:Dockerfile 0.0%