HomeWildfire Games

Add an icon to pyrogenesis' application window
AuditedrP20067

Description

Add an icon to pyrogenesis' application window

Tested By: Imarok (Windows, Ubuntu w. Gnome), s0600204 (Arch w. Xfce), ffffffff (Kubuntu w. KDE)
Reviewed By: ffffffff, s0600204
Differential Revision: https://code.wildfiregames.com/D768
Trac Tickets: #4363

Details

Auditors
ffffffff
Itms
Committed
s0600204Aug 28 2017, 11:56 PM
Reviewer
ffffffff
Differential Revision
D768: Add window icon
Parents
rP20066: Options page cleanup.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 2931
Build 5043: Trigger Windows Autobuild
Build 5042: Post-Commit BuildJenkins

Event Timeline

ffffffff raised a concern with this commit.Apr 20 2018, 2:45 PM
ffffffff added a subscriber: ffffffff.

For some reason on Ubuntu 16.04 Unity Desktop the pyrogenesis executable from SVN directory binaries/system/pyrogenesis leads to unknown executable icon in taskbar. Having googled little about SDL_SetWindowIcon usage under unity ubuntu but didn't find a proper solution.

I also check resizing the taskbar from settings but didn't help changing to the correct icon to binaries/data/mods/public/art/textures/icons/window.png.

In terminal it also doesn't give the warning from the code LOGWARNING("Window icon not found.").

So it may need some fix in the correct usage internally i guess.

Can somebody confirm this on Ubuntu Unity?

Greets

This commit now has outstanding concerns.Apr 20 2018, 2:45 PM
elexis added a subscriber: elexis.Apr 20 2018, 2:52 PM

Did that icon work before this commit?
Also, perhaps the cached version of the png is corrupted, try nuking .cache/0ad.

ffffffff accepted this commit.Apr 20 2018, 2:54 PM

Did that icon work before this commit?
Also, perhaps the cached version of the png is corrupted, try nuking .cache/0ad.

correct

All concerns with this commit have now been addressed.Apr 20 2018, 2:54 PM
Itms raised a concern with this commit.May 1 2018, 8:21 PM
Itms added a subscriber: Itms.

This change doesn't work after packaging the game: indeed the icon gets converted to dds and gets a new name.

There are two possible fixes:

  • P119 uses a CCacheLoader to detect the presence of a dds file in the archive, while not bothering to do the actual caching. It also prevents generating a mipmap during the dds conversion, because that would prevent the conversion to BGRA.
  • We could move the window icon outside of art/textures/ so that it isn't cached by the archive builder. For instance art/icons/ might be a possibility.

It seems to me that the second one is easier and more sensible, because we're not caching the image in the first place, so why cache it during packaging? But maybe we should really cache it, in which case P119 is incomplete.

This commit now has outstanding concerns.May 1 2018, 8:21 PM
Itms accepted this commit.Dec 26 2018, 10:15 AM
All concerns with this commit have now been addressed.Dec 26 2018, 10:15 AM