Page 1 of 1

Icon used when building from source

Posted: Wed Oct 25, 2023 10:18 pm
by phkb
Hopefully this is a quick question: Where is the icon file used when you build Oolite from source? I've found the icon files that are with the installer, but I didn't think they were used during the standard build process.

Re: Icon used when building from source

Posted: Wed Oct 25, 2023 10:25 pm
by hiran
phkb wrote: Wed Oct 25, 2023 10:18 pm
Hopefully this is a quick question: Where is the icon file used when you build Oolite from source? I've found the icon files that are with the installer, but I didn't think they were used during the standard build process.
Let's recap where the icon should show up:

Linux: Launcher Icon, Window Icon
Windows: Installer icon, Start Menu icon, Window icon
Apple Mac: probably the same but I cannot tell

So for Linux the launcher icon and the window icon are both defined in
https://github.com/OoliteProject/oolite ... te.desktop
and this results likely in this icon file:
https://github.com/OoliteProject/oolite ... e-icon.png

For Windows I can only talk about the installer. This one is defined in
https://github.com/OoliteProject/oolite ... OOlite.nsi
so it uses this icon file for the installer and start menu entries:
https://github.com/OoliteProject/oolite ... Oolite.ico
https://github.com/OoliteProject/oolite ... te-HDR.ico

We should collect such good to know information at https://wiki.alioth.net/index.php/Developer%27s_Corner

Re: Icon used when building from source

Posted: Wed Oct 25, 2023 10:32 pm
by phkb
hiran wrote: Wed Oct 25, 2023 10:25 pm
For Windows I can only talk about the installer. This one is defined in
https://github.com/OoliteProject/oolite ... OOlite.nsi
so it uses this icon file for the installer and start menu entries:
https://github.com/OoliteProject/oolite ... Oolite.ico
https://github.com/OoliteProject/oolite ... te-HDR.ico
Yep, those are the ones I found. I replaced them with a trial update, did a rebuild, but the EXE file still has the old icon.

Re: Icon used when building from source

Posted: Wed Oct 25, 2023 10:59 pm
by hiran
phkb wrote: Wed Oct 25, 2023 10:32 pm
Yep, those are the ones I found. I replaced them with a trial update, did a rebuild, but the EXE file still has the old icon.
The EXE must be built and linked via gcc. I guess at link time there must be some graphics on the command line but I'm probably not wise enough to find it in the GNUMakefile.

Re: Icon used when building from source

Posted: Thu Oct 26, 2023 5:38 am
by another_commander
The executable's icon is defined in the resource file src\SDL\OOResourcesWin\OOResourcesWin.rc.

If you do not immediately see the icon changing after you rebuild, it may be because of the Windows icon cache still holding the old icon image. In a case like this, do a make clean and rebuild the project from scratch. Then the new icon should be visible. If this doesn't work, deploy nuclear weapons as seen here. If this still fails, try restarting the computer and that should finally fix it.

Re: Icon used when building from source

Posted: Fri Oct 27, 2023 4:16 pm
by cbr
Could the location of the icon/screen be accessed by an oxp, to enable custom ones?

Re: Icon used when building from source

Posted: Fri Oct 27, 2023 4:26 pm
by another_commander
cbr wrote: Fri Oct 27, 2023 4:16 pm
Could the location of the icon/screen be accessed by an oxp, to enable custom ones?
No.

Re: Icon used when building from source

Posted: Fri Oct 27, 2023 4:28 pm
by hiran
cbr wrote: Fri Oct 27, 2023 4:16 pm
Could the location of the icon/screen be accessed by an oxp, to enable custom ones?
OXPs definitely have no access to file or network resources. So OXPs cannot influence the icons definitely not.

Re: Icon used when building from source

Posted: Wed Nov 01, 2023 7:29 pm
by hiran
cbr wrote: Fri Oct 27, 2023 4:16 pm
Could the location of the icon/screen be accessed by an oxp, to enable custom ones?
You may have to think slightly bigger.

You want to provide a custom version of Oolite.
One that comes with a special expansion.
One that has a different icon - maybe vary the name, menu icons and some more stuff?
All this cannot be achieved by an OXP alone.

Then package Oolite into some custom installer. Now you can tweak the complete branding and preinstall your OXPs. Would that help?

Re: Icon used when building from source

Posted: Fri Nov 03, 2023 5:15 pm
by cbr
hiran wrote: Wed Nov 01, 2023 7:29 pm

You may have to think slightly bigger.
All this cannot be achieved by an OXP alone.

Then package Oolite into some custom installer. Now you can tweak the complete branding and preinstall your OXPs. Would that help?
Ah, that probably is a bit 'bigger' than i thought/need...

Morelike the seasonal icons used by searchengines, that golden red one when christmas time is coming ;)