[Jeu] Slash’Em

[Jeu] Slash’Em.

1) Répertoire de travail :

[~] ➔ mkdir -p JEUX/SLASH
[~] ➔ cd JEUX/SLASH/
[~/JEUX/SLASH] ➔ 

2) Téléchargement du code source :

[~/JEUX/SLASH] ➔ wget http://sourceforge.net/projects/slashem/files/slashem-source/0.0.7E7F3/se007e7f3.tar.gz

3) Décompression de l’archive:

[~/JEUX/SLASH] ➔ tar xvfz se007e7f3.tar.gz

4) Configuration :

[~/JEUX/SLASH] ➔ cd slashem-0.0.7E7F3/sys/unix/
[~/JEUX/SLASH/slashem-0.0.7E7F3/sys/unix] ➔ sh ./setup.sh

5) Modification des fichiers de configuration :

Ouvrir :

src/Makefile

Chercher :

SHELL=/bin/sh

Remplacer par :

SHELL=/bin/bash

Chercher :

# CFLAGS = -O2 -fomit-frame-pointer -I../include
# LFLAGS = -L/usr/X11R6/lib

Remplacer par :

CFLAGS = -O2 -fomit-frame-pointer -I../include
LFLAGS = -L/usr/lib -lm

Chercher :

CFLAGS = -O -I../include
LFLAGS =

Remplacer par :

#CFLAGS = -O -I../include
#LFLAGS =

Chercher :

WINGTKCONFIG=PKG_CONFIG_PATH=/usr/devel/lib/pkgconfig pkg-config gtk+-2.0

Remplacer par :

WINGTKCONFIG=PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config gtk+-2.0

Chercher :

WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)

Remplacer par :

#WINSRC = $(WINTTYSRC)
#WINOBJ = $(WINTTYOBJ)

Chercher :

# WINSRC = $(WINTTYSRC) $(WINGTKSRC) $(PROXYUTLSRC)
# WINOBJ = $(WINTTYOBJ) $(WINGTKOBJ) $(PROXYUTLOBJ)

Remplacer par :

WINSRC = $(WINTTYSRC) $(WINGTKSRC) $(PROXYUTLSRC)
WINOBJ = $(WINTTYOBJ) $(WINGTKOBJ) $(PROXYUTLOBJ)

Chercher :

# WINTTYLIB = -lncurses
WINTTYLIB = -ltermlib

Remplacer par :

WINTTYLIB = -lncurses
#WINTTYLIB = -ltermlib

Chercher :

WINLIB = $(WINTTYLIB)

Remplacer par :

#WINLIB = $(WINTTYLIB)

Chercher :

# WINLIB = $(WINTTYLIB) $(WINGTKLIB)

Remplacer par :

WINLIB = $(WINTTYLIB) $(WINGTKLIB)

Ouvrir :

include/config.h

Chercher :

/* #define GTK_GRAPHICS */

Remplacer par :

#define GTK_GRAPHICS

Chercher :

#ifndef WIZARD          /* allow for compile-time or Makefile changes */
# ifndef KR1ED
#  define WIZARD  "wizard" /* the person allowed to use the -D option */
# else
#  define WIZARD
#  define WIZARD_NAME "wizard"
# endif
#endif

Remplacer par :

#ifndef WIZARD          /* allow for compile-time or Makefile changes */
# ifndef KR1ED
#  define WIZARD  "pi" /* the person allowed to use the -D option */
# else
#  define WIZARD
#  define WIZARD_NAME "pi"
# endif
#endif

Chercher :

#ifdef UNIX
/* path and file name extension for compression program */
# define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
# define COMPRESS_EXTENSION ".Z"             /* compress's extension */

/* An example of one alternative you might want to use: */
/* # define COMPRESS "/usr/local/bin/gzip" */   /* FSF gzip compression */
/* # define COMPRESS_EXTENSION ".gz" */      /* normal gzip extension */

/* # define COMPRESS "/usr/bin/bzip2"   *//* bzip2 compression */
/* # define COMPRESS_EXTENSION ".bz2"   *//* bzip2 extension */
#endif

Remplacer par :

#ifdef UNIX
/* path and file name extension for compression program */
/*# define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */
/*# define COMPRESS_EXTENSION ".Z" */        /* compress's extension */

/* An example of one alternative you might want to use: */
/* # define COMPRESS "/usr/local/bin/gzip" */   /* FSF gzip compression */
/* # define COMPRESS_EXTENSION ".gz" */      /* normal gzip extension */

 # define COMPRESS "/usr/bin/bzip2"     /* bzip2 compression */
 # define COMPRESS_EXTENSION ".bz2"     /* bzip2 extension */
#endif

Chercher :

/* #define DLB */

Remplacer par :

#define DLB

Ouvrir :

include/unixconf.h 

Chercher :

#define SVR4            /* use in addition to SYSV for System V Release 4 */
                        /* including Solaris 2+ */
#define NETWORK         /* if running on a networked system */
                        /* e.g. Suns sharing a playground through NFS */
/* #define SUNOS4 */    /* SunOS 4.x */
/* #define LINUX */     /* Another Unix clone */

Remplacer par :

/* #define SVR4 */      /* use in addition to SYSV for System V Release 4 */
                        /* including Solaris 2+ */
/* #define NETWORK */           /* if running on a networked system */
                        /* e.g. Suns sharing a playground through NFS */
/* #define SUNOS4 */    /* SunOS 4.x */
#define LINUX   /* Another Unix clone */

Chercher :

/* #define TIMED_DELAY */       /* usleep() */

Remplacer par :

#define TIMED_DELAY     /* usleep() */

Chercher :

#define MAIL                    /* Deliver mail during the game */

Remplacer par :

/* #define MAIL */ 

Ouvrir :

Makefile

Chercher :

GAMEUID  = games
GAMEGRP  = bin

# Permissions - some places use setgid instead of setuid, for instance
# See also the option "SECURE" in include/config.h
GAMEPERM = 04755
FILEPERM = 0644
EXEPERM  = 0755
DIRPERM  = 0755
VARFILEPERM = 0644
VARDIRPERM  = 0755

Remplacer par :

GAMEUID  = root
GAMEGRP  = users

# Permissions - some places use setgid instead of setuid, for instance
# See also the option "SECURE" in include/config.h
GAMEPERM = 0755
FILEPERM = 0644
EXEPERM  = 0755
DIRPERM  = 0775
VARFILEPERM = 0664
VARDIRPERM  = 0775

Chercher :

# CNF_SHARE_DATND = $(CNF_SHARE_GTKND

Remplacer par :

CNF_SHARE_DATND = $(CNF_SHARE_GTKND)

Chercher :

CNF_SHARE_DATND =

Remplacer par :

#CNF_SHARE_DATND =

6) Compilation :

[~/JEUX/SLASH/slashem-0.0.7E7F3] ➔ make all

7) Installation :

[~/JEUX/SLASH/slashem-0.0.7E7F3] ➔ sudo make install
[~/JEUX/SLASH/slashem-0.0.7E7F3] ➔ cd

8) Fichier de configuration :

Ouvrir :

~/.slashemrc

Ajouter :

# ~/.slashemrc

OPTIONS=!autopickup
OPTIONS=name:Rob,catname:Miaow,dogname:Woof,horsename:Neigh
OPTIONS=color,hilite_pet,lit_corridor
OPTIONS=help,!news,mail,silent,time
OPTIONS=showexp,showscore,showweight

TILES=name:Small tiles,file:x11tiles
TILES=name:Big tiles,file:x11bigtiles,transparent
TILES=name:Big 3D tiles,file:x11big3dtiles,transparent,pseudo3D
OPTIONS=tiles:Big 3D tiles

Action :

export SLASHEMOPTIONS=~/.slashemrc

9) Lancement du jeu :

[~] ➔ slashem

10) Capture d’écran :

slashem
11) Lien :

http://www.basicallytech.com/blog/index.php?/archives/16-SlashEM-on-Linux-configure,-install,-setup-and-play.html