On Dec 29, 2007 10:45 AM, Robert Millan rmh@aybabtu.com wrote:
I was thinking in doing something like this already, but you still need
a
way to set winver, so it boils down to either sharing code with winecfg
or
duplicating it.
I'd like to avoid duplication if possible.
I am not sure where the global winver is set but I am sure its still in the registry so you can change it with a registry key as Julliard said. For just running per-application all you need to do is set it as HKCU\Software\Wine\AppDefaults\foo.exe\Version which is a string resource, again this can be done via a reg file that regedit can import. Thats even less complicated then then inf route I suggested.
Do you mean you have a situation like a broken application AND installer that only works under win98 but the default version is win2000? Maybe you only want that installer to run in win98 mode but the rest of wine to run in win2000 mode? Wine used to have the -winver option I think and CrossOver has this setting but I can't see anyway to set the windows version on the command line for a buggy installer. The solution (which I also think kind of sucks) would be to do something like script
wine regedit add-setup.exe-version.reg wine setup.exe wine regedit remove-setup.exe-version.reg wine regedit add-foo.exe-version.reg wine foo.exe
Of course steps 3 and 4 could be combined in one registry file and 1 and 3 would not even be needed if you could set the version on the command line but we don't seem to support that anymore for quite a long time. I think the solution to have multiple appdefaults with programs having generic names like setup.exe and install.exe is to enhance the support in wine and winecfg application/dlloverrides to use md5sum/sha hashes. I don't know how julliard really feels about this but this is similar to what was discussed with having a custom Wine shim engine for application compatibly. If you were going to change some code and he approves I think this is the route to go.....
So say rather than having
HKCU\Software\Wine\AppDefaults\setup.exe\Version win98
you would have something like
HKCU\Software\Wine\AppDefaults\b83fd2e8b34ba6b6f59e9f9cfbe129d9\Version win98 HKCU\Software\Wine\AppDefaults\b83fd2e8b34ba6b6f59e9f9cfbe129d9\filename setup.exe
HKCU\Software\Wine\AppDefaults\912672566150fd7663fba3a927f79fca\Version win2000 HKCU\Software\Wine\AppDefaults\912672566150fd7663fba3a927f79fca\filename setup.exe
This way two installers both named setup.exe can have their own windows version and dlloverrides set.
Thanks Steven
-- Steven Edwards
"There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo
The system on windows doesn't use the md5sum (I think it has one) but it looks for the product ID which is burried into most executables first. It also checks for other things but in a hackier way. As there are a lot of different versions of a program but which all need the same override.
Roderick