mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Updater: Support DLLs for win32 and win64
This commit is contained in:
parent
88780b8fbc
commit
32db2e6915
|
@ -221,8 +221,24 @@ void CUpdater::PerformUpdate()
|
|||
{
|
||||
if(it->second)
|
||||
{
|
||||
FetchFile(it->first.c_str());
|
||||
aLastFile = it->first.c_str();
|
||||
const char *pFile = it->first.c_str();
|
||||
size_t len = str_length(pFile);
|
||||
if(!str_comp_nocase(pFile + len - 4, ".dll"))
|
||||
{
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
char aBuf[512];
|
||||
str_copy(aBuf, pFile, sizeof(aBuf)); // SDL
|
||||
str_copy(aBuf + len - 4, "-" PLAT_NAME, sizeof(aBuf) - len + 4); // -win32
|
||||
str_append(aBuf, pFile + len - 4, sizeof(aBuf)); // .dll
|
||||
FetchFile(aBuf, pFile);
|
||||
#endif
|
||||
// Ignore DLL downloads on other platforms, on Linux we statically link anyway
|
||||
}
|
||||
else
|
||||
{
|
||||
FetchFile(pFile);
|
||||
}
|
||||
aLastFile = pFile;
|
||||
}
|
||||
else
|
||||
m_pStorage->RemoveBinaryFile(it->first.c_str());
|
||||
|
|
Loading…
Reference in a new issue