wine64 from Epel does not start win32 applications

Issues related to applications and software problems
User avatar
psposito
Posts: 16
Joined: 2014/12/27 22:27:25
Contact:

Re: wine64 from Epel does not start win32 applications

Post by psposito » 2018/10/09 13:01:02

This is a how to, for both 64 and 32 bits wine-staging on Centos 7....

Step 1)

Create and run install-wine-prerqs.sh...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/bash

echo "Install wine building tools..."

sudo yum install samba-winbind-clients -y
sudo yum groupinstall 'Development Tools' -y
sudo yum install libjpeg-turbo-devel libtiff-devel freetype-devel -y
sudo yum install glibc-devel.{i686,x86_64} libgcc.{i686,x86_64} libX11-devel.{i686,x86_64} freetype-devel.{i686,x86_64} gnutls-devel.{i686,x86_64} libxml2-devel.{i686,x86_64} libjpeg-turbo-devel.{i686,x86_64} libpng-devel.{i686,x86_64} libXrender-devel.{i686,x86_64} alsa-lib-devel.{i686,x86_64} glib2-devel.{i686,x86_64} libSM-devel.{i686,x86_64} -y

sudo yum install glibc-devel libstdc++-devel icoutils openal-soft-devel prelink gstreamer-plugins-base-devel gstreamer-devel ImageMagick-devel fontpackages-devel libv4l-devel gsm-devel giflib-devel libXxf86dga-devel mesa-libOSMesa-devel isdn4k-utils-devel libgphoto2-devel fontforge libusb-devel lcms2-devel audiofile-devel -y

sudo yum install openldap-devel libxslt-devel libXcursor-devel libXi-devel libXxf86vm-devel libXrandr-devel libXinerama-devel libXcomposite-devel mesa-libGLU-devel ocl-icd opencl-headers libpcap-devel dbus-devel ncurses-devel libsane-hpaio pulseaudio-libs-devel cups-devel libmpg123-devel fontconfig-devel sane-backends-devel.x86_64 -y

sudo yum install glibc-devel.i686 dbus-devel.i686 freetype-devel.i686 pulseaudio-libs-devel.i686 libX11-devel.i686 mesa-libGLU-devel.i686 libICE-devel.i686 libXext-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXxf86vm-devel.i686 libXrender-devel.i686 libXinerama-devel.i686 libXcomposite-devel.i686 libXrandr-devel.i686 mesa-libGL-devel.i686 mesa-libOSMesa-devel.i686 libxml2-devel.i686 libxslt-devel.i686 zlib-devel.i686 gnutls-devel.i686 ncurses-devel.i686 sane-backends-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 libexif-devel.i686 lcms2-devel.i686 gettext-devel.i686 isdn4k-utils-devel.i686 cups-devel.i686 fontconfig-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pkgconfig.i686 libtiff-devel.i686 unixODBC.i686 openldap-devel.i686 alsa-lib-devel.i686 audiofile-devel.i686 freeglut-devel.i686 giflib-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 libXmu-devel.i686 libXxf86dga-devel.i686 libieee1284-devel.i686 libpng-devel.i686 librsvg2-devel.i686 libstdc++-devel.i686 libusb-devel.i686 unixODBC-devel.i686 qt-devel.i686 libpcap-devel.i686 -y

sudo yum install gstreamer1-plugins-base-devel.{x86_64,i686} gstreamer1-devel.{x86_64,i686} systemd-devel.{x86_64,i686} -y
sudo yum install libXfixes-devel.{x86_64,i686} -y

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Download latest wine-patched staging from github https://github.com/wine-staging/wine-staging

Step 3) For both 64 bit and 32 bit architectures of wine, create and run a script install-wine.sh

Do not forget to check the tar files names and if needed, change them to the following script before running it...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#!/bin/bash

IAm="${0##*/}"

Pause () {
echo ""
read -n 1 -s -p "Press any key to continue..."
echo ""
}

RunCmd () {
echo "$1"
eval "$1"
}

if [ -z "$1" ]; then
echo ""
echo "Error: the first paramemter is missing"
echo " usage: ${IAm} tarball"
echo " where tarbal is a Wine Staging gz tar ball"
echo ""
echo " example: ${IAm} wine-patched-staging-1.9.15.tar.gz"
echo ""
echo " Notes: please do not use on beta versions"
echo " this only will work correctly on the 32 bit version"
echo ""
exit 1

elif [ -z "$(echo $1 | grep -i ".tar.gz")" ]; then
echo ""
echo "Error: the first paramemter is not a tar.gz tarball"
echo ""
exit 1

elif [ -z "$(echo $1 | grep -i -E "wine-patched-stagin")" ]; then
echo ""
echo "Error: the first paramemter is Wine Staging gz tarball"
echo ""
exit 1

elif [ ! -f $1 ]; then
echo ""
echo "Error: unable to locate tarball <$1>"
echo ""
exit 1

fi

# if [ -z "$(/usr/bin/whoami | grep root)" ]; then
# echo ""
# ErrorSound
# echo 'Dude! You must be root to do this.'
# echo "Try"
# echo " su root -c \"${IAm} $1\""
# echo 'Exiting. Bummer ...'
# echo ""
# Pause
# exit 1
# fi

NewRev="$(echo $1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1'})"
NewPath="$(echo $1 | awk -F ".tar.gz" '{print $1'})"

echo ""
echo "New Rev: $NewRev"
echo "New Path: $NewPath"

if [ -d $NewPath ]; then
echo ""
echo "Error: new directory already exists <$NewPath>"
echo ""
exit 1
fi

echo ""; echo ""
RunCmd "tar xzvf $1 " # > /dev/nul
RunCmd "cd $NewPath"
RunCmd "mkdir -p wine32 wine64"
RunCmd "cd wine64"
RunCmd "../configure --enable-win64"
RunCmd "make depend;"
RunCmd "make -J($nproc)"
RunCmd "cd ../wine32"
RunCmd "PKG_CONFIG_PATH=/usr/lib/pkgconfig ../configure --with-wine64=../wine64"
#RunCmd "./configure --disable-win64"
RunCmd "make depend;"
RunCmd "make -J($nproc)"
RunCmd "sudo make install"
RunCmd "cd ../wine64"
RunCmd "make install"
RunCmd "cd ../../"
# RunCmd "rm -rf $NewPath"
# echo ""
RunCmd "/usr/bin/wine --version"
RunCmd "/usr/bin/wine64cd .. --version"
echo ""

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Step 4) Depending on which version you need, for 32 bits Wine, you have to add to your .bash_profile :

export WINEARCH=win32

Post Reply

Return to “CentOS 7 - Software Support”