Hello, from mere curiosity, I copied my .wine folder to Windows and tried running the *.exe files therein (such as notepad.exe, clock.exe etc), but absolutely nothing seems to happen. Is this normal? Also, is the reason Wine programs don't run in Windows a legal or a technical one? And, in the latter case, could you provide some detailed info on why this is so? Thanks for all your help.
On 10/16/10 11:36 PM, adav84 wrote:> Hello, > > from mere curiosity, I copied my .wine folder to Windows and tried running the *.exe files therein (such as notepad.exe, clock.exe etc), but absolutely nothing seems to happen. > Is this normal?Yes. They're not real executable files. They're stubs that are put there to fool stupid Windows programs that expect them to be there. They have resources (particularly the version resource), but that's about it.> Also, is the reason Wine programs don't run in Windows a legal or a technical one?Technical.> And, in the latter case, could you provide some detailed info on why this is so?The real executables are located in <prefix>/lib/wine. (<prefix> is set at installation time. Most Linux distros set the <prefix> to /usr. When you install from source, it's set to /usr/local. It could be any valid directory though; /opt/local, or /sw, for example.) They're in the executable format of your native OS (ELF, or if you run Mac OS X, Mach-O), which is different from Windows' (PE). Windows doesn't understand executables that aren't in PE format, so you can't run Wine's built-in executables on Windows. In fact, Winelib executables (as they're called) are actually shared objects. This is so they can be loaded by the 'wine' executable. So they're actually useless without the 'wine' executable even if Windows could run them. Chip
There is a technical reason. They are placeholders. Wine notepad.exe is in another location INSTALLPREFIX/lib/wine/notepad.exe.so Note the exe.so they are native dynamic elf files with an internal format like a PE wrapped inside. A long time ago these were in the wine prefix instead of placeholders and kinda caused windows some major hickups processing them. Placeholders are still damaging to a windows install just not as much. You will find all the wine provided dlls also in the .wine/drive_c are also placeholders no real executable code inside. It is possible to build most of the wine programs with mingw so making really windows executable usable on windows. Even a large section of the dlls and almost the complete test suite(all bar wine only parts) can be built for windows. The wine loader cannot be built for windows. Basically placeholders and .exe.so can be build using the native platform compiler. To build normal windows .exe require mingw or equal so you have a compiler to process source and produce the windows exe. Simpler only requiring 1 compiler to build wine instead of two. This is also insanity preventing. Since different compilers building for different platforms can have different bugs. So poor developers don't have to be asking what compiler is screwed up. Since only 1 compiler is used to build wine it has to be the trouble maker.