Compiling on the OLPC XO Laptop

From OHRRPGCE-Wiki
Jump to: navigation, search
Obsolete.png
This article (or part thereof) is obsolete. It may have made sense in the past, but it does not make sense now. It is kept here only for historic curiosity and/or posterity.

The OLPC XO laptop is capable of running the OHRRPGCE, but it is not currently easy to install.

From the Terminal[edit]

You will need to type Linux commands from the XO's Terminal activity.

Installing Libraries[edit]

Become root

su

Then use yum to install libraries

yum install glibc-devel libtermcap-devel ncurses-devel libX11-devel libXpm-devel libXrandr-devel libXrender-devel SDL_mixer-devel

Then type exit to stop being root

exit

Installing FreeBasic[edit]

The sugar interface does not provide any way (that I know of) for the terminal to access files saved to your journal from Firefox. Instead, download the FreeBasic installer using wget

First, make a folder to store the installer. I like dl' for downloads

mkdir dl
cd dl

Then use wget and the full URL of the file to download:

wget http://internap.dl.sourceforge.net/sourceforge/fbc/FreeBASIC-v0.18.2b-linux.tar.gz

After the file downloads, unpack it with the tar command

tar -zxvf FreeBASIC-v0.18.2b-linux.tar.gz

Now change into the newly unpacked directory

cd FreeBASIC

Now become root

su

And then run the FreeBasic installer.

./install.sh -i

Type exit to stop being root

exit

change back to your home directory

cd ~

Getting OHRRPGCE source code[edit]

First, install subversion.

become root

su

Use yum to install the subversion packages

yum install subversion

Type exit to stop being root

exit

Now make a directory to store your source code. I like src

mkdir src
cd src

Now check out the OHRRPGCE source code

svn co https://rpg.hamsterrepublic.com/source ohr

After the code is check out change into the wip directory

cd ~/src/ohr/wip

And run the scripts to compile with the SDL backends

./makegame.sh sdl sdl && ./makeedit.sh sdl sdl

To run game or custom, you can use these commands from the terminal

~/src/ohr/wip/ohrrpgce-game -f
~/src/ohr/wip/ohrrpgce-custom -f

The -f means fullscreen. Unfortunately fullscreen does not work on the XO hardware, but -f will make the OHRRPGCE window appear in the center of the screen, instead of the top-left corner.

Making it Faster[edit]

Thanks to TeeEmCee's recent performance work, the OHR runs aat an acceptable speed on XO hardware at -z 2

You can make the OHRRPGCE run faster by compiling it without -exx. Edit makegame.sh and makeedit.sh and remove -exx from the fbc command line. Without -exx the OHRRPGCE is playable fairly smoothly at -z 3 zoom level (although fades are still noticeably slow)

Packages[edit]

if I figure out how to construct easier-to-install packages for the XO, I will post them here.

See Also[edit]