From 2c346c015fba4434728a2ab7708f7c930ba655d8 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Wed, 13 Sep 2017 14:54:19 +0300 Subject: [PATCH] implement DLANGUI_VERSION #438 --- dub.json | 7 +------ src/dlangui/core/config.d | 2 ++ src/dlangui/platforms/common/startup.d | 6 ++++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dub.json b/dub.json index 74a6665c..f40e4a3f 100644 --- a/dub.json +++ b/dub.json @@ -20,12 +20,7 @@ "libs-linux": ["z"], "stringImportPaths": [ - "views", - "views/res", - "views/res/mdpi", - "views/res/hdpi", - "views/res/shaders", - "views/res/i18n" + "views" ], "-ddoxFilterArgs": ["--unittest-examples", "--min-protection=Protected", "--ex", "win32.", diff --git a/src/dlangui/core/config.d b/src/dlangui/core/config.d index 6d079c60..c0c0c006 100644 --- a/src/dlangui/core/config.d +++ b/src/dlangui/core/config.d @@ -1,5 +1,7 @@ module dlangui.core.config; +extern(C) @property dstring DLANGUI_VERSION(); + //version = USE_CONSOLE; version(USE_CONSOLE) { diff --git a/src/dlangui/platforms/common/startup.d b/src/dlangui/platforms/common/startup.d index e81c73fb..1f9793c1 100644 --- a/src/dlangui/platforms/common/startup.d +++ b/src/dlangui/platforms/common/startup.d @@ -6,6 +6,12 @@ import dlangui.widgets.styles; import dlangui.graphics.fonts; import dlangui.graphics.resources; import dlangui.widgets.widget; +import std.utf : toUTF32; + +private immutable dstring DLANGUI_VERSION_VALUE = toUTF32(import("DLANGUI_VERSION")); +extern(C) @property dstring DLANGUI_VERSION() { + return DLANGUI_VERSION_VALUE; +} static if (BACKEND_GUI) { import dlangui.graphics.ftfonts;