NsisIn.cpp (p7zip_15.14.1_src_all) | : | NsisIn.cpp (p7zip_16.02_src_all) | ||
---|---|---|---|---|
skipping to change at line 89 | skipping to change at line 89 | |||
EW_STRCMP, // StrCmp | EW_STRCMP, // StrCmp | |||
EW_READENVSTR, // ReadEnvStr, ExpandEnvStrings | EW_READENVSTR, // ReadEnvStr, ExpandEnvStrings | |||
EW_INTCMP, // IntCmp, IntCmpU | EW_INTCMP, // IntCmp, IntCmpU | |||
EW_INTOP, // IntOp | EW_INTOP, // IntOp | |||
EW_INTFMT, // IntFmt | EW_INTFMT, // IntFmt | |||
EW_PUSHPOP, // Push/Pop/Exchange | EW_PUSHPOP, // Push/Pop/Exchange | |||
EW_FINDWINDOW, // FindWindow | EW_FINDWINDOW, // FindWindow | |||
EW_SENDMESSAGE, // SendMessage | EW_SENDMESSAGE, // SendMessage | |||
EW_ISWINDOW, // IsWindow | EW_ISWINDOW, // IsWindow | |||
EW_GETDLGITEM, // GetDlgItem | EW_GETDLGITEM, // GetDlgItem | |||
EW_SETCTLCOLORS, // SerCtlColors | EW_SETCTLCOLORS, // SetCtlColors | |||
EW_SETBRANDINGIMAGE, // SetBrandingImage | EW_SETBRANDINGIMAGE, // SetBrandingImage | |||
EW_CREATEFONT, // CreateFont | EW_CREATEFONT, // CreateFont | |||
EW_SHOWWINDOW, // ShowWindow, EnableWindow, HideWindow | EW_SHOWWINDOW, // ShowWindow, EnableWindow, HideWindow | |||
EW_SHELLEXEC, // ExecShell | EW_SHELLEXEC, // ExecShell | |||
EW_EXECUTE, // Exec, ExecWait | EW_EXECUTE, // Exec, ExecWait | |||
EW_GETFILETIME, // GetFileTime | EW_GETFILETIME, // GetFileTime | |||
EW_GETDLLVERSION, // GetDLLVersion | EW_GETDLLVERSION, // GetDLLVersion | |||
// EW_GETFONTVERSION, // Park : 2.46.2 | // EW_GETFONTVERSION, // Park : 2.46.2 | |||
// EW_GETFONTNAME, // Park : 2.46.3 | // EW_GETFONTNAME, // Park : 2.46.3 | |||
skipping to change at line 1151 | skipping to change at line 1151 | |||
Raw_UString.SetFromAscii(Raw_AString); | Raw_UString.SetFromAscii(Raw_AString); | |||
} | } | |||
bool CInArchive::IsGoodString(UInt32 param) const | bool CInArchive::IsGoodString(UInt32 param) const | |||
{ | { | |||
if (param >= NumStringChars) | if (param >= NumStringChars) | |||
return false; | return false; | |||
if (param == 0) | if (param == 0) | |||
return true; | return true; | |||
const Byte *p = _data + _stringsPos; | const Byte *p = _data + _stringsPos; | |||
unsigned c; | ||||
if (IsUnicode) | if (IsUnicode) | |||
return (Get16(p + param * 2 - 2)) == 0; | c = Get16(p + param * 2 - 2); | |||
return p[param - 1] == 0; | else | |||
c = p[param - 1]; | ||||
// some files have '\\' character before string? | ||||
return (c == 0 || c == '\\'); | ||||
} | } | |||
bool CInArchive::AreTwoParamStringsEqual(UInt32 param1, UInt32 param2) const | bool CInArchive::AreTwoParamStringsEqual(UInt32 param1, UInt32 param2) const | |||
{ | { | |||
if (param1 == param2) | if (param1 == param2) | |||
return true; | return true; | |||
/* NSIS-3.0a1 probably contains bug, so it can use 2 different strings | /* NSIS-3.0a1 probably contains bug, so it can use 2 different strings | |||
with same content. So we check real string also. | with same content. So we check real string also. | |||
Also it's possible to check identical postfix parts of strings. */ | Also it's possible to check identical postfix parts of strings. */ | |||
skipping to change at line 1504 | skipping to change at line 1508 | |||
{ | { | |||
AddParams(params, GetNumParams(params, num)); | AddParams(params, GetNumParams(params, num)); | |||
} | } | |||
static const UInt32 CMD_REF_Goto = (1 << 0); | static const UInt32 CMD_REF_Goto = (1 << 0); | |||
static const UInt32 CMD_REF_Call = (1 << 1); | static const UInt32 CMD_REF_Call = (1 << 1); | |||
static const UInt32 CMD_REF_Pre = (1 << 2); | static const UInt32 CMD_REF_Pre = (1 << 2); | |||
static const UInt32 CMD_REF_Show = (1 << 3); | static const UInt32 CMD_REF_Show = (1 << 3); | |||
static const UInt32 CMD_REF_Leave = (1 << 4); | static const UInt32 CMD_REF_Leave = (1 << 4); | |||
static const UInt32 CMD_REF_OnFunc = (1 << 5); | static const UInt32 CMD_REF_OnFunc = (1 << 5); | |||
static const UInt32 CMD_REF_Section = (1 << 6); | static const UInt32 CMD_REF_Section = (1 << 6); | |||
static const UInt32 CMD_REF_InitPluginDir = (1 << 7); | static const UInt32 CMD_REF_InitPluginDir = (1 << 7); | |||
// static const UInt32 CMD_REF_Creator = (1 << 5); // _Pre is used instead | // static const UInt32 CMD_REF_Creator = (1 << 5); // _Pre is used instead | |||
static const unsigned CMD_REF_OnFunc_NumShifts = 28; // it uses for onFunc too | static const unsigned CMD_REF_OnFunc_NumShifts = 28; // it uses for onFunc too | |||
static const unsigned CMD_REF_Page_NumShifts = 16; // it uses for onFunc too | static const unsigned CMD_REF_Page_NumShifts = 16; // it uses for onFunc too | |||
static const UInt32 CMD_REF_Page_Mask = 0x0FFF0000; | static const UInt32 CMD_REF_Page_Mask = 0x0FFF0000; | |||
static const UInt32 CMD_REF_OnFunc_Mask = 0xF0000000; | static const UInt32 CMD_REF_OnFunc_Mask = 0xF0000000; | |||
inline bool IsPageFunc(UInt32 flag) | inline bool IsPageFunc(UInt32 flag) | |||
{ | { | |||
return (flag & (CMD_REF_Pre | CMD_REF_Show | CMD_REF_Leave)) != 0; | return (flag & (CMD_REF_Pre | CMD_REF_Show | CMD_REF_Leave)) != 0; | |||
skipping to change at line 3345 | skipping to change at line 3349 | |||
if (idx == (Int32)spec_outdir_VarIndex) | if (idx == (Int32)spec_outdir_VarIndex) | |||
Raw_AString.Insert(0, spec_outdir_A); | Raw_AString.Insert(0, spec_outdir_A); | |||
else if (idx == kVar_OUTDIR) | else if (idx == kVar_OUTDIR) | |||
Raw_AString.Insert(0, APrefixes.Back()); | Raw_AString.Insert(0, APrefixes.Back()); | |||
APrefixes.Add(Raw_AString); | APrefixes.Add(Raw_AString); | |||
} | } | |||
} | } | |||
#ifdef NSIS_SCRIPT | #ifdef NSIS_SCRIPT | |||
s += isSetOutPath ? "SetOutPath" : "CreateDirectory"; | s += isSetOutPath ? "SetOutPath" : "CreateDirectory"; | |||
AddParam(params[0]); | AddParam(params[0]); | |||
#endif | #endif | |||
break; | break; | |||
} | } | |||
case EW_ASSIGNVAR: | case EW_ASSIGNVAR: | |||
{ | { | |||
if (params[0] == spec_outdir_VarIndex) | if (params[0] == spec_outdir_VarIndex) | |||
{ | { | |||
spec_outdir_U.Empty(); | spec_outdir_U.Empty(); | |||
skipping to change at line 3557 | skipping to change at line 3561 | |||
altPathOk = false; | altPathOk = false; | |||
UInt32 additional = 0; | UInt32 additional = 0; | |||
if (GetVarIndexFinished(altParam, '\\', additional) == kVar_INSTDIR) | if (GetVarIndexFinished(altParam, '\\', additional) == kVar_INSTDIR) | |||
altPathOk = AreTwoParamStringsEqual(altParam + additional, params[0] ); | altPathOk = AreTwoParamStringsEqual(altParam + additional, params[0] ); | |||
} | } | |||
#ifdef NSIS_SCRIPT | #ifdef NSIS_SCRIPT | |||
AddParam(params[0]); | AddParam(params[0]); | |||
SmallSpaceComment(); | ||||
/* | /* | |||
for (int i = 1; i < 3; i++) | for (int i = 1; i < 3; i++) | |||
AddParam_UInt(params[i]); | AddParam_UInt(params[i]); | |||
*/ | */ | |||
if (params[3] != 0) | if (params[3] != 0) | |||
{ | ||||
SmallSpaceComment(); | ||||
AddParam(params[3]); | AddParam(params[3]); | |||
} | ||||
#endif | #endif | |||
if (!altPathOk) | if (!altPathOk) | |||
{ | { | |||
#ifdef NSIS_SCRIPT | #ifdef NSIS_SCRIPT | |||
AddError("alt path error"); | AddError("alt path error"); | |||
#endif | #endif | |||
} | } | |||
End of changes. 8 change blocks. | ||||
7 lines changed or deleted | 12 lines changed or added |