digitalmars.D.learn - application icon
- Gimsom (2/2) Mar 13 2013 Hi, I would like to set an icon for my D2 application but I have
- Adam D. Ruppe (25/27) Mar 13 2013 Create the .ico file and put it in your project folder. Then make
- Andrej Mitrovic (4/5) Mar 13 2013 Also there's this resource guide:
Hi, I would like to set an icon for my D2 application but I have no idea how to do that, could somone explain me? Thanks.
Mar 13 2013
On Wednesday, 13 March 2013 at 12:59:57 UTC, Gimsom wrote:Hi, I would like to set an icon for my D2 application but I have no idea how to do that, could somone explain me? Thanks.Create the .ico file and put it in your project folder. Then make a resource file: whatever_name.rc with just one line of content: IDI_ICON1 ICON DISCARDABLE "iconfil.ico" Then, when you build the program, run rcc on this: \dm\dm\bin\rcc.exe whatever_name.rc rcc.exe is included in this download: http://ftp.digitalmars.com/bup.zip It will make a .res file for you. Then build the exe like so: \dmd\windows\bin\dmd app.d whatever_name.res and your exe should show the icon. While you're at it, if you want to prevent the text console window from appearing when you run the program, you can make a file called "whatever_name.def" with these two lines: EXETYPE NT SUBSYSTEM WINDOWS and then add it to the compile line too. So you end up with a build process of: \dm\dm\bin\rcc.exe whatever_name.rc \dmd\windows\bin\dmd app.d [also list your other .d files...] whatever_name.res whatever_name.def and you have an exe together with icon and no console.
Mar 13 2013
On 3/13/13, Adam D. Ruppe <destructionator gmail.com> wrote:Then make a resource file:Also there's this resource guide: http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/WindowsResources It should be ported to the new wiki some time.
Mar 13 2013