IRMA can be installed on a Windows platform but it's a little bit tricky cause it's strongly dependant of go-yara and CGO. Here's a little documentation to guide you step by step:
All the installation process will be done with msys2/mingw terminal. In order to avoid any error, you have to ensure that your installation directories don't contains space or special characters. I haven't tested to install as a simple user, i strongly advise you to install everything with admin privileges on top of your c:\ drive.
For the configurations and examples below, my install paths are:
First of all, note that you won't be able to get IRMA working if the dependencies are compiled with another compilator than GCC. There is currently some problems with CGO when external libraries are compiled with Visual C++, so no need to install Visual Studio or vcpkg.
pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-pkg-config base-devel openssl-develexport PATH=$PATH:/c/Go/bin:/c/msys64/mingw64/bin:/c/Git/binIt's strongly adviced NOT to clone VirusTotal's YARA repository but download the source code of the latest release. If you compile libyara from the latest commit, it could generate some side effect when linking this library with IRMA and GCO.
./bootstrap.sh &&./configure && make && make install With this step, you won't need to launch use mingw terminal anymore and you will be able to use Go to install IRMA and compile your projects directly from Windows cmd / powershell.
Ensure to have the following as system environment variables (not user env vars. If not, create them:
GOARCH=<your-architecture> (eg. amd64)
GOOS=windows
CGO_CFLAGS=-IC:/msys64/mingw64/include
CGO_LDFLAGS=-LC:/msys64/mingw64/lib -lyara -lcrypto
PKG_CONFIG_PATH=C:/msys64/mingw64/lib/pkgconfig
You also need C:\msys64\mingw64\bin in your system PATH env vars.
Ensure you have got the following user environment var (not system not):
GOPATH=%USERPROFILE%\go
Note that paths be written with slashs and not backslash. As i already said, don't use path with spaces or special characters.
Now, from Windows cmd or Powershell, you can install IRMA: go get github.com/codeyourweb/irma
Compilation should be done with: go build -tags yara_static -a -ldflags '-extldflags "-static"' .