digitalmars.D.learn - Windows Resource Files and DUB
- Alexander (11/11) Jun 08 There is a [Using Windows Resource Files with
- Adam D. Ruppe (5/6) Jun 08 curious, what do you put in your resource file?
- Alexander (5/11) Jun 08 Right now just app icon and version info, but I also need menu,
- Adam D. Ruppe (8/12) Jun 08 I see. I tend to do all that stuff in code, can `import()` files
There is a [Using Windows Resource Files with D2](https://wiki.dlang.org/Using_Windows_Resource_Files_with_D2) article, but it says nothing about DUB and is probably somewhat outdated. So what actually works in `dub.json` (assuming the file `resource\my.res` exists): ``` { "dflags": ["-L/SUBSYSTEM:WINDOWS", "-Lresource\\my.res"] } ```
Jun 08
On Monday, 8 June 2026 at 18:25:00 UTC, Alexander wrote:There is a [Using Windows Resource Files withcurious, what do you put in your resource file? i recently added exe icon support built into opend (and hipreme merged that into his `redub` program too) but the rest i barely touch anymore.
Jun 08
On Monday, 8 June 2026 at 18:32:14 UTC, Adam D. Ruppe wrote:On Monday, 8 June 2026 at 18:25:00 UTC, Alexander wrote:Right now just app icon and version info, but I also need menu, dialog and some more icons to indicate status. I want to implement system tray icon and right-click menu there. And maybe dialog window with logs and/or status and info.There is a [Using Windows Resource Files withcurious, what do you put in your resource file? i recently added exe icon support built into opend (and hipreme merged that into his `redub` program too) but the rest i barely touch anymore.
Jun 08
On Monday, 8 June 2026 at 18:43:20 UTC, Alexander wrote:Right now just app icon and version info, but I also need menu, dialog and some more icons to indicate status. I want to implement system tray icon and right-click menu there. And maybe dialog window with logs and/or status and info.I see. I tend to do all that stuff in code, can `import()` files in D and stuff too, but still either way works. So generally speaking, if you pass the .res file to the compiler, it knows how to forward it to the linker. Passing it as a dub sourceFiles should work too. Then a preBuildCommand to run the resource compiler. (or do a regular makefile or something to generate it lol).
Jun 08








Adam D. Ruppe <destructionator gmail.com>