I want to deploy an application on Windows that needs to access the GHC API. Using the first simple example from the Wiki:
http://www.haskell.org/haskellwiki/GHC/As_a_library
results in the following error (compiled on one machine with haskell platform and executed on another clean windows install): test.exe: can't find a package database at C:\haskell\lib\package.conf.d
I'd like to deploy my application as a simple zip file and not require the user to have anything installed. Is there a straightforward way to include the needed GHC things in that zip file so it will work?
This program will copy necessary files to the specified directory (will work only on windows):
After running it with destination directory as argument you will have a local copy of
lib
andmingw
(about 300 Mb total).You can remove unused libraries from
lib
to save more space.