From 1ac26e41d1de88965131401356c37497bf899ded Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 2 Mar 2013 19:53:14 +0000 Subject: removed not used headers added version info removed not used files git-svn-id: http://svn.miranda-ng.org/main/trunk@3855 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NotifyAnything/NotifyAnything_10.vcxproj | 31 ++++--- .../NotifyAnything_10.vcxproj.filters | 6 ++ plugins/NotifyAnything/NotifyAnything_11.vcxproj | 23 +++--- .../NotifyAnything_11.vcxproj.filters | 6 ++ plugins/NotifyAnything/res/NotifyAnything.rc | 53 ------------ plugins/NotifyAnything/res/Version.rc | 38 +++++++++ plugins/NotifyAnything/sendlog/SLImp.cpp | 94 ---------------------- plugins/NotifyAnything/sendlog/SendLog.cpp | 38 --------- plugins/NotifyAnything/sendlog/SendLogWin.cpp | 30 ------- plugins/NotifyAnything/sendlog/compile.bat | 31 ------- plugins/NotifyAnything/src/Version.h | 14 ++++ plugins/NotifyAnything/src/common.h | 18 ++--- plugins/NotifyAnything/src/main.cpp | 16 ++-- plugins/NotifyAnything/src/options.cpp | 4 - 14 files changed, 103 insertions(+), 299 deletions(-) create mode 100644 plugins/NotifyAnything/res/Version.rc delete mode 100644 plugins/NotifyAnything/sendlog/SLImp.cpp delete mode 100644 plugins/NotifyAnything/sendlog/SendLog.cpp delete mode 100644 plugins/NotifyAnything/sendlog/SendLogWin.cpp delete mode 100644 plugins/NotifyAnything/sendlog/compile.bat create mode 100644 plugins/NotifyAnything/src/Version.h (limited to 'plugins/NotifyAnything') diff --git a/plugins/NotifyAnything/NotifyAnything_10.vcxproj b/plugins/NotifyAnything/NotifyAnything_10.vcxproj index 99d6ebd770..26095ce0f1 100644 --- a/plugins/NotifyAnything/NotifyAnything_10.vcxproj +++ b/plugins/NotifyAnything/NotifyAnything_10.vcxproj @@ -72,8 +72,8 @@ Full - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use common.h Level3 @@ -93,15 +93,15 @@ true Windows ws2_32.lib;comctl32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin11\lib + $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% Full - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use common.h Level3 @@ -121,15 +121,15 @@ true Windows ws2_32.lib;comctl32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin11\lib + $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% Disabled - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -149,14 +149,14 @@ $(IntDir)$(TargetName).lib Windows ws2_32.lib;comctl32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin11\lib + $(ProfileDir)..\..\bin10\lib Disabled - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Use @@ -174,25 +174,24 @@ $(IntDir)$(TargetName).lib Windows ws2_32.lib;comctl32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin11\lib + $(ProfileDir)..\..\bin10\lib - Create - Create - Create - Create + Create + + diff --git a/plugins/NotifyAnything/NotifyAnything_10.vcxproj.filters b/plugins/NotifyAnything/NotifyAnything_10.vcxproj.filters index 863181e19a..ec9e88d5fd 100644 --- a/plugins/NotifyAnything/NotifyAnything_10.vcxproj.filters +++ b/plugins/NotifyAnything/NotifyAnything_10.vcxproj.filters @@ -32,10 +32,16 @@ Header Files + + Header Files + Resource Files + + Resource Files + \ No newline at end of file diff --git a/plugins/NotifyAnything/NotifyAnything_11.vcxproj b/plugins/NotifyAnything/NotifyAnything_11.vcxproj index 0fa2361589..c0bbb0ba51 100644 --- a/plugins/NotifyAnything/NotifyAnything_11.vcxproj +++ b/plugins/NotifyAnything/NotifyAnything_11.vcxproj @@ -76,8 +76,8 @@ Full - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use common.h Level3 @@ -104,8 +104,8 @@ Full - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use common.h Level3 @@ -132,8 +132,8 @@ Disabled - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -159,8 +159,8 @@ Disabled - ..\..\include;..\ExternalAPI%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Use @@ -185,18 +185,17 @@ - Create - Create - Create - Create + Create + + diff --git a/plugins/NotifyAnything/NotifyAnything_11.vcxproj.filters b/plugins/NotifyAnything/NotifyAnything_11.vcxproj.filters index 863181e19a..ec9e88d5fd 100644 --- a/plugins/NotifyAnything/NotifyAnything_11.vcxproj.filters +++ b/plugins/NotifyAnything/NotifyAnything_11.vcxproj.filters @@ -32,10 +32,16 @@ Header Files + + Header Files + Resource Files + + Resource Files + \ No newline at end of file diff --git a/plugins/NotifyAnything/res/NotifyAnything.rc b/plugins/NotifyAnything/res/NotifyAnything.rc index d89d3bfda2..03f1df6c9e 100644 --- a/plugins/NotifyAnything/res/NotifyAnything.rc +++ b/plugins/NotifyAnything/res/NotifyAnything.rc @@ -102,59 +102,6 @@ END ///////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////// -// Swedish resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE) -#ifdef _WIN32 -LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,0,2,8 - PRODUCTVERSION 0,0,2,8 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "Receives popup descriptions from external sources and forward them to the PopUp plugin." - VALUE "CompanyName", "Daniel Wesslen" - VALUE "FileDescription", "NotifyAnything Miranda IM plugin" - VALUE "FileVersion", "0, 0, 2, 8" - VALUE "InternalName", "NotifyAnything" - VALUE "LegalCopyright", "Placed in public domain 2003" - VALUE "OriginalFilename", "NotifyAnything.dll" - VALUE "ProductName", "NotifyAnything Miranda plugin" - VALUE "ProductVersion", "0, 0, 2, 8" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -#endif // Swedish resources -///////////////////////////////////////////////////////////////////////////// - - - #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // diff --git a/plugins/NotifyAnything/res/Version.rc b/plugins/NotifyAnything/res/Version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/plugins/NotifyAnything/res/Version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "afxres.h" +#include "..\src\version.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/plugins/NotifyAnything/sendlog/SLImp.cpp b/plugins/NotifyAnything/sendlog/SLImp.cpp deleted file mode 100644 index 0a4b69e81c..0000000000 --- a/plugins/NotifyAnything/sendlog/SLImp.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#define _WINSOCKAPI_ // don't include winsock 1.x -#include -#include -#include -#include - -#include -#include - -#include -#include - -void implementation(int argc, char **argv, bool console) -{ - int port = 12001; - bool tcp = false; - const char *target = "127.0.0.1"; - - if (argc >= 2 && !strcmp("-T", argv[1])) { - tcp = true; - argc -= 1; - argv += 1; - } - - if (argc >= 3 && !strcmp("-H", argv[1])) { - target = argv[2]; - argc -= 2; - argv += 2; - } - - if (argc >= 3 && !strcmp("-P", argv[1])) { - port = atoi(argv[2]); - argc -= 2; - argv += 2; - } - - WSADATA wsaData; - int err = WSAStartup(MAKEWORD(2, 2), &wsaData); - if (err) - throw (DWORD) err; - - char portbuf[10]; - sprintf(portbuf, "%i", port); - - ADDRINFO hints; - memset(&hints, 0, sizeof hints); - hints.ai_socktype = SOCK_DGRAM; - hints.ai_family = PF_INET; - ADDRINFO *res; - err = getaddrinfo(target, portbuf, &hints, &res); - - if (err || !res) - throw (DWORD) err; - - SOCKET sock; - SOCKADDR_IN to = *(SOCKADDR_IN*)res->ai_addr; - - sock = socket(AF_INET, tcp ? SOCK_STREAM : SOCK_DGRAM, tcp ? IPPROTO_TCP : IPPROTO_UDP); - if (sock == INVALID_SOCKET) - throw (DWORD) WSAGetLastError(); - - SOCKADDR_IN self; - ZeroMemory(&self, sizeof self); - self.sin_family = AF_INET; - - if (bind(sock, (const SOCKADDR *) &self, sizeof self)) - throw (DWORD) WSAGetLastError(); - - if (connect(sock, (const SOCKADDR *) &to, sizeof to)) - throw (DWORD) WSAGetLastError(); - - if (console && (argc == 1 || argc == 3 && !strcmp("-p", argv[1]))) { - std::string prefix; - if (argc == 3) - prefix = argv[2]; - std::string line; - while (std::getline(std::cin, line)) { - std::string data = prefix + line; - send(sock, data.data(), data.size(), 0); - } - } else { - std::string message = argv[1]; - for (int i=2; i -#include - -#include -#include - -void implementation(int argc, char **argv, bool console); - -int main(int argc, char **argv) -try -{ - if (argc == 2 && !strcmp("/?", argv[1])) { - std::cout << "\n" - "Syntax: sendlog [-T] [-H host] [-P port] [-p prefix]\n" - "\tSends each input line as a separate message, with optional prefix.\n" - "\n" - "Syntax: sendlog text\n" - "\tSends single text message.\n" - "\n" - << std::flush; - return 0; - } - - implementation(argc, argv, true); -} -catch (DWORD err) { - LPVOID lpMsgBuf; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); - - std::cerr << (LPCTSTR)lpMsgBuf << std::endl; - if (!std::cerr) - MessageBox(NULL, (LPCTSTR)lpMsgBuf, "sendlog", MB_OK); - - LocalFree(lpMsgBuf); - - return 1; -} diff --git a/plugins/NotifyAnything/sendlog/SendLogWin.cpp b/plugins/NotifyAnything/sendlog/SendLogWin.cpp deleted file mode 100644 index 37f112efb8..0000000000 --- a/plugins/NotifyAnything/sendlog/SendLogWin.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include - -#include -#include - -void implementation(int argc, char **argv, bool console); - -int main(int argc, char **argv) -try -{ - if (argc == 1 || argc == 2 && !strcmp("/?", argv[1])) { - MessageBox(NULL, "Syntax: sendlog32 [-T] [-H host] [-P port] text\n" - "\tSends single text message.", "Sendlog32", MB_OK); - return 0; - } - - implementation(argc, argv, false); -} -catch (DWORD err) { - LPVOID lpMsgBuf; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); - - MessageBox(NULL, (LPCTSTR)lpMsgBuf, "sendlog32", MB_OK); - - LocalFree(lpMsgBuf); - - return 1; -} diff --git a/plugins/NotifyAnything/sendlog/compile.bat b/plugins/NotifyAnything/sendlog/compile.bat deleted file mode 100644 index f5dc4d40f0..0000000000 --- a/plugins/NotifyAnything/sendlog/compile.bat +++ /dev/null @@ -1,31 +0,0 @@ -rem @echo off -if not "%VS100COMNTOOLS%" == "" ( - call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" - "%VS100COMNTOOLS%\..\..\vc\bin\cl.exe" /MD /O2 /Os /EHsc SendLog.cpp SLImp.cpp /link ws2_32.lib user32.lib - "%VS100COMNTOOLS%\..\..\vc\bin\cl.exe" /MD /O2 /Os /EHsc SendLogWin.cpp SLImp.cpp /link ws2_32.lib user32.lib - call :ProcessFiles 10 -) - -if not "%VS110COMNTOOLS%" == "" ( - call "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" - "%VS110COMNTOOLS%\..\..\vc\bin\cl.exe" /MD /O2 /Os /EHsc SendLog.cpp SLImp.cpp /link ws2_32.lib user32.lib - "%VS110COMNTOOLS%\..\..\vc\bin\cl.exe" /MD /O2 /Os /EHsc SendLogWin.cpp SLImp.cpp /link ws2_32.lib user32.lib - call :ProcessFiles 11 -) -goto :eof - -:ProcessFiles -mkdir ..\..\..\bin%1\Debug 2>nul -copy /Y *.exe ..\..\..\bin%1\Debug >nul - -mkdir ..\..\..\bin%1\Debug64 2>nul -copy /Y *.exe ..\..\..\bin%1\Debug64 >nul - -mkdir ..\..\..\bin%1\Release 2>nul -copy /Y *.exe ..\..\..\bin%1\Release >nul - -mkdir ..\..\..\bin%1\Release64 2>nul -copy /Y *.exe ..\..\..\bin%1\Release64 >nul - -del *.obj;*.exe >nul -goto :eof diff --git a/plugins/NotifyAnything/src/Version.h b/plugins/NotifyAnything/src/Version.h new file mode 100644 index 0000000000..eb60355219 --- /dev/null +++ b/plugins/NotifyAnything/src/Version.h @@ -0,0 +1,14 @@ +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 0 +#define __RELEASE_NUM 2 +#define __BUILD_NUM 8 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM + +#define __PLUGIN_NAME "NotifyAnything" +#define __FILENAME "NotifyAnything.dll" +#define __DESCRIPTION "Displays popups for custom events, triggered by UDP packages." +#define __AUTHOR "Daniel Wesslen, Korney San" +#define __AUTHOREMAIL "wesslen@users.sourceforge.net, kora@users.sourceforge.net" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2003 Daniel Wesslen" diff --git a/plugins/NotifyAnything/src/common.h b/plugins/NotifyAnything/src/common.h index fc58f65940..ff1f9c2588 100644 --- a/plugins/NotifyAnything/src/common.h +++ b/plugins/NotifyAnything/src/common.h @@ -1,34 +1,26 @@ -// disable warnings about underscore in stdc functions -#pragma warning(disable: 4996) +#define _CRT_SECURE_NO_DEPRECATE #include - -#include -#include -#include #include -#include #include #include -#include -#include - #include #include #include #include #include "newpluginapi.h" -#include "m_system_cpp.h" #include "m_options.h" #include "m_skin.h" #include "m_langpack.h" #include "m_database.h" -#include "m_utils.h" - #include "m_popup.h" + #include "m_LogService.h" +#include "resource.h" +#include "Version.h" + extern HINSTANCE hInst; const char PlugName[] = "NotifyAnything"; diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 7ef581fb24..e82a525b98 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -71,16 +71,16 @@ int hLangpack; PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), - "NotifyAnything", - PLUGIN_MAKE_VERSION(0, 0, 2, 8), - "Displays popups for custom events, triggered by UDP packages.", - "Daniel Wesslén, Korney San", - "wesslen@users.sourceforge.net, kora@users.sourceforge.net", - "Public Domain 2003 Daniel Wesslén", - "http://miranda-ng.org", + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, UNICODE_AWARE, // {E92874EC-594A-4A2F-BDED-C0BE8B5A45D1} - { 0xe92874ec, 0x594a, 0x4a2f, { 0xbd, 0xed, 0xc0, 0xbe, 0x8b, 0x5a, 0x45, 0xd1 }} + {0xe92874ec, 0x594a, 0x4a2f, {0xbd, 0xed, 0xc0, 0xbe, 0x8b, 0x5a, 0x45, 0xd1}} }; BOOL WINAPI DllMain(HINSTANCE hi, DWORD, LPVOID) diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp index 7574cbf867..5b02963ec7 100644 --- a/plugins/NotifyAnything/src/options.cpp +++ b/plugins/NotifyAnything/src/options.cpp @@ -1,8 +1,4 @@ - -#include - #include "common.h" -#include "resource.h" NASettings g_settings; -- cgit v1.2.3