From a501b3f6598084308d715ab40dc0050459c25eff Mon Sep 17 00:00:00 2001 From: donho Date: Sat, 10 Nov 2007 14:05:57 +0000 Subject: [PATCH] [NEW_FEATURE] Preparing Updater. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@70 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/MISC/SysMsg/SysMsg.cpp | 2 +- PowerEditor/src/winmain.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/PowerEditor/src/MISC/SysMsg/SysMsg.cpp b/PowerEditor/src/MISC/SysMsg/SysMsg.cpp index 62f3b336..3ba97b53 100644 --- a/PowerEditor/src/MISC/SysMsg/SysMsg.cpp +++ b/PowerEditor/src/MISC/SysMsg/SysMsg.cpp @@ -169,7 +169,7 @@ void systemMessage(const char *title) void printInt(int int2print) { char str[32]; - itoa(int2print, str, 10); + sprintf(str, "%d", int2print); ::MessageBox(NULL, str, "", MB_OK); } diff --git a/PowerEditor/src/winmain.cpp b/PowerEditor/src/winmain.cpp index 5f758b98..a298dc0f 100644 --- a/PowerEditor/src/winmain.cpp +++ b/PowerEditor/src/winmain.cpp @@ -269,10 +269,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh if (TheFirstOne) { -/* - Process updater("C:\\Program Files\\7-Zip\\7zFM.exe", "c:\\"); - updater.run(); -*/ + char updaterPath[MAX_PATH]; + strcpy(updaterPath, pNppParameters->getNppPath()); + strcat(updaterPath, "\\updater\\gup.exe"); + if (::PathFileExists(updaterPath)) + { + Process updater(updaterPath, "c:\\"); + updater.run(); + } } MSG msg; msg.wParam = 0;