Compile Hoib on Linux


First, you need all this stuff:


To compile Hoib, run the following command in the Hoib source directory:
./configure && make
You can type
./configure --help
to see a list of compilation options. After Hoib is compiled, run
make install
as root to install it.


Program should be in menu:
Applications -> Science -> Hoib
If you don't find it there, just type in console:

Known problems and fixes

wxWidgets version ... wx-config: not found

It might happend even if you had installed wxWidgets. You can have a different wx-config, for example I use wx-gtk2-unicode-config in that way:
./configure --with-wx-config=wx-gtk2-unicode-config

Font size

Default value of font in Hoib is 10 points, you can change it in hoib file configuration - hoib.conf. After first run the program this file should be generated in your main directory inside .hoib folder. To change font for example on 12 just add/edit this line:
Important: If you set too big font size than lines in lesson window will are wrapped.

How help?

Yes I need help. I say it in other words: you really should help :) There are many things to make Hoib better.
If your national language is not supported right now by Hoib, you can change it. Just help translate interface or introduction. If you know good and free texts you can add them into Hoib texts. And finally, you can write course for your national language.

Translate interface

If you would like help Hoib project, you can translate interface or introduction text.
Hoib use gettext tool for internationalize, so translate interface into another language is very simple. All you need is poedit. If you got it, now you need file with texts to translate. Enter po directory it is in hoib source directory.Then type:
make hoib.pot
This command should generate hoib.pot file, needed by poedit. More instructions, how to translate, you can find on a main page poedit.
A bit complicated is translate introduction text. First, you have to create needed language directory and all files in it (see Hoib file structure for more information). After that just copy this file:
into new directory intro. And that is it. Now you can translate it.It is very simple html, because wxWidges "browser" don't support more complicated structures.

Hoib file structure

Each language has an own directory - language directory - where are stored files only for this language. All this directories you can find here:
Thay had a names like: en_GB, pl_PL. So, inside en_GB directory you find things for English language, inside pl_PL for Polish, etc. If you don't find you country directory, you can create it. The name of it you can find execute this command:
locale -a
Each language directory have to contain:
  • lessons - the directory, it contains all lessons,
  • texts - the directory, it contains all texts and
    • listtexts.txt - the file, it contains information about texts (authors, titles, lines, paths).
  • dict.txt - the file, dictionary (not bigger than 150KB). Words are used for exercises and games,
  • intro - the directory, it contains only one file index.html, which contains introduction,
You can switch to another language, for example:
export LC_ALL=pl_PL
It's only for this console session, after logout you return to default settings.

Add new course

If you want to make same course of text first, very important things is: you need text editor which support UTF-8. Don't mix char-coding in files, Hoib supports only UTF-8, but UTF-8 supports all alphabets.
It is quite easy to add new course. First, inside your language directory create the folder lessons. It contains lesson texts, descriptoin of each lessons. The most important file in this directory is lessons.txt. Example content of file:
Lesson 1 - letters: F, J, D, K
Lesson 2 - letters: A, S, L and char ;
Lesson 3 - letters: G, H
Do you see the pattern?
Each new lesson consists of 3 lines:
  • title of lesson
  • name of file with description of this lesson, just name not full path
  • name of file witch contains text of lesson, just name
Important thins:
  • Don't add empty lines into a file. Number of all lines should divide by three without remainder, if not - you made a mistake.
  • Title is used in course list of lessons and showed in title of lesson window, so it should be short and plain.
  • description file is just a plain text. It should contains information about new characters (expect revision text) and place of fingers on keyboard.
  • file lesson ... contains test of lesson. Hoib breaks lines if they are too long so you don't have to watch on it. Good idea is not create one-long-word-without-spaces-which-takes-all-line. Don't use tab in your text lesson, but you can break lines. Don't type space after another space.
  • remember which characters was used and be careful to not add not known letters.

Add new texts

It's quite easy. First you have to have a text :) Very important thing: it must be legal. Text must be under "free licence": Creative Commons, GNU GPL, etc. I think that good idea is add well-known texts, written by good writers, so don't send your texts (unless you are Terry Pratchett). If you got one, choose an interesting part contains 15-60 lines, and copy selected part into a txt file. The file just insert into texts directory. But, it's not the and. After that you have to add information about the new text into listtexts.txt (see Hoib file structure). This file has a simple structure, each next line means:
  • length of text - number - just information how many lines it contains. Important: check a file length by hoib: texts->my texts->add,
  • author - string,
  • title - string,
  • name of file with text - string - only name with extension, but not full path.
For example:
Bram Stoker
Information about all texts is sorted by length. And thats it.

Make words dictionary

The words dictionary dict.txt is stored in language directory (about Hoib file structure you can read here).