I'm trying to think of a way to make multi-CD installers work under Wine. Right now, the hardest part is that when the installers tell you to change discs, the Setup.exe file mappings are still open. I'm thinking of making Wine not map the file, but read it straight into RAM, if the executable to be mapped is on removable media.
But since to do this, MapViewOfFile needs to know the media type, and the file name is only known in CreateFile, I apparently need to store the media type in the wineserver object to accomplish this.
Would changing the wineserver protocol in this way be a good idea?
Index: server/protocol.def =================================================================== RCS file: /cvsroot/winex/wine/server/protocol.def,v retrieving revision 1.5 diff -u -r1.5 protocol.def --- server/protocol.def 2001/10/13 20:20:06 1.5 +++ server/protocol.def 2001/10/18 22:50:29 @@ -505,6 +505,7 @@ unsigned int sharing; /* sharing flags */ int create; /* file create action */ unsigned int attrs; /* file attributes for creation */ + int mediatype; /* media type file is on */ VARARG(filename,string); /* file name */ @REPLY handle_t handle; /* handle to the file */ @@ -527,6 +528,7 @@ @REPLY int fd; /* file descriptor */ int type; /* the type of file */ + int mediatype; /* media type file is on */ @END #define FD_TYPE_INVALID 0 #define FD_TYPE_DEFAULT 1
Ove Kaaven wrote:
I'm trying to think of a way to make multi-CD installers work under Wine. Right now, the hardest part is that when the installers tell you to change discs, the Setup.exe file mappings are still open. I'm thinking of making Wine not map the file, but read it straight into RAM, if the executable to be mapped is on removable media.
That's a very interesting issue. It's cool that Wine is to the point where such things matter.
[ Off topic - I've been thinking on and off about that other project that added native PE support to BSD. I wonder how / if they handle this issue.
Perhaps this is something that Linux itself would want, even for native executables. I suppose it might be a mount option. Hmm hmm. ]
- Dan