diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-30 11:50:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-30 11:50:38 +0000 |
commit | c2c8016a4f56b10299b279c64370e304265e7c3b (patch) | |
tree | 30058c8f2d56f01dfd2099f8636e022d01e00bb7 /plugins | |
parent | 40d145149e5d95415fde7c3927706f9dd447902c (diff) |
source code unification
git-svn-id: http://svn.miranda-ng.org/main/trunk@1726 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj | 227 | ||||
-rw-r--r-- | plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj.filters | 112 | ||||
-rw-r--r-- | plugins/PluginUpdater/PluginUpdater_10.vcxproj | 8 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Common.h | 88 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 42 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 44 |
6 files changed, 500 insertions, 21 deletions
diff --git a/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj new file mode 100644 index 0000000000..c414504c14 --- /dev/null +++ b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj @@ -0,0 +1,227 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug Unicode|Win32">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Unicode|x64">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>PluginUpdater</ProjectName>
+ <ProjectGuid>{21F6C0E4-DD1A-49E6-82FD-64574BB902BD}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\src\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\Resource.rc" />
+ <ResourceCompile Include="res\Version.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\Minizip\crypt.h" />
+ <ClInclude Include="src\Minizip\ioapi.h" />
+ <ClInclude Include="src\Minizip\iowin32.h" />
+ <ClInclude Include="src\Minizip\unzip.h" />
+ <ClInclude Include="src\Minizip\zconf.h" />
+ <ClInclude Include="src\Minizip\zip.h" />
+ <ClInclude Include="src\Minizip\zlib.h" />
+ <ClInclude Include="src\Resource.h" />
+ <ClInclude Include="src\Common.h" />
+ <ClInclude Include="src\Notifications.h" />
+ <ClInclude Include="src\Version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\checksum.cpp" />
+ <ClCompile Include="src\Events.cpp" />
+ <ClCompile Include="src\Minizip\ioapi.c">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">NotUsing</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="src\Minizip\iowin32.c">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">NotUsing</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="src\Minizip\unzip.c">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">NotUsing</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="src\Notifications.cpp" />
+ <ClCompile Include="src\Options.cpp" />
+ <ClCompile Include="src\PluginUpdater.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="src\Scanner.cpp" />
+ <ClCompile Include="src\unzipfile.cpp" />
+ <ClCompile Include="src\Utils.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\btnClose.ico" />
+ <None Include="res\btnOk.ico" />
+ <None Include="res\delete.ico" />
+ <None Include="res\menu.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\zlib\zlib_10.vcxproj">
+ <Project>{e2a369cd-eda3-414f-8ad0-e732cd7ee68c}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj.filters b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj.filters new file mode 100644 index 0000000000..595ed68903 --- /dev/null +++ b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj.filters @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files\Minizip">
+ <UniqueIdentifier>{845e5403-a8df-47fc-a179-7ac2048f954d}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\Resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\Resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Common.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Notifications.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Minizip\crypt.h">
+ <Filter>Source Files\Minizip</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Minizip\ioapi.h">
+ <Filter>Source Files\Minizip</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Minizip\iowin32.h">
+ <Filter>Source Files\Minizip</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Minizip\unzip.h">
+ <Filter>Source Files\Minizip</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Minizip\zconf.h">
+ <Filter>Source Files\Minizip</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Minizip\zip.h">
+ <Filter>Source Files\Minizip</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Minizip\zlib.h">
+ <Filter>Source Files\Minizip</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\Notifications.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Options.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\PluginUpdater.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Utils.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Events.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\checksum.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\unzipfile.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Minizip\ioapi.c">
+ <Filter>Source Files\Minizip</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Minizip\iowin32.c">
+ <Filter>Source Files\Minizip</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Minizip\unzip.c">
+ <Filter>Source Files\Minizip</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Scanner.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\menu.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\delete.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\btnOk.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\btnClose.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/PluginUpdater/PluginUpdater_10.vcxproj b/plugins/PluginUpdater/PluginUpdater_10.vcxproj index 01e66fce75..5b34e33ab2 100644 --- a/plugins/PluginUpdater/PluginUpdater_10.vcxproj +++ b/plugins/PluginUpdater/PluginUpdater_10.vcxproj @@ -73,7 +73,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\src\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
@@ -96,7 +96,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -119,7 +119,7 @@ <Optimization>Full</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
@@ -144,7 +144,7 @@ <Optimization>Full</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;.\Minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;MIRANDA_VER=0x0A00;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h index 9efa4740be..28c899e9d7 100644 --- a/plugins/PluginUpdater/src/Common.h +++ b/plugins/PluginUpdater/src/Common.h @@ -19,8 +19,6 @@ Boston, MA 02111-1307, USA. #define _CRT_SECURE_NO_WARNINGS
-#define MIRANDA_VER 0x0A00
-
// Windows Header Files:
#include <time.h>
#include <stdio.h>
@@ -138,7 +136,6 @@ int OptInit(WPARAM, LPARAM); void DoCheck(int iFlag);
BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal);
void ShowPopup(HWND hDlg, LPCTSTR Title, LPCTSTR Text, int Number, int ActType);
-void __stdcall ExitMe(void*);
void __stdcall RestartMe(void*);
BOOL AllowUpdateOnStartup();
void InitTimer();
@@ -150,3 +147,88 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam INT_PTR CALLBACK DlgMsgPop(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
bool unzip(const TCHAR* ptszZipFile, TCHAR* ptszDestPath, TCHAR* ptszBackPath);
+
+#if MIRANDA_VER < 0x0A00
+
+template<class T> class mir_ptr
+{
+ T* data;
+
+public:
+ __inline mir_ptr() : data((T*)mir_calloc(sizeof(T))) {}
+ __inline mir_ptr(T* _p) : data(_p) {}
+ __inline ~mir_ptr() { mir_free(data); }
+ __inline T* operator = (T* _p) { if (data) mir_free(data); data = _p; return data; }
+ __inline T* operator->() const { return data; }
+ __inline operator T*() const { return data; }
+ __inline operator INT_PTR() const { return (INT_PTR)data; }
+};
+
+class _A2T
+{
+ TCHAR* buf;
+
+public:
+ __forceinline _A2T(const char* s) : buf(mir_a2t(s)) {}
+ __forceinline _A2T(const char* s, int cp) : buf(mir_a2t_cp(s, cp)) {}
+ ~_A2T() { mir_free(buf); }
+
+ __forceinline operator TCHAR*() const
+ { return buf;
+ }
+};
+
+class _T2A
+{
+ char* buf;
+
+public:
+ __forceinline _T2A(const TCHAR* s) : buf(mir_t2a(s)) {}
+ __forceinline _T2A(const TCHAR* s, int cp) : buf(mir_t2a_cp(s, cp)) {}
+ __forceinline ~_T2A() { mir_free(buf); }
+
+ __forceinline operator char*() const
+ { return buf;
+ }
+};
+
+__forceinline INT_PTR Options_Open(OPENOPTIONSDIALOG *ood)
+{
+ return CallService("Opt/OpenOptions", 0, (LPARAM)ood);
+}
+
+__forceinline INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp)
+{
+ return CallService("Opt/AddPage", wParam, (LPARAM)odp);
+}
+
+char* rtrim(char* str);
+void CreatePathToFileT(TCHAR* szFilePath);
+
+#define NEWTSTR_ALLOCA(A) (A == NULL)?NULL:_tcscpy((TCHAR*)alloca((_tcslen(A)+1)* sizeof(TCHAR)), A)
+
+__forceinline HANDLE Skin_GetIconHandle(const char* szIconName)
+{ return (HANDLE)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)szIconName);
+}
+
+__forceinline HICON Skin_GetIcon(const char* szIconName, int size=0)
+{ return (HICON)CallService(MS_SKIN2_GETICON, size, (LPARAM)szIconName);
+}
+
+__forceinline HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi)
+{ return (HGENMENU)CallService("CList/AddMainMenuItem", 0, (LPARAM)mi);
+}
+
+__forceinline INT_PTR Hotkey_Register(HOTKEYDESC *hk)
+{ return CallService("CoreHotkeys/Register", 0, (LPARAM)hk);
+}
+
+__forceinline INT_PTR CreateDirectoryTreeT(const TCHAR* ptszPath)
+{ return CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)ptszPath);
+}
+
+__forceinline HANDLE Skin_AddIcon(SKINICONDESC* si)
+{ return (HANDLE)CallService("Skin2/Icons/AddIcon", 0, (LPARAM)si);
+}
+
+#endif
\ No newline at end of file diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index d42c0901e7..8e2ffd6935 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -19,9 +19,18 @@ Boston, MA 02111-1307, USA. #include "common.h"
-HINSTANCE hInst = NULL;
+#if MIRANDA_VER < 0x0A00
+ #define MIID_UPDATER {0x4a47b19b, 0xde5a, 0x4436, { 0xab, 0x4b, 0xe1, 0xf3, 0xa0, 0x22, 0x5d, 0xe7}}
+
+ PLUGINLINK* pluginLink;
+ MM_INTERFACE mmi;
+ LIST_INTERFACE li;
+ MD5_INTERFACE md5i;
+ UTF8_INTERFACE utfi;
+#endif
-HANDLE hPluginUpdaterFolder = NULL, hCheckUpdates = NULL;
+HANDLE hPluginUpdaterFolder = NULL, hCheckUpdates = NULL, hEmptyFolder = NULL;
+HINSTANCE hInst = NULL;
TCHAR tszRoot[MAX_PATH] = {0};
int hLangpack;
@@ -35,6 +44,9 @@ PLUGININFOEX pluginInfoEx = { __COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
+#if MIRANDA_VER < 0x0A00
+ 0,
+#endif
//{29517BE5-779A-48e5-8950-CB4DE1D43172}
{0x29517be5, 0x779a, 0x48e5, {0x89, 0x50, 0xcb, 0x4d, 0xe1, 0xd4, 0x31, 0x72}}
};
@@ -45,15 +57,34 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE;
}
+#if MIRANDA_VER < 0x0A00
+static const MUUID interfaces[] = {MIID_UPDATER, MIID_LAST};
+
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+#endif
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfoEx;
}
+
+#if MIRANDA_VER < 0x0A00
+extern "C" __declspec(dllexport) int Load(PLUGINLINK* link)
+{
+ pluginLink = link;
+ mir_getMMI(&mmi);
+ mir_getLI(&li);
+ mir_getMD5I(&md5i);
+ mir_getUTFI(&utfi);
+#else
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
-
+#endif
if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
hPluginUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, "Plugin Updater", MIRANDA_USERDATAT _T("\\")DEFAULT_UPDATES_FOLDER);
@@ -84,10 +115,9 @@ extern "C" __declspec(dllexport) int Load(void) // Add hotkey
HOTKEYDESC hkd = {0};
hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
hkd.pszName = "Check for plugin updates";
- hkd.ptszDescription = _T("Check for plugin updates");
- hkd.ptszSection = _T("Plugin Updater");
+ hkd.pszDescription = "Check for plugin updates";
+ hkd.pszSection = "Plugin Updater";
hkd.pszService = MODNAME"/CheckUpdates";
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 1886d02c01..737df21960 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -19,12 +19,10 @@ Boston, MA 02111-1307, USA. #include "Common.h"
-//vector<FILEINFO> Files;
BOOL DlgDld;
int Number = 0;
TCHAR tszDialogMsg[2048] = {0};
FILEINFO* pFileInfo = NULL;
-//FILEURL* pFileUrl = NULL;
HANDLE CheckThread = NULL, hNetlibUser = NULL;
POPUP_OPTIONS PopupOptions = {0};
aPopups PopupsList[POPUPS];
@@ -128,7 +126,11 @@ BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) DWORD dwBytes;
NETLIBHTTPREQUEST nlhr = {0};
- nlhr.cbSize = sizeof(nlhr);
+ #if MIRANDA_VER < 0x0A00
+ nlhr.cbSize = NETLIBHTTPREQUEST_V1_SIZE;
+ #else
+ nlhr.cbSize = sizeof(nlhr);
+ #endif
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11;
char* szUrl = mir_t2a(tszURL);
@@ -164,13 +166,9 @@ BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) return ret;
}
-void __stdcall ExitMe(void*)
-{
- CallService("CloseAction", 0, 0);
-}
-
void __stdcall RestartMe(void*)
{
+ CallService("CloseAction", 0, 0);
CallService(MS_SYSTEM_RESTART, 0, 0);
}
@@ -227,3 +225,33 @@ void InitTimer() SetWaitableTimer(Timer, &li, interval, TimerAPCProc, NULL, 0);
}
}
+
+#if MIRANDA_VER < 0x0A00
+char* rtrim(char* str)
+{
+ if (str == NULL)
+ return NULL;
+
+ char* p = strchr(str, 0);
+ while (--p >= str) {
+ switch (*p) {
+ case ' ': case '\t': case '\n': case '\r':
+ *p = 0; break;
+ default:
+ return str;
+ }
+ }
+ return str;
+}
+
+void CreatePathToFileT(TCHAR* szFilePath)
+{
+ TCHAR* pszLastBackslash = _tcsrchr(szFilePath, '\\');
+ if (pszLastBackslash == NULL)
+ return;
+
+ *pszLastBackslash = '\0';
+ CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)szFilePath);
+ *pszLastBackslash = '\\';
+}
+#endif
|