How to set environment variables for 64bit wine-staging?

Questions about Wine on Linux
Locked
tim110011
Level 2
Level 2
Posts: 30
Joined: Wed Jul 05, 2017 2:29 am

How to set environment variables for 64bit wine-staging?

Post by tim110011 »

I followed this guide and installed 64bit wine-staging 2.11:
http://www.wine-staging.com/installatio ... tro_fedora

Code: Select all

sudo dnf install winehq-staging.x86_64
Now,how to set environment variables correctly?
I readed FAQ and man page, here is my script:

Code: Select all

#!/bin/bash

#declare -r WINEHQ_PATH=""    # will test plain wine later
declare -r WINEHQ-STAGING_PATH="/opt/wine-staging"
export HQ_PATH="$WINE-STAGING_PATH"    # use package from winehq, not distro

export WINEVERPATH="$HQ_PATH"
export PATH="$HQ_PATH/bin:$PATH"
export WINESERVER="$HQ_PATH/bin/wineserver"
export WINELOADER="$HQ_PATH/bin/wine"
export WINEDLLPATH="$HQ_PATH/lib/wine/fakedlls"
export LD_LIBRARY_PATH="$HQ_PATH/lib:$LD_LIBRARY_PATH" 
man page says:
WINEDLLPATH
Specifies the path(s) in which to search for builtin dlls and
Winelib applications. This is a list of directories separated by
":". In addition to any directory specified in WINEDLLPATH, Wine
will also look in /opt/wine-staging/lib64/wine.
Question 1: This is differet from FAQ; the folling 2 lines, which one is correct?

Code: Select all

WINEDLLPATH="$HQ_PATH/lib/wine"
WINEDLLPATH="$HQ_PATH/lib/wine/fakedlls"
Question 2 : Is LD_LIBRARY_PATH still required for regular use (no develpment, no testing) ?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: How to set environment variables for 64bit wine-staging?

Post by Bob Wya »

Take a look at:

Code: Select all

man wine
Hopefully that will clarify the situation a bit!

You don't need any of those environment variables - in your use case.
As long as Wine is compiled with:

Code: Select all

--prefix="/opt/wine-staging"
Then all additional directories will be set relative to this path.

As an aside...
Gentoo has largely moved over to a multislot-wine implementation in recent months.
In other words you can have multiple versions of Wine installed simultaneously - on one system.
Wine is compiled using multiple directory overrides.

Here is brief summary of the compile-time flags used on these new multi-slot Wine package build scripts:

Code: Select all

--prefix="${MY_PREFIX}"
--datarootdir="${MY_DATAROOTDIR}"
--datadir="${MY_DATADIR}"
--docdir="${MY_DOCDIR}"
--includedir="${MY_INCLUDEDIR}"
--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
--libexecdir="${MY_LIBEXECDIR}"
--localstatedir="${MY_LOCALSTATEDIR}"
--mandir="${MY_MANDIR}"
--sysconfdir="/etc/wine"
Implementing this relies on the fact that Wine sets defaults for the:
  • WINESERVER
  • WINELOADER
  • WINEDLLPATH
environment variable directories when it is compiled.
So no environment overrides are necessary to support the multiple Wine installations!

Bob
Locked