Monday, June 24, 2013

installing wine on Ubuntu 64bit

chroot Method


ຕິດຕັ້ງ schroot ແລະ debootstrap packages:
sudo apt-get install schroot debootstrap 


ສ້າງ configuration file ສຳຫລັບ schroot:
sudo vim /etc/schroot/chroot.d/precise_i386.conf 


[precise_i386]
description=Ubuntu Precise
personality=linux32
directory=/srv/chroot/precise_i386
root-users=your_username
type=directory
users=your_username 
 
ສ້າງ directory & download  

sudo mkdir -p /srv/chroot/precise_i386
sudo debootstrap --variant=buildd --arch=i386 precise /srv/chroot/precise_i386 http://archive.ubuntu.com/ubuntu/ 


ໃຫ້ສາມາດ apt-get ໄດ້ໃນ chroot:
sudo cp /etc/apt/sources.list /srv/chroot/precise_i386/etc/apt/ 


Enter chroot:
schroot -c precise_i386 -u root 


Get the basic packages:
apt-get install ubuntu-minimal
apt-get install python-software-properties 


Install the build dependencies:
apt-get update
apt-get build-dep wine 


You might need to add the wine repository first if you get an error such as:
E: You must put some 'source' URIs in your sources.list 


To do so, simply run:
add-apt-repository ppa:ubuntu-wine/ppa
apt-get update 

Download the Wine source tree into your chroot:
apt-get install git
git clone git://source.winehq.org/git/wine 

Note that the default schroot rebinds the /home directory on the host system so that it appears in the chroot system. This means your home folder is basically shared.
Compile:
cd wine
./configure
make 

To be able to use Wine from outside the chroot, Wine's dependencies must be installed outside the chroot. The easiest way is to exit the chroot and install a prepackaged copy of Wine:
exit
sudo apt-get install wine 

You can now run Wine from outside the chroot:
exit
cd wine
./wine notepad 

No comments: