Cvscedega

From ArchWiki

Jump to: navigation, search
i18n
English
简体中文

There are two methods of install cedega from CVS

Contents

Method One

  1. Download http://cvscedega.linux-gamers.net/WineCVS.sh and run it: sh WineCVS.sh
  2. Follow the instructions for installing cvscedega.
  3. When it is running make it is going to fail.
  4. To get rid of the errors you have to go into the folder where the script downloads the sources. In your home folder enter .WineCVS/sources/cvscedega/winex/tools/ In here you should find two folders named wrc and widl. In both of these you should find a file named ppl.l. In these files you have to remove the big comments at the top.
  5. Now run the WineCVS.sh script again. Now it should compile fine.

Method Two

For more information see the Cedega CVS HOWTO

The script above works really well but if you want to handle cvscedega with pacman, you can do that with the following PKGBUILD!

You can find the original here.

The following PKGBUILD is adapted from Legout's by DibbleTheWrecker - it cannot be installed along side the stock wine pkgs. Once you have built it once you can then just use makepkg -f to build a new one and it auto corrects the name.

# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
pkgname=cedega-cvs
pkgver=20050611
pkgrel=1
pkgdesc="Wine with enhanced direct X support for playing Windows games under Linux. This will checkout and package the latest CVS version."
arch=('i686')
url="http://www.transgaming.org"
license=('')
depends=('glut' 'fontconfig' 'freetype2' 'bison' 'flex' 'libjpeg' 'libpng' 'zlib')
provides=('wine')
conflicts=('cedega' 'wine')
makedepends=('cvs')
#install=cvscedega.install

cvsmod="winex"
cvsroot=":pserver:cvs:cvs@cvs.transgaming.org:/cvsroot"

build() {
  cd ${srcdir}

  touch ~/.cvspass
  cvs -d $cvsroot login
  msg "Connecting to $cvsmod.sourceforge.net CVS server...."
  cvs -z3 -d $cvsroot co $cvsmod

  msg "CVS checkout done or server timeout"
  msg "Starting make..."

  rm -r $cvsmod-build
  #mkdir ../$cvsmod-build
  cp -r $cvsmod $cvsmod-build

  cd $cvsmod-build/tools
  mv widl/ppl.l widl/ppl.l.new
  tail -n1388 widl/ppl.l.new > widl/ppl.l
  mv wrc/ppl.l wrc/ppl.l.new
  tail -n1388 wrc/ppl.l.new > wrc/ppl.l

  cd ..
  autoconf
  #../$cvsmod/configure --enable-pthreads --with-x --enable-opengl --prefix=/usr/lib/winex
  ./configure --enable-pthreads \
              --with-x --enable-opengl \
              --prefix=/usr --sysconfdir=/etc \
              --disable-debug --disable-trace --disable-sdltest

  make depend
  make || return 1
  make prefix=${pkgdir}/usr install

#'  cat << EOF > ${srcdir}/$cvsmod/$cvsmod
#!/bin/bash
#export WINEPREFIX="/opt/wine"
#/usr/bin/wine $@
#EOF
#  install -m755 -D $startdir/src/$cvsmod/$cvsmod $startdir/pkg/usr/bin/$cvsmod

  # Correct the pkgver in our PKGBUILD - this allows correct gensync operation
  # NOTE: pkgver variable must be declared with first 10 lines of PKGBUILD!
  cd $startdir
  old_pkgver=$pkgver
  pkgver=`date +%Y%m%d`
  sed -i "1,11 s|pkgver=$old_pkgver|pkgver=$pkgver|" ./PKGBUILD
}
# vim:syntax=sh

Compilation problems

If you have problems compiling preloader.c, modify by hand with your favorite text editor the following in miscemu/preloader.c:

Where it says:

static int is_in_preload_range( const ElfW(auxv_t) *av, int type )
{
    int i;

    while (av->a_type != type && av->a_type != AT_NULL) av++;
    if (av->a_type == type)
    {
        for (i = 0; preload_info[i].size; i++)
        {
            if ((char *)av->a_un.a_ptr >= (char *)preload_info[i].addr &&
                (char *)av->a_un.a_ptr < (char *)preload_info[i].addr + preload_info[i].size)
             return 1;
        }
    }
    return 0;
}

Replace it with:

static int is_in_preload_range( const ElfW(auxv_t) *av, int type )
{
    int i;

    while (av->a_type != type && av->a_type != AT_NULL) av++;
    if (av->a_type == type)
    {
        for (i = 0; preload_info[i].size; i++)
        {
            if ((char *)av->a_un.a_val >= (char *)preload_info[i].addr &&
                (char *)av->a_un.a_val < (char *)preload_info[i].addr  + preload_info[i].size)
             return 1;
        }
    }
    return 0;
}

This is due to a bug related to GCC 4 that was fixed on a newer wine version but not on winex cvs

Compilation problems #2

If you have problems compiling signal_i386.c, add to beginning of file:

#ifndef VIF_MASK /* some useful definitions for EFlags */
#define VIF_MASK    0x00080000 /* virtual interrupt flag */
#define VIP_MASK    0x00100000 /* virtual interrupt pending */
#endif

If you have problems compiling dosvm.c, add to beginning of file:

#ifndef IF_MASK
#define IF_MASK 0x00000200
#endif

#ifndef VIF_MASK
#define VIF_MASK 0x00080000
#endif
Personal tools