summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/PluginUpdater
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/pu_stub/pu_stub.cpp4
-rw-r--r--plugins/PluginUpdater/src/Compat/compat.cpp6
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp24
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp194
-rw-r--r--plugins/PluginUpdater/src/Events.cpp10
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp2
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp2
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp46
-rw-r--r--plugins/PluginUpdater/src/stdafx.h6
-rw-r--r--plugins/PluginUpdater/src/unzipfile.cpp4
10 files changed, 149 insertions, 149 deletions
diff --git a/plugins/PluginUpdater/pu_stub/pu_stub.cpp b/plugins/PluginUpdater/pu_stub/pu_stub.cpp
index 8b3e25896d..8167c32d83 100644
--- a/plugins/PluginUpdater/pu_stub/pu_stub.cpp
+++ b/plugins/PluginUpdater/pu_stub/pu_stub.cpp
@@ -66,9 +66,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int)
TCHAR tszPipeName[MAX_PATH];
#if _MSC_VER < 1400
- _stprintf(tszPipeName, _T("\\\\.\\pipe\\Miranda_Pu_%s"), lpCmdLine);
+ _stprintf(tszPipeName, L"\\\\.\\pipe\\Miranda_Pu_%s", lpCmdLine);
#else
- _stprintf_s(tszPipeName, MAX_PATH, _T("\\\\.\\pipe\\Miranda_Pu_%s"), lpCmdLine);
+ _stprintf_s(tszPipeName, MAX_PATH, L"\\\\.\\pipe\\Miranda_Pu_%s", lpCmdLine);
#endif
log( L"Opening pipe %s...", tszPipeName);
HANDLE hPipe = CreateFile(tszPipeName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
diff --git a/plugins/PluginUpdater/src/Compat/compat.cpp b/plugins/PluginUpdater/src/Compat/compat.cpp
index 35533ffd6a..4d46cca5fc 100644
--- a/plugins/PluginUpdater/src/Compat/compat.cpp
+++ b/plugins/PluginUpdater/src/Compat/compat.cpp
@@ -106,8 +106,8 @@ void __stdcall RestartMe(void*)
TCHAR mirandaPath[MAX_PATH], cmdLine[MAX_PATH];
GetModuleFileName(NULL, mirandaPath, SIZEOF(mirandaPath));
- TCHAR *profilename = Utils_ReplaceVarsT(_T("%miranda_profilename%"));
- mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d /profile=%s"), mirandaPath, GetCurrentProcessId(), profilename);
+ TCHAR *profilename = Utils_ReplaceVarsT(L"%miranda_profilename%");
+ mir_sntprintf(cmdLine, SIZEOF(cmdLine), L"\"%s\" /restart:%d /profile=%s", mirandaPath, GetCurrentProcessId(), profilename);
mir_free(profilename);
CallService("CloseAction", 0, 0);
@@ -139,5 +139,5 @@ void InitIcoLib()
}
TCHAR *GetDefaultUrl() {
- return mir_tstrdup(_T("http://miranda-ng.org/distr/deprecated/0.94.9/x%platform%"));
+ return mir_tstrdup(L"http://miranda-ng.org/distr/deprecated/0.94.9/x%platform%");
}
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index 6ad434754f..3d6b7ed772 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -55,13 +55,13 @@ static void ApplyDownloads(void *param)
//create needed folders after escalating priviledges. Folders creates when we actually install updates
TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
- mir_sntprintf(tszFileBack, _T("%s\\Backups"), g_tszRoot);
+ mir_sntprintf(tszFileBack, L"%s\\Backups", g_tszRoot);
SafeCreateDirectory(tszFileBack);
- mir_sntprintf(tszFileTemp, _T("%s\\Temp"), g_tszRoot);
+ mir_sntprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
- VARST tszMirandaPath(_T("%miranda_path%"));
+ VARST tszMirandaPath(L"%miranda_path%");
HANDLE nlc = NULL;
for (int i=0; i < todo.getCount(); ++i) {
@@ -168,7 +168,7 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
TCHAR *ext = _tcsrchr(szPath, '.');
if (ext != NULL)
*ext = '\0';
- _tcscat(szPath, _T(".test"));
+ _tcscat(szPath, L".test");
HANDLE hFile = CreateFile(szPath, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
// Running Windows Vista or later (major version >= 6).
@@ -230,7 +230,7 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
int groupId = 4;
if (_tcschr(todo[i].tszOldName, L'\\') != NULL)
- groupId = (_tcsstr(todo[i].tszOldName, _T("Plugins")) != NULL) ? 1 : ((_tcsstr(todo[i].tszOldName, _T("Languages")) != NULL) ? 3 : 2);
+ groupId = (_tcsstr(todo[i].tszOldName, L"Plugins") != NULL) ? 1 : ((_tcsstr(todo[i].tszOldName, L"Languages") != NULL) ? 3 : 2);
lvi.iItem = i;
lvi.lParam = (LPARAM)&todo[i];
@@ -362,13 +362,13 @@ static FILEINFO* ServerEntryToFileInfo(const ServListEntry &hash, const TCHAR* t
tp = _tcschr(tszRelFileName, L'\\'); if (tp) tp++; else tp = tszRelFileName;
_tcslwr(tp);
- mir_sntprintf(FileInfo->File.tszDiskPath, _T("%s\\Temp\\%s.zip"), g_tszRoot, tszFileName);
- mir_sntprintf(FileInfo->File.tszDownloadURL, _T("%s/%s.zip"), tszBaseUrl, tszRelFileName);
+ mir_sntprintf(FileInfo->File.tszDiskPath, L"%s\\Temp\\%s.zip", g_tszRoot, tszFileName);
+ mir_sntprintf(FileInfo->File.tszDownloadURL, L"%s/%s.zip", tszBaseUrl, tszRelFileName);
for (tp = _tcschr(FileInfo->File.tszDownloadURL, '\\'); tp != 0; tp = _tcschr(tp, '\\'))
*tp++ = '/';
FileInfo->File.CRCsum = hash.m_crc;
// Load list of checked Plugins from database
- Netlib_LogfT(hNetlibUser, _T("File %s found"), FileInfo->tszOldName);
+ Netlib_LogfT(hNetlibUser, L"File %s found", FileInfo->tszOldName);
FileInfo->bEnabled = db_get_b(NULL, DB_MODULE_NEW_FILES, _T2A(FileInfo->tszOldName)) != 0;
return FileInfo;
}
@@ -393,13 +393,13 @@ static void GetList(void *)
}
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(_T("%miranda_path%"));
+ VARST dirname(L"%miranda_path%");
for (int i=0; i < hashes.getCount(); i++) {
ServListEntry &hash = hashes[i];
TCHAR tszPath[MAX_PATH];
- mir_sntprintf(tszPath, _T("%s\\%s"), dirname, hash.m_name);
+ mir_sntprintf(tszPath, L"%s\\%s", dirname, hash.m_name);
if (GetFileAttributes(tszPath) == INVALID_FILE_ATTRIBUTES) {
FILEINFO *FileInfo = ServerEntryToFileInfo(hash, baseUrl, tszPath);
@@ -480,9 +480,9 @@ static INT_PTR ParseUriService(WPARAM, LPARAM lParam)
if (hash == NULL)
return 0;
- VARST dirName(_T("%miranda_path%"));
+ VARST dirName(L"%miranda_path%");
TCHAR tszPath[MAX_PATH];
- mir_sntprintf(tszPath, _T("%s\\%s"), dirName, hash->m_name);
+ mir_sntprintf(tszPath, L"%s\\%s", dirName, hash->m_name);
FILEINFO *fileInfo = ServerEntryToFileInfo(*hash, baseUrl, tszPath);
FILELIST *fileList = new FILELIST(1);
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index 2b636c5a2a..38e3646421 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -61,9 +61,9 @@ static void ApplyUpdates(void *param)
HWND hwndList = GetDlgItem(hDlg, IDC_LIST_UPDATES);
//create needed folders after escalating priviledges. Folders creates when we actually install updates
TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
- mir_sntprintf(tszFileBack, _T("%s\\Backups"), g_tszRoot);
+ mir_sntprintf(tszFileBack, L"%s\\Backups", g_tszRoot);
SafeCreateDirectory(tszFileBack);
- mir_sntprintf(tszFileTemp, _T("%s\\Temp"), g_tszRoot);
+ mir_sntprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
// 2) Download all plugins
@@ -96,14 +96,14 @@ static void ApplyUpdates(void *param)
Netlib_CloseHandle(nlc);
// 3) Unpack all zips
- VARST tszMirandaPath(_T("%miranda_path%"));
+ VARST tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < todo.getCount(); i++) {
FILEINFO& p = todo[i];
if (p.bEnabled) {
if (p.bDeleteOnly) {
// we need only to backup the old file
TCHAR *ptszRelPath = p.tszNewName + _tcslen(tszMirandaPath) + 1, tszBackFile[MAX_PATH];
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, ptszRelPath);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, ptszRelPath);
BackupFile(p.tszNewName, tszBackFile);
}
else {
@@ -111,8 +111,8 @@ static void ApplyUpdates(void *param)
// otherwise it would be replaced by unzip
if ( _tcsicmp(p.tszOldName, p.tszNewName)) {
TCHAR tszSrcPath[MAX_PATH], tszBackFile[MAX_PATH];
- mir_sntprintf(tszSrcPath, _T("%s\\%s"), tszMirandaPath, p.tszOldName);
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, p.tszOldName);
+ mir_sntprintf(tszSrcPath, L"%s\\%s", tszMirandaPath, p.tszOldName);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, p.tszOldName);
BackupFile(tszSrcPath, tszBackFile);
}
@@ -126,8 +126,8 @@ static void ApplyUpdates(void *param)
#if MIRANDA_VER < 0x0A00
// 4) Change title of clist
ptrT title(db_get_tsa(NULL, "CList", "TitleText"));
- if (!lstrcmpi(title, _T("Miranda IM")))
- db_set_ts(NULL, "CList", "TitleText", _T("Miranda NG"));
+ if (!lstrcmpi(title, L"Miranda IM"))
+ db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
#endif
db_set_b(NULL, MODNAME, DB_SETTING_RESTART_COUNT, 5);
@@ -165,9 +165,9 @@ static void ApplyUpdates(void *param)
TCHAR mirstartpath[MAX_PATH];
#ifdef _WIN64
- mir_sntprintf(mirstartpath, _T("%s\\miranda32.exe"), tszMirandaPath);
+ mir_sntprintf(mirstartpath, L"%s\\miranda32.exe", tszMirandaPath);
#else
- mir_sntprintf(mirstartpath, _T("%s\\miranda64.exe"), tszMirandaPath);
+ mir_sntprintf(mirstartpath, L"%s\\miranda64.exe", tszMirandaPath);
#endif
CallServiceSync(MS_SYSTEM_RESTART, bRestartCurrentProfile, (LPARAM)mirstartpath);
}
@@ -210,7 +210,7 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
TCHAR *ext = _tcsrchr(szPath, '.');
if (ext != NULL)
*ext = '\0';
- _tcscat(szPath, _T(".test"));
+ _tcscat(szPath, L".test");
HANDLE hFile = CreateFile(szPath, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
// Running Windows Vista or later (major version >= 6).
@@ -268,9 +268,9 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
for (int i = 0; i < todo.getCount(); ++i) {
LVITEM lvI = {0};
lvI.mask = LVIF_TEXT | LVIF_PARAM | LVIF_GROUPID | LVIF_NORECOMPUTE;
- lvI.iGroupId = (_tcsstr(todo[i].tszOldName, _T("Plugins")) != NULL) ? 1 :
- ((_tcsstr(todo[i].tszOldName, _T("Languages")) != NULL) ? 3 :
- ((_tcsstr(todo[i].tszOldName, _T("Icons")) != NULL) ? 4 : 2));
+ lvI.iGroupId = (_tcsstr(todo[i].tszOldName, L"Plugins") != NULL) ? 1 :
+ ((_tcsstr(todo[i].tszOldName, L"Languages") != NULL) ? 3 :
+ ((_tcsstr(todo[i].tszOldName, L"Icons") != NULL) ? 4 : 2));
lvI.iSubItem = 0;
lvI.lParam = (LPARAM)&todo[i];
lvI.pszText = todo[i].tszOldName;
@@ -412,10 +412,10 @@ static void DlgUpdateSilent(void *param)
//create needed folders after escalating priviledges. Folders creates when we actually install updates
TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
- mir_sntprintf(tszFileBack, _T("%s\\Backups"), g_tszRoot);
+ mir_sntprintf(tszFileBack, L"%s\\Backups", g_tszRoot);
SafeCreateDirectory(tszFileBack);
- mir_sntprintf(tszFileTemp, _T("%s\\Temp"), g_tszRoot);
+ mir_sntprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
// 2) Download all plugins
@@ -446,14 +446,14 @@ static void DlgUpdateSilent(void *param)
}
// 3) Unpack all zips
- VARST tszMirandaPath(_T("%miranda_path%"));
+ VARST tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < UpdateFiles.getCount(); i++) {
FILEINFO& p = UpdateFiles[i];
if (p.bEnabled) {
if (p.bDeleteOnly) {
// we need only to backup the old file
TCHAR *ptszRelPath = p.tszNewName + _tcslen(tszMirandaPath) + 1, tszBackFile[MAX_PATH];
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, ptszRelPath);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, ptszRelPath);
BackupFile(p.tszNewName, tszBackFile);
}
else {
@@ -461,8 +461,8 @@ static void DlgUpdateSilent(void *param)
// otherwise it would be replaced by unzip
if (_tcsicmp(p.tszOldName, p.tszNewName)) {
TCHAR tszSrcPath[MAX_PATH], tszBackFile[MAX_PATH];
- mir_sntprintf(tszSrcPath, _T("%s\\%s"), tszMirandaPath, p.tszOldName);
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, p.tszOldName);
+ mir_sntprintf(tszSrcPath, L"%s\\%s", tszMirandaPath, p.tszOldName);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, p.tszOldName);
BackupFile(tszSrcPath, tszBackFile);
}
@@ -478,8 +478,8 @@ static void DlgUpdateSilent(void *param)
#if MIRANDA_VER < 0x0A00
// 4) Change title of clist
ptrT title = db_get_tsa(NULL, "CList", "TitleText");
- if (!_tcsicmp(title, _T("Miranda IM")))
- db_set_ts(NULL, "CList", "TitleText", _T("Miranda NG"));
+ if (!_tcsicmp(title, L"Miranda IM"))
+ db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
#endif
opts.bForceRedownload = false;
@@ -515,7 +515,7 @@ static void DlgUpdateSilent(void *param)
if (!notified) {
// Error, let's try to show MessageBox as last way to inform user about successful update
TCHAR tszText[200];
- mir_sntprintf(tszText, _T("%s\n\n%s"), TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
+ mir_sntprintf(tszText, L"%s\n\n%s", TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
if (MessageBox(NULL, tszText, tszTitle, MB_ICONINFORMATION | MB_YESNO) == IDYES)
#if MIRANDA_VER >= 0x0A00
@@ -544,61 +544,61 @@ struct
}
static renameTable[] =
{
- { _T("svc_dbepp.dll"), _T("Plugins\\dbeditorpp.dll") },
- { _T("svc_crshdmp.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("crashdmp.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("crashrpt.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("attache.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("svc_vi.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("crashrpt.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("versioninfo.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("advsplashscreen.dll"), _T("Plugins\\splashscreen.dll") },
- { _T("import_sa.dll"), _T("Plugins\\import.dll") },
- { _T("newnr.dll"), _T("Plugins\\notesreminders.dll") },
- { _T("dbtool.exe"), _T("Plugins\\dbchecker.dll") },
- { _T("dbtool_sa.exe"), _T("Plugins\\dbchecker.dll") },
- { _T("clist_mw.dll"), _T("Plugins\\clist_nicer.dll") },
- { _T("bclist.dll"), _T("Plugins\\clist_blind.dll") },
- { _T("otr.dll"), _T("Plugins\\mirotr.dll") },
- { _T("ttnotify.dll"), _T("Plugins\\tooltipnotify.dll") },
- { _T("newstatusnotify.dll"), _T("Plugins\\newxstatusnotify.dll") },
- { _T("rss.dll"), _T("Plugins\\newsaggregator.dll") },
- { _T("dbx_3x.dll"), _T("Plugins\\dbx_mmap.dll") },
- { _T("actman30.dll"), _T("Plugins\\actman.dll") },
- { _T("skype.dll"), _T("Plugins\\skypeweb.dll") },
- { _T("skypeclassic.dll"), _T("Plugins\\skypeweb.dll") },
- { _T("historysweeper.dll"), _T("Plugins\\historysweeperlight.dll") },
+ { L"svc_dbepp.dll", L"Plugins\\dbeditorpp.dll" },
+ { L"svc_crshdmp.dll", L"Plugins\\crashdumper.dll" },
+ { L"crashdmp.dll", L"Plugins\\crashdumper.dll" },
+ { L"crashrpt.dll", L"Plugins\\crashdumper.dll" },
+ { L"attache.dll", L"Plugins\\crashdumper.dll" },
+ { L"svc_vi.dll", L"Plugins\\crashdumper.dll" },
+ { L"crashrpt.dll", L"Plugins\\crashdumper.dll" },
+ { L"versioninfo.dll", L"Plugins\\crashdumper.dll" },
+ { L"advsplashscreen.dll", L"Plugins\\splashscreen.dll" },
+ { L"import_sa.dll", L"Plugins\\import.dll" },
+ { L"newnr.dll", L"Plugins\\notesreminders.dll" },
+ { L"dbtool.exe", L"Plugins\\dbchecker.dll" },
+ { L"dbtool_sa.exe", L"Plugins\\dbchecker.dll" },
+ { L"clist_mw.dll", L"Plugins\\clist_nicer.dll" },
+ { L"bclist.dll", L"Plugins\\clist_blind.dll" },
+ { L"otr.dll", L"Plugins\\mirotr.dll" },
+ { L"ttnotify.dll", L"Plugins\\tooltipnotify.dll" },
+ { L"newstatusnotify.dll", L"Plugins\\newxstatusnotify.dll" },
+ { L"rss.dll", L"Plugins\\newsaggregator.dll" },
+ { L"dbx_3x.dll", L"Plugins\\dbx_mmap.dll" },
+ { L"actman30.dll", L"Plugins\\actman.dll" },
+ { L"skype.dll", L"Plugins\\skypeweb.dll" },
+ { L"skypeclassic.dll", L"Plugins\\skypeweb.dll" },
+ { L"historysweeper.dll", L"Plugins\\historysweeperlight.dll" },
#if MIRANDA_VER >= 0x0A00
- { _T("dbx_mmap_sa.dll"), _T("Plugins\\dbx_mmap.dll") },
- { _T("dbx_tree.dll"), _T("Plugins\\dbx_mmap.dll") },
- { _T("rc4.dll"), NULL },
- { _T("athena.dll"), NULL },
- { _T("skypekit.exe"), NULL },
+ { L"dbx_mmap_sa.dll", L"Plugins\\dbx_mmap.dll" },
+ { L"dbx_tree.dll", L"Plugins\\dbx_mmap.dll" },
+ { L"rc4.dll", NULL },
+ { L"athena.dll", NULL },
+ { L"skypekit.exe", NULL },
#endif
- { _T("proto_newsaggr.dll"), _T("Icons\\proto_newsaggregator.dll") },
- { _T("clienticons_*.dll"), _T("Icons\\fp_icons.dll") },
- { _T("fp_*.dll"), _T("Icons\\fp_icons.dll") },
-
- { _T("langpack_*.txt"), _T("Languages\\*") },
-
- { _T("mir_app.dll"), NULL },
- { _T("mir_core.dll"), NULL },
- { _T("zlib.dll"), NULL },
- { _T("pcre16.dll"), NULL },
- { _T("clist_classic.dll"), NULL },
- { _T("chat.dll"), NULL },
- { _T("srmm.dll"), NULL },
- { _T("stdurl.dll"), NULL },
- { _T("extraicons.dll"), NULL },
- { _T("firstrun.dll"), NULL },
- { _T("flashavatars.dll"), NULL },
- { _T("gender.dll"), NULL },
- { _T("langman.dll"), NULL },
- { _T("metacontacts.dll"), NULL },
- { _T("xfire.dll"), NULL },
- { _T("WART-*.exe"), NULL },
+ { L"proto_newsaggr.dll", L"Icons\\proto_newsaggregator.dll" },
+ { L"clienticons_*.dll", L"Icons\\fp_icons.dll" },
+ { L"fp_*.dll", L"Icons\\fp_icons.dll" },
+
+ { L"langpack_*.txt", L"Languages\\*" },
+
+ { L"mir_app.dll", NULL },
+ { L"mir_core.dll", NULL },
+ { L"zlib.dll", NULL },
+ { L"pcre16.dll", NULL },
+ { L"clist_classic.dll", NULL },
+ { L"chat.dll", NULL },
+ { L"srmm.dll", NULL },
+ { L"stdurl.dll", NULL },
+ { L"extraicons.dll", NULL },
+ { L"firstrun.dll", NULL },
+ { L"flashavatars.dll", NULL },
+ { L"gender.dll", NULL },
+ { L"langman.dll", NULL },
+ { L"metacontacts.dll", NULL },
+ { L"xfire.dll", NULL },
+ { L"WART-*.exe", NULL },
};
// Checks if file needs to be renamed and copies it in pNewName
@@ -629,34 +629,34 @@ static bool isValidExtension(const TCHAR *ptszFileName)
{
const TCHAR *pExt = _tcsrchr(ptszFileName, '.');
- return (pExt != NULL) && (!_tcsicmp(pExt, _T(".dll")) || !_tcsicmp(pExt, _T(".exe")) || !_tcsicmp(pExt, _T(".txt")));
+ return (pExt != NULL) && (!_tcsicmp(pExt, L".dll") || !_tcsicmp(pExt, L".exe") || !_tcsicmp(pExt, L".txt"));
}
// We only scan subfolders "Plugins", "Icons", "Languages", "Libs", "Core"
static bool isValidDirectory(const TCHAR *ptszDirName)
{
- return !_tcsicmp(ptszDirName, _T("Plugins")) || !_tcsicmp(ptszDirName, _T("Icons")) || !_tcsicmp(ptszDirName, _T("Languages")) || !_tcsicmp(ptszDirName, _T("Libs")) || !_tcsicmp(ptszDirName, _T("Core"));
+ return !_tcsicmp(ptszDirName, L"Plugins") || !_tcsicmp(ptszDirName, L"Icons") || !_tcsicmp(ptszDirName, L"Languages") || !_tcsicmp(ptszDirName, L"Libs") || !_tcsicmp(ptszDirName, L"Core");
}
// Scans folders recursively
static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tszBaseUrl, SERVLIST& hashes, OBJLIST<FILEINFO> *UpdateFiles, int level = 0)
{
TCHAR tszBuf[MAX_PATH];
- mir_sntprintf(tszBuf, _T("%s\\*"), tszFolder);
+ mir_sntprintf(tszBuf, L"%s\\*", tszFolder);
WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(tszBuf, &ffd);
if (hFind == INVALID_HANDLE_VALUE)
return 0;
- Netlib_LogfT(hNetlibUser,_T("Scanning folder %s"), tszFolder);
+ Netlib_LogfT(hNetlibUser,L"Scanning folder %s", tszFolder);
int count = 0;
do {
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
// Scan recursively all subfolders
if (isValidDirectory(ffd.cFileName)) {
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, ffd.cFileName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, ffd.cFileName);
count += ScanFolder(tszBuf, cbBaseLen, tszBaseUrl, hashes, UpdateFiles, level + 1);
}
}
@@ -664,19 +664,19 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
// calculate the current file's relative name and store it into tszNewName
TCHAR tszNewName[MAX_PATH];
if (CheckFileRename(ffd.cFileName, tszNewName)) {
- Netlib_LogfT(hNetlibUser, _T("File %s will be renamed to %s."), ffd.cFileName, tszNewName);
+ Netlib_LogfT(hNetlibUser, L"File %s will be renamed to %s.", ffd.cFileName, tszNewName);
// Yes, we need the old file name, because this will be hashed later
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, ffd.cFileName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, ffd.cFileName);
}
else {
if (level == 0) {
// Rename Miranda*.exe
_tcsncpy_s(tszNewName, opts.bChangePlatform && !mir_tstrcmpi(ffd.cFileName, OLD_FILENAME) ? NEW_FILENAME : ffd.cFileName, _TRUNCATE);
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, tszNewName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, tszNewName);
}
else {
- mir_sntprintf(tszNewName, _T("%s\\%s"), tszFolder + cbBaseLen, ffd.cFileName);
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, ffd.cFileName);
+ mir_sntprintf(tszNewName, L"%s\\%s", tszFolder + cbBaseLen, ffd.cFileName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, ffd.cFileName);
}
}
@@ -692,7 +692,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
if (item == NULL) {
TCHAR *p = _tcsrchr(tszNewName, '.');
if (p[-1] != 'w' && p[-1] != 'W') {
- Netlib_LogfT(hNetlibUser, _T("File %s: Not found on server, skipping"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
continue;
}
@@ -700,7 +700,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
int iPos = int(p - tszNewName) - 1;
strdelt(p - 1, 1);
if ((item = hashes.find((ServListEntry*)&pName)) == NULL) {
- Netlib_LogfT(hNetlibUser, _T("File %s: Not found on server, skipping"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
continue;
}
@@ -716,11 +716,11 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
CalculateModuleHash(tszBuf, szMyHash);
// hashes are the same, skipping
if (strcmp(szMyHash, item->m_szHash) == 0) {
- Netlib_LogfT(hNetlibUser, _T("File %s: Already up-to-date, skipping"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Already up-to-date, skipping", ffd.cFileName);
continue;
}
else
- Netlib_LogfT(hNetlibUser, _T("File %s: Update available"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Update available", ffd.cFileName);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
@@ -728,7 +728,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
}
}
else
- Netlib_LogfT(hNetlibUser, _T("File %s: Forcing redownload"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Forcing redownload", ffd.cFileName);
#endif
ptszUrl = item->m_name;
@@ -736,8 +736,8 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
}
else {
// file was marked for deletion, add it to the list anyway
- Netlib_LogfT(hNetlibUser, _T("File %s: Marked for deletion"), ffd.cFileName);
- ptszUrl = _T("");
+ Netlib_LogfT(hNetlibUser, L"File %s: Marked for deletion", ffd.cFileName);
+ ptszUrl = L"";
MyCRC = 0;
}
@@ -761,8 +761,8 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
p = (p) ? p + 1 : tszBuf;
_tcslwr(p);
- mir_sntprintf(FileInfo->File.tszDiskPath, _T("%s\\Temp\\%s.zip"), g_tszRoot, p);
- mir_sntprintf(FileInfo->File.tszDownloadURL, _T("%s/%s.zip"), tszBaseUrl, tszBuf);
+ mir_sntprintf(FileInfo->File.tszDiskPath, L"%s\\Temp\\%s.zip", g_tszRoot, p);
+ mir_sntprintf(FileInfo->File.tszDownloadURL, L"%s/%s.zip", tszBaseUrl, tszBuf);
for (p = _tcschr(FileInfo->File.tszDownloadURL, '\\'); p != 0; p = _tcschr(p, '\\'))
*p++ = '/';
@@ -786,7 +786,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz
// Thread checks for updates
static void CheckUpdates(void *)
{
- Netlib_LogfT(hNetlibUser, _T("Checking for updates"));
+ Netlib_LogfT(hNetlibUser, L"Checking for updates");
Thread_SetName("PluginUpdater: CheckUpdates");
TCHAR tszTempPath[MAX_PATH];
@@ -802,7 +802,7 @@ static void CheckUpdates(void *)
bool success = ParseHashes(updateUrl, baseUrl, hashes);
if (success) {
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(_T("%miranda_path%"));
+ VARST dirname(L"%miranda_path%");
int count = ScanFolder(dirname, lstrlen(dirname) + 1, baseUrl, hashes, UpdateFiles);
// Show dialog
@@ -849,7 +849,7 @@ void UninitCheck()
// menu item command
static INT_PTR MenuCommand(WPARAM, LPARAM)
{
- Netlib_LogfT(hNetlibUser, _T("Update started manually!"));
+ Netlib_LogfT(hNetlibUser, L"Update started manually!");
DoCheck(false);
return 0;
}
@@ -875,7 +875,7 @@ void CheckUpdateOnStartup()
if ((now - was) < 86400)
return;
}
- Netlib_LogfT(hNetlibUser, _T("Update on startup started!"));
+ Netlib_LogfT(hNetlibUser, L"Update on startup started!");
DoCheck();
}
}
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp
index 41e730b449..1afbe741cc 100644
--- a/plugins/PluginUpdater/src/Events.cpp
+++ b/plugins/PluginUpdater/src/Events.cpp
@@ -23,7 +23,7 @@ HANDLE hPluginUpdaterFolder;
int OnFoldersChanged(WPARAM, LPARAM)
{
- FoldersGetCustomPathT(hPluginUpdaterFolder, g_tszRoot, MAX_PATH, _T(""));
+ FoldersGetCustomPathT(hPluginUpdaterFolder, g_tszRoot, MAX_PATH, L"");
size_t len = _tcslen(g_tszRoot);
if (g_tszRoot[len-1] == '\\' || g_tszRoot[len-1] == '/')
g_tszRoot[len-1] = 0;
@@ -36,21 +36,21 @@ void EmptyFolder()
NULL,
FO_DELETE,
g_tszRoot,
- _T(""),
+ L"",
FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION,
false,
0,
- _T("") };
+ L"" };
SHFileOperation(&file_op);
}
int ModulesLoaded(WPARAM, LPARAM)
{
- if (hPluginUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, LPGEN("Plugin Updater"), MIRANDA_PATHT _T("\\")DEFAULT_UPDATES_FOLDER)) {
+ if (hPluginUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, LPGEN("Plugin Updater"), MIRANDA_PATHW L"\\" DEFAULT_UPDATES_FOLDER)) {
HookEvent(ME_FOLDERS_PATH_CHANGED, OnFoldersChanged);
OnFoldersChanged(0, 0);
}
- else lstrcpyn(g_tszRoot, VARST( _T("%miranda_path%\\" DEFAULT_UPDATES_FOLDER)), _countof(g_tszRoot));
+ else lstrcpyn(g_tszRoot, VARST(L"%miranda_path%\\" DEFAULT_UPDATES_FOLDER), _countof(g_tszRoot));
#if MIRANDA_VER >= 0x0A00
if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE))
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index d2cae3353b..f21dd3481f 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -71,7 +71,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hPopup, UINT uMsg, WPARAM wParam, LPAR
static void _stdcall RestartPrompt(void *)
{
TCHAR tszText[200];
- mir_sntprintf(tszText, _T("%s\n\n%s"), TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
+ mir_sntprintf(tszText, L"%s\n\n%s", TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
if (MessageBox(0, tszText, TranslateT("Plugin Updater"), MB_YESNO | MB_ICONQUESTION | MB_TOPMOST) == IDYES)
CallService(MS_SYSTEM_RESTART, db_get_b(NULL, MODNAME, "RestartCurrentProfile", 1) ? 1 : 0, 0);
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 74554870cd..4a07853828 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -142,7 +142,7 @@ extern "C" __declspec(dllexport) int Load(void)
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
db_unset(0, MODNAME, DB_SETTING_UPDATE_URL);
}
- else if (!_tcscmp(dbvUpdateURL, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS_OLD)_T("/"))) {
+ else if (!_tcscmp(dbvUpdateURL, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS_OLD)L"/")) {
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK_SYMBOLS);
db_unset(0, MODNAME, DB_SETTING_UPDATE_URL);
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index ca31724626..2d3923b7cd 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -132,19 +132,19 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
{
REPLACEVARSARRAY vars[2];
#if MIRANDA_VER >=0x0A00
- vars[0].key.t = _T("platform");
+ vars[0].key.t = L"platform";
#ifdef _WIN64
- vars[0].value.t = _T("64");
+ vars[0].value.t = L"64";
#else
- vars[0].value.t = _T("32");
+ vars[0].value.t = L"32";
#endif
vars[1].key.t = vars[1].value.t = 0;
#else
- vars[0].lptzKey = _T("platform");
+ vars[0].lptzKey = L"platform";
#ifdef _WIN64
- vars[0].lptzValue = _T("64");
+ vars[0].lptzValue = L"64";
#else
- vars[0].lptzValue = _T("32");
+ vars[0].lptzValue = L"32";
#endif
vars[1].lptzKey = vars[1].lptzValue = 0;
#endif
@@ -152,8 +152,8 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
// Download version info
FILEURL pFileUrl;
- mir_sntprintf(pFileUrl.tszDownloadURL, _T("%s/hashes.zip"), baseUrl);
- mir_sntprintf(pFileUrl.tszDiskPath, _T("%s\\hashes.zip"), g_tszTempPath);
+ mir_sntprintf(pFileUrl.tszDownloadURL, L"%s/hashes.zip", baseUrl);
+ mir_sntprintf(pFileUrl.tszDiskPath, L"%s\\hashes.zip", g_tszTempPath);
pFileUrl.CRCsum = 0;
HANDLE nlc;
@@ -161,14 +161,14 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
Netlib_CloseHandle(nlc);
if (!ret) {
- Netlib_LogfT(hNetlibUser,_T("Downloading list of available updates from %s failed"),baseUrl);
+ Netlib_LogfT(hNetlibUser,L"Downloading list of available updates from %s failed",baseUrl);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
SkinPlaySound("updatefailed");
return false;
}
if(!unzip(pFileUrl.tszDiskPath, g_tszTempPath, NULL,true)) {
- Netlib_LogfT(hNetlibUser,_T("Unzipping list of available updates from %s failed"),baseUrl);
+ Netlib_LogfT(hNetlibUser,L"Unzipping list of available updates from %s failed",baseUrl);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
SkinPlaySound("updatefailed");
return false;
@@ -177,10 +177,10 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
DeleteFile(pFileUrl.tszDiskPath);
TCHAR tszTmpIni[MAX_PATH] = {0};
- mir_sntprintf(tszTmpIni, _T("%s\\hashes.txt"), g_tszTempPath);
- FILE *fp = _tfopen(tszTmpIni, _T("r"));
+ mir_sntprintf(tszTmpIni, L"%s\\hashes.txt", g_tszTempPath);
+ FILE *fp = _tfopen(tszTmpIni, L"r");
if (!fp) {
- Netlib_LogfT(hNetlibUser,_T("Opening %s failed"), g_tszTempPath);
+ Netlib_LogfT(hNetlibUser,L"Opening %s failed", g_tszTempPath);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
return false;
}
@@ -258,7 +258,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)
bool ret = false;
for (int i = 0; !ret && i < MAX_RETRIES; i++) {
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s to %s (attempt %d)"),pFileURL->tszDownloadURL,pFileURL->tszDiskPath, i+1);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s to %s (attempt %d)",pFileURL->tszDownloadURL,pFileURL->tszDiskPath, i+1);
NETLIBHTTPREQUEST *pReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr);
if (pReply) {
nlc = pReply->nlc;
@@ -269,7 +269,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)
int crc = Get_CRC((unsigned char*)pReply->pData, pReply->dataLength);
if (crc != pFileURL->CRCsum) {
// crc check failed, try again
- Netlib_LogfT(hNetlibUser,_T("crc check failed for file %s"),pFileURL->tszDiskPath);
+ Netlib_LogfT(hNetlibUser,L"crc check failed for file %s",pFileURL->tszDiskPath);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pReply);
continue;
}
@@ -285,7 +285,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)
else {
// try to write it via PU stub
TCHAR tszTempFile[MAX_PATH];
- mir_sntprintf(tszTempFile, _T("%s\\pulocal.tmp"), g_tszTempPath);
+ mir_sntprintf(tszTempFile, L"%s\\pulocal.tmp", g_tszTempPath);
hFile = CreateFile(tszTempFile, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile != INVALID_HANDLE_VALUE) {
DWORD dwBytes;
@@ -297,16 +297,16 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)
ret = true;
}
else
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s failed with error %d"),pFileURL->tszDownloadURL,pReply->resultCode);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s failed with error %d",pFileURL->tszDownloadURL,pReply->resultCode);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pReply);
}
else {
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s failed, host is propably temporary down."),pFileURL->tszDownloadURL);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s failed, host is propably temporary down.",pFileURL->tszDownloadURL);
nlc = NULL;
}
}
if(!ret)
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s failed, giving up"),pFileURL->tszDownloadURL);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s failed, giving up",pFileURL->tszDownloadURL);
mir_free(szUrl);
mir_free(nlhr.headers);
@@ -487,7 +487,7 @@ bool PrepareEscalation()
TCHAR *ext = _tcsrchr(szPath, '.');
if (ext != NULL)
*ext = '\0';
- _tcscat(szPath, _T(".test"));
+ _tcscat(szPath, L".test");
HANDLE hFile = CreateFile(szPath, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile != INVALID_HANDLE_VALUE) {
// we are admins or UAC is disable, cool
@@ -502,7 +502,7 @@ bool PrepareEscalation()
else {
// Elevate the process. Create a pipe for a stub first
TCHAR tszPipeName[MAX_PATH];
- mir_sntprintf(tszPipeName, _T("\\\\.\\pipe\\Miranda_Pu_%d"), GetCurrentProcessId());
+ mir_sntprintf(tszPipeName, L"\\\\.\\pipe\\Miranda_Pu_%d", GetCurrentProcessId());
hPipe = CreateNamedPipe(tszPipeName, PIPE_ACCESS_DUPLEX, PIPE_READMODE_BYTE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL);
if (hPipe == INVALID_HANDLE_VALUE) {
hPipe = NULL;
@@ -511,8 +511,8 @@ bool PrepareEscalation()
TCHAR cmdLine[100], *p;
GetModuleFileName(NULL, szPath, ARRAYSIZE(szPath));
if ((p = _tcsrchr(szPath, '\\')) != 0)
- _tcscpy(p+1, _T("pu_stub.exe"));
- mir_sntprintf(cmdLine, _T("%d"), GetCurrentProcessId());
+ _tcscpy(p+1, L"pu_stub.exe");
+ mir_sntprintf(cmdLine, L"%d", GetCurrentProcessId());
// Launch a stub
SHELLEXECUTEINFO sei = { sizeof(sei) };
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index 872a7d372b..501363d3e2 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -109,8 +109,8 @@ extern struct PlugOptions
#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS "http://miranda-ng.org/distr/pdb_x%d"
-#define FILENAME_X64 _T("miranda64.exe")
-#define FILENAME_X32 _T("miranda32.exe")
+#define FILENAME_X64 L"miranda64.exe"
+#define FILENAME_X32 L"miranda32.exe"
#ifdef _WIN64
#define DEFAULT_BITS 64
@@ -124,7 +124,7 @@ extern struct PlugOptions
#define NEW_FILENAME FILENAME_X64
#endif
-#define PLUGIN_INFO_URL _T("http://miranda-ng.org/p/%s")
+#define PLUGIN_INFO_URL L"http://miranda-ng.org/p/%s"
#define DEFAULT_UPDATE_URL_OLD "http://miranda-ng.org/distr/stable/x%platform%"
#define DEFAULT_UPDATE_URL_TRUNK_OLD "http://miranda-ng.org/distr/x%platform%"
diff --git a/plugins/PluginUpdater/src/unzipfile.cpp b/plugins/PluginUpdater/src/unzipfile.cpp
index c4696096aa..2a64019ada 100644
--- a/plugins/PluginUpdater/src/unzipfile.cpp
+++ b/plugins/PluginUpdater/src/unzipfile.cpp
@@ -32,7 +32,7 @@ extern "C"
static void PrepareFileName(TCHAR *dest, size_t destSize, const TCHAR *ptszPath, const TCHAR *ptszFileName)
{
- mir_sntprintf(dest, destSize, _T("%s\\%s"), ptszPath, ptszFileName);
+ mir_sntprintf(dest, destSize, L"%s\\%s", ptszPath, ptszFileName);
for (TCHAR *p = dest; *p; ++p)
if (*p == '/')
@@ -83,7 +83,7 @@ bool extractCurrentFile(unzFile uf, TCHAR *ptszDestPath, TCHAR *ptszBackPath, bo
else {
TCHAR tszTempPath[MAX_PATH];
GetTempPath( _countof(tszTempPath), tszTempPath);
- GetTempFileName(tszTempPath, _T("PUtemp"), GetCurrentProcessId(), tszBackFile);
+ GetTempFileName(tszTempPath, L"PUtemp", GetCurrentProcessId(), tszBackFile);
ptszFile2unzip = tszBackFile;
}