Added GetDllVersion /ProductVersion switch
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7310 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
52d6782447
commit
3a3d2202a7
10 changed files with 36 additions and 30 deletions
|
@ -607,17 +607,19 @@ int CEXEBuild::pp_getversion(int which_token, LineParser&line)
|
|||
{
|
||||
const bool tlb = TOK_P_GETTLBVERSION == which_token;
|
||||
const TCHAR *cmdname = tlb ? _T("!gettlbversion") : _T("!getdllversion"), *path;
|
||||
DWORD ti = 1, flags = tlb ? PPGVHF_TLB : 0, low, high;
|
||||
DWORD ti = 1, flags = tlb ? PPGVHF_TLB : 0, low, high, prod = 0;
|
||||
for (;; ++ti)
|
||||
{
|
||||
if (!_tcsicmp(line.gettoken_str(ti), _T("/noerrors")))
|
||||
flags |= PPGVHF_NOERRORS;
|
||||
else if (!_tcsicmp(line.gettoken_str(ti), _T("/packed")))
|
||||
flags |= PPGVHF_PACKED;
|
||||
else if (!_tcsicmp(line.gettoken_str(ti), _T("/productversion")))
|
||||
++prod;
|
||||
else
|
||||
break;
|
||||
}
|
||||
if ((tlb ? GetTLBVersion : GetDLLVersion)(path = line.gettoken_str(ti), high, low)) flags |= PPGVHF_VALID;
|
||||
if ((tlb ? GetTLBVersion : GetDLLVersion)(path = line.gettoken_str(ti), high, low, !!prod)) flags |= PPGVHF_VALID;
|
||||
return pp_getversionhelper(cmdname, path, line.gettoken_str(ti+1), high, low, flags);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue