Language strings inside any other strings, $$ defines fix, both currently disabled by defines, support for /LANG in command VIAddVersionKey
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2652 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
45a9eb4ae7
commit
a558797625
11 changed files with 200 additions and 21 deletions
|
@ -333,7 +333,11 @@ char ps_tmpbuf[NSIS_MAX_STRLEN*2];
|
|||
|
||||
char * NSISCALL process_string_fromtab(char *out, int offs)
|
||||
{
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
char *p=process_string(GetStringFromStringTab(offs), 0);
|
||||
#else
|
||||
char *p=process_string(GetStringFromStringTab(offs));
|
||||
#endif
|
||||
if (!out) return p;
|
||||
return lstrcpyn(out,p,NSIS_MAX_STRLEN);
|
||||
}
|
||||
|
@ -394,9 +398,17 @@ int NSISCALL mystrlen(const char *in)
|
|||
}
|
||||
|
||||
// Dave Laundon's simplified process_string
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
char * NSISCALL process_string(const char *in, int iStartIdx )
|
||||
#else
|
||||
char * NSISCALL process_string(const char *in)
|
||||
#endif
|
||||
{
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
char *out = ps_tmpbuf+iStartIdx;
|
||||
#else
|
||||
char *out = ps_tmpbuf;
|
||||
#endif
|
||||
while (*in && out - ps_tmpbuf < NSIS_MAX_STRLEN)
|
||||
{
|
||||
int nVarIdx = (unsigned char)*in++;
|
||||
|
@ -525,11 +537,7 @@ char * NSISCALL process_string(const char *in)
|
|||
{
|
||||
*out++ = *in++;
|
||||
}
|
||||
else if (nVarIdx != VAR_CODES_START)
|
||||
{
|
||||
*out++ = nVarIdx;
|
||||
}
|
||||
else
|
||||
else if (nVarIdx == VAR_CODES_START)
|
||||
{
|
||||
DWORD f;
|
||||
static char smwcvesf[]="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
|
||||
|
@ -613,6 +621,19 @@ char * NSISCALL process_string(const char *in)
|
|||
}
|
||||
out+=mystrlen(out);
|
||||
} // == VAR_CODES_START
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
else if ( nVarIdx == LANG_CODES_START )
|
||||
{
|
||||
char *p;
|
||||
nVarIdx = *(short*)in; in+=sizeof(WORD);
|
||||
p = process_string(GetStringFromStringTab(nVarIdx), out-ps_tmpbuf);
|
||||
out+=mystrlen(out);
|
||||
}
|
||||
#endif
|
||||
else // Normal char
|
||||
{
|
||||
*out++ = nVarIdx;
|
||||
}
|
||||
#endif
|
||||
} // while
|
||||
*out = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue