From a77e43825fdfe580ede909d4d48048e2d82c586e Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 15 Mar 2013 08:36:43 +0000 Subject: added precompiled header added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@4041 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Watrack_MPD/src/Version.h | 14 ++ plugins/Watrack_MPD/src/commonheaders.h | 23 +-- plugins/Watrack_MPD/src/constants.h | 4 - plugins/Watrack_MPD/src/init.cpp | 28 ++-- plugins/Watrack_MPD/src/main.h | 24 ---- plugins/Watrack_MPD/src/resource.h | 5 - plugins/Watrack_MPD/src/stdafx.cpp | 18 +++ plugins/Watrack_MPD/src/utilities.h | 2 + plugins/Watrack_MPD/watrack_mpd_10.vcxproj | 157 +++++---------------- plugins/Watrack_MPD/watrack_mpd_10.vcxproj.filters | 29 ++-- plugins/Watrack_MPD/watrack_mpd_11.vcxproj | 108 ++++---------- plugins/Watrack_MPD/watrack_mpd_11.vcxproj.filters | 15 +- 12 files changed, 139 insertions(+), 288 deletions(-) create mode 100644 plugins/Watrack_MPD/src/Version.h delete mode 100755 plugins/Watrack_MPD/src/constants.h delete mode 100755 plugins/Watrack_MPD/src/main.h create mode 100644 plugins/Watrack_MPD/src/stdafx.cpp (limited to 'plugins') diff --git a/plugins/Watrack_MPD/src/Version.h b/plugins/Watrack_MPD/src/Version.h new file mode 100644 index 0000000000..c23589187c --- /dev/null +++ b/plugins/Watrack_MPD/src/Version.h @@ -0,0 +1,14 @@ +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 0 +#define __RELEASE_NUM 0 +#define __BUILD_NUM 4 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM + +#define __PLUGIN_NAME "Watrack MPD" +#define __FILENAME "Watrack_MPD.dll" +#define __DESCRIPTION "Music Player Daemon support for Watrack." +#define __AUTHOR "sss" +#define __AUTHOREMAIL "sss123next@list.ru" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2009 sss" diff --git a/plugins/Watrack_MPD/src/commonheaders.h b/plugins/Watrack_MPD/src/commonheaders.h index c71f36b977..ebf41e6819 100755 --- a/plugins/Watrack_MPD/src/commonheaders.h +++ b/plugins/Watrack_MPD/src/commonheaders.h @@ -19,38 +19,29 @@ #define _CRT_SECURE_NO_WARNINGS #include -#include -#include -#include -#include - #include #include -//#include -//#include #include -//#include -//#include -//#include #include #include -#include "resource.h" +#include -#include "constants.h" -#include "main.h" -#include "m_music.h" +#include "resource.h" #include "utilities.h" +#include "Version.h" + +#define szModuleName "Watrack_MPD" extern HINSTANCE hInst; extern HANDLE ghNetlibUser; extern BOOL bWatrackService; extern TCHAR *gbHost, *gbPassword; extern WORD gbPort; - extern char *date(); -extern int WaMpdOptInit(WPARAM wParam,LPARAM lParam); + +extern int WaMpdOptInit(WPARAM wParam, LPARAM lParam); extern void RegisterPlayer(); #endif diff --git a/plugins/Watrack_MPD/src/constants.h b/plugins/Watrack_MPD/src/constants.h deleted file mode 100755 index 2ac58a4d43..0000000000 --- a/plugins/Watrack_MPD/src/constants.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef CONSTANTS_H -#define CONSTANTS_H -#define szModuleName "Watrack_MPD" -#endif diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp index 13e0b85351..b01745c4dd 100755 --- a/plugins/Watrack_MPD/src/init.cpp +++ b/plugins/Watrack_MPD/src/init.cpp @@ -16,8 +16,6 @@ #include "commonheaders.h" -#define PLUGIN_NAME "Watrack_MPD" - HINSTANCE hInst; BOOL bWatrackService = FALSE; int hLangpack = 0; @@ -27,13 +25,13 @@ HANDLE ghNetlibUser; PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), - PLUGIN_NAME, - PLUGIN_MAKE_VERSION(0,0,0,4), - "Music Player Daemon support for Watrack.", - "sss, others..", - "sss123next@list.ru", - "© 2009 sss, others...", - "http://sss.chaoslab.ru:81/tracker/mim_plugs/", + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, UNICODE_AWARE, // 692E87D0-6C71-4CDC-9E36-2B69FBDC4C {0x692e87d0, 0x6c71, 0x4cdc, {0x9e, 0x36, 0x2b, 0x2d, 0x69, 0xfb, 0xdc, 0x4c}} @@ -45,7 +43,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } -__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; } @@ -61,15 +59,13 @@ void InitVars() static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { - HANDLE hHookOptionInit; NETLIBUSER nlu = {0}; nlu.cbSize = sizeof(nlu); nlu.flags = (NUF_OUTGOING | NUF_HTTPCONNS); nlu.szDescriptiveName = "Watrack MPD connection"; - nlu.szSettingsModule = PLUGIN_NAME; + nlu.szSettingsModule = __PLUGIN_NAME; ghNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); InitVars(); - hHookOptionInit = HookEvent(ME_OPT_INITIALISE, WaMpdOptInit); if (ServiceExists("WATrack/Player")) bWatrackService = TRUE; RegisterPlayer(); @@ -77,14 +73,16 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) return 0; } -int __declspec(dllexport) Load() +extern "C" __declspec(dllexport) int Load() { mir_getLP(&pluginInfo); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); + HookEvent(ME_OPT_INITIALISE, WaMpdOptInit); + return 0; } -int __declspec(dllexport) Unload(void) +extern "C" __declspec(dllexport) int Unload(void) { free(gbHost); free(gbPassword); diff --git a/plugins/Watrack_MPD/src/main.h b/plugins/Watrack_MPD/src/main.h deleted file mode 100755 index 4dcd949c11..0000000000 --- a/plugins/Watrack_MPD/src/main.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright © 2008 sss, chaos.persei -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef MAIN_H -#define MAIN_H - -//TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef); -//const TCHAR *stristr( const TCHAR *str, const TCHAR *substr); - -#endif - - diff --git a/plugins/Watrack_MPD/src/resource.h b/plugins/Watrack_MPD/src/resource.h index 15f3d472f1..4999f6c88e 100755 --- a/plugins/Watrack_MPD/src/resource.h +++ b/plugins/Watrack_MPD/src/resource.h @@ -2,22 +2,17 @@ // Microsoft Visual C++ generated include file. // Used by watrack_mpd.rc // -#define IDD_OPT_DOS 104 #define IDD_OPT_WA_MPD 104 #define IDC_FOR_ONLINE 1003 #define IDC_MSG_NUMBER 1004 #define IDC_MSG_TEXT 1005 #define IDC_MSG_RATE 1006 #define IDC_ENABLE_CUSTOM_MESSAGE 1007 -#define IDC_FOR_ONLINE2 1008 #define IDC_CLIENT_BASED 1008 -#define IDC_MESSAGE_SIZE 1009 #define IDC_MSG_SIZE 1009 -#define IDC_MSG_SIZE2 1010 #define IDC_CHAR_COUNT 1010 #define IDC_SERVER 1011 #define IDC_PORT 1012 -#define IDC_EDIT3 1013 #define IDC_PASSWORD 1013 // Next default values for new objects diff --git a/plugins/Watrack_MPD/src/stdafx.cpp b/plugins/Watrack_MPD/src/stdafx.cpp new file mode 100644 index 0000000000..e7e41dae3c --- /dev/null +++ b/plugins/Watrack_MPD/src/stdafx.cpp @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "commonheaders.h" \ No newline at end of file diff --git a/plugins/Watrack_MPD/src/utilities.h b/plugins/Watrack_MPD/src/utilities.h index 8cef30fb25..7bd9dd0830 100755 --- a/plugins/Watrack_MPD/src/utilities.h +++ b/plugins/Watrack_MPD/src/utilities.h @@ -1,6 +1,8 @@ #ifndef UTILITIES_H #define UTILITIES_H + HANDLE NetLib_CreateConnection(HANDLE hUser, NETLIBOPENCONNECTION* nloc); HANDLE CreateThreadEx(pThreadFuncEx AFunc, void* arg, DWORD* pThreadID); TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef); + #endif diff --git a/plugins/Watrack_MPD/watrack_mpd_10.vcxproj b/plugins/Watrack_MPD/watrack_mpd_10.vcxproj index 684dd1512d..de8ab7f230 100755 --- a/plugins/Watrack_MPD/watrack_mpd_10.vcxproj +++ b/plugins/Watrack_MPD/watrack_mpd_10.vcxproj @@ -18,24 +18,6 @@ x64 - - - - - - - - - - - - - - - - - - Watrack_MPD {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C} @@ -43,23 +25,19 @@ DynamicLibrary - false Unicode DynamicLibrary - false Unicode DynamicLibrary - false Unicode true DynamicLibrary - false Unicode true @@ -72,19 +50,15 @@ - - - - @@ -93,200 +67,141 @@ $(SolutionDir)$(Configuration)64\Plugins\ $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - false - false $(SolutionDir)$(Configuration)\Plugins\ $(SolutionDir)$(Configuration)64\Plugins\ $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - true - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - + true - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release Unicode/testplug.tlb - - - Full OnlyExplicitInline Size true ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;FULL_BUILD;%(PreprocessorDefinitions);_UNICODE;UNICODE + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true - MultiThreadedDLL true Level3 - true false + Use + commonheaders.h NDEBUG;%(PreprocessorDefinitions) - 0x0809 ..\..\include\msapi - true true true true - UseLinkTimeCodeGeneration false - - $(IntDir)$(TargetName).lib - MachineX86 $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% + Windows - - true - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\Release Unicode/testplug.tlb - - - Full OnlyExplicitInline Size true ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;FULL_BUILD;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true - MultiThreadedDLL true - Precise Level3 - true false + Use + commonheaders.h NDEBUG;%(PreprocessorDefinitions) - 0x0809 ..\..\include\msapi - true true true true - UseLinkTimeCodeGeneration false - - $(IntDir)$(TargetName).lib $(ProfileDir)..\..\bin10\lib - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mir_core64.lib;Miranda64.lib /PDBALTPATH:%_PDB% + Windows - - true - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/testplug.tlb - - - Disabled ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS;FULL_BUILD;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 - true EditAndContinue false + Use + commonheaders.h _DEBUG;%(PreprocessorDefinitions) - 0x0809 ..\..\include\msapi - true true false - - $(IntDir)$(TargetName).lib - MachineX86 $(ProfileDir)..\..\bin10\lib + Windows - - true - - - _DEBUG;%(PreprocessorDefinitions) - true - true - .\Debug/testplug.tlb - - - Disabled ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS;FULL_BUILD;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Level3 - true - ProgramDatabase false + Use + commonheaders.h _DEBUG;%(PreprocessorDefinitions) - 0x0809 ..\..\include\msapi - true true false - - $(IntDir)$(TargetName).lib $(ProfileDir)..\..\bin10\lib + Windows - - true - + + + + + + Create + + + + + + + + + + + + + diff --git a/plugins/Watrack_MPD/watrack_mpd_10.vcxproj.filters b/plugins/Watrack_MPD/watrack_mpd_10.vcxproj.filters index 67721aee48..10468a5690 100755 --- a/plugins/Watrack_MPD/watrack_mpd_10.vcxproj.filters +++ b/plugins/Watrack_MPD/watrack_mpd_10.vcxproj.filters @@ -12,16 +12,19 @@ - + Sources - + Sources - + Sources - + + Sources + + Sources @@ -29,28 +32,22 @@ Headers - - Headers - - - Headers - - - Headers - - - Headers - Headers Headers + + Headers + Resources + + Resources + \ No newline at end of file diff --git a/plugins/Watrack_MPD/watrack_mpd_11.vcxproj b/plugins/Watrack_MPD/watrack_mpd_11.vcxproj index 3f6a13fa1e..c16db1b5b6 100644 --- a/plugins/Watrack_MPD/watrack_mpd_11.vcxproj +++ b/plugins/Watrack_MPD/watrack_mpd_11.vcxproj @@ -18,22 +18,6 @@ x64 - - - - - - - - - - - - - - - - Watrack_MPD {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C} @@ -70,19 +54,15 @@ - - - - @@ -95,41 +75,9 @@ $(SolutionDir)$(Configuration)64\Plugins\ $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - - - true - - - true - - - true - - true - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release Unicode/testplug.tlb - - - Full OnlyExplicitInline @@ -141,6 +89,8 @@ true Level3 false + Use + commonheaders.h NDEBUG;%(PreprocessorDefinitions) @@ -156,17 +106,8 @@ /PDBALTPATH:%_PDB% Windows - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\Release Unicode/testplug.tlb - - - Full OnlyExplicitInline @@ -178,6 +119,8 @@ true Level3 false + Use + commonheaders.h NDEBUG;%(PreprocessorDefinitions) @@ -193,18 +136,8 @@ /PDBALTPATH:%_PDB% Windows - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/testplug.tlb - - - Disabled ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) @@ -215,6 +148,8 @@ Level3 EditAndContinue false + Use + commonheaders.h _DEBUG;%(PreprocessorDefinitions) @@ -227,17 +162,8 @@ $(ProfileDir)..\..\bin11\lib Windows - - - _DEBUG;%(PreprocessorDefinitions) - true - true - .\Debug/testplug.tlb - - - Disabled ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) @@ -246,6 +172,8 @@ MultiThreadedDebugDLL Level3 false + Use + commonheaders.h _DEBUG;%(PreprocessorDefinitions) @@ -258,8 +186,26 @@ $(ProfileDir)..\..\bin11\lib Windows - + + + + + + Create + + + + + + + + + + + + + diff --git a/plugins/Watrack_MPD/watrack_mpd_11.vcxproj.filters b/plugins/Watrack_MPD/watrack_mpd_11.vcxproj.filters index aee5ea1284..10468a5690 100644 --- a/plugins/Watrack_MPD/watrack_mpd_11.vcxproj.filters +++ b/plugins/Watrack_MPD/watrack_mpd_11.vcxproj.filters @@ -24,27 +24,30 @@ Sources + + Sources + Headers - - Headers - - - Headers - Headers Headers + + Headers + Resources + + Resources + \ No newline at end of file -- cgit v1.2.3