How to install Wine from Offical Repos Using "pkg"

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

How to install Wine from Offical Repos Using "pkg"

#1 Post by s243a »

Intro

You can install either 32bit wine, 64bit wine or both. Many windows applications are 32bit in which case you will need the 32bit version of wine. The easiest way to do this on puppy will be within a 32bit system. However, for 64bit systems you may find on this form (or in the package repo) versions built for 64bit system, that can also run 32bit versions of wine if you either install the necessary 32bit libs or load an sfs that contains these libs (e.g. 32bit_compatibility_libs_tahr64.sfs -- see post). The sfs approach to getting the 32bit libs is safer because if you try to install the 32bit libs onto your system there could be name conflicts with the 64 bit libs.

Rather than worrying about such name conflicts one could just install the 32bit wine in a 32bit puppy.

How to Install Wine using "pkg", an example tested in Bionic32-light (19.03+2) - 27 April, 2019

Download (or clone), the following branch of pkg: "add-keep-epoch-env_var_no_global_rtn&fix_issue_74&81"
(part of merge request #22)

If you downloaded an archive (e.g. Pkg-add-keep-epoch-env_var_no_global_rtn&fix_issue_74&81.tar.gz)

then extract it and run the install script that was extracted from the archive.

**Note: you should do the command "uname -a" first and if you see "x86_64" then it means that you are using a 64 bit kernal, either because the puppy has a 64bit kernal or it is running a chroot with a 64bit host. If you have a 32bit puppy running with a 64bit kernal you need to apply the following fix, "Issue #97. wrong arch in ppa2pup_gawk when run as 32bit chroot system in a 64bit host". I'll create an update soon that has this fix. You can probably do this fix after doing the install script but I recommend doing it before hand.

Now set, the default repo. For instance in "upup bionic beaver" (versions 64bit, 32bit and 32bit light), do the following command:

Code: Select all

pkg --repo bionic-main
**In the next set of commands we will need internet connectivity. Therefore if you are doing this installation in a chroot sytem (e.g. psandbox [1]) then copy /etc/resolv.conf into the chroot system.

Now let's add the official wine repos using pkg.
**On older versions of pkg do "pkg add-repo" instead of "pkg --add-repo"

Code: Select all

sandbox# pkg --add-repo https://dl.winehq.org/wine-builds/ubuntu/ bionic main
Enter a repo name, such as 'bionic-DISTRO_SUB_VERSION-main':  
 bionic-DISTRO_SUB_VERSION-main
edit the suggested name to:
"bionic-wine-main"

and then press enter. The latest version of wine in the repo is 5.2.

** We are going to try 5.1. I tried running studiotax on dpupbuster32 with wine 5.2 and while it sort of worked it crached too often. To run studiotax on wine the big thing is that you need a version of wine that is new enough to have windows installer 2.0.

To see what is available for version 5.1 do the command:

Code: Select all

sandbox# pkg --names-all wine | grep 5.1
wine-devel_5.1~bionic
wine-devel-dbg_5.1~bionic
wine-devel-dev_5.1~bionic
wine-devel-i386_5.1~bionic
winehq-devel_5.1~bionic
winehq-staging_5.1~bionic
wine-staging_5.1~bionic
wine-staging-dbg_5.1~bionic
wine-staging-dev_5.1~bionic
wine-staging-i386_5.1~bionic
Now install the 32bit version of wine

Code: Select all

pkg --get wine-staging-i386_5.1~bionic
The packages in this repo are compiled with the prefix /opt/wine-staging.

Now install the following package,

Code: Select all

pkg --get wine-staging_5.1~bionic
which is mostly scripts, symlinks and fonts. It is instructive to look at these scripts (e.g. /opt/wine-staging/regedit) the same script is re-used with different names in such a way to call the appropriate wine executable (wine or wine64), based on the directory of the script.


Finnaly install the package

Code: Select all

pkg -get winehq-staging_5.1~bionic
which contains documentation and symlinks to both the wine executables and scripts.

If one moves the opt folder then they will have to readjust these symlinks. Also in a 64 bit system one might want to create a second folder containing these symlinks but not have the symlink to wine in this folder but instead the symlink to wine64 in this folder. If this is done then any scripts that are symlinked in this directory (e.g. regedit) will be called with respect to the 64bit version of wine rather than the 32bit version of wine.

In either case the wine script will be called with the default wine prefix for either wine (which has a default wine prefix ~/.wine) or wine64 (which has a default wine prefix of ~/.wine64). Since a prefix can only be for either wine or wine64 then presumably specifying the prefix is another way to determine which wine to use.

If one is running wine32 as an underdog (see thread) one might want to consider moving he files in wine-staging-i386_5.1~bionic from /opt/wine-staging to somewhere else like /opt32/wine-staging. If one does this then they will have to copy the scripts from wine-staging_5.1~bionic to this folder, and also should edit the scripts to change the default folder. This move isn't necessary because the path names don't conflict between the 64bit and 32 bit versions. However, it could reduce the risk of a files being blocked. If one does such a move they will also have to adjust the symlinks in winehq-staging_5.1~bionic.

Configure WIne

Configure wine with the command:

Code: Select all

winecfg
**I recommend installing "mono" and "gecko" when prompted to do so.

Note that this will only configure the 32bit wine prefixe (i.e. ~/.wine) unless you specify the architechre.

Code: Select all

WINEARCH="Winearch=win64 winecfg
**Only applicable to 64bit puppies.

No say we want to install StudioTax and we coppied the installer to "~/.wine/drive_c". THen we can do this:

Code: Select all

cd ~/.wine/drive_c
wine ./StudioTax2019Install.exe
Now run it:

Code: Select all

cd /root/.wine/drive_c/Program Files/BHOK IT Consulting/StudioTax 2019
wine ./StudioTax.exe
It apears to start but I can't prommise that it won't crash.



Notes
-----------------
1 - Installation, works using psandbox (see thread) to create a chroot system. For installation purposes this sandbox can be used as the chroot folder of an ssh server (see thread). Configuring and running wine over ssh might be more problematic because there might be issues with X11 forwarding and wine. If you install wine using a sandbox, you might want to convert the save folder of the sandbox to a sfs file (see thread)

Further Reading
-----------------------------
https://wiki.winehq.org/Wine_User%27s_G ... wine_start
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#2 Post by Mike Walsh »

@ s243a:-

Whilst I appreciate what you're attempting to do here - I get that you like 'pkg'! - this all seems awfully long-winded, given that version2013 has been compiling & building Puppy-specific WINE packages for several years now. What are you trying to do.....put the poor guy out of a job?? :lol:

My other main concern is that by tying Puppy into all the mainstream distros repositories, it's surely another nail in the coffin of Puppy's uniqueness, no? I mean, to me, if ya like the mainstream distros so much, then run the damn things instead..... :roll:

(Don't forget, using packages from the mainstream distros repos usually ends up with an extended lib-chase.....or has Scotty got this whole thing down "pat" by now, so it's all to Pup's benefit?)


Mike. :wink:

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#3 Post by s243a »

Mike Walsh wrote:@ s243a:-

Whilst I appreciate what you're attempting to do here - I get that you like 'pkg'! - this all seems awfully long-winded, given that version2013 has been compiling & building Puppy-specific WINE packages for several years now. What are you trying to do.....put the poor guy out of a job?? :lol:
As far as I can tell, the the wine pets that version2013 is building were compiled on tahr. This means that this pet will depend on libs that aren't available in newer systems. On can either install these older libs ot load an sfs that has them. User linux28 seems to have problems with the wine pets that are available on this forum (see thread), that said I can't promise that said user will have better luck with the approach I mentioned in this thread.

I'm just trying to give people options here. I'll also note that the newest version that "version2013" has compiled is wine 5.1. Wine 5.2 is available from the official wine repos.
My other main concern is that by tying Puppy into all the mainstream distros repositories, it's surely another nail in the coffin of Puppy's uniqueness, no? I mean, to me, if ya like the mainstream distros so much, then run the damn things instead..... :roll:
Puppy has unique tools and is still quite a bit smaller than the mainstream distros. I agree that it is usually better if we have software compiled specifically for puppy but the reason that we provide access to binary compatible distros is so that it is easy for users to install software if there isn't a puppy specific version.
(Don't forget, using packages from the mainstream distros repos usually ends up with an extended lib-chase.....or has Scotty got this whole thing down "pat" by now, so it's all to Pup's benefit?)
Mainstream distros do have a lot of dependencies. We can block these dependencies if want in either the ppm or pkg but this isn't guaranteed to work since some libs won't load if the dependencies are missing. For this reason I one day might try building a system based more on tinycore than I have done so thus far.

Finally I'll say if you are looking for the most unique systems provided on this forum than I would suggest either fatdog64, EasyOS or firstrib.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#4 Post by rockedge »

I see it as another cool way of installing wine!

good info. I use Pkg in scripts to install some pretty involved stuff. Works great and the ease of adding repos (is why we made Bionic and Co. or no?) makes it a very powerful tool.

Mike, I like having options. Also sometimes different install methods will work better than others.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#5 Post by vtpup »

I've had exactly the problem that s2243a talks about. I am staying back on Tahrpup 32 on my main computer primarily because I need Wine 1.5.9 to run an essential cad program for me. No later Wine version has ever run as well -- important features don't work. 1.5.9 functions perfectly on Tahrpup for my needs.

When I tried to run my Wine 1.5.9 .pet on BionicPup64 even with 32 bit compatibility sfs, it still doesn't work. Obviously something is missing.

I'm still looking for a solution to run Wine 1.5.9 properly in Bionicpup64.
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

Post Reply