Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 1.62 KB

build-with-msys2.md

File metadata and controls

76 lines (51 loc) · 1.62 KB

Build utool with MinGW64 under window10

Install compile toolchain

Install MSYS2

Install MinGW toolchain

  • Update package database and core system packages with
pacman -Sy pacman
pacman -Syu
pacman -Su
  • install auto tools and cmake
pacman -S cmake automake autoconf libtool git
  • install MinGW64 toolchain
pacman -S  mingw-w64-i686-toolchain
pacman -S  mingw-w64-x86_64-toolchain

1,3,13 is required

Compile

ENV

Open D:\tools\msys2\mingw64.exe as administrator. The whole compile progress is under MinGW64 ENV, and please make sure it's run as administrator.

download source code from github

cd ${your-workspace}
git clone https://github.com/IamFive/huawei-utool.git huawei-utool
cd huawei-utool

build CURL

cd ${your-workspace}/huawei-utool
cd third-party/curl
./buildconf
./configure --host=x86_64-w64-mingw32 --with-zlib --with-winssl --without-ssl --without-axtls --without-nghttp2 --without-libssh2 --without-gssapi --without-libidn2 --without-librtmp  --without-libpsl
mingw32-make

build Utool

Using cmake to build utool, after make install, utool bin script will be install to ${your-workspace}/bin.

cd ${workspace}/huawei-utool
rm -rf build && mkdir -p build && cd build
cmake -G "MinGW Makefiles" -DCMAKE_SH=CMAKE_SH-NOTFOUND ..
mingw32-make
mingw32-make install