Easily changing directory where program files should be inst

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Paul Menzel

Easily changing directory where program files should be inst

Post by Paul Menzel »

Dear Wine users,


installing a Windows program the program’s installer should look up some
registry entry(?) (ProgramFiles [2]) what folder to use to install the
program files into. For Englisch installations this is normally `C:
\Program Files` in my home directory.

I have small space left in my home directory, so I would like to install
the program files in a different location, for example drive D: on a
different partition, by default. [2] says that this registry entry
cannot be changed using `winecfg` and `regedit` has to be used. It would
be awesome if this option could be added to `winecfg` for easy change.

Searching for »winecfg program files« in Bugzilla [3] I could not find a
report/request for this. Should I create a bug report?


Thanks,

Paul


[1] http://wiki.winehq.org/FAQ
[2] http://wiki.winehq.org/UsefulRegistryKeys
[3] http://bugs.winehq.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

Paul I am sorry to say I don't see that much advantage since we already have a way.

WINEPREFIX="location" wine <application.exe>

This creates a full new virtual drive system at the location.

Unless applications need to interact with each other they don't need to be in the same WINEPREFIX. The advantage here is by using wine prefixs is if one prefix goes south due to something strange happening the other wine prefixs operate perfectly.

"man wine" does give useful options.
Paul Menzel

Easily changing directory where program files should be inst

Post by Paul Menzel »

Dear oiaohm,


Am Samstag, den 02.01.2010, 06:04 -0600 schrieb oiaohm:
Paul I am sorry to say I don't see that much advantage since we
already have a way.

WINEPREFIX="location" wine <application.exe>

This creates a full new virtual drive system at the location.

Unless applications need to interact with each other they don't need
to be in the same WINEPREFIX. The advantage here is by using wine
prefixs is if one prefix goes south due to something strange happening
the other wine prefixs operate perfectly.

"man wine" does give useful options.
that is indeed interesting. Thank you for your answer. I have three more
questions though.

1. How is a CLI illiterate user supposed to do this?
2. Would the use of different Wine prefixes result in more resource
usage since for example the registry is not shared?
3. Using Wine prefixes gives me more than I asked for, I think. I just
want all files belonging to program files go into a different directory
than `~/.wine/`. Still if I do this with Wine prefixes I have to set the
`WINEPREFIX` variable for the user and the whole Wine configuration and
installed applications will go there? Is this recommended?


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
User avatar
dimesio
Moderator
Moderator
Posts: 13371
Joined: Tue Mar 25, 2008 10:30 pm

Re: Easily changing directory where program files should be

Post by dimesio »

Paul Menzel wrote: 1. How is a CLI illiterate user supposed to do this?
2. Would the use of different Wine prefixes result in more resource
usage since for example the registry is not shared?
3. Using Wine prefixes gives me more than I asked for, I think. I just
want all files belonging to program files go into a different directory
than `~/.wine/`. Still if I do this with Wine prefixes I have to set the
`WINEPREFIX` variable for the user and the whole Wine configuration and
installed applications will go there? Is this recommended?
1. Either learn to use the CLI, or use a third party app that provides a user friendly interface for wineprefix management. Note that if you use a third party app, it will not be supported here. http://wiki.winehq.org/ThirdPartyApplications

2. You don't have to have many wineprefixes, though there are advantages to doing so. You can create one wineprefix wherever you want (and even name it .wine if you so desire) and install all your apps to it. (Make sure the location is a native *nix filesystem such as ext2 or ext3.) You will have to set the WINEPREFIX variable every time you run anything (though it should be added automatically by winemenubuilder to menu and desktop links). If you don't specify a different wineprefix, Wine defaults to ~/.wine. But that's all it is: a default setting. There's nothing special about ~/.wine.

3. If your app's installer prompts you for a location, as many do, you should be able to browse to wherever you want on your system, even another partition, and install the program files there, while keeping the registry in ~/.wine, if you really want to. If your app's installer doesn't give you a choice, you will have to use a different wineprefix. As to whether this is recommended, most experienced users have multiple wineprefixes. I only use ~/.wine when running regression tests.
Paul Menzel

Easily changing directory where program files should be inst

Post by Paul Menzel »

Am Samstag, den 02.01.2010, 09:49 -0600 schrieb dimesio:
Paul Menzel wrote:
1. How is a CLI illiterate user supposed to do this?
Either learn to use the CLI,
;-)
or use a third party app that provides a user friendly interface for
wineprefix management. Note that if you use a third party app, it will
not be supported here. http://wiki.winehq.org/ThirdPartyApplications
Do all of the listed applications support setting the ProgramFiles
directory in a using a graphical interface?

Can you recommend one?
2. Would the use of different Wine prefixes result in more resource
usage since for example the registry is not shared?
You don't have to have many wineprefixes, though there are advantages
to doing so.
[…]

Thanks, but does it use more resources?
3. Using Wine prefixes gives me more than I asked for, I think. I just
want all files belonging to program files go into a different directory
than `~/.wine/`. Still if I do this with Wine prefixes I have to set the
`WINEPREFIX` variable for the user and the whole Wine configuration and
installed applications will go there? Is this recommended?
If your app's installer prompts you for a location, as many do, you
should be able to browse to wherever you want on your system, even
another partition, and install the program files there, while keeping
the registry in ~/.wine, if you really want to.
That is true, indeed, but very cumbersome and most users do not care to
change it (I have seen this yesterday.), so it would be nice to as an
admin or whatever to configure this.

[…]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
User avatar
dimesio
Moderator
Moderator
Posts: 13371
Joined: Tue Mar 25, 2008 10:30 pm

Re: Easily changing directory where program files should be

Post by dimesio »

Paul Menzel wrote: Do all of the listed applications support setting the ProgramFiles
directory in a using a graphical interface?
AFAIK, none of them support changing only the Program Files directory (rather than the whole wineprefix). But I could be wrong.
Can you recommend one?
The only third party app that I use is winetricks, which is a CLI tool designed for developers, but useful for users, too.

Of GUI apps, I can tell you that Codeweavers is the main support of the Wine Project, so if you purchase Crossover, you are helping to support Wine. They also have their own well-developed support system, which seems not to be the case with some of the other third party apps on the list.
Thanks, but does it use more resources?
Yes, of course, since each wineprefix will take up disk space, even with no apps installed.
That is true, indeed, but very cumbersome and most users do not care to change it
It is the exact same thing they would have to do in Windows.
Paul Menzel

Easily changing directory where program files should be inst

Post by Paul Menzel »

Am Samstag, den 02.01.2010, 12:27 -0600 schrieb dimesio:
Paul Menzel wrote:
[…]
That is true, indeed, but very cumbersome and most users do not care to change it
It is the exact same thing they would have to do in Windows.
Sorry. I thought you could change that in Windows somewhere besides in
the registry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
Martin Gregorie

Easily changing directory where program files should be inst

Post by Martin Gregorie »

On Sat, 2010-01-02 at 17:43 +0100, Paul Menzel wrote:
Am Samstag, den 02.01.2010, 09:49 -0600 schrieb dimesio:
Paul Menzel wrote:
2. Would the use of different Wine prefixes result in more resource
usage since for example the registry is not shared?
You don't have to have many wineprefixes, though there are advantages
to doing so.
[…]

Thanks, but does it use more resources?
A little - not, IMO, enough to worry about. This is what I found:

- All the wine executables, wine libraries, icons, fonts, documentation
etc is in /usr sub-directories. This totals around 60 MB and none of
it is duplicated in the prefixes.

- The overhead for each prefix is about 4.8 MB for a basic setup without
any web browsing capability. This is before any Windows application
and associated data has been installed. It is very small beer indeed
compared with the size of the smallest disk you can buy these days
(80GB from my favorite online store's catalog).

You can easily check this yourself with the du utility:-

du -hs .wine*

Martin
User avatar
dimesio
Moderator
Moderator
Posts: 13371
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

One thing I did forget to mention is that you can change the default wineprefix location in .bashrc. Adding

Code: Select all

export WINEPREFIX=/path/to/wineprefix
to a user's .bashrc will make /path/to/wineprefix the default wineprefix for that user instead of ~./wine, and they won't have to remember to specify it each time.
Gert van den Berg

Easily changing directory where program files should be inst

Post by Gert van den Berg »

On Sat, Jan 2, 2010 at 13:17, Paul Menzel
<[email protected]> wrote:
Dear Wine users,


installing a Windows program the program’s installer should look up some
registry entry(?) (ProgramFiles [2]) what folder to use to install the
program files into. For Englisch installations this is normally `C:
\Program Files` in my home directory.

I have small space left in my home directory, so I would like to install
the program files in a different location, for example drive D: on a
different partition, by default. [2] says that this registry entry
cannot be changed using `winecfg` and `regedit` has to be used. It would
be awesome if this option could be added to `winecfg` for easy change.

Searching for »winecfg program files« in Bugzilla [3] I could not find a
report/request for this. Should I create a bug report?
http://wiki.jswindle.com/index.php/WINEPREFIX might be what you are
actually looking for....
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

Paul Menzel
1. How is a CLI illiterate user supposed to do this?
How do you expect to use wine while being CLI illiterate. Thinking all information to resolve why applications don't run come out on the CLI.

Winecfg only configures inside a prefix. Third party tools exist to provide a user interface with prefixs. Big issue with Winecfg is that it uses wine own graphical interfaces that cannot operate without a wine prefix. How can you say snookered.
2. Would the use of different Wine prefixes result in more resource
usage since for example the registry is not shared?
As what others have said a wine prefix costs bugger all. The gains out weight it costs. ie Applications not conflicting with each other and ending up dead.
3. Using Wine prefixes gives me more than I asked for, I think. I just
want all files belonging to program files go into a different directory
than `~/.wine/`. Still if I do this with Wine prefixes I have to set the
`WINEPREFIX` variable for the user and the whole Wine configuration and
installed applications will go there? Is this recommended?
Yes its recommended for the reason of application conflits and that if something happens to lets say a drive that one wineprefix is on the other remains operational. At the low cost why not.

Please look at the menu entries wine creates. You will find WINEPREFIX is embedded. Users are allowed by WINEPREFIX's as many as they like.

Basically you don't want a registry solution but want a better front end for what is already in wine. Debuging monitoring is another area that wine suxs in graphical.

Maybe the solution would be adding wine to http://libvirt.org/ so http://virt-manager.org/ could be used to manage prefixs.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

not sure if I'm on track or not.... I might be misunderstanding what is wanted.

if you want to keep your prefix in ~/.wine but just have "Program Files" on a different drive, then you can do this by making a symlink.... just put Program Files on the other drive and create a symlink to it called Program Files in drive_c of the wineprefix.

I'm not sure what OS your using or where your mounts are.. but this example would work on Mac OS X.... you'd have to modify it slightly for Linux depending where your mounts are.... (OSX uses /Volumes)

I'd move Program Files folder over to my other drive, say in /Volumes/SecondHardDrive
mv "~/.wine/drive_c/Program Files" "/Volumes/SecondHardDrive"

then I'd go into my drive_c...
cd "~/.wine/drive_c"

then I'd make this symlink...
ln -s "/Volumes/SecondHardDrive/Program Files" "Program Files"

this would effectively make anything trying to access "~/.wine/drive_c/Program Files" see (read/write) the actual contents of "/Volumes/SecondHardDrive/Program Files"
Locked