When pass parameters to program running under wine,wine will automatically convert unix style path into windows style
However,it fails to convert correctly when file path contains tilde(which means $HOME in bash)
For example
When pass parameters to program running under wine,wine will automatically convert unix style path into windows style
I am sorry to have to burst your bubble the reality wine in fact does not do this. Build the following little program with mingw32 or equal windows compiler.
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char **argv) {
int i;
for (i = 0; i < argc; i++) {
printf("%s\n", argv[i]);
}
return EXIT_SUCCESS;
}
Yes this is a simple print what arguments application receives. You will find wine is not processing the arguments at all. There is a major mistake people make NT operating systems like XP 7 .... in fact support using either / or \ as path separator just always display \. There is no way for wine to tell a unix path from a nt path. Yes this G:/home/username/.wine is a valid windows path. This is not wine being magic its just obeying what NT demands.
Need to convert from unix style to wine style there is a official command todo that. winepath -w <unixpath> even so this does not process ~ to home. Bash and posix shells does ~ to home conversion. With the above program built for linux do "\~" under bash as a arguement. Now you should see the problem. winepath cannot do home solve on ~ without risking being incompatible to a real path pass. Yes it valid under Linux for a folder named "~" to exist. Maybe a feature request for winepath to add a control flag to convert ~ to path .