Icon used when building from source

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Icon used when building from source

Post 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.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Icon used when building from source

Post 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
Sunshine - Moonlight - Good Times - Oolite
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Icon used when building from source

Post 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.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Icon used when building from source

Post 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.
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

Re: Icon used when building from source

Post 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.
User avatar
cbr
---- E L I T E ----
---- E L I T E ----
Posts: 1422
Joined: Thu Aug 27, 2015 4:24 pm

Re: Icon used when building from source

Post by cbr »

Could the location of the icon/screen be accessed by an oxp, to enable custom ones?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

Re: Icon used when building from source

Post 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.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Icon used when building from source

Post 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.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Icon used when building from source

Post 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?
Sunshine - Moonlight - Good Times - Oolite
User avatar
cbr
---- E L I T E ----
---- E L I T E ----
Posts: 1422
Joined: Thu Aug 27, 2015 4:24 pm

Re: Icon used when building from source

Post 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 ;)
Post Reply