Adapt wingup new version 4.1 to distinguish between 32 and 64 bit for update

This commit is contained in:
Don Ho 2016-09-20 01:01:40 +02:00
parent 51797bf59e
commit 53ca639b17
4 changed files with 19 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@ -2618,12 +2618,21 @@ void Notepad_plus::command(int id)
generic_string updaterFullPath = updaterDir;
PathAppend(updaterFullPath, TEXT("gup.exe"));
generic_string param = TEXT("-verbose -v");
param += VERSION_VALUE;
generic_string param;
if (id == IDM_CONFUPDATERPROXY)
{
param = TEXT("-options");
}
else
{
param = TEXT("-verbose -v");
param += VERSION_VALUE;
if (NppParameters::getInstance()->isx64())
{
param += TEXT(" -px64");
}
}
Process updater(updaterFullPath.c_str(), param.c_str(), updaterDir.c_str());
updater.run();

View File

@ -418,8 +418,8 @@ DEVOMER*/
generic_string updaterFullPath = updaterDir + TEXT("gup.exe");
generic_string version = TEXT("-v");
version += VERSION_VALUE;
generic_string updaterParams = TEXT("-v");
updaterParams += VERSION_VALUE;
bool isUpExist = nppGui._doesExistUpdater = (::PathFileExists(updaterFullPath.c_str()) == TRUE);
@ -438,7 +438,11 @@ DEVOMER*/
bool isGtXP = ver > WV_XP;
if (TheFirstOne && isUpExist && doUpdate && isGtXP)
{
Process updater(updaterFullPath.c_str(), version.c_str(), updaterDir.c_str());
if (pNppParameters->isx64())
{
updaterParams += TEXT(" -px64");
}
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
updater.run();
// Update next update date