Showing posts with label wine. Show all posts
Showing posts with label wine. Show all posts

10 June 2013

444.Building Wine 1.6-rc1 on Debian Wheezy using a chroot

Here's a generic way of building wine which works for 1.6-rc1 (and 1.5.28 and everything in between except 1.5.30).

The build instructions are recycled from my 1.5-series instructions -- the 1.5 series is the development version and Wine 1.6 is the new stable release, and so Wine 1.5.31 and 1.6-rc1 should be pretty similar. As a release candidate (rc) 1.6-rc1 isn't meant for production work. For that, use Wine 1.4 which is the current stable series.


Here's a link to the release announcement: http://www.winehq.org/announce/1.6-rc1

See here for information about 3D acceleration using libGL/U with Wine: http://verahill.blogspot.com.au/2013/05/429-briefly-wine-libglliubglu-blender.html

Getting started:
If you set up a e.g. chroot to build 1.5.28 or  before or 1.5.31 (1.5.30 had a bug which needed patching), you don't need to set up a new chroot to build 1.6-rc1. In that case, skip the set-up step below and instead re-enter your existing chroot like this:
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32
su sandbox
cd ~/tmp

And skip to 'Building wine'.

Otherwise do this:
Setting up the Chroot
sudo apt-get install debootstrap
mkdir $HOME/tmp/architectures/wine32 -p
cd $HOME/tmp/architectures
sudo debootstrap --arch i386 wheezy $HOME/tmp/architectures/wine32 http://ftp.au.debian.org/debian/
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32

You're now in the chroot:
apt-get update
apt-get install locales sudo vim
echo 'export LC_ALL="C"'>>/etc/bash.bashrc
echo 'export LANG="C"'>>/etc/bash.bashrc
echo '127.0.0.1 localhost beryllium' >> /etc/hosts
source /etc/bash.bashrc
adduser sandbox
usermod -g sudo sandbox
echo 'Defaults !tty_tickets' >> /etc/sudoers
su sandbox
cd ~/

Replace 'beryllium' with the name your host system (it's just to suppress error messages)

Building Wine
While still in the chroot, continue (the i386 is ok; don't worry about it -- you don't actually need it):

sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libdbus-1-dev:i386 libgnutls-dev:i386 libncurses-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig-dev:i386 libgsm1-dev:i386 libtiff-dev:i386 libpng-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libhal-dev:i386 gettext:i386 prelink:i386 bzip2:i386 bison:i386 flex:i386 oss4-dev:i386 checkinstall:i386 ocl-icd-libopencl1:i386 opencl-headers:i386 libasound2-dev:i386 build-essential
mkdir ~/tmp
cd ~/tmp
wget http://prdownloads.sourceforge.net/wine/wine-1.6-rc1.tar.bz2

tar xvf wine-1.6-rc1.tar.bz2
cd wine-1.6-rc1/
./configure
time make -j3
sudo checkinstall --install=no
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: Preparing package documentation...OK Please write a description for the package. End your description with an empty line or EOF. >> wine 1.6-rc1 >> ***************************************** **** Debian package creation selected *** ***************************************** This package will be built according to these values: 0 - Maintainer: [ root@beryllium ] 1 - Summary: [ wine 1.6-rc1] 2 - Name: [ wine-1.6 ] 3 - Version: [ 1.6-rc1] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ i386 ] 8 - Source location: [ wine-1.6-rc1 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ wine-1.6 ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
Checkinstall takes a little while (In particular this step: 'Copying files to the temporary directory...').

Installing Wine

Exit the chroot
sandbox@beryllium:~/tmp/wine-1.6-rc1$ exit
exit
root@beryllium:/# exit
exit
me@beryllium:~/tmp/architectures$ 

On your host system
 Enable multiarch* and install ia32-libs, since you've built a proper 32 bit binary:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs

*At some point I think ia32-libs may be replaced by proper multiarch packages, but maybe not. So we're kind of doing both here.

 Copy the .deb package and install it
sudo cp wine32/home/sandbox/tmp/wine-1.6-rc1/wine_1.6-rc1-1_i386.deb .
sudo chown $USER wine_1.6-rc1-1_i386.deb
sudo dpkg -i wine_1.6-rc1-1_i386.deb

30 May 2013

433. Wine 1.5.31 on Debian

Here's a generic way of building wine which works for 1.5.31 (and 1.5.28 and everything in between except 1.5.31).




See here for information about 3D acceleration using libGL/U with Wine: http://verahill.blogspot.com.au/2013/05/429-briefly-wine-libglliubglu-blender.html

Getting started:
If you set up a e.g. chroot to build 1.5.28 before, you don't need to set up a new chroot to build 1.5.31. In that case, skip the set-up step below and instead re-enter your existing chroot like this:
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32
su sandbox
cd ~/tmp

Setting up the Chroot
sudo apt-get install debootstrap
mkdir $HOME/tmp/architectures/wine32 -p
cd $HOME/tmp/architectures
sudo debootstrap --arch i386 wheezy $HOME/tmp/architectures/wine32 http://ftp.au.debian.org/debian/
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32

You're now in the chroot:
apt-get update
apt-get install locales sudo vim
echo 'export LC_ALL="C"'>>/etc/bash.bashrc
echo 'export LANG="C"'>>/etc/bash.bashrc
echo '127.0.0.1 localhost beryllium' >> /etc/hosts
source /etc/bash.bashrc
adduser sandbox
usermod -g sudo sandbox
echo 'Defaults !tty_tickets' >> /etc/sudoers
su sandbox
cd ~/

Replace 'beryllium' with the name your host system (it's just to suppress error messages)

Building Wine
While still in the chroot, continue (the i386 is ok; don't worry about it -- you don't actually need it):

sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libdbus-1-dev:i386 libgnutls-dev:i386 libncurses-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig-dev:i386 libgsm1-dev:i386 libtiff-dev:i386 libpng-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libhal-dev:i386 gettext:i386 prelink:i386 bzip2:i386 bison:i386 flex:i386 oss4-dev:i386 checkinstall:i386 ocl-icd-libopencl1:i386 opencl-headers:i386 libasound2-dev:i386 build-essential
mkdir ~/tmp
cd ~/tmp
wget http://prdownloads.sourceforge.net/wine/wine-1.5.31.tar.bz2
tar xvf wine-1.5.31.tar.bz2
cd wine-1.5.31/./configure
time make -j3
sudo checkinstall --install=no
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: Preparing package documentation...OK Please write a description for the package. End your description with an empty line or EOF. >> wine 1.5.31 >> ***************************************** **** Debian package creation selected *** ***************************************** This package will be built according to these values: 0 - Maintainer: [ root@beryllium ] 1 - Summary: [ wine 1.5.31] 2 - Name: [ wine ] 3 - Version: [ 1.5.31] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ i386 ] 8 - Source location: [ wine-1.5.31 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ wine ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
Checkinstall takes a little while (In particular this step: 'Copying files to the temporary directory...').

Installing Wine

Exit the chroot
sandbox@beryllium:~/tmp/wine-1.5.31$ exit
exit
root@beryllium:/# exit
exit
me@beryllium:~/tmp/architectures$ 

On your host system
 Enable multiarch* and install ia32-libs, since you've built a proper 32 bit binary:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs

*At some point I think ia32-libs may be replaced by proper multiarch packages, but maybe not. So we're kind of doing both here.

 Copy the .deb package and install it
sudo cp wine32/home/sandbox/tmp/wine-1.5.31/wine_1.5.31-1_i386.deb .
sudo chown $USER wine_1.5.31-1_i386.deb
sudo dpkg -i wine_1.5.31-1_i386.deb

Links to this post:
http://appdb.winehq.org/objectManager.php?sClass=version&iId=19141&iTestingId=79415&bShowAll=true

23 May 2013

429. Briefly: Wine, libGL/liubGLU, Blender and nvidia -- 3D acceleration under Wine

The short version:
sudo apt-get install libgl1-nvidia-glx:i386

The longer version:
I looked into the possibility of running Blender for 32 bit windows under wine due to a series of comments to a post: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html?showComment=1369252731918#c3560166574961895965

On this particular system I have a Geforce 430. It's running Debian Wheezy 64 bit, and has 32 bit wine 1.5.30 compiled as shown in this post: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html


False start
First I downloaded and installed Blender. Running it using
wine ~/.wine/drive_c/Program\ Files/Blender\ Foundation/Blender/blender.exe
led to
err:ole:CoGetClassObject class {24e669e1-e90f-4595-a012-b0fd3ccc5c5a} not registered err:ole:CoGetClassObject no class object {24e669e1-e90f-4595-a012-b0fd3ccc5c5a} could be created for context 0x1 err:module:load_builtin_dll failed to load .so lib for builtin L"GLU32.dll": libGL.so.1: cannot open shared object file: No such file or directory err:module:import_dll Loading library GLU32.dll (which is needed by L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe") failed (error c000007a). err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe" failed, status c0000135
Using locate I found something that sounded right-ish
sudo ln -s /usr/lib/i386-linux-gnu/libGLU.so.1 /lib32/libGLU.so.1

Tried again:
wine: Call from 0x7b83c562 to unimplemented function ntoskrnl.exe.IoAssignResources, aborting wine: Unimplemented function ntoskrnl.exe.IoAssignResources called at address 0x7b83c562 (thread 003c), starting debugger... err:module:load_builtin_dll failed to load .so lib for builtin L"GLU32.dll": libGL.so.1: cannot open shared object file: No such file or directory err:module:import_dll Loading library GLU32.dll (which is needed by L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe") failed (error c000007a). err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe" failed, status c0000135
And more
sudo ln -s /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2 /lib32/libGL.so.1

And tried again
wine: Call from 0x7b83c562 to unimplemented function ntoskrnl.exe.IoAssignResources, aborting wine: Unimplemented function ntoskrnl.exe.IoAssignResources called at address 0x7b83c562 (thread 003c), starting debugger... err:module:load_builtin_dll failed to load .so lib for builtin L"GLU32.dll": libGL.so.1: cannot open shared object file: No such file or directory err:module:import_dll Loading library GLU32.dll (which is needed by L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe") failed (error c000007a). err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe" failed, status c0000135
OK, so /lib32 isn't in the ld path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib32

And tried again.
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so err:winediag:X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly (using GL renderer "GeForce GT 430/PCIe/SSE2", version "1.4 (2.1.2 NVIDIA 304.88)"). Writing: /tmp/\blender.crash.txt
Fine. Back to the drawing board.

(Btw, libasound2-plugins:i386 would lead to broken packages re the libasound_module_pcm_pulse.so message.)

Solution:
aptitude show libgl1-nvidia-glx-ia32
Package: libgl1-nvidia-glx-ia32 New: yes [..] Replaces: nvidia-glx-ia32 (< 195.36.31), nvidia-glx-ia32 (< 195.36.31) Description: please switch to multiarch libgl1-nvidia-glx:i386

Half the time these things break when installing the i386 packages, but sure, let's try:
sudo apt-get install libgl1-nvidia-glx:i386
Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libgl1-nvidia-alternatives-ia32 Use 'apt-get autoremove' to remove it. Recommended packages: libxvmcnvidia1:i386 The following packages will be REMOVED: libgl1-nvidia-glx-ia32 The following NEW packages will be installed: libgl1-nvidia-glx:i386

Try again:
wine ~/.wine/drive_c/Program\ Files/Blender\ Foundation/Blender/blender.exe

It works!

Note that this means that you can run Facio 17.1.1 on Wine as well (it's an unofficial GUI for e.g. GAMESS US/WinGAMESS, Firefly, etc.)

16 May 2013

416. Compiling Wine 1.5.30 in a chroot (fixed)

Update 2, 22 May 2013: Thanks to the Anonymous poster who pointed out that wine 1.5.30 was broken! Anyway, I've updated this post with instructions how to patch the wine 1.5.30 sources so that it includes libwine in the final .deb package.

(I normally attached a screenshot of the winecfg about tab, but not this time -- had I done that I would've realised something was wrong. )

It's fixed now. Wine 1.5.30 is OK again.






Update 22 May 2013: libwine.so.1 doesn't get included in the deb package, which causes severely reduced functionality. I've confirmed that Wine 1.5.28 built as shown in http://verahill.blogspot.com.au/2013/04/387-compiling-wine-1528-in-i386-chroot.html works fine though.

I'll update here when I've figured out why the compiled libraries don't get included.

It's similar to what is mentioned in these bug reports:
https://bugs.archlinux.org/task/35189
https://bugs.archlinux.org/task/35190
https://bugs.archlinux.org/task/35191

There's a fix here: http://bugs.winehq.org/attachment.cgi?id=44422


Original post:
While it'd be absolutely fair to accuse me of recycling posts, I have a reasonably good reason for doing so: posting build instructions for the latest version -- even if identical to instructions for earlier versions -- confirms that it 'works'. Also, it shows that the instructions are current.

I'm too much of a hoarder to go back and update old posts.

Anyway, here's a generic way of building wine which works for 1.5.30 (and 1.5.28 and everything in between). And yes, I've copy/pasted from my old 1.5.28 post...

See here for information about 3D acceleration using libGL/U: http://verahill.blogspot.com.au/2013/05/429-briefly-wine-libglliubglu-blender.html

Getting started:
If you set up a chroot to build 1.5.28 before, you don't need to set up a new chroot to build 1.5.30. In that case, skip the set-up step below and instead re-enter your existing chroot like this:
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32
su sandbox
cd ~/tmp

Setting up the Chroot
sudo apt-get install debootstrap
mkdir $HOME/tmp/architectures/wine32 -p
cd $HOME/tmp/architectures
sudo debootstrap --arch i386 wheezy $HOME/tmp/architectures/wine32 http://ftp.au.debian.org/debian/
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32

You're now in the chroot:
apt-get update
apt-get install locales sudo vim
echo 'export LC_ALL="C"'>>/etc/bash.bashrc
echo 'export LANG="C"'>>/etc/bash.bashrc
echo '127.0.0.1 localhost beryllium' >> /etc/hosts
source /etc/bash.bashrc
adduser sandbox
usermod -g sudo sandbox
echo 'Defaults !tty_tickets' >> /etc/sudoers
su sandbox
cd ~/

Replace 'beryllium' with the name your host system (it's just to suppress error messages)

Building Wine
While still in the chroot, continue (the i386 is ok; don't worry about it -- you don't actually need it):

sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libdbus-1-dev:i386 libgnutls-dev:i386 libncurses-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig-dev:i386 libgsm1-dev:i386 libtiff-dev:i386 libpng-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libhal-dev:i386 gettext:i386 prelink:i386 bzip2:i386 bison:i386 flex:i386 oss4-dev:i386 checkinstall:i386 ocl-icd-libopencl1:i386 opencl-headers:i386 libasound2-dev:i386 build-essential
mkdir ~/tmp
cd ~/tmp
wget http://prdownloads.sourceforge.net/wine/wine-1.5.30.tar.bz2
tar xvf wine-1.5.30.tar.bz2
cd wine-1.5.30/
wget http://bugs.winehq.org/attachment.cgi?id=44422 -O diff.patch
patch -p1 < diff .patch
patching file configure patching file configure.ac patching file libs/wine/Makefile.in
./configure time make -j3 sudo checkinstall --install=no
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: Preparing package documentation...OK Please write a description for the package. End your description with an empty line or EOF. >> wine 1.5.30-2 >> ***************************************** **** Debian package creation selected *** ***************************************** This package will be built according to these values: 0 - Maintainer: [ root@beryllium ] 1 - Summary: [ wine 1.5.30-2 ] 2 - Name: [ wine ] 3 - Version: [ 1.5.30-2 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ i386 ] 8 - Source location: [ wine-1.5.30 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ wine ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
Compilation took ca 13 minutes with three threads. Checkinstall takes a little while (In particular this step: 'Copying files to the temporary directory...').

Installing Wine

Exit the chroot
sandbox@beryllium:~/tmp/wine-1.5.30$ exit
exit
root@beryllium:/# exit
exit
me@beryllium:~/tmp/architectures$ 

On your host system
 Enable multiarch* and install ia32-libs, since you've built a proper 32 bit binary:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs

*At some point I think ia32-libs may be replaced by proper multiarch packages, but maybe not. So we're kind of doing both here.

 Copy the .deb package and install it
sudo cp wine32/home/sandbox/tmp/wine-1.5.30/wine_1.5.30-1_i386.deb .
sudo chown $USER wine_1.5.30-1_i386.deb
sudo dpkg -i wine_1.5.30-1_i386.deb

15 April 2013

387. Compiling Wine 1.5.28 in a i386 chroot on Debian Wheezy amd64

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

UPDATE: for those who don't want to compile and are willing to take a minor risk* there are pre-built debs for mepis here: http://main.mepis-deb.org/mepiscr/testrepo/pool/test/w/wine/
They are provided by Steve Pusser, who is an active member at the debian forums.

* I presume, but don't actually know, that they are compatible with debian due to 1) Steve being active on the debian forums and 2) Mepis being based on debian stable (currently Squeeze)

Original post

New version of wine out now: 1.5.28.

Not much to get excited about from what I can tell, but wine now relies on GnuTLS instead of openssl.

Here's how to build it -- a lot of it is shamelessly recycled from earlier posts on this blog.

Getting started:
If you set up a chroot to build 1.5.27 before, you don't need to set up a new chroot to build 1.5.28. In that case, skip the set-up step below and instead re-enter your existing chroot like this:
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32
su sandbox

Setting up the Chroot
mkdir $HOME/tmp/architectures/wine32
cd $HOME/tmp/architectures
sudo debootstrap --arch i386 wheezy $HOME/tmp/architectures/wine32 http://ftp.au.debian.org/debian/
sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32

You're now in the chroot:
apt-get update
apt-get install locales sudo vim
echo 'export LC_ALL="C"'>>/etc/bash.bashrc
echo 'export LANG="C"'>>/etc/bash.bashrc
echo '127.0.0.1 localhost beryllium' >> /etc/hosts
source /etc/bash.bashrc
adduser sandbox
usermod -g sudo sandbox
echo 'Defaults !tty_tickets' >> /etc/sudoers
su sandbox
cd ~/

Building Wine
While still in the chroot, continue (the i386 is ok; don't worry about it -- you don't actually need it):

sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libdbus-1-dev:i386 libgnutls-dev:i386 libncurses-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig-dev:i386 libgsm1-dev:i386 libtiff-dev:i386 libpng-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libhal-dev:i386 gettext:i386 prelink:i386 bzip2:i386 bison:i386 flex:i386 oss4-dev:i386 checkinstall:i386 ocl-icd-libopencl1:i386 opencl-headers:i386 libasound2-dev:i386 build-essential
mkdir ~/tmp
cd ~/tmp
wget http://prdownloads.sourceforge.net/wine/wine-1.5.28.tar.bz2
tar xvf wine-1.5.28.tar.bz2
cd wine-1.5.28/
./configure
time make -j2
sudo checkinstall --install=no
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: Preparing package documentation...OK Please write a description for the package. End your description with an empty line or EOF. >> wine 1.5.28 >> ***************************************** **** Debian package creation selected *** ***************************************** This package will be built according to these values: 0 - Maintainer: [ root@beryllium ] 1 - Summary: [ wine 1.5.28 ] 2 - Name: [ wine ] 3 - Version: [ 1.5.28 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ i386 ] 8 - Source location: [ wine-1.5.28 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ wine ] 12 - Conflicts: [ ] 13 - Replaces: [ ]

Compilation took ca 19 minutes. Checkinstall takes a little while (In particular this step: 'Copying files to the temporary directory...').

Installing Wine
Exit the chroot
sandbox@beryllium:~/tmp/wine-1.5.28$ exit
exit
root@beryllium:/# exit
exit
me@beryllium:~/tmp/architectures$ 

On your host system
Enable multiarch and install ia32-libs, since you've built a proper 32 bit binary:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs

Copy the .deb package and install it
sudo cp wine32/home/sandbox/tmp/wine-1.5.28/wine_1.5.28-1_i386.deb .
sudo chown $USER wine_1.5.28-1_i386.deb
sudo dpkg -i wine_1.5.28-1_i386.deb

Links to this post:
http://forum.winehq.org/viewtopic.php?f=8&t=18924

05 April 2013

376. Wine 1.5.27 on Debian: i386 chroot

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

Note: Please, if you do have issues actually using the wine binaries built this way, post a comment -- everything is working fine on my systems but I'd like to know exactly what libraries you need to install on the target system to make Wine built in the chroot run to satisfaction.


Preamble: Building wine on Debian Wheezy amd 64 is a PITA at the moment, since some amd64 -dev packages are not co-installable with their i386 counterpart. Such an example is libfreetype6-dev:i386.


If I'm understanding this post correctly I may be confusing the idea behind multiarch vs cross-compiling:

"multiarch provides support for cross-compiling, but we don't have an amd64->i386 cross-compiler - only a biarch (multilib) compiler."

which I interpret to mean that while we generally can compile against 32 bit libs in wheezy using multiarch, it's not necessarily the way it is intended to work (I've never bother to check whether the binaries are 32 bit, or just linked against 32 bit libs). Instead, an alternative way to look at multiarch is that it supports the use of packages linked against 32 bit libs (and puts libraries in arch dependent locations), but not by necessity the compilation of 32 bit binaries (if it does, great). Or maybe I'm wrong. The bottom line is that we might have to accept compiling in a chroot, and then install the 32 bit libs on the target machine to support execution.
I've built wine using chroot in the past, but it was always with the intention of hammering out dependencies.


Getting started:

The Chroot
mkdir $HOME/tmp/architectures/wine32
cd $HOME/tmp/architectures
sudo debootstrap --arch i386 wheezy $HOME/tmp/architectures/wine32 http://ftp.au.debian.org/debian/

sudo mount -o bind /proc wine32/proc
sudo cp /etc/resolv.conf wine32/etc/resolv.conf
sudo chroot wine32

You're now in the chroot:
apt-get update
apt-get install locales sudo vim
echo 'export LC_ALL="C"'>>/etc/bash.bashrc
echo 'export LANG="C"'>>/etc/bash.bashrc
echo '127.0.0.1 localhost beryllium' >> /etc/hosts
source /etc/bash.bashrc
adduser sandbox
usermod -g sudo sandbox
echo 'Defaults !tty_tickets' >> /etc/sudoers
su sandbox
cd ~/

Building Wine
While still in the chroot, continue (the i386 is ok; don't worry about it):
sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libdbus-1-dev:i386 libgnutls-dev:i386 libncurses-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig-dev:i386 libgsm1-dev:i386 libtiff-dev:i386 libpng-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libhal-dev:i386 libcurl4-openssl-dev:i386 gettext:i386 prelink:i386 bzip2:i386 bison:i386 flex:i386 oss4-dev:i386 checkinstall:i386 ocl-icd-libopencl1:i386 opencl-headers:i386 libasound2-dev:i386 build-essential
mkdir ~/tmp
cd ~/tmp
wget http://prdownloads.sourceforge.net/wine/wine-1.5.27.tar.bz2
cd wine-1.5.27/
./configure
time make -j2
sudo checkinstall --install=no
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: Preparing package documentation...OK Please write a description for the package. End your description with an empty line or EOF. >> wine 1.5.27 >> ***************************************** **** Debian package creation selected *** ***************************************** This package will be built according to these values: 0 - Maintainer: [ root@beryllium ] 1 - Summary: [ wine 1.5.27 ] 2 - Name: [ wine ] 3 - Version: [ 1.5.27 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ i386 ] 8 - Source location: [ wine-1.5.27 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ wine ] 12 - Conflicts: [ ] 13 - Replaces: [ ]

Compilation took ca 20 minutes. Checkinstall takes a little while (In particular this step: 'Copying files to the temporary directory...').

Installing Wine
Exit the chroot
sandbox@beryllium:~/tmp/wine-1.5.27$ exit
exit
root@beryllium:/# exit
exit
me@beryllium:~/tmp/architectures$ 

On your host system
Enable multiarch and install ia32-libs, since you've built a proper 32 bit binary:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs

Copy the .deb package and install it
sudo cp wine32/home/sandbox/tmp/wine-1.5.27/wine_1.5.27-1_i386.deb .
sudo chown $USER wine_1.5.27-1_i386.deb
sudo dpkg -i wine_1.5.27-1_i386.deb

The tricky bit
The question is what 32 bit libs you need on the host system, if any.
ldd /usr/local/bin/wine
linux-gate.so.1 => (0x55573000) libwine.so.1 => /usr/local/bin/../lib/libwine.so.1 (0x55577000) libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0x556f5000) libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0x5570e000) libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0x55871000) /lib/ld-linux.so.2 (0x55555000)
So far everything is working fine with ia32-libs.

Links to this post:
http://forums.bistudio.com/showthread.php?149892-ARMA-III-on-Linux-servers-via-WINE%2Fpage4
http://forum.winehq.org/viewtopic.php?f=8&t=19010

11 March 2013

356. Installing Office 2003 under Wine on Arch Linux

I did this in wine 1.5.25. Office 2003 is a bit trickier in Arch than in debian (http://verahill.blogspot.com.au/2013/01/307-installing-office-2003-in-wine-on.html)


1. First enable multilib in /etc/pacman.conf
96 97 [multilib] 98 SigLevel = PackageRequired 99 Include = /etc/pacman.d/mirrorlist 100

2. Install wine
pacman -S wine winetricks wine_gecko
WINEARCH=win32 winecfg
winetricks msxml3

Follow the instructions (i.e. download the msi file and put it in the right location)

3. Install Office
loop-mount your iso (or put in the CD)

sudo mkdir -p /media/cdrom
sudo chmod u+rwx /media/cdrom
chmod og+rx /media/cdrom
sudo mount -o loop OFFICE11.iso /media/cdrom
msiexec \i /media/cdrom/pro11.msi

Don't choose advanced customisation or the install will eventually fail. You can run 'wine control' later and click on 'Add/Remove programs' but unfortunately I don't seem to be able to actually get MS equation editor to install that way either.

I was hoping that 1.5.25 would work with Equation editor, but it didn't: http://bugs.winehq.org/show_bug.cgi?id=32697

20 January 2013

323. Wine 1.5.22 on Debian Testing/Wheezy. Compiling using multiarch

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

Another update: It seems like your mileage in terms of how well Wine will work for you will vary using this method. It works fine for me and I suspect it's because I've built earlier Wine versions of my systems and have ia32-libs-dev installed. This package is no longer available in Testing. ia32-libs installs the libs you need, but does not provide symlinks between .so and .so.X files -- you can probably do that by hand if necessary though. It's not for beginners.

An additional thing to remember is that the 1.5 series of Wine is a development series -- 1.4 is the stable series which is meant for end users. Progress made in 1.5 will be included in 1.6.

NOTE: there are a couple of issues, and they will depend on how your system is set up.
* libosmesa6-dev:i386 will require mesa-common-dev:i386 which will remove libosmesa6-dev:amd64 and more, which is bad.
* libglu1-mesa-dev:i386 depends on libgl1-mesa-dev:i386 which will remove libgl1-mesa-dev:amd64 and more, which is bad.
*  libgstreamer-plugins-base0.10-dev:i386 depends on libgstreamer0.10-dev:i386 which depends on gir1.2-gstreamer-0.10:i386 which depends on gir1.2-freedesktop:i386 which depends on gir1.2-glib-2.0:i386 which depends on libgirepository-1.0-1:i386 which will remove a whole lot of packages (132 on one of my systems, including gnome, gdm3 etc.)

I'm working on figuring out what's triggering this on some systems but not others.
In the mean time see http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html to see how to build wine in a chroot, which is safe. You can then install that .deb package on your normal system and HOPEFULLY there won't be any broken dependencies. You won't need the -dev:i386 packages on the install target.

ldd `which wine` 
linux-gate.so.1 => (0x55573000) libwine.so.1 => /usr/local/lib/libwine.so.1 (0x55576000) libpthread.so.0 => /lib32/libpthread.so.0 (0x556ec000) libc.so.6 => /lib32/libc.so.6 (0x55705000) libdl.so.2 => /lib32/libdl.so.2 (0x55867000)
so you really don't seem to need much in the way of shared libs installed.

A new incremental version of wine is out.

There's little difference between building 1.5.21 and 1.5.22 but here it is anyway. The build is very easy on an up-to-date installation of Testing/Wheezy. If you are on stable, the list over needed packages can be found in this post.

See here for recent changes between different Wine versions: http://linux.softpedia.com/progChangelog/Wine-Changelog-148.html

Compiling
sudo dpkg --add-architecture i386
sudo apt-get update

sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libdbus-1-dev:i386 libgnutls-dev:i386 libncurses-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig-dev:i386 libgsm1-dev:i386 libtiff-dev:i386 libpng-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libhal-dev:i386 libcurl4-openssl-dev:i386 gettext prelink bzip2 bison flex oss4-dev checkinstall ocl-icd-libopencl1:i386 opencl-headers gcc-multilib

mkdir ~/tmp
cd ~/tmp
wget http://prdownloads.sourceforge.net/wine/wine-1.5.22.tar.bz2
tar xvf wine-1.5.22.tar.bz2
cd wine-1.5.22/
./configure
config.status: executing include/wine commands config.status: executing Makefile commands configure: Finished. Do 'make' to compile Wine.
time make -j4 sudo checkinstall --install=no
***************************************** **** Debian package creation selected *** ***************************************** This package will be built according to these values: 0 - Maintainer: [ root@lithium ] 1 - Summary: [ wine 1.5.22 ] 2 - Name: [ wine ] 3 - Version: [ 1.5.22 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ amd64 ] 8 - Source location: [ wine-1.5.22 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ wine ] 12 - Conflicts: [ ] 13 - Replaces: [ ] [..] Copying files to the temporary directory...
sudo dpkg -i wine_1.5.22-1_amd64.deb

where 4 is the number of cores on your build machine (see here and here for -jN). The build took 13 minutes on a three-core AMD Athlon II X3 445 (3.1 GHz) with -j4. The 'Copying files to...' can take quite a while, so let it run to completion.

Anyway, that's it. An easy build.

16 January 2013

320. Wsearch32 in Wine

Wsearch32 is a windows program that does what it's supposed to -- open mass spectrometer data files. Because our students use it quite a lot and to save me time in training them, here's how to install wsearch32 and how to get started with it. It runs almost perfectly in Wine.

One notable thing about Wsearch is that it opens HP Agilent Chemstation .D files without any problems. It's notable because different versions of HP Agilent Chemstation can't even open files written by other versions (yup, it's true...) of the same damned program.

Another obvious advantage of Wsearch is that it makes it very easy to export data, although it only exports one spectrum at a time (i.e. you can't get the full time-dependent data set).

WSearch was written by Frank Antolasic at the RMIT in Melbourne, Australia.


What doesn't work under Wine: It will freeze if you try to open several files at the same time. This does not happen on native Windows.




Installation
Download it from here: http://www.wsearch.com.au/
wget http://www.wsearch.com.au/wsearch32/wsearch32.zip
unzip wsearch32.zip
and follow the instructions:
There's nothing odd about the installation process

It works as well as under windows


Screenshots
This is the default view

Click on the import icon (the red one in the left corner), and select your file. There are plenty of supported formats.

This is the TIC view. Click anywhere on the TIC to get the corresponding spectrum

TIC and spectrum view.

Click on the M/I icon on the right to get a list of all the data in the spectrum plot..
You can then save the spectrum in a range of ascii based formats.


You can get the acquisition headers under Chromatogram/List header info. You can also make ion plots  in the same menu.
Wsearch also comes with a simple isotopic pattern calculator.

The Help works fine under linux/wine


This is the free version of wsearch -- there is some functionality missing.







09 January 2013

313. Which Office for linux users? Libreoffice, Openoffice, Lotus Symphony, Google Docs, Microsoft Live/Skydrive, Wine/Office2003 and Office2003 in Virtualbox, WPS Office

UPDATE 6 Apr 2013: I've added WPS Office

UPDATE 10 Feb 2013: I've tried Libreoffice 4.0 as well -- no improvement in terms of rendering vs Libreoffice 3.5.4 (below). The start-up times are greatly improved though.

UPDATE 4 Feb. 2013: Equation Editor in Office 2003 on Wine used to be supported -- however, while fixing the editor in office 2010 support for older office versions broke. This will (hopefully) be fixed in future versions and the codeweaver and wine devs are aware of the issue. Bug reports to that effect:
http://bugs.winehq.org/show_bug.cgi?id=32697 and http://www.codeweavers.com/support/tickets/browse/?ticket_id=931759

Most of my publications are via collaborations, and I'm more or less the only one who uses Linux. When I'm in charge, I use latex -- but you can be a zealot, or you can be a pragmatist. Life tends to be easier for the pragmatic. I draw the line at actually using a native installation of Windows though.

A few things are important: figures should render ok, endnote should render ok, I need to use track changes and I should be able to insert equations. Oh, and the templates from the major publishers (RSC, Wiley, ACS) should work.

So, once and for all (well, I should revise this for each major version I suppose) here's an evaluation of  where each solution on Linux falls short and where it does well.

I mocked up a simple article style doc file using Word 2003, Endnote X and Microsoft Equation Editor 3.0 and the Angewandte Chemie template, and then opened it in various alternative solutions.

I tried:

  • LibreOffice
  • OpenOffice
  • Lotus Symphony
  • Abiword
  • Google Docs/Drive
  • Microsoft Live/Skydrive


Here's what I found:

NOTE: when I say 'good' or 'bad' I mean how well they reproduce the look which is found in Word 2003. It's not a judgement on the quality of the word processor as such. I also recognise that for a developer it isnt much fun spending time working on reproducing someone else's crappy and poorly documented software, when you could be implementing new and wonderful things instead.

Outcome: all non-Word 2003 solutions at a minimum had the figure move slightly relative to the text. All solutions did the Endnote references ok, if not the location of them. Some solutions had issues with the greek letters in the equation. All non-MS solutions rendered the equation as an image which couldn't be edited.

See for yourself...


Office 2003/Virtualbox
This is the canonical version -- this is how it was created and how it should look.
Word 2003 in Virtualbox


Libreoffice 1:3.5.4+dfsg-4 
Looks fine, but
* The numbering for the equation (put it there using a tab stop) is too far left
* part of a paragraph now separates the figure from its caption -- the picture hasn't moved, but the first column on the first page seems to be one line shorter, which pushes the text of the previous paragraph past the figure.
* The last paragraph doesn't end on the first page, but in the first column of the second page..
* The second page also looks different, with the endnote bit moved to the second column.
LibreOffice


Openoffice 3.4.1-1
I grabbed the latest debs from http://www.openoffice.org/download/other.html#tested-full
On the second page the Endnote references are in the right place (c.f. Libreoffice).

* Greek letters in Equation replaced by squares (missing font?). (greek letters in text is ok)
* The numbering for the equation (put it there using a tab stop) is too far left
* part of a paragraph now separates the figure from its caption -- the picture hasn't moved, but the first column on the first page seems to be one line shorter, which pushes the text of the previous paragraph past the figure.
* The last paragraph doesn't end on the first page, but in the first column of the second page..


OpenOffice


Lotus Symphony 3.0.1
I downloaded the Lucid i386 deb and installed it in an Ubuntu Lucid virtual machine. Symphony is based on OpenOffice.

* Greek letters in Equation disappeared completely. (greek letters in text is ok)
* The numbering for the equation (put it there using a tab stop) is too far left
* part of a paragraph now separates the figure from its caption -- the picture hasn't moved, but the first column on the first page seems to be one line shorter, which pushes the text of the previous paragraph past the figure.
* The last paragraph doesn't end on the first page, but in the first column of the second page..
* The second page also looks different, with the endnote bit moved to the second column.


Lotus Symphony


Office 2003/Wine
See here for installation: http://verahill.blogspot.com.au/2013/01/307-installing-office-2003-in-wine-on.html
Everything looks fine with one pretty important exception:
* The equation is missing completely. Note that other people may have better luck installing Equation editor under wine -- I haven't managed to install it at all.
Word 2003 in Wine
Abiword
Plenty of issues:
* The author box has move to the top left corner.
* Can't find the table
* Greek letters missing in equation
* Greek letter in text missing
* Lots of stuff missing or misplaced (e.g. Keyword background picture)
Abiword


Google Docs
This was the big surprise -- I've always thought that google docs was essentially as 'good' as Microsoft Office. They have a financial incentive to be, after all. Turns out that the document was all but unrecognisable when opened in Google Docs. By far the worst solution. Note: the out-of-date warning is triggered by Chrome 18. Most similar to Abiword.
Google Docs

Microsoft Live 
Yes, that's right -- Microsoft Live works on Linux. This is the free version you get via Hotmail/Skydrive -- not their Office 365 or whatever they use now.
There are more surprises -- it doesn't render the document faithfully.

View:
* The numbering for the equation (put it there using a tab stop) is too far left. (like Libreoffice)
* part of a paragraph now separates the figure from its caption -- the picture hasn't moved, but the first column on the first page seems to be one line shorter, which pushes the text of the previous paragraph past the figure. (like Libreoffice)
* The last paragraph doesn't end on the first page, but in the first column of the second page. (like Libreoffice)
* The last paragraph doesn't end on the first page, but in the first column of the second page. (like Openoffice)
In other words -- Libreoffice/Openoffice do just as well as Microsoft Live


The interface for the View mode


full -- and no, you can't zoom in and out...


Editing:
In editing mode all it looks like a mess -- see figures.
In addition to the obvious formatting mess,
* greek letters in text show up as squares (problem with fonts on my computer or problems with live?)
* The equation cannot be edited.
However, once you go back to View mode the formatting is restored -- but it'd leave you flying blind while trying to make changes.

Editing mode


The full document -- yes, there's no Zoom...
WPS (Kingsoft)
I only discovered this by accident. Kingsoft (金山软件) is a legitimate Chinese company (Star Office was big in the 90s) and somehow there's a linux version (i386) of their Office suite: http://linux.wps.cn/. The bad news is that it's in Chinese, but that doesn't stop me from evaluating it -- it's such a close copy to Office 2007 that you can pretty much guess how to use it.

You can download it by clicking on this link: http://wdl.cache.ijinshan.com/wps/download/Linux/unstable/wps-office_8.1.0.3724~b1p2_i386.deb

It seems to be reproducing the file pretty well, with the exception of how it renders the equation and the missing stars in the author affiliation section. However, the location of the figure caption is correct, and the second page looks good.

And here's how it looks:




08 January 2013

309. Installing Office 2003 in Wine on Debian Testing

UPDATE 4 Feb 2013: Equation Editor under Office 2003 used to be support on Wine/Crossover. The devs are aware of it and looking into fixing the regression.


Bug reports to that effect:
http://bugs.winehq.org/show_bug.cgi?id=32697 and http://www.codeweavers.com/support/tickets/browse/?ticket_id=931759


UPDATE: I've since tried this using CrossOver 12 as well. The installation goes much more smoothly (the .exe file works fine), and you basically don't need to do anything except click 'Next' a couple of time. The Equation editor still doesn't work though. There's a free 15 day trial version of CrossOver available at http://www.codeweavers.com/products/. If running Office 2003 is your goal there seems to be little difference between CrossOver and Wine. However, I ended up buying a copy of crossover anyway since at this stage of my life and career it's not that much money and by supporting crossovre you indirectly support wine.

Since I would guess at the lack of Office for Linux as the single most problematic issue facing those wishing to switch from Windows or Mac to Linux, and since it would be something attempted very early on in someone's experience of Linux, it doesn't hurt to show the steps in detail -- especially since there are a few stumbling stones.

The linux community like to suggest new adopters to run Word under Wine, or better yet, to use libre/openoffice. It's an open secret that there are issues though. Most casual users won't notice most of the time,  but problems do exist.

In the particular case of Office 2003 under Wine, my main issue is that there's no way of installing Microsoft Equation Editor from what I can see, and it is a feature I do use when publishing together with other people (sweet, sweet TeX...). Another issue is that figures tend not to show up well or at all (complaints about memory -- most of our collaborative files are >5 Mb) when I use Word under Wine. These aren't issues when running in a virtual machine, which is the way I usually suffer through my bouts with Office.

An added head ache is this: http://wine.1045685.n5.nabble.com/Bug-26358-New-Office-2003-installer-crashes-immediately-td3414859.html and  http://bugs.winehq.org/attachment.cgi?id=35449. Using any of the versions of Wine above I just can't install using the setuppro.exe. This bug report ( http://bugs.winehq.org/show_bug.cgi?id=31942) showed me the simple solution though: using pro11.msi instead.

Anyway, just be aware of the limitations -- you can't install office, then do wine control, "add/remove programs", and add e.g. Microsoft Equation Editor. Likewise, if you try to be smart and do a custom install, and choose advanced customization, the installation will fail and complain about missing CAB files (in the case of equation editor: 01561403.cab). I've also tried installing MathType 4, which shows up under Objects, but is reported as missing when selected.

Otherwise this works fine.

Wine
To install the official wheezy version of wine:
sudp dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine wine-bin:i386 libwine-bin:i386 libwine:i386

You can also see the following posts on this blog for how to install/compile wine:
1.5.21 (using multiarch)
1.5.19 (using the dev.carbon-project.org rules)
1.5.5 (using the dev.carbon-project.org rules)
1.5.5 (downloading precompiled debs)

For this installation I've used Wine 1.5.19.

Installation
First set up cabextract and winetricks and install corefonts etc.
sudo apt-get install cabextract ttf-mscorefonts-installer
wget http://winetricks.org/winetricks
chmod +x winetricks
./winetricks corefonts fontfix

If you have Office 2003 as an OFFICE11.iso file (likely if you're at e.g. a university) then loop mount that file
In the directory where your iso file is:

sudo mkdir /media/OFFICE11
sudo mount -o loop OFFICE11 /media/OFFICE11
mount: warning: /media/OFFICE11/ seems to be mounted read-only.
wine msiexec /i /media/OFFICE11/pro11.msi

If you get any questions about Gecko or Mono, go ahead and let them install. Anyway, this launches the installation -- just do what you'd do under Windows, with the following caveats:

Important: You can't go back and install missing programs, so install all that you want from the beginning. Also, if you try to do advanced customisation and install Equation Editor (maybe other programs too) the installation will fail and complain about a missing CAB file. It hasn't always been so  apparently.


Running
Launch it as any other gnome or kde program, or from the terminal do
wine ~/.wine/drive_c/Program\ Files/Microsoft\ Office/OFFICE11/WINWORD.EXE

28 September 2012

248. Matt Monroe's Molecular Weight Calculator under Wine on Linux

I've downloaded the source code to Matt Monroe's molecular weight calculator in the past, and having replaced wsearch32 (+wine) with OpenChrom I figured I'd go online, download it and see what Mono can do for me. I had a vague recollection that the source code was only freely available online for a short while, and as it turns out I couldn't find it this time.

Anyway, not finding the source code I decided to update my Molecular Weight calculator from version 6.46 to 6.49 which (finally) allows you to set the charge of an ion WITHOUT having the mass of a H+ added for each charge. It's not difficult to compensate for, but it's always confusing to new students.

1. Install Wine and winetricks, add dlls
You can either install wine from the repos (old version)
sudo apt-get install wine-bin

Or you can download a newer, unstable version from dev.carbon-project.org:
http://verahill.blogspot.com.au/2012/01/debian-testingwheezy-64-bit-installing.html

Or you can compile your own:
http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html



The mono step was a right headache and would fail unless I nuked everything winetricks and wine knew about each other/

To get winetricks and set everything up:

sudo apt-get install cabextract
wget http://winetricks.org/winetricks
sudo mv winetricks /usr/local/bin/
sudo chmod +x /usr/local/bin/winetricks
wget http://downloads.sourceforge.net/project/wine/Wine%20Mono/0.0.4/wine-mono-0.0.4.msi
wine msiexec /i wine-mono-0.0.4.msi
You're now asked whether to download and install mono...sigh...more often that not this has failed in the past.
winetricks vcrun6sp6
Download the file from the browser window that just opened
cd ~/.cache/winetricks/vcrun6sp6 
mv ~/Downloads/Vs6sp6.exe .
winetricks vcrun6sp6
winetricks corefonts
winetricks riched30
wine uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}'
winetricks dotnet20
cd ~/.cache/winetricks/dotnet20/
mv ~/Downloads/dotnetfx.exe .
winetricks dotnet20
Ignore this error. Installation will take a while after that. Have patience. Like 10 minutes kind of patience.
And finally:
winetricks wsh57


2. Download the molecular weight calculator and install
If you go to http://www.alchemistmatt.com/mwtwin.html
you get redirected to here: http://omics.pnl.gov/software/MWCalculator.php


cd ~/tmp
mkdir molw
cd molw/
wget http://omics.pnl.gov/installers/MolecularWeightCalculator_Installer.zip
wget http://omics.pnl.gov/installers/MwtWinDll_SourceAndSupportingDLLs.zip
ls *.zip|xargs -I {} unzip {}
unzip MwtWinDll_Source_v3.4.4518.zip

You'll get some warning about Revisionhistory.txt etc. being overwritten. That's fine.

Launch the install with
wine msiexec /i MolecularWeightCalculator.msi




If you try to launch the mol weight calculator at this point you'll get an error about a missing MwtWinDLL.dll:

So sort that out:

cd ~/tmp/molw/bin
regsvr32 MwtWinDll.dll
Successfully registered DLL MwtWinDll.dll
[If I tried to copy the dll to the wine structure first and register that copy I got:
DllRegisterServer not implemented in DLL C:\windows\system\MwtWinDll.dll]
If it seems weird to install wine-mono and then remove it as is done above, it's to get around a bug which causes dotnet20 installation to fail/


Anyway, you're pretty much done:
 wine ~/.wine/drive_c/Program\ Files/Molecular\ Weight\ Calculator/mwtwin.exe

Yay!






Comment:
Getting there was a bit of a trek, passing though a whole lot of different sets of dlls:
winetricks msflxgrd
winetricks vcrun2005
winetricks vb6run
winetricks mdac28
winetricks comctl32ocx
winetricks comctl32

The solution above should suffice though.

I even ended up installing mol weight calc on a windows box and using dependency walker, but not even that sorted it out -- googling for scrrun did it in the end.

In particular this last error was bloody annoying:
"Object doesn't support this action." What, saving?

"Error saving default options file. Use the /X switch at the command line to prevent this error."
But it was solved by doing winetricks wsh57