From 4a966be3c32e745b2567e51c27766942f798f77d Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 26 Jul 2015 12:33:08 +0000 Subject: common projects git-svn-id: http://svn.miranda-ng.org/main/trunk@14724 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/PluginUpdater.vcxproj | 33 +++ .../PluginUpdater/PluginUpdater.vcxproj.filters | 4 + plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj | 15 +- plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj | 15 +- plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj | 15 +- plugins/PluginUpdater/PluginUpdater_10.vcxproj | 215 ------------------- .../PluginUpdater/PluginUpdater_10.vcxproj.filters | 94 --------- plugins/PluginUpdater/PluginUpdater_12.vcxproj | 218 ------------------- .../PluginUpdater/PluginUpdater_12.vcxproj.filters | 94 --------- plugins/PluginUpdater/PluginUpdater_14.vcxproj | 218 ------------------- .../PluginUpdater/PluginUpdater_14.vcxproj.filters | 94 --------- plugins/PluginUpdater/src/Common.h | 233 --------------------- plugins/PluginUpdater/src/Compat/compat.cpp | 2 +- plugins/PluginUpdater/src/DlgListNew.cpp | 2 +- plugins/PluginUpdater/src/DlgUpdate.cpp | 2 +- plugins/PluginUpdater/src/Events.cpp | 2 +- plugins/PluginUpdater/src/Notifications.cpp | 2 +- plugins/PluginUpdater/src/Options.cpp | 2 +- plugins/PluginUpdater/src/PluginUpdater.cpp | 2 +- plugins/PluginUpdater/src/Services.cpp | 2 +- plugins/PluginUpdater/src/Utils.cpp | 2 +- plugins/PluginUpdater/src/checksum.cpp | 2 +- plugins/PluginUpdater/src/stdafx.cpp | 18 -- plugins/PluginUpdater/src/stdafx.cxx | 18 ++ plugins/PluginUpdater/src/stdafx.h | 233 +++++++++++++++++++++ plugins/PluginUpdater/src/unzipfile.cpp | 2 +- 26 files changed, 308 insertions(+), 1231 deletions(-) create mode 100644 plugins/PluginUpdater/PluginUpdater.vcxproj create mode 100644 plugins/PluginUpdater/PluginUpdater.vcxproj.filters delete mode 100644 plugins/PluginUpdater/PluginUpdater_10.vcxproj delete mode 100644 plugins/PluginUpdater/PluginUpdater_10.vcxproj.filters delete mode 100644 plugins/PluginUpdater/PluginUpdater_12.vcxproj delete mode 100644 plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters delete mode 100644 plugins/PluginUpdater/PluginUpdater_14.vcxproj delete mode 100644 plugins/PluginUpdater/PluginUpdater_14.vcxproj.filters delete mode 100644 plugins/PluginUpdater/src/Common.h delete mode 100644 plugins/PluginUpdater/src/stdafx.cpp create mode 100644 plugins/PluginUpdater/src/stdafx.cxx create mode 100644 plugins/PluginUpdater/src/stdafx.h (limited to 'plugins/PluginUpdater') diff --git a/plugins/PluginUpdater/PluginUpdater.vcxproj b/plugins/PluginUpdater/PluginUpdater.vcxproj new file mode 100644 index 0000000000..6eb44c75ec --- /dev/null +++ b/plugins/PluginUpdater/PluginUpdater.vcxproj @@ -0,0 +1,33 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + PluginUpdater + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD} + + + + + + + {e2a369cd-eda3-414f-8ad0-e732cd7ee68c} + + + \ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdater.vcxproj.filters b/plugins/PluginUpdater/PluginUpdater.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/PluginUpdater/PluginUpdater.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj index 0c2576b216..378244d523 100644 --- a/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj +++ b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj @@ -196,22 +196,13 @@ - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing diff --git a/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj b/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj index c28c3c8a40..577267bd4c 100644 --- a/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj +++ b/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj @@ -188,22 +188,13 @@ - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing diff --git a/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj b/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj index d7ca2f5d1c..945a1bea8c 100644 --- a/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj +++ b/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj @@ -188,22 +188,13 @@ - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing diff --git a/plugins/PluginUpdater/PluginUpdater_10.vcxproj b/plugins/PluginUpdater/PluginUpdater_10.vcxproj deleted file mode 100644 index 7efc2c91c1..0000000000 --- a/plugins/PluginUpdater/PluginUpdater_10.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - PluginUpdater - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD} - - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - ..\..\include;..\ExternalAPI;.\src\Minizip;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - EditAndContinue - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Disabled - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - Level3 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - Level3 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - {e2a369cd-eda3-414f-8ad0-e732cd7ee68c} - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdater_10.vcxproj.filters b/plugins/PluginUpdater/PluginUpdater_10.vcxproj.filters deleted file mode 100644 index a40a0d37b2..0000000000 --- a/plugins/PluginUpdater/PluginUpdater_10.vcxproj.filters +++ /dev/null @@ -1,94 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - {794a226d-3db3-4b7e-aa4c-4d1b4d1aa76d} - - - - - Resource Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - \ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdater_12.vcxproj b/plugins/PluginUpdater/PluginUpdater_12.vcxproj deleted file mode 100644 index 906439f147..0000000000 --- a/plugins/PluginUpdater/PluginUpdater_12.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - PluginUpdater - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD} - - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - ..\..\include;..\ExternalAPI;.\src\Minizip;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - EditAndContinue - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - false - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Disabled - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - Level4 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin12\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - Level4 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin12\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - {e2a369cd-eda3-414f-8ad0-e732cd7ee68c} - - - - - - \ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters b/plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters deleted file mode 100644 index a40a0d37b2..0000000000 --- a/plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters +++ /dev/null @@ -1,94 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - {794a226d-3db3-4b7e-aa4c-4d1b4d1aa76d} - - - - - Resource Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - \ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdater_14.vcxproj b/plugins/PluginUpdater/PluginUpdater_14.vcxproj deleted file mode 100644 index 62c04be513..0000000000 --- a/plugins/PluginUpdater/PluginUpdater_14.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - PluginUpdater - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD} - - - - DynamicLibrary - Unicode - true - v140_xp - - - DynamicLibrary - Unicode - true - v140_xp - - - DynamicLibrary - Unicode - v140_xp - - - DynamicLibrary - Unicode - v140_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - ..\..\include;..\ExternalAPI;.\src\Minizip;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - EditAndContinue - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - false - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Disabled - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - Level4 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin14\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions) - Level4 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin14\lib - comctl32.lib;%(AdditionalDependencies) - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - {e2a369cd-eda3-414f-8ad0-e732cd7ee68c} - - - - - - \ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdater_14.vcxproj.filters b/plugins/PluginUpdater/PluginUpdater_14.vcxproj.filters deleted file mode 100644 index a40a0d37b2..0000000000 --- a/plugins/PluginUpdater/PluginUpdater_14.vcxproj.filters +++ /dev/null @@ -1,94 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - {794a226d-3db3-4b7e-aa4c-4d1b4d1aa76d} - - - - - Resource Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - \ No newline at end of file diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h deleted file mode 100644 index 7834bdcb3b..0000000000 --- a/plugins/PluginUpdater/src/Common.h +++ /dev/null @@ -1,233 +0,0 @@ -/* -Copyright (C) 2010 Mataes - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#define _CRT_SECURE_NO_WARNINGS - -// Windows Header Files: -#include -#include -#include -#include -#include -#include - -// Miranda header files -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "version.h" -#include "resource.h" - -#if MIRANDA_VER < 0x0A00 -#include "Compat\compat.h" -#endif - -#include "Notifications.h" - -// Enable Visual Style -#if defined _M_IX86 -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") -#elif defined _M_IA64 -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") -#elif defined _M_X64 -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") -#else -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") -#endif - -#define MODNAME "PluginUpdater" -#define MODULEA "Plugin Updater" -#define MODULE L"Plugin Updater" -#define DEFAULT_UPDATES_FOLDER L"Plugin Updates" - -struct FILEURL -{ - TCHAR tszDownloadURL[2048]; - TCHAR tszDiskPath[MAX_PATH]; - int CRCsum; -}; - -struct FILEINFO -{ - TCHAR tszOldName[MAX_PATH], tszNewName[MAX_PATH]; - FILEURL File; - BOOL bEnabled, bDeleteOnly; -}; - -typedef OBJLIST FILELIST; - -extern struct PlugOptions -{ - BYTE bUpdateOnStartup, bUpdateOnPeriod, bOnlyOnceADay, bForceRedownload, bSilentMode; - BOOL bSilent; - - BYTE bPeriodMeasure; - int Period; -} opts; - -#define DEFAULT_UPDATEONSTARTUP 1 -#define DEFAULT_UPDATEONPERIOD 0 -#define DEFAULT_PERIOD 1 -#define DEFAULT_PERIODMEASURE 1 - -#if MIRANDA_VER < 0x0A00 - #define DEFAULT_ONLYONCEADAY 0 -#else - #define DEFAULT_ONLYONCEADAY 1 -#endif - -#define DEFAULT_UPDATE_URL "http://miranda-ng.org/distr/stable/x%platform%" -#define DEFAULT_UPDATE_URL_TRUNK "http://miranda-ng.org/distr/x%platform%" -#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS "http://miranda-ng.org/distr/pdb_x%platform%" -#define PLUGIN_INFO_URL _T("http://miranda-ng.org/p/%s") - -#define UPDATE_MODE_CUSTOM 0 -#define UPDATE_MODE_STABLE 1 -#define UPDATE_MODE_TRUNK 2 -#define UPDATE_MODE_TRUNK_SYMBOLS 3 -#define UPDATE_MODE_MAX_VALUE 3 // when adding new mode, increment this number - -#define DB_SETTING_UPDATE_MODE "UpdateMode" -#define DB_SETTING_UPDATE_URL "UpdateURL" -#define DB_SETTING_REDOWNLOAD "ForceRedownload" -#define DB_SETTING_NEED_RESTART "NeedRestart" -#define DB_SETTING_RESTART_COUNT "RestartCount" -#define DB_SETTING_LAST_UPDATE "LastUpdate" -#define DB_SETTING_DONT_SWITCH_TO_STABLE "DontSwitchToStable" -#define DB_MODULE_FILES MODNAME "Files" - -#define MAX_RETRIES 3 - -#define IDINFO 3 -#define IDDOWNLOAD 4 -#define IDDOWNLOADALL 5 - -using namespace std; - -extern HINSTANCE hInst; - -extern DWORD g_mirandaVersion; -extern TCHAR tszRoot[MAX_PATH], tszTempPath[MAX_PATH]; -extern aPopups PopupsList[POPUPS]; -extern HANDLE hPipe, hNetlibUser; -#if MIRANDA_VER >= 0x0A00 -extern IconItemT iconList[]; -#endif -void UninitCheck(void); -void UninitListNew(void); - -class AutoHandle -{ - HANDLE &m_handle; - AutoHandle& operator=(const AutoHandle&) { return *this; } - -public: - AutoHandle(HANDLE &_handle) : m_handle(_handle) {} - ~AutoHandle() - { - if (m_handle) { - ::CloseHandle(m_handle); - m_handle = 0; - } - } -}; - -/////////////////////////////////////////////////////////////////////////////// - -struct ServListEntry -{ - ServListEntry(const char* _name, const char* _hash, int _crc) : - m_name( mir_a2t(_name)), - m_crc(_crc) - { - strncpy(m_szHash, _hash, sizeof(m_szHash)); - } - - ~ServListEntry() - { - mir_free(m_name); - } - - TCHAR *m_name; - DWORD m_crc; - char m_szHash[32+1]; -}; - -typedef OBJLIST SERVLIST; - -/////////////////////////////////////////////////////////////////////////////// - -void InitPopupList(); -void LoadOptions(); -void InitNetlib(); -void InitIcoLib(); -void InitServices(); -void InitEvents(); -void InitOptions(); -void InitListNew(); -void InitCheck(); -void CreateTimer(); - -void UnloadCheck(); -void UnloadListNew(); -void UnloadNetlib(); - -void BackupFile(TCHAR *ptszSrcFileName, TCHAR *ptszBackFileName); - -bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes); -int CompareHashes(const ServListEntry *p1, const ServListEntry *p2); - -TCHAR* GetDefaultUrl(); -bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc); - -void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number); -void __stdcall RestartMe(void*); -void __stdcall OpenPluginOptions(void*); -void CheckUpdateOnStartup(); -void InitTimer(void *type); - -bool unzip(const TCHAR *ptszZipFile, TCHAR *ptszDestPath, TCHAR *ptszBackPath,bool ch); -void strdel(TCHAR *parBuffer, int len); - -/////////////////////////////////////////////////////////////////////////////// - -int CalculateModuleHash(const TCHAR *tszFileName, char *dest); - -BOOL IsProcessElevated(); -bool PrepareEscalation(); - -int SafeCreateDirectory(const TCHAR *ptszDirName); -int SafeCopyFile(const TCHAR *ptszSrc, const TCHAR *ptszDst); -int SafeMoveFile(const TCHAR *ptszSrc, const TCHAR *ptszDst); -int SafeDeleteFile(const TCHAR *ptszSrc); -int SafeCreateFilePath(TCHAR *pFolder); - -char *StrToLower(char *str); diff --git a/plugins/PluginUpdater/src/Compat/compat.cpp b/plugins/PluginUpdater/src/Compat/compat.cpp index e6b67265bd..ede6b2212b 100644 --- a/plugins/PluginUpdater/src/Compat/compat.cpp +++ b/plugins/PluginUpdater/src/Compat/compat.cpp @@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA. This file contains some compatibility functions for Miranda IM */ -#include "Common.h" +#include "stdafx.h" PLUGINLINK *pluginLink; MM_INTERFACE mmi; diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index b331b0ee67..fda1defc54 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" static HWND hwndDialog; static HANDLE hListThread; diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index de7eb92b94..7baff3aa44 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" #define UM_ERROR (WM_USER+1) diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp index 79eb903c4c..f97d384bf5 100644 --- a/plugins/PluginUpdater/src/Events.cpp +++ b/plugins/PluginUpdater/src/Events.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" HANDLE hPluginUpdaterFolder; diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp index 904a7091e6..65cebbc854 100644 --- a/plugins/PluginUpdater/src/Notifications.cpp +++ b/plugins/PluginUpdater/src/Notifications.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" aPopups PopupsList[POPUPS]; diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index e32e5ce52c..f9b6933265 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" PlugOptions opts; POPUP_OPTIONS PopupOptions = {0}; diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 6a77bb1c49..c030a6376d 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" HINSTANCE hInst = NULL; TCHAR tszRoot[MAX_PATH] = {0}, tszTempPath[MAX_PATH]; diff --git a/plugins/PluginUpdater/src/Services.cpp b/plugins/PluginUpdater/src/Services.cpp index 9b44f0038d..ef70e7edb8 100644 --- a/plugins/PluginUpdater/src/Services.cpp +++ b/plugins/PluginUpdater/src/Services.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" static INT_PTR srvParseHashes(WPARAM wParam, LPARAM lParam) { diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 2638750363..36e46ceb43 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "Common.h" +#include "stdafx.h" HANDLE hNetlibUser = NULL, hPipe = NULL; diff --git a/plugins/PluginUpdater/src/checksum.cpp b/plugins/PluginUpdater/src/checksum.cpp index 2335bae500..48d2d9ee26 100644 --- a/plugins/PluginUpdater/src/checksum.cpp +++ b/plugins/PluginUpdater/src/checksum.cpp @@ -2,7 +2,7 @@ // Checksum Tool // By Bio (C) 2012 -#include "common.h" +#include "stdafx.h" // Return codes #define RESULT_OK 0 diff --git a/plugins/PluginUpdater/src/stdafx.cpp b/plugins/PluginUpdater/src/stdafx.cpp deleted file mode 100644 index c5fe5abaad..0000000000 --- a/plugins/PluginUpdater/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 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 "common.h" \ No newline at end of file diff --git a/plugins/PluginUpdater/src/stdafx.cxx b/plugins/PluginUpdater/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/PluginUpdater/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 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 "stdafx.h" \ No newline at end of file diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h new file mode 100644 index 0000000000..7834bdcb3b --- /dev/null +++ b/plugins/PluginUpdater/src/stdafx.h @@ -0,0 +1,233 @@ +/* +Copyright (C) 2010 Mataes + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#define _CRT_SECURE_NO_WARNINGS + +// Windows Header Files: +#include +#include +#include +#include +#include +#include + +// Miranda header files +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "version.h" +#include "resource.h" + +#if MIRANDA_VER < 0x0A00 +#include "Compat\compat.h" +#endif + +#include "Notifications.h" + +// Enable Visual Style +#if defined _M_IX86 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_IA64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_X64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#else +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +#endif + +#define MODNAME "PluginUpdater" +#define MODULEA "Plugin Updater" +#define MODULE L"Plugin Updater" +#define DEFAULT_UPDATES_FOLDER L"Plugin Updates" + +struct FILEURL +{ + TCHAR tszDownloadURL[2048]; + TCHAR tszDiskPath[MAX_PATH]; + int CRCsum; +}; + +struct FILEINFO +{ + TCHAR tszOldName[MAX_PATH], tszNewName[MAX_PATH]; + FILEURL File; + BOOL bEnabled, bDeleteOnly; +}; + +typedef OBJLIST FILELIST; + +extern struct PlugOptions +{ + BYTE bUpdateOnStartup, bUpdateOnPeriod, bOnlyOnceADay, bForceRedownload, bSilentMode; + BOOL bSilent; + + BYTE bPeriodMeasure; + int Period; +} opts; + +#define DEFAULT_UPDATEONSTARTUP 1 +#define DEFAULT_UPDATEONPERIOD 0 +#define DEFAULT_PERIOD 1 +#define DEFAULT_PERIODMEASURE 1 + +#if MIRANDA_VER < 0x0A00 + #define DEFAULT_ONLYONCEADAY 0 +#else + #define DEFAULT_ONLYONCEADAY 1 +#endif + +#define DEFAULT_UPDATE_URL "http://miranda-ng.org/distr/stable/x%platform%" +#define DEFAULT_UPDATE_URL_TRUNK "http://miranda-ng.org/distr/x%platform%" +#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS "http://miranda-ng.org/distr/pdb_x%platform%" +#define PLUGIN_INFO_URL _T("http://miranda-ng.org/p/%s") + +#define UPDATE_MODE_CUSTOM 0 +#define UPDATE_MODE_STABLE 1 +#define UPDATE_MODE_TRUNK 2 +#define UPDATE_MODE_TRUNK_SYMBOLS 3 +#define UPDATE_MODE_MAX_VALUE 3 // when adding new mode, increment this number + +#define DB_SETTING_UPDATE_MODE "UpdateMode" +#define DB_SETTING_UPDATE_URL "UpdateURL" +#define DB_SETTING_REDOWNLOAD "ForceRedownload" +#define DB_SETTING_NEED_RESTART "NeedRestart" +#define DB_SETTING_RESTART_COUNT "RestartCount" +#define DB_SETTING_LAST_UPDATE "LastUpdate" +#define DB_SETTING_DONT_SWITCH_TO_STABLE "DontSwitchToStable" +#define DB_MODULE_FILES MODNAME "Files" + +#define MAX_RETRIES 3 + +#define IDINFO 3 +#define IDDOWNLOAD 4 +#define IDDOWNLOADALL 5 + +using namespace std; + +extern HINSTANCE hInst; + +extern DWORD g_mirandaVersion; +extern TCHAR tszRoot[MAX_PATH], tszTempPath[MAX_PATH]; +extern aPopups PopupsList[POPUPS]; +extern HANDLE hPipe, hNetlibUser; +#if MIRANDA_VER >= 0x0A00 +extern IconItemT iconList[]; +#endif +void UninitCheck(void); +void UninitListNew(void); + +class AutoHandle +{ + HANDLE &m_handle; + AutoHandle& operator=(const AutoHandle&) { return *this; } + +public: + AutoHandle(HANDLE &_handle) : m_handle(_handle) {} + ~AutoHandle() + { + if (m_handle) { + ::CloseHandle(m_handle); + m_handle = 0; + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// + +struct ServListEntry +{ + ServListEntry(const char* _name, const char* _hash, int _crc) : + m_name( mir_a2t(_name)), + m_crc(_crc) + { + strncpy(m_szHash, _hash, sizeof(m_szHash)); + } + + ~ServListEntry() + { + mir_free(m_name); + } + + TCHAR *m_name; + DWORD m_crc; + char m_szHash[32+1]; +}; + +typedef OBJLIST SERVLIST; + +/////////////////////////////////////////////////////////////////////////////// + +void InitPopupList(); +void LoadOptions(); +void InitNetlib(); +void InitIcoLib(); +void InitServices(); +void InitEvents(); +void InitOptions(); +void InitListNew(); +void InitCheck(); +void CreateTimer(); + +void UnloadCheck(); +void UnloadListNew(); +void UnloadNetlib(); + +void BackupFile(TCHAR *ptszSrcFileName, TCHAR *ptszBackFileName); + +bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes); +int CompareHashes(const ServListEntry *p1, const ServListEntry *p2); + +TCHAR* GetDefaultUrl(); +bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc); + +void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number); +void __stdcall RestartMe(void*); +void __stdcall OpenPluginOptions(void*); +void CheckUpdateOnStartup(); +void InitTimer(void *type); + +bool unzip(const TCHAR *ptszZipFile, TCHAR *ptszDestPath, TCHAR *ptszBackPath,bool ch); +void strdel(TCHAR *parBuffer, int len); + +/////////////////////////////////////////////////////////////////////////////// + +int CalculateModuleHash(const TCHAR *tszFileName, char *dest); + +BOOL IsProcessElevated(); +bool PrepareEscalation(); + +int SafeCreateDirectory(const TCHAR *ptszDirName); +int SafeCopyFile(const TCHAR *ptszSrc, const TCHAR *ptszDst); +int SafeMoveFile(const TCHAR *ptszSrc, const TCHAR *ptszDst); +int SafeDeleteFile(const TCHAR *ptszSrc); +int SafeCreateFilePath(TCHAR *pFolder); + +char *StrToLower(char *str); diff --git a/plugins/PluginUpdater/src/unzipfile.cpp b/plugins/PluginUpdater/src/unzipfile.cpp index a67945be95..4b79f0fc52 100644 --- a/plugins/PluginUpdater/src/unzipfile.cpp +++ b/plugins/PluginUpdater/src/unzipfile.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" extern "C" { -- cgit v1.2.3