Hipreme's #8 Tip of the day - Using custom runtime with dub projects

evilrat evilrat666 at gmail.com
Sun Jan 22 17:06:13 UTC 2023


On Sunday, 22 January 2023 at 16:57:56 UTC, Hipreme wrote:
>
> The way to use dub's packages is by using the DFLAGS. With 
> DFLAGS, I can set the import path to my own DRuntime and own 
> std. That way I can make the dependencies behave more or less 
> the same, this is an example of what is being done now:
>
> Keep in mind that you'll probably need to setup some env 
> variables such as mine done for making your script a little 
> more portable to other developer's PCs. I would really like if 
> there was a way to define global dflags on dub though.

Can't you just use env variable[1] and put into dub dflags like 
this?

https://github.com/Superbelko/ohmygentool/blob/cc75d915a8df8bdc2bba628df305d421151994a1/dub.json#L11


_(note that some of the listed predefines doesn't work in some 
sections though, a bug maybe?)_
[1] https://dub.pm/package-format-json.html#environment-variables


More information about the Digitalmars-d-learn mailing list