Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (Not For Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (Not For Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd September 2012, 10:38 PM
ikamusume Offline
Registered User
 
Join Date: Sep 2012
Location: UK
Posts: 6
linuxfirefox
How to compile and install the USokoban game

How to compile and install USokoban on Fedora.



This is a guide at beginner level.

Important: You should always check what commands do (using man pages) and what the content of scripts are before running them. This is just a guide for other people who encounter similar problems as I had when getting this working.

Compilation

Download the sources and extract it into a folder such as ~/Downloads/usokoban, then download the media and extract it into a folder such as ~/Downloads/usokoban-bin.

You can also check the files are the same as the ones I got:

Code:
$ md5sum usokoban-0.0.13-src.tar.gz 
e445a851c0fa6100546cefc18073e2b8  usokoban-0.0.13-src.tar.gz
$ md5sum usokoban-0.0.13-i386.tar.gz 
67f1282a1851fd3495829542c374f3c4  usokoban-0.0.13-i386.tar.gz
You will need to install gcc (the C compiler) as well as the development packages for gtk+-2.0, libpcre and sqlite3. To do this:

Code:
sudo yum install gcc
Code:
sudo yum install gtk2-devel.x86_64 pcre-devel.x86_64 sqlite-devel.x86_64
(you can use yum search pcre-devel to see other versions, in case you are not using x86_64)

For the compiler to be able to find these libraries you need to use

Code:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib64/pkgconfig/
if you used a different version of the libraries than x86_64 you might need to add a different path to pkg-config. You can find out where pkg-config needs to look by opening Administration -> Add/Remove Software and search for the package you have installed, select it then open Selection -> get file list and look for things like pkgconfig/libpcre.pc in the files list. You can check you pkg-config is finding things using: pkg-config --exists libpcre && echo found

Now if you run the command from README.source:

Code:
gcc base.c settings.c sokoban.c sokoban2.c solver.c savitch.c solution.c -o usokoban `pkg-config --cflags --libs gtk+-2.0 libpcre sqlite3`
it will error like this:

Code:
/usr/bin/ld: /tmp/ccMkYGad.o: undefined reference to symbol 'g_thread_init'
/usr/bin/ld: note: 'g_thread_init' is defined in DSO /lib64/libgthread-2.0.so.0 so try adding it to the linker command line
/lib64/libgthread-2.0.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
to resolve the errors use this:

Code:
gcc base.c settings.c sokoban.c sokoban2.c solver.c savitch.c solution.c -o usokoban `pkg-config --cflags --libs gtk+-2.0 libpcre sqlite3` -lgthread-2.0 -lz
you should now have your own compiled binary of usokoban! Don't run it yet.

Installation

Now copy the binary over the one stuff in ~/Downloads/usokoban-bin:

Code:
cp ~/Downloads/usokoban/usokoban ~/Downloads/usokoban-bin
and cd into the usokoban-bin directory before running (remember to check the script to see what exactly it does - just copying files into the right places - before running it)

Code:
sudo sh install_usokoban.sh
Now usokoban will show up in the games list (at least it does in xfce) and you can play it now! It will save the solutions you find and level you are on too.

Customization

You can now save borgar to /usr/share/games/usokoban and then put skin.default=/usr/share/games/usokoban/borgar.png in ~/.usokoban You can also save some of the great classic levels at David W. Skinner's Sokoban page into that folder and open them next time you play usokoban.

Have fun!
Reply With Quote
Reply

Tags
compile, game, install, usokoban

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cant install Urban Terror 4.1 game :( FedoraSuperFan Gamers' Lounge 5 26th December 2007 11:12 PM
cant install Urban Terror 4.1 game :( FedoraSuperFan Using Fedora 1 26th December 2007 09:30 PM
Game Servers Install sngskunk Using Fedora 1 7th July 2005 07:23 PM
I/O Error (after trying to install a game using Cedega) zynthetic Using Fedora 0 11th April 2005 04:04 AM
newbie- How do I install a game Mbarter Using Fedora 1 17th March 2005 07:36 PM


Current GMT-time: 11:51 (Tuesday, 19-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat