I'm creating a Derelict application and apparently derelict needs the shared libraries to be in the root path. Is there a way to do this using DUB, without copying the files over manually into the ./bin
folder? (Just have them get copied when building automatically)
Also I am assuming the .so files for Linux systems will have to be in the binary folder too. I know there is "copyFiles"
but where will the files get copied from, where will they get copied to? Is this cross-platform?
On Linux you'd normally just have the necessary libraries installed system wide using your distribution's package manager.
On Windows DLLs are often placed in the application's folder and
copyFiles
exists for exactly this reason.This is what I have in my DUB package.json for an application that uses Derelict GLFW and Derelict FreeImage:
The files are copied from the
lib
folder in the root of my project and they are copied to the random temporary folder dub uses for building (I imagine on linux it's somewhere in /tmp and on Windows it's in somewhere like %APPDATA%\Temp\dub).