Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions on howto easily use it on Windows #14

Open
gussen opened this issue Feb 22, 2024 · 0 comments
Open

Add instructions on howto easily use it on Windows #14

gussen opened this issue Feb 22, 2024 · 0 comments

Comments

@gussen
Copy link

gussen commented Feb 22, 2024

Add instructions on howto easily use it on Windows

The easy way to build on Windows is to install libbotan package using MSYS2/MinGW and add some information to project.cabal.
MSYS2/MinGW64 is installed by GHCUP/GHC on Windows.

Here are the instructions (Paths might be different on your machine)

Install libbotan and dependencies in MSYS2. Start a MSYS2 shell by executing C:\ghcup\msys64\msys2.exe
or C:\ghcup\msys64\msys2_shell.cmd -msys

# If needed update the package database and ugrade all installed packages
pacman -Syu
pacman -Su

# Install libbotan and it's dependencies
pacman -S mingw-w64-x86_64-libbotan

Add the botan-low dependency to the projects cabal file

build-depends:   base  ^>=4.17.2.1
               , botan-low

Add this to cabal.project so that the needed parts of the Botan C++ library can
be found when building.

packages: .

package botan-bindings
extra-include-dirs: C:\ghcup\msys64\mingw64\include\botan-3
extra-lib-dirs: C:\ghcup\msys64\mingw64\bin, C:\ghcup\msys64\mingw64\lib

Build and run from PowerShell

 # Add libbotan-3.dll location to Path for this session
 # so that the executable can find the dll.
 $env:Path += ";C:\ghcup\msys64\mingw64\bin"
 cabal build
 cabal run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant