User Tools

Site Tools


vmime

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vmime [2016/10/16 20:24] – [Windows (MSYS + MinGW64)] mhatzvmime [2023/04/25 16:52] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
 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://vmime.org for more informations.+Visit http://vmime.org for more information.
  
 ===== Compiling ===== ===== Compiling =====
Line 37: Line 37:
   make   make
   sudo make install   sudo make install
- 
-==== Windows (MSYS + MinGW64) ==== 
- 
-=== Prerequisites === 
- 
-  - Download and install MinGW64 from sourceforge (https://sourceforge.net/projects/mingw-w64/).   
-    - Use the following settings: 
-      - Version: latest (6.2.0 on 2016-09-21) 
-      - Architecture: x86_64 
-      - Threads: win32 
-      - Exception: seh 
-      - Build revision: 1 
-    - And install it on "C:\" (it will create a mingw64 directory) 
-  - Download MSYS (https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/ ). On 2016-09-21, the latest version is MSYS-20111123.zip. 
-    - Extract the msys folder to "C:\" 
-    - Run C:\msys\msys.bat, it will open a unix-like terminal 
-    - From this terminal, run: sh /postinstall/pi.sh 
-    - Answer "y" for the two first questions. 
-    - Enter the path to your mingw64 installation (C:/mingw64) in our case. **Make sure to use "/" instead of "\".** 
-    - It should "Normalizing your MSYS environment". 
-  - Download and install CMake (https://cmake.org/download/) 
-    - When installing, choose to add CMake to the "path" environment variable. 
- 
-=== Preparing dependencies === 
- 
-== Compiling GSASL == 
- 
-  - Download GSASL from ftp://ftp.gnu.org/gnu/gsasl/ (latest version is 1.8.0 on 2016-09-21) and extract files. 
-  - Open C:\msys\msys.bat 
-  - Then type the following commands : 
- 
-<code> 
-  $ cd /path/to/your/libgsasl_src_dir/ (i.e. /c/Users/MrNobody/dev/libgsasl-1.8.0/) 
-  $ mkdir build 
-  $ cd build 
-  $ ../configure --prefix=/path/to/your/libgsasl_src_dir/dist 
-  $ make 
-  $ make install 
-</code> 
- 
-== Get other dependencies == 
-Fortunately, the Winbuilds project offers some precompiled dependencies we need. You can download the following packages from http://win-builds.org/doku.php/1.5.0_packages: 
-  * gnutls 
-  * pkg-config 
-  * win-iconv 
- 
-== Compiling VMime == 
- 
-Finally, you can compile VMime using the following commands: 
- 
-<code> 
-  $ git clone https://github.com/kisli/vmime.git 
-  $ mkdir vmime/build 
-  $ cd vmime/build 
-  $ export DEPS=/path/to/dependencies/parent/dir 
-  $ cmake .. -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=/C/mingw64/bin/g++.exe -DCMAKE_C_COMPILER=/C/mingw64/bin/gcc.exe \ 
-  -DCMAKE_MAKE_PROGRAM=/C/mingw64/bin/mingw32-make.exe -DCMAKE_BUILD_TYPE=Release \ 
-  -DCMAKE_INSTALL_PREFIX=/C/Users/MrNobody/dev/vmime-master/install \ 
-  -DGNUTLS_INCLUDE_DIR=$DEPS/gnutls-3.2.21/include -DGNUTLS_LIBRARY=$DEPS/gnutls-3.2.21/lib64/libgnutls.dll.a \ 
-  -DGSASL_INCLUDE_DIR=$DEPS/libgsasl-1.8.0/include -DGSASL_LIBRARIES=$DEPS/libgsasl-1.8.0/lib/libgsasl.dll.a \ 
-  -DICONV_INCLUDE_DIR=$DEPS/win-iconv-0.0.6/include -DICONV_LIBRARIES=$DEPS/win-iconv-0.0.6/lib64/libiconv.dll.a \ 
-  -DPKG_CONFIG_EXECUTABLE=$DEPS/pkg-config/bin/pkg-config.exe -DVMIME_CHARSETCONV_LIB=iconv \ 
-  -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 
-</code> 
- 
-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/build/bin directory into the install/bin directory. 
  
  
Line 135: Line 63:
  
 <code> <code>
-  $ cd path/to/iconv/sources +$ cd path/to/iconv/sources 
-  $ mkdir build +$ mkdir build 
-  $ cd build +$ cd build 
-  $ ../configure --prefix=$(pwd) +$ ../configure --prefix=$(pwd) 
-  $ make            <- I was using mingw32-make at first but I encountered some errors with it. It plays nice with MSYS  +$ make            <- I was using mingw32-make at first but I encountered some errors with it. It plays nice with MSYS make. 
-  $ make install+$ make install
 </code> </code>
  
Line 146: Line 74:
 === Compiling VMIME === === Compiling VMIME ===
  
-In order to prevent some bugs with the -std=c++11 flag, you need to modify the file cmake/cmake-cxx11/Modules/CheckCXX11Features.cmake at lines 58 and 64 (not sure if the first one is useful).+In order to prevent some bugs with the -std=c++11 flag with gcc 5.3, you need to modify the file cmake/cmake-cxx11/Modules/CheckCXX11Features.cmake at lines 58 and 64 (not sure if the first one is useful).
  
 <code> <code>
Line 166: Line 94:
 </code> </code>
  
-And you can finally compile VMime !+And you can finally compile VMime!
  
 <code> <code>
-  $ git clone https://github.com/kisli/vmime.git +$ git clone https://github.com/kisli/vmime.git 
-  $ mkdir vmime/build +$ mkdir vmime/build 
-  $ cd vmime/build +$ cd vmime/build 
-  $ export DEPS=/path/to/dependencies/parent/dir +$ export DEPS=/path/to/dependencies/parent/dir 
-  $ cmake .. -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=/C/MinGW/bin/mingw32-g++.exe -DCMAKE_C_COMPILER=/C/MinGW/bin/mingw32-gcc.exe \ +$ cmake .. -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=/C/MinGW/bin/mingw32-g++.exe -DCMAKE_C_COMPILER=/C/MinGW/bin/mingw32-gcc.exe \ 
-  -DCMAKE_MAKE_PROGRAM=/C/MinGW/bin/mingw32-make.exe -DCMAKE_BUILD_TYPE=Release \ +-DCMAKE_MAKE_PROGRAM=/C/MinGW/bin/mingw32-make.exe -DCMAKE_BUILD_TYPE=Release \ 
-  -DCMAKE_INSTALL_PREFIX=$(pwd)/install \ +-DCMAKE_INSTALL_PREFIX=$(pwd)/install \ 
-  -DGNUTLS_INCLUDE_DIR=$DEPS/gnutls-3.4.9/include -DGNUTLS_LIBRARY=$DEPS/gnutls-3.4.9/lib/libgnutls.dll.a \ +-DGNUTLS_INCLUDE_DIR=$DEPS/gnutls-3.4.9/include -DGNUTLS_LIBRARY=$DEPS/gnutls-3.4.9/lib/libgnutls.dll.a \ 
-  -DGSASL_INCLUDE_DIR=$DEPS/gsasl-1.8.0/include -DGSASL_LIBRARIES=$DEPS/gsasl-1.8.0/lib/libgsasl.dll.a \ +-DGSASL_INCLUDE_DIR=$DEPS/gsasl-1.8.0/include -DGSASL_LIBRARIES=$DEPS/gsasl-1.8.0/lib/libgsasl.dll.a \ 
-  -DICONV_INCLUDE_DIR=$DEPS/libiconv-1.14/build/dist/include -DICONV_LIBRARIES=$DEPS/libiconv-1.14/build/dist/lib/libiconv.dll.a \ +-DICONV_INCLUDE_DIR=$DEPS/libiconv-1.14/build/dist/include -DICONV_LIBRARIES=$DEPS/libiconv-1.14/build/dist/lib/libiconv.dll.a \ 
-  -DPKG_CONFIG_EXECUTABLE=$DEPS/pkg-config/pkg-config.exe -DVMIME_CHARSETCONV_LIB=iconv \ +-DPKG_CONFIG_EXECUTABLE=$DEPS/pkg-config/pkg-config.exe -DVMIME_CHARSETCONV_LIB=iconv \ 
-  -DVMIME_BUILD_DOCUMENTATION=OFF -DVMIME_BUILD_SAMPLES=OFF -DVMIME_BUILD_TESTS=OFF \ +-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_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="-D_WIN32_WINNT=0x0502"+-DVMIME_SHARED_PTR_USE_BOOST=OFF -DVMIME_SHARED_PTR_USE_CXX=ON -DCMAKE_CXX_FLAGS="-D_WIN32_WINNT=0x0502" 
 +$ mingw32-make.exe 
 +$ mingw32-make.exe install 
 +</code>
  
 +
 +==== Windows (MSYS + MinGW64) [DRAFT] ====
 +
 +=== Prerequisites ===
 +
 +  - Download and install MinGW64 from sourceforge (https://sourceforge.net/projects/mingw-w64/).  
 +    - Use the following settings:
 +      - Version: latest (6.2.0 on 2016-09-21)
 +      - Architecture: x86_64
 +      - Threads: win32
 +      - Exception: seh
 +      - Build revision: 1
 +    - And install it on "C:\" (it will create a mingw64 directory)
 +  - Download MSYS (https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/ ). On 2016-09-21, the latest version is MSYS-20111123.zip.
 +    - Extract the msys folder to "C:\"
 +    - Run C:\msys\msys.bat, it will open a unix-like terminal
 +    - From this terminal, run: sh /postinstall/pi.sh
 +    - Answer "y" for the two first questions.
 +    - Enter the path to your mingw64 installation (C:/mingw64) in our case. **Make sure to use "/" instead of "\".**
 +    - It should "Normalizing your MSYS environment".
 +  - Download and install CMake (https://cmake.org/download/)
 +    - When installing, choose to add CMake to the "path" environment variable.
 +
 +=== Preparing dependencies ===
 +
 +== Compiling GSASL ==
 +
 +  - Download GSASL from ftp://ftp.gnu.org/gnu/gsasl/ (latest version is 1.8.0 on 2016-09-21) and extract files.
 +  - Open C:\msys\msys.bat
 +  - Then type the following commands :
 +
 +<code>
 +$ cd /path/to/your/libgsasl_src_dir/ (i.e. /c/Users/MrNobody/dev/libgsasl-1.8.0/)
 +$ mkdir build
 +$ cd build
 +$ ../configure --prefix=/path/to/your/libgsasl_src_dir/dist
 +$ make
 +$ make install
 </code> </code>
 +
 +== Get other dependencies ==
 +Fortunately, the Winbuilds project offers some precompiled dependencies we need. You can download the following packages from http://win-builds.org/doku.php/1.5.0_packages:
 +  * gnutls
 +  * pkg-config
 +  * win-iconv
 +
 +== Compiling VMime ==
 +
 +Finally, you can compile VMime using the following commands:
 +
 +<code>
 +$ git clone https://github.com/kisli/vmime.git
 +$ mkdir vmime/build
 +$ cd vmime/build
 +$ export DEPS=/path/to/dependencies/parent/dir
 +$ cmake .. -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=/C/mingw64/bin/g++.exe -DCMAKE_C_COMPILER=/C/mingw64/bin/gcc.exe \
 +-DCMAKE_MAKE_PROGRAM=/C/mingw64/bin/mingw32-make.exe -DCMAKE_BUILD_TYPE=Release \
 +-DCMAKE_INSTALL_PREFIX=/C/Users/MrNobody/dev/vmime-master/install \
 +-DGNUTLS_INCLUDE_DIR=$DEPS/gnutls-3.2.21/include -DGNUTLS_LIBRARY=$DEPS/gnutls-3.2.21/lib64/libgnutls.dll.a \
 +-DGSASL_INCLUDE_DIR=$DEPS/libgsasl-1.8.0/include -DGSASL_LIBRARIES=$DEPS/libgsasl-1.8.0/lib/libgsasl.dll.a \
 +-DICONV_INCLUDE_DIR=$DEPS/win-iconv-0.0.6/include -DICONV_LIBRARIES=$DEPS/win-iconv-0.0.6/lib64/libiconv.dll.a \
 +-DPKG_CONFIG_EXECUTABLE=$DEPS/pkg-config/bin/pkg-config.exe -DVMIME_CHARSETCONV_LIB=iconv \
 +-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
 +</code>
 +
 +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/build/bin directory into the install/bin directory.
 +
vmime.1476649464.txt.gz · Last modified: 2023/04/25 16:52 (external edit)