January 21, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On Wednesday, 21 January 2015 at 18:23:09 UTC, ketmar via Digitalmars-d-announce wrote: > On Wed, 21 Jan 2015 17:33:05 +0000 > Vadim Lopatin via Digitalmars-d-announce > <digitalmars-d-announce@puremagic.com> wrote: > >> Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file? > nope, it's impossible. CTFE code can't interoperate with environment. mix: (__FILE__.stripExtension.baseName) ~ ".res"; |
January 21, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile Burg | On Wednesday, 21 January 2015 at 18:34:09 UTC, Basile Burg wrote:
> On Wednesday, 21 January 2015 at 18:23:09 UTC, ketmar via Digitalmars-d-announce wrote:
>> On Wed, 21 Jan 2015 17:33:05 +0000
>> Vadim Lopatin via Digitalmars-d-announce
>> <digitalmars-d-announce@puremagic.com> wrote:
>>
>>> Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file?
>> nope, it's impossible. CTFE code can't interoperate with environment.
>
> mix:
>
> (__FILE__.stripExtension.baseName) ~ ".res";
It's not suitable for unknown set of files.
|
January 21, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vadim Lopatin | On Wednesday, 21 January 2015 at 19:07:39 UTC, Vadim Lopatin wrote:
> On Wednesday, 21 January 2015 at 18:34:09 UTC, Basile Burg wrote:
>> On Wednesday, 21 January 2015 at 18:23:09 UTC, ketmar via Digitalmars-d-announce wrote:
>>> On Wed, 21 Jan 2015 17:33:05 +0000
>>> Vadim Lopatin via Digitalmars-d-announce
>>> <digitalmars-d-announce@puremagic.com> wrote:
>>>
>>>> Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file?
>>> nope, it's impossible. CTFE code can't interoperate with environment.
>>
>> mix:
>>
>> (__FILE__.stripExtension.baseName) ~ ".res";
>
> It's not suitable for unknown set of files.
It's suitable for an IDE: file.d, matching file.res, if it exists then add a -J...no problem.
|
January 21, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vadim Lopatin | On Wednesday, 21 January 2015 at 17:36:36 UTC, Vadim Lopatin wrote:
> On Wednesday, 21 January 2015 at 16:20:31 UTC, FrankLike wrote:
>> On Wednesday, 21 January 2015 at 15:49:06 UTC, FrankLike wrote:
>>> On Wednesday, 21 January 2015 at 14:52:36 UTC, Vadim Lopatin wrote:
>>>>
>>>> DlangIDE status Update:
>>>> Syntax highlight for D source is working.
>>>> It's just highlight based on token types. No advanced features like code completion, folding, etc.
>>>>
>>>> Best regards,
>>>> Vadim
>>>
>>> good work.
>>
>> If use dco to build the dlangIDE,config local.ini
>>
>> ----------------local.ini---------------------------
>> DC=dmd
>> DCStandardEnvBin=dmd2\windows\bin
>> SpecialLib=dlanguilib
>> importPath= -I..\..\dlangui\src
>> ;lflags=console
>> lflags=win32
>> ;lflags=win64
>> ;dflags=
>> libs= ..\lib\dlanguilib.lib ..\lib\dlib.lib
>> ;targetType=exe//lib//staticLib//dynamicLib//sourceLib//none
>> targetType=exe
>> ;targetName=;// ;'null is auto'
>> targetName=dlangide.exe
>> ;compileType=;//64//32mscoff
>> compileType=
>> ;buildMode=debug;//release
>> buildMode=debug
>> --------------------end---------------------
>> and copy dlib.lib with dlanguilib.lib to lib folder,and copy dlib to "dmd2\windows\import",then run 'dco',will get the dlangIDE.exe file only
>> 1206kb,but bu dub, 4518kb.
>>
>> get dco:
>> git clone https://github.com/FrankLIKE/dco
>>
>> Frank
>
> Did you try dub build --build=release ?
I known it,but can't get so small exe for debug,and exe no console.
|
January 22, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to data man | On Wednesday, 21 January 2015 at 17:16:40 UTC, data man wrote: > And there is the ability to embed resources into .exe? Done. Standard resources are embedded into executable by default. When your application uses custom resources, you can embed resources into executable and/or specify external resource directory(s). To embed resources, put them into views/res directory, and create file views/resources.list with list of all files to embed. Use following code to embed resources: ---- /// entry point for dlangui based application extern (C) int UIAppMain(string[] args) { // embed non-standard resources listed in views/resources.list into executable embeddedResourceList.addResources(embedResourcesFromList!("resources.list")()); ... ---- Resource list resources.list file may look similar to following: ---- res/i18n/en.ini res/i18n/ru.ini res/mdpi/cr3_logo.png res/mdpi/document-open.png res/mdpi/document-properties.png res/mdpi/document-save.png res/mdpi/edit-copy.png res/mdpi/edit-paste.png res/mdpi/edit-undo.png res/mdpi/tx_fabric.jpg res/theme_custom1.xml ---- As well you can specify list of external directories to get resources from. ---- /// entry point for dlangui based application extern (C) int UIAppMain(string[] args) { // resource directory search paths string[] resourceDirs = [ appendPath(exePath, "../../../res/"), // for Visual D and DUB builds appendPath(exePath, "../../../res/mdpi/"), // for Visual D and DUB builds appendPath(exePath, "../../../../res/"),// for Mono-D builds appendPath(exePath, "../../../../res/mdpi/"),// for Mono-D builds appendPath(exePath, "res/"), // when res dir is located at the same directory as executable appendPath(exePath, "../res/"), // when res dir is located at project directory appendPath(exePath, "../../res/"), // when res dir is located at the same directory as executable appendPath(exePath, "res/mdpi/"), // when res dir is located at the same directory as executable appendPath(exePath, "../res/mdpi/"), // when res dir is located at project directory appendPath(exePath, "../../res/mdpi/") // when res dir is located at the same directory as executable ]; // setup resource directories - will use only existing directories Platform.instance.resourceDirs = resourceDirs; ---- When same file exists in both embedded and external resources, one from external resource directory will be used - it's useful for developing and testing of resources. As well, it's no more required to set theme and language in UIAppMain if you don't want to change default values. |
January 22, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Wednesday, 21 January 2015 at 23:21:27 UTC, FrankLike wrote:
> On Wednesday, 21 January 2015 at 17:36:36 UTC, Vadim Lopatin wrote:
>> On Wednesday, 21 January 2015 at 16:20:31 UTC, FrankLike wrote:
>>> On Wednesday, 21 January 2015 at 15:49:06 UTC, FrankLike wrote:
>>>> On Wednesday, 21 January 2015 at 14:52:36 UTC, Vadim Lopatin wrote:
>>>>>
>>>>> DlangIDE status Update:
>>>>> Syntax highlight for D source is working.
>>>>> It's just highlight based on token types. No advanced features like code completion, folding, etc.
>>>>>
>>>>> Best regards,
>>>>> Vadim
>>>>
>>>> good work.
>>>
>>> If use dco to build the dlangIDE,config local.ini
>>>
>>> ----------------local.ini---------------------------
>>> DC=dmd
>>> DCStandardEnvBin=dmd2\windows\bin
>>> SpecialLib=dlanguilib
>>> importPath= -I..\..\dlangui\src
>>> ;lflags=console
>>> lflags=win32
>>> ;lflags=win64
>>> ;dflags=
>>> libs= ..\lib\dlanguilib.lib ..\lib\dlib.lib
>>> ;targetType=exe//lib//staticLib//dynamicLib//sourceLib//none
>>> targetType=exe
>>> ;targetName=;// ;'null is auto'
>>> targetName=dlangide.exe
>>> ;compileType=;//64//32mscoff
>>> compileType=
>>> ;buildMode=debug;//release
>>> buildMode=debug
>>> --------------------end---------------------
>>> and copy dlib.lib with dlanguilib.lib to lib folder,and copy dlib to "dmd2\windows\import",then run 'dco',will get the dlangIDE.exe file only
>>> 1206kb,but bu dub, 4518kb.
>>>
>>> get dco:
>>> git clone https://github.com/FrankLIKE/dco
>>>
>>> Frank
>>
>> Did you try dub build --build=release ?
> I known it,but can't get so small exe for debug,and exe
> no console.
On win32, dub build --build=release now gives 1305Kb executable with embedded resources.
What are advantages of dco?
|
January 23, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vadim Lopatin | On Thursday, 22 January 2015 at 13:37:16 UTC, Vadim Lopatin wrote:
>>>> If use dco to build the dlangIDE,config local.ini
>>>>
>>>> ----------------local.ini---------------------------
>>>> DC=dmd
>>>> DCStandardEnvBin=dmd2\windows\bin
>>>> SpecialLib=dlanguilib
>>>> importPath= -I..\..\dlangui\src
>>>> ;lflags=console
>>>> lflags=win32
>>>> ;lflags=win64
>>>> ;dflags=
>>>> libs= ..\lib\dlanguilib.lib ..\lib\dlib.lib
>>>> ;targetType=exe//lib//staticLib//dynamicLib//sourceLib//none
>>>> targetType=exe
>>>> ;targetName=;// ;'null is auto'
>>>> targetName=dlangide.exe
>>>> ;compileType=;//64//32mscoff
>>>> compileType=
>>>> ;buildMode=debug;//release
>>>> buildMode=debug
>>>> --------------------end---------------------
>>>> and copy dlib.lib with dlanguilib.lib to lib folder,and copy dlib to "dmd2\windows\import",then run 'dco',will get the dlangIDE.exe file only
>>>> 1206kb,but bu dub, 4518kb.
>>>>
>>>> get dco:
>>>> git clone https://github.com/FrankLIKE/dco
>>>>
>>>> Frank
>>>
>>> Did you try dub build --build=release ?
>> I known it,but can't get so small exe for debug,and exe
>> no console.
>
> On win32, dub build --build=release now gives 1305Kb executable with embedded resources.
>
> What are advantages of dco?
Config ini is Quickly,if you don't know how to config a dub.json.
Building is quickly and easy : 'dco' in cmd.exe ,then ok.
It's easy to get a win32.exe ,not a exe on console.
|
January 24, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vadim Lopatin | Vadim, I can't understand why if I adding to dub.json "dlangui": ">=0.4.4" On dub build I am getting: OPTLINK (R) for Win32 Release 8.00.15 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html .dub\build\application-debug-windows-x86-dmd_2066-DB440D76262575D36BFB1E2999272A 0D\geodataloader.obj Error 2: File Not Found .dub\build\application-debug-windows-x86-dmd_2066-DB440 D76262575D36BFB1E2999272A0D\geodataloader.obj --- errorlevel 1 FAIL .dub\build\application-debug-windows-x86-dmd_2066-DB440D76262575D36BFB1E299 9272A0D\ geodataloader executable Error executing command run: dmd failed with exit code 1. If remove. All build. |
January 24, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | I checked what is in: derelict-sdl2-1.9.1\.dub\build\library-debug-windows-x86-dmd_2066-C6F79EB15955F23DC333E5B450077DDB In this folder located only file: DerelictSDL2.lib |
January 24, 2015 Re: DlangUI project update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On 25/01/2015 9:29 a.m., Suliman wrote:
> I checked what is in:
> derelict-sdl2-1.9.1\.dub\build\library-debug-windows-x86-dmd_2066-C6F79EB15955F23DC333E5B450077DDB
>
>
> In this folder located only file: DerelictSDL2.lib
$ dub clean
$ dub build --force
Some inconsistency in build caches I bet.
|
Copyright © 1999-2021 by the D Language Foundation