fixed bug #1008632 - some special folders don't always work in Windows 9x
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4345 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7fb1bfc096
commit
f3b771634e
1 changed files with 22 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
#include "../Platform.h"
|
#include "../Platform.h"
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
#include <shellapi.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "fileform.h"
|
#include "fileform.h"
|
||||||
|
@ -88,6 +89,27 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
// workaround for bug #1008632
|
||||||
|
// http://sourceforge.net/tracker/index.php?func=detail&aid=1008632&group_id=22049&atid=373085
|
||||||
|
//
|
||||||
|
// without this, SHGetSpecialFolderPath doesn't always recognize some
|
||||||
|
// special folders, like the desktop folder for all users, on Windows
|
||||||
|
// 9x. unlike SHGetSpecialFolderPath, which is not available on all
|
||||||
|
// versions of Windows, SHGetSpecialFolderLocation doesn't try too
|
||||||
|
// hard to make sure the caller gets what he asked for. so we give it
|
||||||
|
// a little push in the right direction by doing part of the work for
|
||||||
|
// it.
|
||||||
|
//
|
||||||
|
// part of what SHGetFileInfo does, is to convert a path into an idl.
|
||||||
|
// to do this conversion, it first needs to initialize the list of
|
||||||
|
// special idls, which are exactly the idls we use to get the paths
|
||||||
|
// of special folders (CSIDL_*).
|
||||||
|
|
||||||
|
SHFILEINFO shfi;
|
||||||
|
SHGetFileInfo("", 0, &shfi, sizeof(SHFILEINFO), 0);
|
||||||
|
}
|
||||||
|
|
||||||
mystrcpy(g_caption,_LANG_GENERIC_ERROR);
|
mystrcpy(g_caption,_LANG_GENERIC_ERROR);
|
||||||
|
|
||||||
GetTempPath(NSIS_MAX_STRLEN, state_temp_dir);
|
GetTempPath(NSIS_MAX_STRLEN, state_temp_dir);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue