Need Some Help Running Wine from Build Tree

Questions about Wine on Linux
Locked
CWBZ
Newbie
Newbie
Posts: 2
Joined: Mon Nov 26, 2018 8:51 am

Need Some Help Running Wine from Build Tree

Post by CWBZ »

The context here is that I've recently submitted a bug report and been asked to do a regression test. After a rough weekend, I've managed to get a 32-bit chroot set up and build a WOW64 wine. Now I need to start in with regression testing, but I'm unsure how to do the required operations while running my test version of wine from the build tree.

Specifically, for each iteration I'm going to need to:
  • Make a 32-bit wine prefix
  • Install wmp10 via winetricks.
  • Test behavior.
  • Flip a dll back to built-in.
  • Test behavior.
  • Install two dlls via winetricks.
  • Test behavior.
  • Nuke the prefix and test build and proceed to the next iteration.
While I can easily invoke my test build of wine from a command prompt within the build tree for simple stuff (e.g., ./wine notepad), I'm not sure how to properly perform those tasks, making sure that:
  • The wine prefix is populated with dll's from the test version (rather than my installed version)
  • All operations (including winetricks) use the loader, wineserver, libraries, etc. from the test version (rather than my installed version)
According to the FAQ, there are some environment variables that seem to be intended for this purpose, but they seem to be expecting a structure like the installed version in /opt/wine-devel with /bin and /lib and /lib64 and so on. My build tree looks nothing like that. Can anyone explain how to set these environment variables to work with WOW64 wine in a build tree?

Do I need to compile with --prefix and do "make install" to make this work? Will doing "make install" break my existing wine installation by changing the symlinks in /bin or adding crap to my PATH or somesuch? (I'm running Debian stable, if that matters.) Can I completely remove the test version by deleting the installation directory?

I'd greatly appreciate any help with this.
qwertymnb
Level 4
Level 4
Posts: 237
Joined: Sun Jan 17, 2016 4:36 pm

Re: Need Some Help Running Wine from Build Tree

Post by qwertymnb »

Just compile wine for example in ~/winetest/ and run the app like ~/winetest/wine name_of_app.exe

There should be no problem using winetricks i think; winetricks will use your installed wine, so you wineprefix will be updated when you run it, but that shouldn`t be a problem i think
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Need Some Help Running Wine from Build Tree

Post by DarkShadow44 »

Running wine from the build directory is enough. No need for "make install".
To go super sure, you can always use a fresh WINEPREFIX.

FWIW, you can even use a different wine for winetricks: Just set the WINE environment variable.
CWBZ
Newbie
Newbie
Posts: 2
Joined: Mon Nov 26, 2018 8:51 am

Re: Need Some Help Running Wine from Build Tree

Post by CWBZ »

Thank you both!
qwertymnb wrote:There should be no problem using winetricks i think; winetricks will use your installed wine, so you wineprefix will be updated when you run it, but that shouldn`t be a problem i think
Sadly, I think it will be a problem in this case. The bug I'm hunting somehow persists within a wineprefix even after system wine is reverted to a known good version. (Not sure how. I'm guessing that means something bad is happening in the windows registry.) In order to do this test right, I need to be absolutely sure that the testing version of wine (loader, server, libraries, everything) is the only thing that's ever touched the testing wineprefix.
DarkShadow44 wrote:FWIW, you can even use a different wine for winetricks: Just set the WINE environment variable.
How does this handle a WoW64 build tree? Do I need to point it to the correct-bitedness subdirectory, or will it figure it out on its own?
Does this also force winetricks to use the correct server, libraries, and dlls?
Do I also need to set WINEVERPATH, WINESERVER, WINELOADER, WINEDLLPATH, LD_LIBRARY_PATH, or some subset thereof?
(For that matter, how do you set WINEVERPATH for a build tree? Or WINEDLLPATH and LD_LIBRARY_PATH for a WoW64 build?)
User avatar
dimesio
Moderator
Moderator
Posts: 13204
Joined: Tue Mar 25, 2008 10:30 pm

Re: Need Some Help Running Wine from Build Tree

Post by dimesio »

CWBZ wrote: How does this handle a WoW64 build tree? Do I need to point it to the correct-bitedness subdirectory, or will it figure it out on its own?
You should run everything from the wine symlink in the 64 bit build directory.

However, given that WMP10 is only available in 32 bit, why are you bothering to build a full WoW64 setup at all? Unless this is a bug that only appears in WoW64 and not in pure 32 bit Wine, you could test it just by building 32 bit Wine.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Need Some Help Running Wine from Build Tree

Post by Bob Wya »

qwertymnb wrote:Just compile wine for example in ~/winetest/ and run the app like ~/winetest/wine name_of_app.exe

There should be no problem using winetricks i think; winetricks will use your installed wine, so you wineprefix will be updated when you run it, but that shouldn`t be a problem i think
FYI

winetricks supports the WINE env variable, to override the version of Wine being used:

Code: Select all

export WINE="${HOME}/winetest/"
winetricks ...
Bob
Locked