Soluciones Web

Instalar Wine 32 y 64 bits en debian Wheezy

Wine básicamente es un emulador de windows para linux, con el cual podremos instalar distintos programas diseñados inicialmente para Windows (R).

Actualmente del repositorio se instala sólo la versión de 32 bits por lo que no es posible ejecutar programas para windows de 64bits.  Por lo que investigando un poco logré encontrar en varios sitios distintos, aunque principalmente en el sitio oficial de wine, como compilar y al final tener instalado wine de forma de poder ejecutar programas para windows tanto de 32bits como tambien de 64bits de la misma forma que hace windows que permite las 2 tecnologías a la vez.

En este tutorial pretendo juntar todo lo que fui haciendo hasta que finalmente me anduvo. Lo que procedemos a realizar es desinstalar el wine por si ya lo tenemos en nuestro sistema, y lo hacemos desde una consola con el siguiente comando:

$apt-get remove wine

luego de este proceso, necesitamos instalar las fuentes principales para la descarga de los repost para este software, para lo cual ejecutamos el siguiente comando:

$apt-get install git-core

habiendo realizado este proceso, continuamos con la descarga de las fuentes, con el siguiente comando:

$git clone git://source.winehq.org/git/wine.git ~/wine-git


(De: http://wiki.winehq.org/WineOn64bit#head-5dd049f4c05d95a80467aa965870ef41b7fa1988)

Install the build dependencies:

apt-get build-dep wine 
apt-get install libgstreamer-plugins-base0.10-dev libhal-dev liblcms2-dev libosmesa6-dev ocl-icd-opencl-dev

This is all you need to compile a 64-bit Wine (which is most likely not what you want). But to be able to also compile its 32-bit version you will also need to install the following 32-bit development packages:

apt-get install gcc-multilib libasound2-dev:i386 libgsm1-dev:i386 libjpeg8-dev:i386 liblcms2-dev:i386 libldap2-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libv4l-dev:i386 libx11-dev:i386 libxinerama-dev:i386 libxml2-dev:i386 zlib1g-dev:i386 

Furthermore, until the development packages for the following libraries are multiarch compatible you will also have to make do with installing the following 32-bit libraries:

apt-get install libcapi20-dev:i386 libcups2:i386 libdbus-1-3:i386 libfontconfig:i386 libfreetype6:i386 libglu1-mesa:i386 libgnutls26:i386 libgphoto2-2:i386 libncurses5:i386 libosmesa6:i386 libsane:i386 libxcomposite1:i386 libxcursor1:i386 libxi6:i386 libxrandr2:i386 libxslt1.1:i386 ocl-icd-libopencl1:i386 

And then manually creating the following symbolic links:

cd /usr/lib/i386-linux-gnu 
ln -s libcups.so.2 libcups.so
ln -s libexif.so.12 libexif.so
ln -s libfontconfig.so.1 libfontconfig.so
ln -s libfreetype.so.6 libfreetype.so
ln -s libGL.so.1 libGL.so
ln -s libGLU.so.1 libGLU.so
ln -s libgnutls.so.26 libgnutls.so
ln -s libgphoto2.so.2 libgphoto2.so
ln -s libgphoto2_port.so.0 libgphoto2_port.so
ln -s libOSMesa.so.6 libOSMesa.so
ln -s libsane.so.1 libsane.so
ln -s libtiff.so.4 libtiff.so
ln -s libXcomposite.so.1 libXcomposite.so
ln -s libXcursor.so.1 libXcursor.so
ln -s libXi.so.6 libXi.so
ln -s libXrandr.so.2 libXrandr.so
ln -s libXrender.so.1 libXrender.so
ln -s libxslt.so.1 libxslt.so
ln -s libXxf86vm.so.1 libXxf86vm.so
ln -s /lib/i386-linux-gnu/libdbus-1.so.3 libdbus-1.so
ln -s /lib/i386-linux-gnu/libpng12.so.0 libpng12.so
ln -s /lib/i386-linux-gnu/libtinfo.so.5 libtinfo.so
ln -s libpng12.so libpng.so
echo 'INPUT(libncurses.so.5 -ltinfo)' >libncurses.so

Getting GStreamer support is optional and a bit more complex yet. So you may want to skip this part. The difficulty is not only that the GStreamer’s development package does not support multiarch, but also that the 64-bit glibconfig.h header cannot be used to compile 32-bit code. Here are the steps to work around all these issues:

First install the non-development 32-bt package and create symbolic links as usual:

apt-get install libgstreamer-plugins-base0.10-0:i386 
cd /usr/lib/i386-linux-gnu
ln -s libgstapp-0.10.so.0 libgstapp-0.10.so
ln -s libgstbase-0.10.so.0 libgstbase-0.10.so
ln -s libgstreamer-0.10.so.0 libgstreamer-0.10.so
ln -s libgobject-2.0.so.0 libgobject-2.0.so
ln -s libgmodule-2.0.so.0 libgmodule-2.0.so
ln -s libgthread-2.0.so.0 libgthread-2.0.so
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 libglib-2.0.so

Then grab the glibconfig.h.diff patch and apply it as follows:

cd /usr/lib/x86_64-linux-gnu/glib-2.0/include 
patch </tmp/glibconfig.h.diff

Note: Adjust the /tmp/glibconfig.h.diff path to match where you saved the glibconfig.h.diff patch.

Finally Wine’s configure script will still be complaining about missing HAL support. That’s because libhal1:i386 conflicts with libhal1:amd64 so that one cannot install the needed 32-bit libraries anyway. Debian developpers also declared that this will not be fixed. However HAL is deprecated on Wheezy anyway so this should not matter much.  (**)


(De: http://wiki.winehq.org/Wine64)

Building a shared WoW64 setup (most likely what you want)

The next paragraph explains how to build completely separate 32- and 64-bit trees. A more useful setup is to build a shared Wow64 installation, which allows 32-bit programs to invoke 64-bit ones and the other way around.

This requires an out-of-tree build, with two separate build trees:

cd $HOME
mkdir wine64
cd wine64
../wine-git/configure --enable-win64 CC=/usr/local/gcc/bin/gcc
make > make.log 2>&1
cd ..
mkdir wine32
cd wine32
../wine-git/configure --with-wine64=../wine64
make > make.log 2>&1
#make install
#cd ../wine64
#make install

Note that arguments are –enable-win64 and –with-wine64, not –enable-wine64 and –with-win64.

Now you should run wine in the wine64 directory to have the Wow64 Features. Make sure you always compile wine64 first to have the tools needed for wine32. The order of installing is to first install wine32, then wine64. The 32-bit side of such a Wow64 build is in theory supposed to work identically to a stand-alone 32-bit build. Currently this is not quite the case, any help is welcome…

Building a shared WoW64 setup (realidad)

#cd $HOME
#mkdir wine64
#cd wine64
#../wine-git/configure --enable-win64

Despues de un rato y de muchos checking obtuve: configure: Finished. Do 'make' to compile Wine.

#make > make.log 2>&1
Demora un rato muy muy largo, (alrededor de 75 minutos) pero puedes ver que esta trabajando si abres el gestor de archivos en ~/wine64 y ves que el contenido va cambiando. Específicamente los archivos make.log y config.log van cambiando porque van guardando los datos de la compilación.
#cd ..
#mkdir wine32
#cd wine32
#../wine-git/configure --with-wine64=../wine64

Despues de un rato y de muchos checking obtuve: 
configure: libhal 32-bit development files not found, no legacy dynamic device support.  [ No importa, mira mas arriba donde están los (**) ]
configure: Finished. Do 'make' to compile Wine.


y vamos de nuevo con lo que sabemos que tardará un buen rato:
#make > make.log 2>&1
Demora un rato muy muy largo, (alrededor de 75 minutos) pero puedes ver que esta trabajando si abres el gestor de archivos en ~/wine64 y ves que el contenido va cambiando. Específicamente los archivos make.log y config.log van cambiando porque van guardando los datos de la compilación.
#cd ..

 

#sudo apt-get install fakeroot

#sudo apt-get install checkinstall (este se usa para instalar y hacer el paquete wine) #cd wine32 #sudo checkinstall --fstrans=no --pkgversion=1.0.32 ********************************************************************** Done. The new package has been installed and saved to /home/esteban/wine32/wine32_1.0.32-1_amd64.deb You can remove it from your system anytime using: dpkg -r wine32 ********************************************************************** #cd ../wine64/ #sudo checkinstall --fstrans=no --pkgversion=1.0.64 El wine64 tira un par de errores o warnings porque algunos de los archivos ya estan instalados del wine32. A este punto terminé con los dos paquetes .deb generados e instalados. Por lo que con cualquier problema puedo hacer un purge o uninstall de todos los wine e instalar directamente los paquetes generados. De hecho tuve un problema que dejó de funcionar y desinstalé todo y volvi a instalar primero el paquete wine32 y luego el wine64 y ya tengo funcionando aplicaciones windows de 64 y 32 bits

10 Comentarios en “Instalar Wine 32 y 64 bits en debian Wheezy

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *