vmime
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
vmime [2016/09/21 12:50] – [Windows (MSYS + MinGW64)] mhatz | vmime [2016/10/27 11:26] – [Windows (MSYS + MinGW64) [DRAFT]] mhatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== VMime ====== | + | ====== |
===== Introduction ===== | ===== Introduction ===== | ||
VMime is the library we intend to use in Mail2Voice Next. It supports emails protocols such as IMAP and SMTP. | VMime is the library we intend to use in Mail2Voice Next. It supports emails protocols such as IMAP and SMTP. | ||
- | Visit http:// | + | Visit http:// |
===== Compiling ===== | ===== Compiling ===== | ||
Line 38: | Line 38: | ||
sudo make install | sudo make install | ||
- | ==== Windows (MSYS + MinGW64) ==== | + | |
+ | ==== Windows (MSYS + MinGW32) ==== | ||
+ | |||
+ | === Prerequisites === | ||
+ | |||
+ | - Download iconv sources from http:// | ||
+ | - Download GnuTLS binaries from ftp:// | ||
+ | - Download GSASL binaries from https:// | ||
+ | - Download pkg-config binaries and dependencies: | ||
+ | - http:// | ||
+ | - http:// | ||
+ | - http:// | ||
+ | - Unpack pkg-config.exe, | ||
+ | |||
+ | === Setup MSYS/MinGW environment === | ||
+ | |||
+ | - Download and install MinGW | ||
+ | - Download and install MSYS | ||
+ | - Go to your MSYS install folder | ||
+ | - start msys.bat | ||
+ | - type sh / | ||
+ | |||
+ | === Compiling iconv === | ||
+ | |||
+ | < | ||
+ | $ cd path/ | ||
+ | $ mkdir build | ||
+ | $ cd build | ||
+ | $ ../ | ||
+ | $ make <- I was using mingw32-make at first but I encountered some errors with it. It plays nice with MSYS make. | ||
+ | $ make install | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Compiling VMIME === | ||
+ | |||
+ | In order to prevent some bugs with the -std=c++11 flag with gcc 5.3, you need to modify the file cmake/ | ||
+ | |||
+ | < | ||
+ | # | ||
+ | ### Check for needed compiler flags | ||
+ | # | ||
+ | include(CheckCXXCompilerFlag) | ||
+ | check_cxx_compiler_flag(" | ||
+ | if (NOT _HAS_CXX11_FLAG) | ||
+ | check_cxx_compiler_flag(" | ||
+ | endif () | ||
+ | |||
+ | if (_HAS_CXX11_FLAG) | ||
+ | set(CXX11_COMPILER_FLAGS " | ||
+ | elseif (_HAS_CXX0X_FLAG) | ||
+ | set(CXX11_COMPILER_FLAGS " | ||
+ | endif () | ||
+ | |||
+ | </ | ||
+ | |||
+ | And you can finally compile VMime! | ||
+ | |||
+ | < | ||
+ | $ git clone https:// | ||
+ | $ mkdir vmime/ | ||
+ | $ cd vmime/ | ||
+ | $ export DEPS=/ | ||
+ | $ cmake .. -G "MinGW Makefiles" | ||
+ | -DCMAKE_MAKE_PROGRAM=/ | ||
+ | -DCMAKE_INSTALL_PREFIX=$(pwd)/ | ||
+ | -DGNUTLS_INCLUDE_DIR=$DEPS/ | ||
+ | -DGSASL_INCLUDE_DIR=$DEPS/ | ||
+ | -DICONV_INCLUDE_DIR=$DEPS/ | ||
+ | -DPKG_CONFIG_EXECUTABLE=$DEPS/ | ||
+ | -DVMIME_BUILD_DOCUMENTATION=OFF -DVMIME_BUILD_SAMPLES=OFF -DVMIME_BUILD_TESTS=OFF \ | ||
+ | -DVMIME_HAVE_MLANG_H=OFF -DVMIME_HAVE_MLANG_LIB=OFF -DVMIME_HAVE_MESSAGING_PROTO_SENDMAIL=OFF \ | ||
+ | -DVMIME_SHARED_PTR_USE_BOOST=OFF -DVMIME_SHARED_PTR_USE_CXX=ON -DCMAKE_CXX_FLAGS=" | ||
+ | $ mingw32-make.exe | ||
+ | $ mingw32-make.exe install | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Windows (MSYS + MinGW64) | ||
=== Prerequisites === | === Prerequisites === | ||
Line 58: | Line 136: | ||
- It should " | - It should " | ||
- Download and install CMake (https:// | - Download and install CMake (https:// | ||
+ | - When installing, choose to add CMake to the " | ||
=== Preparing dependencies === | === Preparing dependencies === | ||
Line 67: | Line 146: | ||
- Then type the following commands : | - Then type the following commands : | ||
- | | + | < |
- | mkdir build | + | $ cd / |
- | cd build | + | $ mkdir build |
- | ../ | + | $ cd build |
- | make | + | $ ../ |
- | make install | + | $ make |
- | + | $ make install | |
+ | </ | ||
== Get other dependencies == | == Get other dependencies == | ||
- | Fortunately, | + | Fortunately, |
* gnutls | * gnutls | ||
+ | * pkg-config | ||
* win-iconv | * win-iconv | ||
== Compiling VMime == | == Compiling VMime == | ||
+ | |||
+ | Finally, you can compile VMime using the following commands: | ||
+ | |||
+ | < | ||
+ | $ git clone https:// | ||
+ | $ mkdir vmime/build | ||
+ | $ cd vmime/build | ||
+ | $ export DEPS=/ | ||
+ | $ cmake .. -G "MinGW Makefiles" | ||
+ | -DCMAKE_MAKE_PROGRAM=/ | ||
+ | -DCMAKE_INSTALL_PREFIX=/ | ||
+ | -DGNUTLS_INCLUDE_DIR=$DEPS/ | ||
+ | -DGSASL_INCLUDE_DIR=$DEPS/ | ||
+ | -DICONV_INCLUDE_DIR=$DEPS/ | ||
+ | -DPKG_CONFIG_EXECUTABLE=$DEPS/ | ||
+ | -DVMIME_BUILD_DOCUMENTATION=OFF -DVMIME_BUILD_SAMPLES=OFF -DVMIME_BUILD_TESTS=OFF \ | ||
+ | -DVMIME_HAVE_MLANG_H=OFF -DVMIME_HAVE_MLANG_LIB=OFF -DVMIME_HAVE_MESSAGING_PROTO_SENDMAIL=OFF \ | ||
+ | -DVMIME_SHARED_PTR_USE_BOOST=OFF -DVMIME_SHARED_PTR_USE_CXX=ON | ||
+ | $ mingw32-make.exe | ||
+ | $ mingw32-make.exe install | ||
+ | </ | ||
+ | |||
+ | Note 1: you may encounter some errors while generating the Makefile mentioning that libglib2 is missing but you can ignore it. | ||
+ | |||
+ | Note 2: if the install step fails at the end, just copy the missing libvmime.dll file from the build/ | ||
vmime.txt · Last modified: 2023/04/25 16:52 by 127.0.0.1