www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dub repository for a C binding

reply "Sebastian Graf" <SebastianGraf t-online.de> writes:
Hi,

how would I create a dub repository for a ready-to-use C binding 
+ pre-compiled binaries?
Doesn't have to distinguish between platforms for now, but I 
would appreciate it nonetheless.

I aim to then simply reference it in my actual D project, 
preferably using dub ofc.

Thanks!
Oct 09 2013
next sibling parent Mike Parker <aldacron gmail.com> writes:
On 10/10/2013 2:12 AM, Sebastian Graf wrote:
 Hi,

 how would I create a dub repository for a ready-to-use C binding +
 pre-compiled binaries?
 Doesn't have to distinguish between platforms for now, but I would
 appreciate it nonetheless.

 I aim to then simply reference it in my actual D project, preferably
 using dub ofc.

 Thanks!
By "precompiled binaries" I assume you're referring to the C library. AFAIK, dub can't help you with that. dub is a build tool that can help you manage your source-level dependencies, but it's not a full on package manager. You'll have to package the binaries as a separate download. As for the rest, add a package.json and register at code.dlang.org.
Oct 09 2013
prev sibling parent reply "Rikki Cattermole" <alphaglosined gmail.com> writes:
On Wednesday, 9 October 2013 at 17:12:14 UTC, Sebastian Graf 
wrote:
 Hi,

 how would I create a dub repository for a ready-to-use C 
 binding + pre-compiled binaries?
 Doesn't have to distinguish between platforms for now, but I 
 would appreciate it nonetheless.

 I aim to then simply reference it in my actual D project, 
 preferably using dub ofc.

 Thanks!
Take a look at copyFiles option. It copies files e.g. dll's into the bin directory when compiled. Although keep an option available in e.g. a subpackage that does not do this. For more information on what dub can do look at http://code.dlang.org/package-format.
Oct 09 2013
parent reply "Sebastian Graf" <SebastianGraf t-online.de> writes:
On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole 
wrote:
 Take a look at copyFiles option. It copies files e.g. dll's 
 into the bin directory when compiled. Although keep an option 
 available in e.g. a subpackage that does not do this.

 For more information on what dub can do look at 
 http://code.dlang.org/package-format.
And how would I go about the import lib? I have to somehow feed it into the compiler, preferably automatically when referencing the (sub-)package.
Oct 11 2013
next sibling parent reply =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 11.10.2013 11:25, schrieb Sebastian Graf:
 On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole wrote:
 Take a look at copyFiles option. It copies files e.g. dll's into the
 bin directory when compiled. Although keep an option available in e.g.
 a subpackage that does not do this.

 For more information on what dub can do look at
 http://code.dlang.org/package-format.
And how would I go about the import lib? I have to somehow feed it into the compiler, preferably automatically when referencing the (sub-)package.
Right now you have to use the "sourceFiles" field for that. Later it should be possible to set a library search path + library name instead. Example: https://github.com/s-ludwig/dlibgit/blob/master/package.json
Oct 11 2013
parent "Sebastian Graf" <SebastianGraf t-online.de> writes:
On Friday, 11 October 2013 at 10:57:38 UTC, Sönke Ludwig wrote:
 Am 11.10.2013 11:25, schrieb Sebastian Graf:
 On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole 
 wrote:
 Take a look at copyFiles option. It copies files e.g. dll's 
 into the
 bin directory when compiled. Although keep an option 
 available in e.g.
 a subpackage that does not do this.

 For more information on what dub can do look at
 http://code.dlang.org/package-format.
And how would I go about the import lib? I have to somehow feed it into the compiler, preferably automatically when referencing the (sub-)package.
Right now you have to use the "sourceFiles" field for that. Later it should be possible to set a library search path + library name instead. Example: https://github.com/s-ludwig/dlibgit/blob/master/package.json
Thanks, that's what I do now for copying the libraries into the bin directory.
Oct 15 2013
prev sibling parent reply "Sebastian Graf" <SebastianGraf t-online.de> writes:
On Friday, 11 October 2013 at 09:25:58 UTC, Sebastian Graf wrote:
 On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole 
 wrote:
 Take a look at copyFiles option. It copies files e.g. dll's 
 into the bin directory when compiled. Although keep an option 
 available in e.g. a subpackage that does not do this.

 For more information on what dub can do look at 
 http://code.dlang.org/package-format.
And how would I go about the import lib? I have to somehow feed it into the compiler, preferably automatically when referencing the (sub-)package.
Nevermind, I'll see how far I get with dynamically loaded derelict binding.
Oct 11 2013
parent reply "Sebastian Graf" <SebastianGraf t-online.de> writes:
On Friday, 11 October 2013 at 10:57:56 UTC, Sebastian Graf wrote:
 On Friday, 11 October 2013 at 09:25:58 UTC, Sebastian Graf 
 wrote:
 On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole 
 wrote:
 Take a look at copyFiles option. It copies files e.g. dll's 
 into the bin directory when compiled. Although keep an option 
 available in e.g. a subpackage that does not do this.

 For more information on what dub can do look at 
 http://code.dlang.org/package-format.
And how would I go about the import lib? I have to somehow feed it into the compiler, preferably automatically when referencing the (sub-)package.
Nevermind, I'll see how far I get with dynamically loaded derelict binding.
This works surprisingly well. I uploaded my derelict binding on github: https://github.com/sgraf812/DerelictUdis86.git Where else should I announce this?
Oct 15 2013
parent =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 15.10.2013 22:11, schrieb Sebastian Graf:
 On Friday, 11 October 2013 at 10:57:56 UTC, Sebastian Graf wrote:
 On Friday, 11 October 2013 at 09:25:58 UTC, Sebastian Graf wrote:
 On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole wrote:
 Take a look at copyFiles option. It copies files e.g. dll's into the
 bin directory when compiled. Although keep an option available in
 e.g. a subpackage that does not do this.

 For more information on what dub can do look at
 http://code.dlang.org/package-format.
And how would I go about the import lib? I have to somehow feed it into the compiler, preferably automatically when referencing the (sub-)package.
Nevermind, I'll see how far I get with dynamically loaded derelict binding.
This works surprisingly well. I uploaded my derelict binding on github: https://github.com/sgraf812/DerelictUdis86.git Where else should I announce this?
Register an account on code.dlang.org and click on "Manage my packages" below the package list to add your repository (the UI is a bit crude right now but will be improved soon).
Oct 15 2013