Skip to content

Commit

Permalink
DialogInstall: Partially reverted 5e66445 to fix bitness issue with s…
Browse files Browse the repository at this point in the history
…kin installer
  • Loading branch information
brianferguson committed Jul 21, 2023
1 parent 8930785 commit dc6dd4c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Library/DialogInstall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ extern GlobalData g_Data;

DialogInstall* DialogInstall::c_Dialog = nullptr;

inline bool IsWin32Build()
{
#ifdef _WIN64
return false;
#else
return true;
#endif
}

/*
** Constructor.
**
Expand Down Expand Up @@ -517,7 +526,7 @@ bool DialogInstall::ReadPackage()
m_PackageAddons.insert(item);
}
else if (_wcsicmp(component, L"Plugins") == 0 &&
_wcsicmp(itemSz, GetPlatform().Is64Bit() ? L"64bit" : L"32bit") == 0 &&
_wcsicmp(itemSz, IsWin32Build() ? L"32bit" : L"64bit") == 0 &&
_wcsicmp(extension, L".dll") == 0 &&
!wcschr(pos + 1, L'\\'))
{
Expand Down Expand Up @@ -767,7 +776,7 @@ bool DialogInstall::InstallPackage()
targetPath += L"Addons\\";
}
else if (_wcsicmp(component, L"Plugins") == 0 &&
_wcsnicmp(path, GetPlatform().Is64Bit() ? L"64bit" : L"32bit", pos - path) == 0 &&
_wcsnicmp(path, IsWin32Build() ? L"32bit" : L"64bit", pos - path) == 0 &&
_wcsicmp(extension, L".dll") == 0 &&
!wcschr(pos + 1, L'\\'))
{
Expand Down

0 comments on commit dc6dd4c

Please sign in to comment.