From a9e2b96e8d4664fddea569f0c233bc0b028555f1 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Mon, 4 Mar 2013 18:52:10 +0000 Subject: - SndLog command line compilation method restored git-svn-id: http://svn.miranda-ng.org/main/trunk@3886 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- bin10/mir_full.sln | 20 --- bin10/mir_full_pro.sln | 22 --- bin11/mir_full.sln | 22 +-- plugins/NotifyAnything/NotifyAnything_10.vcxproj | 8 - plugins/NotifyAnything/NotifyAnything_11.vcxproj | 8 - plugins/NotifyAnything/SendLog/SLImp.cpp | 94 ++++++++++++ plugins/NotifyAnything/SendLog/SendLog.cpp | 38 +++++ plugins/NotifyAnything/SendLog/SendLogWin.cpp | 30 ++++ .../NotifyAnything/SendLog/SendLogWin_10.vcxproj | 164 -------------------- .../SendLog/SendLogWin_10.vcxproj.filters | 28 ---- .../NotifyAnything/SendLog/SendLogWin_11.vcxproj | 168 --------------------- .../SendLog/SendLogWin_11.vcxproj.filters | 28 ---- plugins/NotifyAnything/SendLog/SendLog_10.vcxproj | 164 -------------------- .../SendLog/SendLog_10.vcxproj.filters | 28 ---- plugins/NotifyAnything/SendLog/SendLog_11.vcxproj | 168 --------------------- .../SendLog/SendLog_11.vcxproj.filters | 28 ---- plugins/NotifyAnything/SendLog/compile.bat | 31 ++++ plugins/NotifyAnything/SendLog/src/Common.h | 9 -- plugins/NotifyAnything/SendLog/src/SLImp.cpp | 84 ----------- plugins/NotifyAnything/SendLog/src/SendLog.cpp | 34 ----- plugins/NotifyAnything/SendLog/src/SendLogWin.cpp | 26 ---- plugins/NotifyAnything/SendLog/src/stdafx.cpp | 18 --- 22 files changed, 194 insertions(+), 1026 deletions(-) create mode 100644 plugins/NotifyAnything/SendLog/SLImp.cpp create mode 100644 plugins/NotifyAnything/SendLog/SendLog.cpp create mode 100644 plugins/NotifyAnything/SendLog/SendLogWin.cpp delete mode 100644 plugins/NotifyAnything/SendLog/SendLogWin_10.vcxproj delete mode 100644 plugins/NotifyAnything/SendLog/SendLogWin_10.vcxproj.filters delete mode 100644 plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj delete mode 100644 plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj.filters delete mode 100644 plugins/NotifyAnything/SendLog/SendLog_10.vcxproj delete mode 100644 plugins/NotifyAnything/SendLog/SendLog_10.vcxproj.filters delete mode 100644 plugins/NotifyAnything/SendLog/SendLog_11.vcxproj delete mode 100644 plugins/NotifyAnything/SendLog/SendLog_11.vcxproj.filters create mode 100644 plugins/NotifyAnything/SendLog/compile.bat delete mode 100644 plugins/NotifyAnything/SendLog/src/Common.h delete mode 100644 plugins/NotifyAnything/SendLog/src/SLImp.cpp delete mode 100644 plugins/NotifyAnything/SendLog/src/SendLog.cpp delete mode 100644 plugins/NotifyAnything/SendLog/src/SendLogWin.cpp delete mode 100644 plugins/NotifyAnything/SendLog/src/stdafx.cpp diff --git a/bin10/mir_full.sln b/bin10/mir_full.sln index bca12d6f47..41dfc42dda 100644 --- a/bin10/mir_full.sln +++ b/bin10/mir_full.sln @@ -371,10 +371,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\plugins\FTPFi EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile_10.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendLog", "..\plugins\NotifyAnything\sendlog\SendLog_10.vcxproj", "{1AF47743-6E78-4C83-A1E5-21F98516EF5E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendLogWin", "..\plugins\NotifyAnything\sendlog\SendLogWin_10.vcxproj", "{F72A3196-30E6-430B-A5EA-3332113A9959}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -1655,22 +1651,6 @@ Global {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|Win32.Build.0 = Debug|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|x64.ActiveCfg = Debug|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|x64.Build.0 = Debug|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|Win32.ActiveCfg = Release|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|Win32.Build.0 = Release|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|x64.ActiveCfg = Release|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|x64.Build.0 = Release|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|Win32.ActiveCfg = Debug|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|Win32.Build.0 = Debug|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|x64.ActiveCfg = Debug|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|x64.Build.0 = Debug|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|Win32.ActiveCfg = Release|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|Win32.Build.0 = Release|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|x64.ActiveCfg = Release|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/bin10/mir_full_pro.sln b/bin10/mir_full_pro.sln index 32c1fb365b..02995af828 100644 --- a/bin10/mir_full_pro.sln +++ b/bin10/mir_full_pro.sln @@ -407,10 +407,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\plugins\FTPFi EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile_10.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendLog", "..\plugins\NotifyAnything\sendlog\SendLog_10.vcxproj", "{1AF47743-6E78-4C83-A1E5-21F98516EF5E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendLogWin", "..\plugins\NotifyAnything\sendlog\SendLogWin_10.vcxproj", "{F72A3196-30E6-430B-A5EA-3332113A9959}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -1691,22 +1687,6 @@ Global {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|Win32.Build.0 = Debug|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|x64.ActiveCfg = Debug|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|x64.Build.0 = Debug|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|Win32.ActiveCfg = Release|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|Win32.Build.0 = Release|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|x64.ActiveCfg = Release|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|x64.Build.0 = Release|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|Win32.ActiveCfg = Debug|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|Win32.Build.0 = Debug|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|x64.ActiveCfg = Debug|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|x64.Build.0 = Debug|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|Win32.ActiveCfg = Release|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|Win32.Build.0 = Release|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|x64.ActiveCfg = Release|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1750,8 +1730,6 @@ Global {F5E3FAFE-B650-4736-8D27-FA53866668C6} = {A93476F5-9C4C-48A6-A8A4-C79D804A3228} {01F9E227-06F5-4BED-907F-402CA7DFAFE6} = {A93476F5-9C4C-48A6-A8A4-C79D804A3228} {73482497-9F57-4819-A9AB-5D841A9F072D} = {A93476F5-9C4C-48A6-A8A4-C79D804A3228} - {1AF47743-6E78-4C83-A1E5-21F98516EF5E} = {A93476F5-9C4C-48A6-A8A4-C79D804A3228} - {F72A3196-30E6-430B-A5EA-3332113A9959} = {A93476F5-9C4C-48A6-A8A4-C79D804A3228} {F9916510-9055-4C9F-997A-3755DEC1511B} = {CBBD3DE7-97CE-479D-87E3-8EACD035AF9B} {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C} = {CBBD3DE7-97CE-479D-87E3-8EACD035AF9B} {1C856B14-54CD-4D07-B18B-5F7DB073AB51} = {CBBD3DE7-97CE-479D-87E3-8EACD035AF9B} diff --git a/bin11/mir_full.sln b/bin11/mir_full.sln index 02455f05a9..acd133b991 100644 --- a/bin11/mir_full.sln +++ b/bin11/mir_full.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio Express 2012 for Windows Desktop Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AVS", "..\plugins\AVS\avs_11.vcxproj", "{7711F563-6473-4ABD-B5E3-477CE8384AD6}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zlib", "..\plugins\Zlib\zlib_11.vcxproj", "{E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}" @@ -371,10 +371,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotifyAnything", "..\plugin EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\plugins\FTPFileYM\curl-7.29.0\lib\vc6libcurl_11.vcxproj", "{01F9E227-06F5-4BED-907F-402CA7DFAFE6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendLog", "..\plugins\NotifyAnything\SendLog\SendLog_11.vcxproj", "{1AF47743-6E78-4C83-A1E5-21F98516EF5E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendLogWin", "..\plugins\NotifyAnything\SendLog\SendLogWin_11.vcxproj", "{F72A3196-30E6-430B-A5EA-3332113A9959}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -1655,22 +1651,6 @@ Global {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.Build.0 = Release|Win32 {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.ActiveCfg = Release|x64 {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.Build.0 = Release|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|Win32.Build.0 = Debug|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|x64.ActiveCfg = Debug|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Debug|x64.Build.0 = Debug|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|Win32.ActiveCfg = Release|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|Win32.Build.0 = Release|Win32 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|x64.ActiveCfg = Release|x64 - {1AF47743-6E78-4C83-A1E5-21F98516EF5E}.Release|x64.Build.0 = Release|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|Win32.ActiveCfg = Debug|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|Win32.Build.0 = Debug|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|x64.ActiveCfg = Debug|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Debug|x64.Build.0 = Debug|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|Win32.ActiveCfg = Release|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|Win32.Build.0 = Release|Win32 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|x64.ActiveCfg = Release|x64 - {F72A3196-30E6-430B-A5EA-3332113A9959}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/plugins/NotifyAnything/NotifyAnything_10.vcxproj b/plugins/NotifyAnything/NotifyAnything_10.vcxproj index 4c2b00dff6..abebc0f871 100644 --- a/plugins/NotifyAnything/NotifyAnything_10.vcxproj +++ b/plugins/NotifyAnything/NotifyAnything_10.vcxproj @@ -193,14 +193,6 @@ - - - {f72a3196-30e6-430b-a5ea-3332113a9959} - - - {1af47743-6e78-4c83-a1e5-21f98516ef5e} - - diff --git a/plugins/NotifyAnything/NotifyAnything_11.vcxproj b/plugins/NotifyAnything/NotifyAnything_11.vcxproj index c6ebb9e073..c0bbb0ba51 100644 --- a/plugins/NotifyAnything/NotifyAnything_11.vcxproj +++ b/plugins/NotifyAnything/NotifyAnything_11.vcxproj @@ -197,14 +197,6 @@ - - - {f72a3196-30e6-430b-a5ea-3332113a9959} - - - {1af47743-6e78-4c83-a1e5-21f98516ef5e} - - diff --git a/plugins/NotifyAnything/SendLog/SLImp.cpp b/plugins/NotifyAnything/SendLog/SLImp.cpp new file mode 100644 index 0000000000..0a4b69e81c --- /dev/null +++ b/plugins/NotifyAnything/SendLog/SLImp.cpp @@ -0,0 +1,94 @@ +#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 new file mode 100644 index 0000000000..37f112efb8 --- /dev/null +++ b/plugins/NotifyAnything/SendLog/SendLogWin.cpp @@ -0,0 +1,30 @@ +#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/SendLogWin_10.vcxproj b/plugins/NotifyAnything/SendLog/SendLogWin_10.vcxproj deleted file mode 100644 index 1a024cae72..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLogWin_10.vcxproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SendLogWin - {F72A3196-30E6-430B-A5EA-3332113A9959} - - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - MultiByte - true - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - EditAndContinue - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - Disabled - WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - - - Create - - - - - - - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/SendLogWin_10.vcxproj.filters b/plugins/NotifyAnything/SendLog/SendLogWin_10.vcxproj.filters deleted file mode 100644 index 42b82c1d08..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLogWin_10.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {d7898d8b-d9be-4841-a698-9c12f867bcf6} - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj b/plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj deleted file mode 100644 index 52c40cfff4..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SendLogWin - {F72A3196-30E6-430B-A5EA-3332113A9959} - - - - Application - MultiByte - true - v110_xp - - - Application - MultiByte - v110_xp - - - Application - MultiByte - true - v110_xp - - - Application - MultiByte - v110_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - EditAndContinue - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - Disabled - WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - - - Create - - - - - - - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj.filters b/plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj.filters deleted file mode 100644 index 42b82c1d08..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLogWin_11.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {d7898d8b-d9be-4841-a698-9c12f867bcf6} - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/SendLog_10.vcxproj b/plugins/NotifyAnything/SendLog/SendLog_10.vcxproj deleted file mode 100644 index 109fbc72c3..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLog_10.vcxproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SendLog - {1AF47743-6E78-4C83-A1E5-21F98516EF5E} - - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - MultiByte - true - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - EditAndContinue - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - Disabled - WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - - - Create - - - - - - - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/SendLog_10.vcxproj.filters b/plugins/NotifyAnything/SendLog/SendLog_10.vcxproj.filters deleted file mode 100644 index 2a419c3c9e..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLog_10.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {1e7dd534-d580-4c97-84cc-fdb23038ee29} - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/SendLog_11.vcxproj b/plugins/NotifyAnything/SendLog/SendLog_11.vcxproj deleted file mode 100644 index 89a77a4d18..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLog_11.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SendLog - {1AF47743-6E78-4C83-A1E5-21F98516EF5E} - - - - Application - MultiByte - true - v110_xp - - - Application - MultiByte - v110_xp - - - Application - MultiByte - true - v110_xp - - - Application - MultiByte - v110_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - EditAndContinue - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - Disabled - WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - Use - Common.h - - - true - Console - false - $(IntDir)$(TargetName).lib - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - Level3 - Full - Size - Use - Common.h - - - true - Console - true - true - false - $(IntDir)$(TargetName).lib - /PDBALTPATH:%_PDB% - ws2_32.lib;%(AdditionalDependencies) - - - - - - - Create - - - - - - - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/SendLog_11.vcxproj.filters b/plugins/NotifyAnything/SendLog/SendLog_11.vcxproj.filters deleted file mode 100644 index 2a419c3c9e..0000000000 --- a/plugins/NotifyAnything/SendLog/SendLog_11.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {1e7dd534-d580-4c97-84cc-fdb23038ee29} - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/plugins/NotifyAnything/SendLog/compile.bat b/plugins/NotifyAnything/SendLog/compile.bat new file mode 100644 index 0000000000..f5dc4d40f0 --- /dev/null +++ b/plugins/NotifyAnything/SendLog/compile.bat @@ -0,0 +1,31 @@ +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/SendLog/src/Common.h b/plugins/NotifyAnything/SendLog/src/Common.h deleted file mode 100644 index 6015a1c011..0000000000 --- a/plugins/NotifyAnything/SendLog/src/Common.h +++ /dev/null @@ -1,9 +0,0 @@ -#define _CRT_SECURE_NO_WARNINGS - -#define _WINSOCKAPI_ // don't include winsock 1.x - -#include -#include -#include -#include - diff --git a/plugins/NotifyAnything/SendLog/src/SLImp.cpp b/plugins/NotifyAnything/SendLog/src/SLImp.cpp deleted file mode 100644 index 3e9b38dd77..0000000000 --- a/plugins/NotifyAnything/SendLog/src/SLImp.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include "Common.h" - -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 "common.h" \ No newline at end of file -- cgit v1.2.3