tabs to spaces and some other minor clean-ups
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5247 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
17f376f671
commit
e2b948ae02
1 changed files with 20 additions and 19 deletions
|
@ -630,34 +630,35 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
|||
int x = 2;
|
||||
DWORD ver = GetVersion();
|
||||
|
||||
/*
|
||||
/*
|
||||
|
||||
SHGetFolderPath as provided by shfolder.dll is used to get special folders
|
||||
unless the installer is running on Windows 95/98. For 95/98 shfolder.dll is
|
||||
only used for the Application Data and Documents folder (if the DLL exists).
|
||||
SHGetFolderPath as provided by shfolder.dll is used to get special folders
|
||||
unless the installer is running on Windows 95/98. For 95/98 shfolder.dll is
|
||||
only used for the Application Data and Documents folder (if the DLL exists).
|
||||
Oherwise, the old SHGetSpecialFolderLocation API is called.
|
||||
|
||||
There reason for not using shfolder.dll for all folders on 95/98 is that
|
||||
some unsupported folders (such as the Start Menu folder for all users) are
|
||||
simulated instead of returning an error so whe can fall back on the folder
|
||||
for the current user.
|
||||
There reason for not using shfolder.dll for all folders on 95/98 is that
|
||||
some unsupported folders (such as the Start Menu folder for all users) are
|
||||
simulated instead of returning an error so whe can fall back on the folder
|
||||
for the current user.
|
||||
|
||||
SHGetFolderPath in shell32.dll could be called directly for Windows versions
|
||||
later than 95/98 but there is no need to do so, because shfolder.dll is still
|
||||
provided and calls shell32.dll.
|
||||
SHGetFolderPath in shell32.dll could be called directly for Windows versions
|
||||
later than 95/98 but there is no need to do so, because shfolder.dll is still
|
||||
provided and calls shell32.dll.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
BOOL use_shfolder = (
|
||||
|
||||
// Use shfolder if not on 95/98
|
||||
BOOL use_shfolder =
|
||||
// Use shfolder if not on 95/98
|
||||
!((ver & 0x80000000) && (LOWORD(ver) != 0x5A04)) ||
|
||||
|
||||
// Unless the Application Data or Documents folder is requested
|
||||
((fldrs[2] == CSIDL_COMMON_APPDATA) ||
|
||||
(fldrs[2] == CSIDL_COMMON_DOCUMENTS))
|
||||
// Unless the Application Data or Documents folder is requested
|
||||
(
|
||||
(fldrs[2] == CSIDL_COMMON_APPDATA) ||
|
||||
(fldrs[2] == CSIDL_COMMON_DOCUMENTS)
|
||||
);
|
||||
|
||||
);
|
||||
/* Carry on... shfolder stuff is over. */
|
||||
|
||||
if (g_exec_flags.all_user_var)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue