summaryrefslogtreecommitdiffstats
path: root/packaging/debian/rules
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-03-05 21:56:27 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-05 12:04:26 -0800
commit4cd222eae7ad16cb32249fe25eeee5e7a00098fd (patch)
tree931ffbbce09dd16b517d55033e93bf5063687c30 /packaging/debian/rules
parent08f438a2c9eb35f00c341730463cf6fac0b72bcd (diff)
downloadsubsurface-4cd222eae7ad16cb32249fe25eeee5e7a00098fd.tar.gz
windows.c: Change the current process path to the module path
When an executable is started on Windows, it has a "Working directory". This directory for a program shortcut stored on the Desktop can be different than the actual executable directory. This also applies if a shell extension is registered to that executable (in the case of Subsurface that could be a .DLD file). When another process simply "executes" a file with a certain extension (e.g. when you double click on a .DLD file), a method ShellExecute is called, which without explicit parameters sets the "Working directory" to the .DLD file directory. This can be a bit of a trouble if the executed module depends on relative paths (e.g. ./xslt, ./share). To solve that we obtain our module full path and filename using GetModuleFileName(), strip the filename from it (e.g. subsurface.exe) and then pass the resulted string to SetCurrentDirectory(), which updates the "Working directory". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/debian/rules')
0 files changed, 0 insertions, 0 deletions