Skip to content
Andrey Penechko edited this page Feb 16, 2015 · 20 revisions

Various Dub Recipes

###Creating windows package that has 32 and 64-bit dlls

  1. Create lib and lib64 folders in your project root (the same folder as dub.json)
  2. Put your 32-bit dll files in a lib folder and 64-bit dlls in lib64
    Dub offers copyFiles build setting that we will use to get things done. This option allows to copy files to the applications directory. Also this option can have platform specific suffixes, whih we will use to copy specific files to each platform.
  3. Put these lines in your dub.json. They will copy every .dll file found in lib folder into application folder.
"copyFiles-windows-x86" : ["lib/*.dll"],
"copyFiles-windows-x86_64" : ["lib64/*.dll"],
  • Final folder structure:

    project
        dub.json
        /lib
              freetype.dll, etc.
        /lib64
              freetype.dll, etc. 64-bit version
    

Clone this wiki locally