moved definition to Platform.h and removed useless function calls
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5196 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5648dd2ace
commit
b5cfb1ce4a
2 changed files with 8 additions and 7 deletions
|
@ -867,4 +867,11 @@ typedef struct tagVS_FIXEDFILEINFO {
|
||||||
# pragma pack()
|
# pragma pack()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ShGetFolderPath
|
||||||
|
typedef HRESULT (__stdcall * PFNSHGETFOLDERPATHA)(HWND, int, HANDLE, DWORD, LPSTR);
|
||||||
|
|
||||||
|
#ifndef SHGFP_TYPE_CURRENT
|
||||||
|
#define SHGFP_TYPE_CURRENT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include "../Platform.h"
|
#include "../Platform.h"
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#include <shfolder.h>
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -628,9 +627,7 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
||||||
int x = 2;
|
int x = 2;
|
||||||
|
|
||||||
// Use SHGetFolderPath when shfolder.dll is available
|
// Use SHGetFolderPath when shfolder.dll is available
|
||||||
PFNSHGETFOLDERPATHA pSHGetFolderPath = 0;
|
PFNSHGETFOLDERPATHA pSHGetFolderPath = (PFNSHGETFOLDERPATHA) myGetProcAddress(MGA_SHGetFolderPathA);
|
||||||
HMODULE hDLL = LoadLibrary("shfolder");
|
|
||||||
if (hDLL) pSHGetFolderPath = (PFNSHGETFOLDERPATHA) myGetProcAddress(MGA_SHGetFolderPathA);
|
|
||||||
|
|
||||||
if (g_exec_flags.all_user_var)
|
if (g_exec_flags.all_user_var)
|
||||||
{
|
{
|
||||||
|
@ -680,9 +677,6 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
||||||
mystrcat(out, QUICKLAUNCH);
|
mystrcat(out, QUICKLAUNCH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hDLL) FreeLibrary(hDLL);
|
|
||||||
|
|
||||||
validate_filename(out);
|
validate_filename(out);
|
||||||
}
|
}
|
||||||
else if (nVarIdx == NS_VAR_CODE)
|
else if (nVarIdx == NS_VAR_CODE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue