Skip to main content

Build Wine rpm with 32 bit application support

Wine is a software to allow running Windows applications in Linux, MAC etc. platforms. It is available for installation from package managers like yum (RHEL, CentOS) and apt (Ubuntu). You can find more details on how it works in Wine wiki . But the default Wine package available from package manager does not have support for 32 bit Windows applications. This was the case for me. In Redhat Enterprise Linux 7.3, the wine package did not contain support for 32 bit windows applications. So the only option was to build a separate rpm of wine which will include this support. All the steps are executed on a RHEL 7.3 VM (x86_64). Step 1 Download and run shell script which will make wine 64 and 32 support for RHEL: https://github.com/zma/usefulscripts/blob/master/script/install-wine-i686-centos7.sh It accepts a version no. as CLI parameter e.g. 2.0.3 The script installs wine in /usr/local/ directory by default. We can verify the files that are being copied for wine using "

Build Wine rpm with 32 bit application support

Wine is a software to allow running Windows applications in Linux, MAC etc. platforms. It is available for installation from package managers like yum (RHEL, CentOS) and apt (Ubuntu). You can find more details on how it works in Wine wiki.

But the default Wine package available from package manager does not have support for 32 bit Windows applications. This was the case for me. In Redhat Enterprise Linux 7.3, the wine package did not contain support for 32 bit windows applications. So the only option was to build a separate rpm of wine which will include this support.

All the steps are executed on a RHEL 7.3 VM (x86_64).

Step 1
Download and run shell script which will make wine 64 and 32 support for RHEL:
It accepts a version no. as CLI parameter e.g. 2.0.3


The script installs wine in /usr/local/ directory by default. We can verify the files that are being copied for wine using "cd /usr/src/wine-2.0.3/wine32/; make -n install" and  "cd /usr/src/wine-2.0.3/wine64/; make -n install"

Step 2
Additional steps for adding windows core fonts (optional):
yum install cabextract
chmod +x winetricks
sh winetricks corefonts

It downloads the fonts at ~/.wine/drive_c/windows/Fonts/

Step 3
Then do following steps to build rpm:


mkdir -p ~/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}

cat <~/.rpmmacros
%_topdir   %(echo $HOME)/rpmbuild
%_tmppath  %{_topdir}/tmp
EOF

cd ~/rpmbuild


Create tarball of wine-

mkdir -p wine-2.0.3/usr/
cd wine-2.0.3
cp -r /usr/local/ usr/

Then remove any unused directory that is not created by wine.

Copy ms-core font files -

cp -r ~/.wine/drive_c/windows/Fonts/ usr/local/share/wine/fonts/ms-core
cd ..
tar -zcvf wine-2.0.3.tar.gz wine-2.0.3/

Copy tar to rpmbuild/SOURCES directory created in above steps.

Create a spec (e.g. wine.spec) file in rpmbuild/SPECS directory with following content.

Then build the rpm using following command -
rpmbuild -ba rpmbuild/SPECS/wine.spec

Rpm will be generated in rpmbuild/RPMS/x86_64 directory. This rpm can be installed on other RHEL 7.3 x86_64 machines.

Step 4
Install x-window system for RHEL in destination machine:

yum install xorg-x11-xauth.x86_64

Step 5
To install the wine rpm do following (it will automatically resolve all dependency packages):

yum install wine-2.0.3-1.x86_64.rpm

Step 6
Start wine for the first time:
winecfg
(in the gui select Windows 7 and apply)
Then run windows applications line below -
wine /path/to/app.exe (for 32 bit binary)
wine64 /path/to/app64.exe (for 64 bit binary)

Comments

  1. Oh my goodness! an incredible article dude. Thank you Nevertheless I am experiencing situation with ur rss . Don’t know why Unable to subscribe to it. Is there anybody getting similar rss problem? Anybody who knows kindly respond. Thnkx
    ms sql server database

    ReplyDelete
  2. Wonderful site you have here but I was curious if you knew of any message boards that cover the same topics talked about here? I'd really love to be a part of group where I can get feedback from other knowledgeable people that share the same interest. If you have any suggestions, please let me know. Kudos!

    ReplyDelete
  3. Excellent article. Keep writing such kind of info on your blog. Im really impressed by your blog.
    Hey there, You have done a fantastic job. I'll certainly digg it and in my opinion suggest to my friends. I am confident they will be benefited from this website.

    ReplyDelete
  4. Enjoyed reading the article above , really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles.

    무료야설

    ReplyDelete
  5. This is really interesting, You’re a very skilled blogger.

    타이마사지

    ReplyDelete
  6. I’ve joined your rss feed and look forward to seeking more of your wonderful post. Also, I’ve shared your website in my social networks!

    출장마사지

    ReplyDelete
  7. It ensures seamless integration with diverse systems of city. This process, though intricate, is crucial for reaching a wider user base. A Compitition Create This blog is guideful. Windows types are running in linux.

    ReplyDelete

Post a Comment