Alexander Orlovskyy – openSUSE Lizards https://lizards.opensuse.org Blogs and Ramblings of the openSUSE Members Fri, 06 Mar 2020 11:29:40 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.5 Trainee small project https://lizards.opensuse.org/2009/03/09/trainee-small-project/ https://lizards.opensuse.org/2009/03/09/trainee-small-project/#comments Mon, 09 Mar 2009 11:02:27 +0000 http://lizards.opensuse.org/?p=570 Hi all!

Well ,  beginning from this week i will start to work on one small project  (one week).

Probably it would be a YaST or QT application,  so if you had a really good idea,  give me simple  feedback. 😉

]]>
https://lizards.opensuse.org/2009/03/09/trainee-small-project/feed/ 2
Writing first YCP program https://lizards.opensuse.org/2009/02/13/writing-first-ycp-program/ https://lizards.opensuse.org/2009/02/13/writing-first-ycp-program/#comments Fri, 13 Feb 2009 10:18:26 +0000 http://lizards.opensuse.org/?p=424 Hi folks!

It was a long time since my last blog. 😉

Today, i will show you my first program, it`s a simple test program which shows basic functions of YCP

Let`s start!!

first of all, you need all core development YaST and QT packages

(All mentioned bottom steps, can be made with normal user )

second , you must create a  symlink to /usr/lib/YaST2/bin/y2base

$ ln -s <destination> <linkname>

(In my case name of symlink is y2base.)

third , you need two console`s , one for program writing and one for monitoring .y2log (where you can see all debug messages)

if you wish more detailed debug output during root session, than type in console following :

$ su

$ export Y2DEBUG=1

$ exit

(switching back to normal user)

Ok, lets see the code of PushButton.ycp !

{
// Build a dialog with one button and two labels.
// Wait until that button is clicked,
// then close the dialog and terminate.

UI::OpenDialog( `VBox(
`Label(`opt(`boldFont),”PushButton TEST!!!!!!!!”),
`PushButton( “&OK” ),
`Label(`opt(`boldFont),”JUST SIMPLE TEST”)
)
);

UI::UserInput();
UI::CloseDialog();
}

Than:

$ chmod 765 PushButton.ycp

After you have written the program  , type in the console:

$ ./y2base ./PushButton.ycp qt

You will get following window:

PushButton

What is amazing at YCP, that this code can be interpreted into ncurses

Try following command:

$ ./y2base ./PushButton.ycp ncurses

Result:

You have written only one code , which can be used in two different gui environments graphical and  text mode!

In my next blog i will write about creating own SCR Agent.

]]>
https://lizards.opensuse.org/2009/02/13/writing-first-ycp-program/feed/ 7
Learning YaST (YCP language) https://lizards.opensuse.org/2008/09/12/learning-yast-ycp-language/ https://lizards.opensuse.org/2008/09/12/learning-yast-ycp-language/#comments Fri, 12 Sep 2008 10:02:59 +0000 http://lizards.opensuse.org/?p=175 My name is Alexander i`m a trainee at SUSE.

In my blog i will write about my experience with learning YCP (YaST Control Language)

First of all, most important part of learning is to have a good manual.

Here you have some links to start:

YCP book ->must read! (up to date)

YCP Reference book

YCP User interface referece book

YaST Development in General

Later i add additional info …..

]]>
https://lizards.opensuse.org/2008/09/12/learning-yast-ycp-language/feed/ 1