summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-25 15:21:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-25 15:21:45 +0000
commit6cd5066a4a158b7d6ec0ca5c210c51b251c8c14d (patch)
tree6c51eb75da1284779c1652dbc0ef7a8522e40689 /plugins/PluginUpdater
parent2925e6ef90c51c6252613613b4eabf5474aef76b (diff)
attempt to use masks in PU
git-svn-id: http://svn.miranda-ng.org/main/trunk@8740 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp73
-rw-r--r--plugins/PluginUpdater/src/Version.h2
2 files changed, 27 insertions, 48 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index ac9a8b1fab..09b9933d22 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -360,58 +360,37 @@ static renameTable[] =
{ _T("dbx_mmap_sa.dll"), _T("Plugins\\dbx_mmap.dll") },
{ _T("proto_newsaggr.dll"), _T("Icons\\proto_newsaggregator.dll") },
- { _T("clienticons_general.dll"), _T("Icons\\fp_icons.dll") },
- { _T("clienticons_miranda.dll"), _T("Icons\\fp_icons.dll") },
- { _T("fp_icq.dll"), _T("Icons\\fp_icons.dll") },
- { _T("fp_jabber.dll"), _T("Icons\\fp_icons.dll") },
- { _T("clienticons_aim.dll"), _T("") },
- { _T("clienticons_gadu.dll"), _T("") },
- { _T("clienticons_gg.dll"), _T("") },
- { _T("clienticons_icq.dll"), _T("") },
- { _T("clienticons_irc.dll"), _T("") },
- { _T("clienticons_jabber.dll"), _T("") },
- { _T("clienticons_mra.dll"), _T("") },
- { _T("clienticons_msn.dll"), _T("") },
- { _T("clienticons_multiproto.dll"), _T("") },
- { _T("clienticons_multiprotocols.dll"), _T("") },
- { _T("clienticons_others.dll"), _T("") },
- { _T("clienticons_overlays.dll"), _T("") },
- { _T("clienticons_packs.dll"), _T("") },
- { _T("clienticons_qq.dll"), _T("") },
- { _T("clienticons_rss.dll"), _T("") },
- { _T("clienticons_skype.dll"), _T("") },
- { _T("clienticons_tlen.dll"), _T("") },
- { _T("clienticons_voip.dll"), _T("") },
- { _T("clienticons_weather.dll"), _T("") },
- { _T("clienticons_yahoo.dll"), _T("") },
- { _T("fp_aim.dll"), _T("") },
- { _T("fp_c6_mra_skype.dll"), _T("") },
- { _T("fp_gg.dll"), _T("") },
- { _T("fp_irc.dll"), _T("") },
- { _T("fp_msn.dll"), _T("") },
- { _T("fp_packs.dll"), _T("") },
- { _T("fp_qq.dll"), _T("") },
- { _T("fp_rss.dll"), _T("") },
- { _T("fp_tlen.dll"), _T("") },
- { _T("fp_weather.dll"), _T("") },
- { _T("fp_yahoo.dll"), _T("") },
-
- { _T("clist_classic.dll"), _T("") },
- { _T("chat.dll"), _T("") },
- { _T("gender.dll"), _T("") },
- { _T("srmm.dll"), _T("") },
- { _T("extraicons.dll"), _T("") },
- { _T("langman.dll"), _T("") },
- { _T("metacontacts.dll"), _T("") },
+ { _T("clienticons_*.dll"), _T("Icons\\fp_icons.dll") },
+ { _T("fp_*.dll"), _T("Icons\\fp_icons.dll") },
+
+ { _T("langpack_*.txt"), _T("Languages\\*") },
+
+ { _T("clist_classic.dll"), NULL },
+ { _T("chat.dll"), NULL },
+ { _T("gender.dll"), NULL },
+ { _T("srmm.dll"), NULL },
+ { _T("extraicons.dll"), NULL },
+ { _T("langman.dll"), NULL },
+ { _T("metacontacts.dll"), NULL },
};
static bool CheckFileRename(const TCHAR *ptszOldName, TCHAR *pNewName)
{
- for (int i=0; i < SIZEOF(renameTable); i++)
- if (!_tcsicmp(ptszOldName, renameTable[i].oldName)) {
- _tcscpy(pNewName, renameTable[i].newName);
- return true;
+ for (int i = 0; i < SIZEOF(renameTable); i++) {
+ if (!wildcmpit(ptszOldName, renameTable[i].oldName))
+ continue;
+
+ TCHAR *ptszDest = renameTable[i].newName;
+ if (ptszDest == NULL)
+ *pNewName = 0;
+ else {
+ _tcsncpy_s(pNewName, MAX_PATH, ptszDest, _TRUNCATE);
+ size_t cbLen = _tcslen(ptszDest) - 1;
+ if (pNewName[cbLen] == '*')
+ _tcsncpy_s(pNewName + cbLen, MAX_PATH - cbLen, ptszOldName, _TRUNCATE);
}
+ return true;
+ }
return false;
}
diff --git a/plugins/PluginUpdater/src/Version.h b/plugins/PluginUpdater/src/Version.h
index 7a2d8d317a..891e33d56f 100644
--- a/plugins/PluginUpdater/src/Version.h
+++ b/plugins/PluginUpdater/src/Version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 1
-#define __BUILD_NUM 7
+#define __BUILD_NUM 8
#include <stdver.h>