This document describes building keytool
with MSYS2
and its usage on Windows 10
64-bit.
- Install
MSYS2
by downloading the installer and following the installation guide in www.msys2.org. - Run
MSYS2
and make sure the package database is updated:
# pacman -Syu
# pacman -Su
- Next, install the compiler and the required packages:
# pacman --noconfirm -S mingw-w64-x86_64-clang patch git make mingw-w64-x86_64-libc++ autoconf automake1.8 libtool automake python
- Clone
keytool-cli
, e.g. intoC:\msys64\home
- Open
MSYS2 MinGW 64-bit
application andcd
intoC:\msys64\home\keytool-cli
- Run the build script with:
# export CC="clang" && export CXX="clang++" && ./build.sh
- Install:
# make install
You can now freely use keytool
inside MSYS2 MinGW 64-bit
console.
To be able to use keytool
as a native app on Windows outside msys2/mingw64
, you have to expose four files to the system: keytool.exe
, libc++.dll
, libunwind.dll
and libssp-0.dll
, which all reside in C:\msys64\mingw64\bin
.
To do so, add that folder to the Windows PATH
by the following command in Windows Cmd
:
> set PATH=%PATH%;C:\msys64\mingw64\bin
That's it. Now you can use keytool
as a native Windows app in the Windows command-line tool.