You are not logged in.

#1 2010-02-18 19:46:09

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

[How?]More than 1 Wine version simultaneously

As a frequent Arch user, I want to broaden my knowledge and skills with Linux - this time, I'd like to be able to have 2 Wine versions - new 1.1.38 and stable 1.0.1. Right now I only have 1.1.38 installed under /opt/wine/. In q4wine it's possible to set different Wine versions, so it looks like something entirely doable and not that hard.

I looked under the PKGBUILD of wine-stable at AUR to see where it installs (I hoped for something like /opt/wine-stable/ to make my life easier), but it didn't tell me much. Because of my newbieness, I don't understand the relevant part:

build() {
   ar x $(basename ${source[0]}) || return 1
   tar xf data.tar.lzma || return 1

   cp -rf etc/ usr/ "$pkgdir"/
}

But it doesn't look like it's getting installed to /opt/wine-101 or something close.

So, my questions are:

1) Where does wine-stable from AUR install as default?

2) How can I change it to install the binaries to /opt/wine-stable?

3) Will it read my current virtual drive ~/.wine/drive_c/ with any problem? Or I need to setup a separate drive?

4) Will there be two separate instances of winecfg?

Thanks for your help! It is greatly appreciated! wink

Offline

#2 2010-02-19 01:02:54

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: [How?]More than 1 Wine version simultaneously

warnec wrote:

1) Where does wine-stable from AUR install as default?
2) How can I change it to install the binaries to /opt/wine-stable?

it looks to me like it installs in the same place as ordinary wine. Try changing the 2nd to last line:

mkdir -p "${pkgdir}/opt/wine-stable/"
cp -rf etc/ usr/ "${pkgdir}/opt/wine-stable/"

when you build the package, don't install it - you can check what files are in it with

$ tar -ztf package-version.pkg.tar.gz

then if you are satisfied it can be installed with pacman -U.

warnec wrote:

3) Will it read my current virtual drive ~/.wine/drive_c/ with any problem? Or I need to setup a separate drive?

yes it will read that, but different version of wine use slightly different layouts so I recommend setting up a separate drive

warnec wrote:

4) Will there be two separate instances of winecfg?

yes, there will be, but both of them will probably end up running your unstable wine's config. you should make a script for the stable one and set the environment variables WINELOADER and WINEPREFIX to the appropriate values (i think man wine will tell you what they mean)


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#3 2010-02-19 06:34:11

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: [How?]More than 1 Wine version simultaneously

Thanks for your help. So it's supposed to look like that?

build() {
   ar x $(basename ${source[0]}) || return 1

   mkdir -p "${pkgdir}/opt/wine-stable/" || return 1

   cp -rf etc/ usr/ "${pkgdir}/opt/wine-stable/" || return 1
}

In that case, it leaves me with an error:

