summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-08-02 20:51:49 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-08-02 20:51:49 +0000
commit03d2586c6dc4c4163f9df52cc8efe0a16768a28c (patch)
tree4134d241dd14221fa0ba3848c5efe769750cc9d1
parent419e301b09de1935ab61f9a28363bb375fc7e208 (diff)
IM_Updater:
-Compilation fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@14825 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj10
-rw-r--r--plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj10
-rw-r--r--plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj14
-rw-r--r--plugins/PluginUpdater/src/Compat/compat.h16
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp3
5 files changed, 34 insertions, 19 deletions
diff --git a/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj
index 378244d523..894efc4922 100644
--- a/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj
+++ b/plugins/PluginUpdater/PluginUpdaterIM_10.vcxproj
@@ -78,7 +78,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
@@ -102,7 +102,7 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
@@ -126,7 +126,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
@@ -153,7 +153,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
@@ -186,7 +186,7 @@
<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\stdafx.h" />
<ClInclude Include="src\Notifications.h" />
<ClInclude Include="src\Version.h" />
</ItemGroup>
diff --git a/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj b/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj
index 577267bd4c..0ed3a88a75 100644
--- a/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj
+++ b/plugins/PluginUpdater/PluginUpdaterIM_12.vcxproj
@@ -78,7 +78,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -100,7 +100,7 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -122,7 +122,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
@@ -147,7 +147,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
@@ -178,7 +178,7 @@
<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\stdafx.h" />
<ClInclude Include="src\Notifications.h" />
<ClInclude Include="src\Version.h" />
</ItemGroup>
diff --git a/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj b/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj
index 945a1bea8c..fb3a3ab9b3 100644
--- a/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj
+++ b/plugins/PluginUpdater/PluginUpdaterIM_14.vcxproj
@@ -27,19 +27,23 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -78,7 +82,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -100,7 +104,7 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -122,7 +126,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
@@ -147,7 +151,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;MIRANDA_VER=0x0800;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>Common.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
@@ -178,7 +182,7 @@
<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\stdafx.h" />
<ClInclude Include="src\Notifications.h" />
<ClInclude Include="src\Version.h" />
</ItemGroup>
diff --git a/plugins/PluginUpdater/src/Compat/compat.h b/plugins/PluginUpdater/src/Compat/compat.h
index e4f15f53d8..5818adcef1 100644
--- a/plugins/PluginUpdater/src/Compat/compat.h
+++ b/plugins/PluginUpdater/src/Compat/compat.h
@@ -26,6 +26,8 @@
#define NETLIB_USER_AGENT "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)"
+typedef HANDLE MCONTACT;
+
template<class T> class mir_ptr
{
T *data;
@@ -140,8 +142,18 @@ __forceinline INT_PTR Hotkey_Register(HOTKEYDESC *hk) {
return CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)hk);
}
-__forceinline INT_PTR CreateDirectoryTreeT(const TCHAR *ptszPath)
-{ return CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)ptszPath);
+__forceinline INT_PTR CreateDirectoryTreeT(const TCHAR *ptszPath) {
+ return CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)ptszPath);
+}
+
+__forceinline TCHAR *Utils_ReplaceVarsT(const TCHAR *szData, MCONTACT hContact, REPLACEVARSARRAY *variables) {
+ REPLACEVARSDATA vars;
+ vars.cbSize = sizeof(vars);
+ vars.dwFlags = RVF_TCHAR;
+ vars.hContact = hContact;
+ vars.variables = variables;
+ return (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)szData, (LPARAM)&vars);
}
+
#define _qtoupper(_c) (((_c) >= 'a' && (_c) <= 'z')?((_c)-('a'+'A')):(_c))
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index 4149ba1620..b8bf392a5f 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -137,7 +137,6 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
vars[0].value.t = _T("32");
#endif
vars[1].key.t = vars[1].value.t = 0;
- baseUrl = Utils_ReplaceVarsT(ptszUrl, 0, vars);
#else
vars[0].lptzKey = _T("platform");
#ifdef _WIN64
@@ -146,8 +145,8 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
vars[0].lptzValue = _T("32");
#endif
vars[1].lptzKey = vars[1].lptzValue = 0;
- baseUrl = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)ptszUrl, (LPARAM)&vars);
#endif
+ baseUrl = Utils_ReplaceVarsT(ptszUrl, 0, vars);
// Download version info
FILEURL pFileUrl;