diff options
author | Hoà V. DINH <dinh.viet.hoa@gmail.com> | 2014-11-22 10:11:22 -0800 |
---|---|---|
committer | Hoà V. DINH <dinh.viet.hoa@gmail.com> | 2014-11-22 10:11:22 -0800 |
commit | 9a7e8d1d9a7373b45ba337c1f9bfa92f16341f11 (patch) | |
tree | 42f3c07590d0eac672182fd8c3ed7ca77603d35b | |
parent | fafaf9dc531119fe359b95ea0c790491b7a900ce (diff) |
Improved build on win32.
5 files changed, 238 insertions, 9 deletions
diff --git a/build-windows/build_headers.bat b/build-windows/build_headers.bat new file mode 100644 index 00000000..4ea101e2 --- /dev/null +++ b/build-windows/build_headers.bat @@ -0,0 +1,4 @@ +@mkdir include +@mkdir include\MailCore +@for /F "delims=" %%a in (build_headers.list) do @copy "..\src\%%a" include\MailCore +@echo "done" >_headers_depends diff --git a/build-windows/build_headers.list b/build-windows/build_headers.list new file mode 100644 index 00000000..25074a18 --- /dev/null +++ b/build-windows/build_headers.list @@ -0,0 +1,200 @@ +MailCore.h +core\MCCore.h +core\abstract\MCAbstract.h +core\abstract\MCAbstractMessage.h +core\basetypes\MCBaseTypes.h +core\basetypes\MCAutoreleasePool.h +core\basetypes\MCObject.h +core\basetypes\MCValue.h +core\basetypes\MCString.h +core\basetypes\MCRange.h +core\basetypes\MCICUTypes.h +core\basetypes\MCData.h +core\abstract\MCMessageConstants.h +core\basetypes\MCArray.h +core\basetypes\MCHashMap.h +core\basetypes\MCJSON.h +core\basetypes\MCMD5.h +core\basetypes\MCNull.h +core\basetypes\MCSet.h +core\basetypes\MCHash.h +core\basetypes\MCLog.h +core\basetypes\MCAssert.h +core\basetypes\MCUtils.h +core\basetypes\MCIndexSet.h +core\basetypes\MCOperation.h +core\basetypes\MCOperationQueue.h +core\basetypes\MCLibetpanTypes.h +core\basetypes\MCOperationCallback.h +core\basetypes\MCIterator.h +core\basetypes\MCConnectionLogger.h +core\abstract\MCAbstractMessagePart.h +core\abstract\MCAbstractPart.h +core\abstract\MCAbstractMultipart.h +core\abstract\MCAddress.h +core\abstract\MCMessageHeader.h +core\imap\MCIMAP.h +core\imap\MCIMAPFolder.h +core\imap\MCIMAPMessage.h +core\imap\MCIMAPMessagePart.h +core\imap\MCIMAPMultipart.h +core\imap\MCIMAPNamespace.h +core\imap\MCIMAPNamespaceItem.h +core\imap\MCIMAPPart.h +core\imap\MCIMAPProgressCallback.h +core\imap\MCIMAPSearchExpression.h +core\imap\MCIMAPSession.h +core\imap\MCIMAPSyncResult.h +core\imap\MCIMAPFolderStatus.h +core\imap\MCIMAPIdentity.h +core\pop\MCPOP.h +core\pop\MCPOPMessageInfo.h +core\pop\MCPOPProgressCallback.h +core\pop\MCPOPSession.h +core\nntp\MCNNTP.h +core\nntp\MCNNTPGroupInfo.h +core\nntp\MCNNTPProgressCallback.h +core\nntp\MCNNTPSession.h +core\rfc822\MCRFC822.h +core\rfc822\MCAttachment.h +core\rfc822\MCMessageBuilder.h +core\rfc822\MCMessageParser.h +core\rfc822\MCMessagePart.h +core\rfc822\MCMultipart.h +core\smtp\MCSMTP.h +core\smtp\MCSMTPProgressCallback.h +core\smtp\MCSMTPSession.h +core\renderer\MCRenderer.h +core\renderer\MCHTMLRendererCallback.h +core\renderer\MCDateFormatter.h +core\renderer\MCAddressDisplay.h +core\provider\MCProvider.h +core\provider\MCMailProvidersManager.h +core\provider\MCMailProvider.h +core\provider\MCNetService.h +async\MCAsync.h +async\smtp\MCAsyncSMTP.h +async\smtp\MCSMTPAsyncSession.h +async\smtp\MCSMTPOperation.h +async\smtp\MCSMTPOperationCallback.h +async\imap\MCAsyncIMAP.h +async\imap\MCIMAPAsyncSession.h +async\imap\MCIMAPOperation.h +async\imap\MCIMAPFetchFoldersOperation.h +async\imap\MCIMAPAppendMessageOperation.h +async\imap\MCIMAPCopyMessagesOperation.h +async\imap\MCIMAPFetchMessagesOperation.h +async\imap\MCIMAPFetchContentOperation.h +async\imap\MCIMAPFetchParsedContentOperation.h +async\imap\MCIMAPIdleOperation.h +async\imap\MCIMAPFolderInfoOperation.h +async\imap\MCIMAPFolderStatusOperation.h +async\imap\MCIMAPSearchOperation.h +async\imap\MCIMAPFetchNamespaceOperation.h +async\imap\MCIMAPIdentityOperation.h +async\imap\MCIMAPCapabilityOperation.h +async\imap\MCIMAPQuotaOperation.h +async\imap\MCIMAPOperationCallback.h +async\imap\MCIMAPMessageRenderingOperation.h +async\pop\MCAsyncPOP.h +async\pop\MCPOPAsyncSession.h +async\pop\MCPOPOperation.h +async\pop\MCPOPFetchHeaderOperation.h +async\pop\MCPOPFetchMessageOperation.h +async\pop\MCPOPFetchMessagesOperation.h +async\pop\MCPOPOperationCallback.h +async\nntp\MCAsyncNNTP.h +async\nntp\MCNNTPAsyncSession.h +async\nntp\MCNNTPOperation.h +async\nntp\MCNNTPFetchHeaderOperation.h +async\nntp\MCNNTPFetchArticleOperation.h +async\nntp\MCNNTPFetchAllArticlesOperation.h +async\nntp\MCNNTPListNewsgroupsOperation.h +async\nntp\MCNNTPFetchOverviewOperation.h +async\nntp\MCNNTPFetchServerTimeOperation.h +async\nntp\MCNNTPOperationCallback.h +objc\MCObjC.h +objc\utils\MCOUtils.h +objc\utils\MCOObjectWrapper.h +objc\utils\NSData+MCO.h +objc\utils\NSString+MCO.h +objc\utils\NSDictionary+MCO.h +objc\utils\NSArray+MCO.h +objc\utils\NSObject+MCO.h +objc\utils\NSError+MCO.h +objc\utils\NSValue+MCO.h +objc\utils\MCOOperation.h +objc\abstract\MCOConstants.h +objc\utils\MCOIndexSet.h +objc\utils\MCORange.h +objc\utils\NSIndexSet+MCO.h +objc\abstract\MCOAbstract.h +objc\abstract\MCOAbstractMessage.h +objc\abstract\MCOAbstractMessagePart.h +objc\abstract\MCOAbstractPart.h +objc\abstract\MCOAbstractMultipart.h +objc\abstract\MCOAddress.h +objc\abstract\MCOMessageHeader.h +objc\abstract\MCOHTMLRendererDelegate.h +objc\abstract\MCOHTMLRendererIMAPDelegate.h +objc\imap\MCOIMAP.h +objc\imap\MCOIMAPSession.h +objc\imap\MCOIMAPOperation.h +objc\imap\MCOIMAPBaseOperation.h +objc\imap\MCOIMAPFetchFoldersOperation.h +objc\imap\MCOIMAPFolder.h +objc\imap\MCOIMAPMessage.h +objc\imap\MCOIMAPMessagePart.h +objc\imap\MCOIMAPMultipart.h +objc\imap\MCOIMAPNamespace.h +objc\imap\MCOIMAPNamespaceItem.h +objc\imap\MCOIMAPIdentity.h +objc\imap\MCOIMAPPart.h +objc\imap\MCOIMAPFolderInfoOperation.h +objc\imap\MCOIMAPFolderInfo.h +objc\imap\MCOIMAPFolderStatusOperation.h +objc\imap\MCOIMAPFolderStatus.h +objc\imap\MCOIMAPAppendMessageOperation.h +objc\imap\MCOIMAPCopyMessagesOperation.h +objc\imap\MCOIMAPFetchMessagesOperation.h +objc\imap\MCOIMAPFetchContentOperation.h +objc\imap\MCOIMAPFetchParsedContentOperation.h +objc\imap\MCOIMAPSearchOperation.h +objc\imap\MCOIMAPIdleOperation.h +objc\imap\MCOIMAPFetchNamespaceOperation.h +objc\imap\MCOIMAPIdentityOperation.h +objc\imap\MCOIMAPCapabilityOperation.h +objc\imap\MCOIMAPQuotaOperation.h +objc\imap\MCOIMAPSearchExpression.h +objc\imap\MCOIMAPMessageRenderingOperation.h +objc\rfc822\MCORFC822.h +objc\rfc822\MCOAttachment.h +objc\rfc822\MCOMessageBuilder.h +objc\rfc822\MCOMessageParser.h +objc\rfc822\MCOMessagePart.h +objc\rfc822\MCOMultipart.h +objc\pop\MCOPOP.h +objc\pop\MCOPOPSession.h +objc\pop\MCOPOPOperation.h +objc\pop\MCOPOPFetchHeaderOperation.h +objc\pop\MCOPOPFetchMessageOperation.h +objc\pop\MCOPOPFetchMessagesOperation.h +objc\pop\MCOPOPMessageInfo.h +objc\smtp\MCOSMTP.h +objc\smtp\MCOSMTPSession.h +objc\smtp\MCOSMTPSendOperation.h +objc\smtp\MCOSMTPOperation.h +objc\nntp\MCONNTP.h +objc\nntp\MCONNTPSession.h +objc\nntp\MCONNTPOperation.h +objc\nntp\MCONNTPFetchHeaderOperation.h +objc\nntp\MCONNTPFetchArticleOperation.h +objc\nntp\MCONNTPFetchAllArticlesOperation.h +objc\nntp\MCONNTPListNewsgroupsOperation.h +objc\nntp\MCONNTPFetchOverviewOperation.h +objc\nntp\MCONNTPFetchServerTimeOperation.h +objc\nntp\MCONNTPGroupInfo.h +objc\provider\MCOProvider.h +objc\provider\MCONetService.h +objc\provider\MCOMailProvider.h +objc\provider\MCOMailProvidersManager.h diff --git a/build-windows/mailcore2/mailcore2/mailcore2.Windows/mailcore2.Windows.vcxproj b/build-windows/mailcore2/mailcore2/mailcore2.Windows/mailcore2.Windows.vcxproj index 1007cf83..9b458840 100644 --- a/build-windows/mailcore2/mailcore2/mailcore2.Windows/mailcore2.Windows.vcxproj +++ b/build-windows/mailcore2/mailcore2/mailcore2.Windows/mailcore2.Windows.vcxproj @@ -373,69 +373,87 @@ <PrecompiledHeader>NotUsing</PrecompiledHeader> <CompileAsWinRT>false</CompileAsWinRT> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\..\include;..\..\..\..\Externals\include;..\..\..\..\src\core\basetypes;..\..\..\..\src\core\zip;..\..\..\..\src\core\zip\minizip;..\..\..\..\src\core\renderer;..\..\..\..\src\core/rfc822;..\..\..\..\src\core/imap;..\..\..\..\src\core\abstract;..\..\..\..\src\core\security;..\..\..\..\src\core\imap;..\..\..\..\src\core\pop;..\..\..\..\src\core\nntp;..\..\..\..\src\core\smtp</AdditionalIncludeDirectories> - <PreprocessorDefinitions>PTW32_STATIC_LIB;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <GenerateWindowsMetadata>false</GenerateWindowsMetadata> - <AdditionalDependencies>uchardet.lib;ssleay32MD.lib;libeay32MD.lib;zlib.lib;regex.lib;User32.lib;Ws2_32.lib;zlibwapi.lib;libctemplate.lib;kernel32.lib;libetpan.lib;libtidy.dll.lib;libxml2.lib;pthreadVC2.lib;icudt.lib;icuin.lib;icuio.lib;icule.lib;iculx.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>libtidy.lib;libxml2.lib;uchardet.lib;ssleay32MD.lib;libeay32MD.lib;zlib.lib;User32.lib;Ws2_32.lib;libctemplate.lib;kernel32.lib;libetpan.lib;pthreadVC2.lib;icudt.lib;icuin.lib;icuio.lib;icule.lib;iculx.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalLibraryDirectories>..\..\..\..\Externals\lib</AdditionalLibraryDirectories> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeader>NotUsing</PrecompiledHeader> <CompileAsWinRT>false</CompileAsWinRT> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\..\include;..\..\..\..\Externals\include;..\..\..\..\src\core\basetypes;..\..\..\..\src\core\zip;..\..\..\..\src\core\zip\minizip;..\..\..\..\src\core\renderer;..\..\..\..\src\core/rfc822;..\..\..\..\src\core/imap;..\..\..\..\src\core\abstract;..\..\..\..\src\core\security;..\..\..\..\src\core\imap;..\..\..\..\src\core\pop;..\..\..\..\src\core\nntp;..\..\..\..\src\core\smtp</AdditionalIncludeDirectories> + <PreprocessorDefinitions>ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <GenerateWindowsMetadata>false</GenerateWindowsMetadata> + <AdditionalDependencies>libtidy.lib;libxml2.lib;uchardet.lib;ssleay32MD.lib;libeay32MD.lib;zlib.lib;User32.lib;Ws2_32.lib;libctemplate.lib;kernel32.lib;libetpan.lib;pthreadVC2.lib;icudt.lib;icuin.lib;icuio.lib;icule.lib;iculx.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>..\..\..\..\Externals\lib</AdditionalLibraryDirectories> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'"> <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeader>NotUsing</PrecompiledHeader> <CompileAsWinRT>false</CompileAsWinRT> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\..\include;..\..\..\..\Externals\include;..\..\..\..\src\core\basetypes;..\..\..\..\src\core\zip;..\..\..\..\src\core\zip\minizip;..\..\..\..\src\core\renderer;..\..\..\..\src\core/rfc822;..\..\..\..\src\core/imap;..\..\..\..\src\core\abstract;..\..\..\..\src\core\security;..\..\..\..\src\core\imap;..\..\..\..\src\core\pop;..\..\..\..\src\core\nntp;..\..\..\..\src\core\smtp</AdditionalIncludeDirectories> + <PreprocessorDefinitions>ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <GenerateWindowsMetadata>false</GenerateWindowsMetadata> + <AdditionalDependencies>libtidy.lib;libxml2.lib;uchardet.lib;ssleay32MD.lib;libeay32MD.lib;zlib.lib;User32.lib;Ws2_32.lib;libctemplate.lib;kernel32.lib;libetpan.lib;pthreadVC2.lib;icudt.lib;icuin.lib;icuio.lib;icule.lib;iculx.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'"> <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeader>NotUsing</PrecompiledHeader> <CompileAsWinRT>false</CompileAsWinRT> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\..\include;..\..\..\..\Externals\include;..\..\..\..\src\core\basetypes;..\..\..\..\src\core\zip;..\..\..\..\src\core\zip\minizip;..\..\..\..\src\core\renderer;..\..\..\..\src\core/rfc822;..\..\..\..\src\core/imap;..\..\..\..\src\core\abstract;..\..\..\..\src\core\security;..\..\..\..\src\core\imap;..\..\..\..\src\core\pop;..\..\..\..\src\core\nntp;..\..\..\..\src\core\smtp</AdditionalIncludeDirectories> + <PreprocessorDefinitions>ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <GenerateWindowsMetadata>false</GenerateWindowsMetadata> + <AdditionalDependencies>libtidy.lib;libxml2.lib;uchardet.lib;ssleay32MD.lib;libeay32MD.lib;zlib.lib;User32.lib;Ws2_32.lib;libctemplate.lib;kernel32.lib;libetpan.lib;pthreadVC2.lib;icudt.lib;icuin.lib;icuio.lib;icule.lib;iculx.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeader>NotUsing</PrecompiledHeader> <CompileAsWinRT>false</CompileAsWinRT> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\..\include;..\..\..\..\Externals\include;..\..\..\..\src\core\basetypes;..\..\..\..\src\core\zip;..\..\..\..\src\core\zip\minizip;..\..\..\..\src\core\renderer;..\..\..\..\src\core/rfc822;..\..\..\..\src\core/imap;..\..\..\..\src\core\abstract;..\..\..\..\src\core\security;..\..\..\..\src\core\imap;..\..\..\..\src\core\pop;..\..\..\..\src\core\nntp;..\..\..\..\src\core\smtp</AdditionalIncludeDirectories> + <PreprocessorDefinitions>ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <GenerateWindowsMetadata>false</GenerateWindowsMetadata> + <AdditionalDependencies>libtidy.lib;libxml2.lib;uchardet.lib;ssleay32MD.lib;libeay32MD.lib;zlib.lib;User32.lib;Ws2_32.lib;libctemplate.lib;kernel32.lib;libetpan.lib;pthreadVC2.lib;icudt.lib;icuin.lib;icuio.lib;icule.lib;iculx.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>..\..\..\..\Externals\lib64</AdditionalLibraryDirectories> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeader>NotUsing</PrecompiledHeader> <CompileAsWinRT>false</CompileAsWinRT> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\..\include;..\..\..\..\Externals\include;..\..\..\..\src\core\basetypes;..\..\..\..\src\core\zip;..\..\..\..\src\core\zip\minizip;..\..\..\..\src\core\renderer;..\..\..\..\src\core/rfc822;..\..\..\..\src\core/imap;..\..\..\..\src\core\abstract;..\..\..\..\src\core\security;..\..\..\..\src\core\imap;..\..\..\..\src\core\pop;..\..\..\..\src\core\nntp;..\..\..\..\src\core\smtp</AdditionalIncludeDirectories> + <PreprocessorDefinitions>ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <GenerateWindowsMetadata>false</GenerateWindowsMetadata> + <AdditionalDependencies>libtidy.lib;libxml2.lib;uchardet.lib;ssleay32MD.lib;libeay32MD.lib;zlib.lib;User32.lib;Ws2_32.lib;libctemplate.lib;kernel32.lib;libetpan.lib;pthreadVC2.lib;icudt.lib;icuin.lib;icuio.lib;icule.lib;iculx.lib;icuuc.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>..\..\..\..\Externals\lib64</AdditionalLibraryDirectories> </Link> </ItemDefinitionGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/build-windows/mailcore2/mailcore2/mailcore2.Windows/mailcore2.Windows.vcxproj.user b/build-windows/mailcore2/mailcore2/mailcore2.Windows/mailcore2.Windows.vcxproj.user new file mode 100644 index 00000000..89d24524 --- /dev/null +++ b/build-windows/mailcore2/mailcore2/mailcore2.Windows/mailcore2.Windows.vcxproj.user @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ShowAllFiles>false</ShowAllFiles> + </PropertyGroup> +</Project>
\ No newline at end of file diff --git a/src/core/provider/MCMailProvider.cpp b/src/core/provider/MCMailProvider.cpp index fd1b9ffb..1055d4fa 100644 --- a/src/core/provider/MCMailProvider.cpp +++ b/src/core/provider/MCMailProvider.cpp @@ -12,6 +12,7 @@ #include "MCJSON.h" #ifdef _MSC_VER +#include <unicode/uregex.h> #include <unicode/utext.h> #include <unicode/utypes.h> #include <unicode/localpointer.h> @@ -196,13 +197,13 @@ bool MailProvider::matchDomain(String * match, String * domain) uregex_close(r); return false; } - uregex_setText(r, domain->unicodeChararacters(), domain->length(), &code); + uregex_setText(r, domain->unicodeCharacters(), domain->length(), &code); if (code != U_ZERO_ERROR) { uregex_close(r); return false; } - bool matched = uregex_matches(r, 0, &code) + bool matched = uregex_matches(r, 0, &code); if (code != U_ZERO_ERROR) { uregex_close(r); return false; |