vmime
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | vmime [2023/04/25 16:52] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Compiling VMime ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | VMime is the library we intend to use in Mail2Voice Next. It supports emails protocols such as IMAP and SMTP. | ||
+ | Visit http:// | ||
+ | |||
+ | ===== Compiling ===== | ||
+ | |||
+ | ==== GNU/Linux (Ubuntu) ==== | ||
+ | |||
+ | === Prerequisites === | ||
+ | |||
+ | |||
+ | Packages needed: | ||
+ | * git | ||
+ | * cmake | ||
+ | * build-essential | ||
+ | * pkg-config | ||
+ | * libgsasl7 | ||
+ | * libgsasl7-dev | ||
+ | * libgnutls-dev | ||
+ | * libssl-dev | ||
+ | * sendmail | ||
+ | * doxygen | ||
+ | |||
+ | One can install all the stuff needed with the following command: | ||
+ | sudo apt-get install -y git cmake build-essential pkg-config libgsasl7 libgsasl7-dev libgnutls-dev libssl-dev sendmail doxygen | ||
+ | |||
+ | |||
+ | === Building === | ||
+ | |||
+ | git clone https:// | ||
+ | mkdir vmime/build | ||
+ | cd vmime/build | ||
+ | cmake -DVMIME_BUILD_SAMPLES=OFF -DVMIME_SHARED_PTR_USE_BOOST=OFF -DVMIME_SHARED_PTR_USE_CXX=ON -DVMIME_SENDMAIL_PATH=/ | ||
+ | make | ||
+ | sudo make install | ||
+ | |||
+ | |||
+ | ==== 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/build | ||
+ | $ cd vmime/build | ||
+ | $ 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) [DRAFT] ==== | ||
+ | |||
+ | === Prerequisites === | ||
+ | |||
+ | - Download and install MinGW64 from sourceforge (https:// | ||
+ | - Use the following settings: | ||
+ | - Version: latest (6.2.0 on 2016-09-21) | ||
+ | - Architecture: | ||
+ | - Threads: win32 | ||
+ | - Exception: seh | ||
+ | - Build revision: 1 | ||
+ | - And install it on " | ||
+ | - Download MSYS (https:// | ||
+ | - Extract the msys folder to " | ||
+ | - Run C: | ||
+ | - From this terminal, run: sh / | ||
+ | - Answer " | ||
+ | - Enter the path to your mingw64 installation (C:/ | ||
+ | - It should " | ||
+ | - Download and install CMake (https:// | ||
+ | - When installing, choose to add CMake to the " | ||
+ | |||
+ | === Preparing dependencies === | ||
+ | |||
+ | == Compiling GSASL == | ||
+ | |||
+ | - Download GSASL from ftp:// | ||
+ | - Open C: | ||
+ | - Then type the following commands : | ||
+ | |||
+ | < | ||
+ | $ cd / | ||
+ | $ mkdir build | ||
+ | $ cd build | ||
+ | $ ../ | ||
+ | $ make | ||
+ | $ make install | ||
+ | </ | ||
+ | |||
+ | == Get other dependencies == | ||
+ | Fortunately, | ||
+ | * gnutls | ||
+ | * pkg-config | ||
+ | * win-iconv | ||
+ | |||
+ | == 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