[warnec@chakra-desktop bin32-wine-stable]$ LANG=C makepkg -cf          
==> Making package: bin32-wine-stable 1.0.1-8 x86_64 (Fri Feb 19 07:33:48 CET 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Downloading wine_1.0.1-0ubuntu8_i386.deb...
--2010-02-19 07:33:48--  http://mirrors.kernel.org/ubuntu/pool/universe/w/wine/wine_1.0.1-0ubuntu8_i386.deb
Resolving mirrors.kernel.org... 199.6.1.174, 130.239.17.6
Connecting to mirrors.kernel.org|199.6.1.174|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7536132 (7.2M) [text/plain]
Saving to: `wine_1.0.1-0ubuntu8_i386.deb.part'

100%[===================================================>] 7,536,132   1.59M/s   in 4.5s

2010-02-19 07:33:52 (1.61 MB/s) - `wine_1.0.1-0ubuntu8_i386.deb.part' saved [7536132/7536132]

==> Validating source files with md5sums...
    wine_1.0.1-0ubuntu8_i386.deb ... Passed
==> Extracting Sources...
==> Entering fakeroot environment...
==> Starting build()...
cp: cannot stat `etc/': No such file or directory
cp: cannot stat `usr/': No such file or directory
==> ERROR: Build Failed.
    Aborting...
[warnec@chakra-desktop bin32-wine-stable]$

Offline

#4 2010-02-19 07:58:12

syre
Member
From: Denmark
Registered: 2009-08-04
Posts: 100

Re: [How?]More than 1 Wine version simultaneously

shouldnt it be /etc/ and /usr/?

Offline

#5 2010-02-19 13:50:42

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: [How?]More than 1 Wine version simultaneously

syre wrote:

shouldnt it be /etc/ and /usr/?

You are of course right, thanks wink

But one more problem:

==> Validating source files with md5sums...
    wine_1.0.1-0ubuntu8_i386.deb ... Passed
==> Extracting Sources...                  
==> Entering fakeroot environment...       
==> Starting build()...
cp: cannot open `/etc/default/cacerts' for reading: Permission denied
cp: cannot open `/etc/sudoers' for reading: Permission denied
cp: cannot open `/etc/gshadow-' for reading: Permission denied
cp: cannot access `/etc/polkit-1/localauthority': Permission denied
cp: cannot open `/etc/shadow-' for reading: Permission denied
cp: cannot open `/etc/openldap/slapd.conf' for reading: Permission denied
cp: cannot open `/etc/openldap/DB_CONFIG.example' for reading: Permission denied
cp: cannot open `/etc/crypttab' for reading: Permission denied
cp: cannot open `/etc/ppp/chap-secrets' for reading: Permission denied
cp: cannot open `/etc/ppp/pap-secrets' for reading: Permission denied
cp: cannot open `/etc/shadow' for reading: Permission denied
cp: cannot open `/etc/cups/printers.conf' for reading: Permission denied
cp: cannot open `/etc/cups/printers.conf.O' for reading: Permission denied
cp: cannot open `/etc/cups/classes.conf' for reading: Permission denied
cp: cannot open `/etc/ssh/ssh_host_rsa_key' for reading: Permission denied
cp: cannot open `/etc/ssh/ssh_host_key' for reading: Permission denied
cp: cannot open `/etc/ssh/ssh_host_dsa_key' for reading: Permission denied
cp: cannot open `/etc/cups.OLD/printers.conf' for reading: Permission denied
cp: cannot open `/etc/cups.OLD/printers.conf.O' for reading: Permission denied
cp: cannot open `/etc/.pwd.lock' for reading: Permission denied
cp: cannot open `/etc/gshadow' for reading: Permission denied
cp: cannot open `/etc/passwd-' for reading: Permission denied
cp: cannot open `/etc/group-' for reading: Permission denied
^C
==> ERROR: Aborted by user! Exiting...

I Ctrl+C'ed it, because obviously it needs sudo permissions. But I don't know if I should run makepkg as sudo, because 1) it could be dangerous, since the PKGBUILD is yet unproved to be safe 2) there is something like fakeroot to use in PKGBUILDs, no? How do I do this?

Offline

#6 2010-02-20 00:55:56

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: [How?]More than 1 Wine version simultaneously

No, it SHOULD NOT be /etc and /usr. Also, this was what I meant:

build() {
   ar x $(basename ${source[0]}) || return 1
   tar xf data.tar.lzma || return 1

   mkdir -p "${pkgdir}/opt/wine-stable/" || return 1
   cp -rf etc/ usr/ "${pkgdir}/opt/wine-stable/" || return 1
}

sorry if I was unclear


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#7 2010-02-20 09:30:07

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: [How?]More than 1 Wine version simultaneously

Looks like it installed correctly now. There is /opt/wine-stable, with etc/ and usr/ inside. Wine binaries are under /opt/wine-stable/usr/bin/ . Thanks!

PS.: There is a problem here, I don't know what caused it. When I run:

/opt/wine-stable/usr/bin/winecfg

Winecfg gets opened, but in the Info tab, it says "Wine 1.1.38".

PPS.: But:

[warnec@chakra-desktop ~]$ /opt/wine-stable/usr/bin/wine --version
wine-1.0.1
[warnec@chakra-desktop ~]$

PPPS.: I set everything in q4wine. This program is really great! All is in GUI, no console. Now, I can run winecfg from Wine 1.0.1 and I have separate Fake Drive for wine-stable.

Last edited by warnec (2010-02-20 09:42:39)

Offline

#8 2010-02-21 00:43:50

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: [How?]More than 1 Wine version simultaneously

warnec wrote:

There is a problem here, I don't know what caused it. When I run:

/opt/wine-stable/usr/bin/winecfg

Winecfg gets opened, but in the Info tab, it says "Wine 1.1.38".

like I said above, you need to set WINELOADER and/or WINEPREFIX. winecfg is just a script that calls wine from /usr/bin unless you specify WINELOADER, like this:

WINELOADER=/opt/wine-stable/usr/bin/wine winecfg

glad to hear it works


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

Board footer

Powered by FluxBB