Icon used when building from source
Moderators: winston, another_commander
- phkb
- 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
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.
- 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
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
- phkb
- 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
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.hiran wrote: ↑Wed Oct 25, 2023 10:25 pmFor 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
- 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
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
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Icon used when building from source
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.
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
Could the location of the icon/screen be accessed by an oxp, to enable custom ones?
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- 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
OXPs definitely have no access to file or network resources. So OXPs cannot influence the icons definitely not.
Sunshine - Moonlight - Good Times - Oolite
- 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
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
Re: Icon used when building from source
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