How to get name of my application (project)

drug drug2004 at bk.ru
Sat Aug 3 14:44:35 UTC 2019


03.08.2019 12:26, Andrey пишет:
> Hello, how to get name of my application (project) that we write in 
> dub.json? Is there any compile-time constant like __MODULE__?

You can get it using $DUB_PACKAGE from Environment variables 
(https://dub.pm/package-format-sdl), for example using preBuildCommands 
you can generate a module and define the constant you need there.


More information about the Digitalmars-d-learn mailing list