wine's argv and current directory
damjan.jov at gmail.com
Sat Jul 21 10:37:55 CDT 2007
We have 2 problems in wine:
1. When you run "wine /path/to/app.exe", argv is "/path/to/app.exe"
which is definitely wrong. The most serious consequence of this is
that apps run through file browser double-clicking can break.
2. Whether you run "wine D:\setup.exe" or "wine
/media/cdrom/setup.exe", the current directory is never "D:\" and when
you double-click an .exe the current directory is $HOME so it's always
wrong. You can't "cd /media/cdrom && wine setup.exe" either because
that stops ejecting the CD for multi-CD installs.
Can we kill 2 birds with 1 stone here and do something like
if (argv is a unix path)
make argv a windows path
SetCurrentDirectory(directory of argv);
before starting the app? Since Windows never uses UNIX paths this
can't break any Windows app, and it will fix double-click startups and
multiple CD installs.
More information about the wine-devel