Wiki

Clone wiki

lrc / Home

Welcome to lrc

Welcome to lrc, the Linux Resource Compiler.

Current version

The current version is 1.2. Grab it here

What is lrc for?

Whenever a computer program, a game or an application, needs additional data like graphics, icons or music and sounds, there are two possibilities to provide these data to the program during execution:

  1. You have a lot of small(ish) files that get loaded when needed. The data is in the correct format: you can use them directly.
  2. You have a few big(ger) files that contain the needed data. But you have to collect these data before execution time and extract them when needed

For latter case lrc was developed. It provides a simple way to collect data using a "compiler" and also a simple way to extract them with a small library which provides classes for extraction

The Linux Resource Compiler consists of two parts: the actual compiler, called lrc, and a library which can be used to extract the resources from the compiled file, called liblrc

Getting lrc

You can get lrc as a tarball from the BitBucket download page or you can clone the complete source using the following command

$ hg clone https://bitbucket.org/StarFire/lrc

Installing lrc

How to install lrc depends on the way, you got the source

Tarball

Simply use the three common Unix commands:

./configure
make
make install

Cloned source

There is only one command more than from the tarball:

./bootstrap
./configure
make
make install

./configure options

There are several options for the ./configure script:

  • --enable-debug enables a lot of debugging messages in both lrc and liblrc
  • --disable-encryption compiles the compiler and the library without encryption. Trying to compile a resource which requires encryption results in a compiler error
  • --disable-gui does not compile the lrcResourceEditor. (Discontinued. See README file in the gui\ directory for more information) Note: It does not compile neither if the required dependencies are not found

Prerequisites

lrc needs the follwing programs or libraries on the system:

  • gcc in version 4.6 (or later), because it uses some features from the new C++11 standard
  • zlib for the zlib compression (it is also needed, if the zLib compression is not used, because it is compiled unconditionally)
  • bzip2 is used also for compression
  • The ShowImage and ShowEmbeddedImage example programs need SDL and SDL_image. If one or both of these libraries are not installed, the example programs won't be built
  • For the lrcResourceEditor (Discontinued. See README file in the gui/ directory for more information) (optional; if the dependencies are not met the program just won't get compiled) the following additional packages are needed:
    • glibmm-2.4 in version 2.32.0 or higher
    • gtkmm-2.4 in version 2.24.2 or higher
    • libglademm-2.4 in version 2.6.7 or higher

Code documentation

If Doxygen is installed on the system, a HTML code documentation will be created in the doc/ directory.

Documentation

The documentation is separated in two parts

Mailinglists

There are two mailinglists for lrc:

  • lrc is the list if you have problems how to use it, or if you have found a bug. This list is also used for announcements.
  • lrc-dev is the list for ongoing development. If you have a suggestion or a patch, this is the right place.

Roadmap

I have created a small roadmap to show what I like to add to lrc in the future

Updated