Pages:
Author

Topic: Where is Bitcoin Core's icon located? (Read 167 times)

HCP
legendary
Activity: 2086
Merit: 4316
April 08, 2021, 05:32:32 PM
#26
Yeah... sounds like it was most likely just a cached file somewhere in amongst it all. I've had similar issues with other applications before where recompiling doesn't seem to be picking up the latest changes and then magically it starts working at some point and I can't figure out why! Tongue

Anyway, glad you got it fixed.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 08, 2021, 04:31:23 PM
#25
It's quite strange but it worked once I re-built it from the beginning. I am right now having Core opened with my custom icon. I guess that it had saved the image(s) in memory, and every time I compiled, nothing changed.

Anyway, thank you for your help!
HCP
legendary
Activity: 2086
Merit: 4316
April 08, 2021, 04:27:09 PM
#24
Ok... not that I think it is the problem... but what are the file owner/group and permissions for your bitcoin/src/qt/res/icons/bitcoin.png file?

After creating and copying to that directory... mine were set incorrect and I had to change to 644 and change from root:root to the user account like the rest of the files in the "icons" directory.

Also, can you post a copy of your bitcoin.png file to a file hosting service... I'll try and use your file, it might be that the PNG is in the wrong format? Huh (unlikely I would think)
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 08, 2021, 04:24:53 AM
#23
To get the custom icon showing... I actually had to manually delete all the *.o (object files) in the "bitcoin/src/qt/" and "bitcoin/src/qt/res" directories and then use make
I guess that by "bitcoin/src/qt/res" directories you mean the object files from those. Not to delete the entire directories.

Alright, these are my executions, I'll now make it.


Finish:



HCP
legendary
Activity: 2086
Merit: 4316
April 08, 2021, 02:52:10 AM
#22
So, I had a play with it... managed to get the bitcoin-qt.exe in Windows Explorer showing the modified icon:



However, within the app it is still showing the original Undecided



To get the custom icon showing... I actually had to manually delete all the *.o (object files) in the "bitcoin/src/qt/" and "bitcoin/src/qt/res" directories and then use make

It seems that just changing the .ico file etc was not enough to trigger a proper recompilation. So, I'm guessing, if you have already made the project, then tried to change the icons, that it will indeed be using the "old" resources.


And finally... I managed to get the "in app" icon changed:



This is defined by the bitcoin/src/qt/res/icons/bitcoin.png file

Again, I had to:
Code:
rm *.o

in both of the following directories:
Code:
bitcoin/src/qt/res
bitcoin/src/qt

Then from "bitcoin/src" run make as normal...
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 07, 2021, 03:45:58 PM
#21
Did you then update all the references to those filenames in the code and makefiles? Huh
Yes, I did. I replaced "bitcoin" with my altcoin name on every file and its filename from the source files. There's no "bitcoin" anywhere on my files. I have no idea where it finds that bitcoin.ico, it isn't even named like that anymore.

Personally, I would try with a "clean" copy of the Bitcoin Core source code... and just try compiling Bitcoin Core itself with just modified icons to see if you can determine which icon files are the ones you need to modify.

Once you have that sorted, you should be able to do the same to your altcoin (and find/modify the necessary references in the various resource and make files etc)
I'll try this now, but even if I detect what's the correct image file, I'll know that it won't work if I just change it from the altcoin files. And that's simple:  I have tried every-single-image that could be that icon.

Fun fact: The installer gets the correct icon, it's the qt that has the issue.
HCP
legendary
Activity: 2086
Merit: 4316
April 07, 2021, 03:15:11 PM
#20
Did you then update all the references to those filenames in the code and makefiles? Huh

If you look here: https://github.com/bitcoin/bitcoin/search?q=*.ico

You can see that references are made in various resource file/makefile code to specific filenames... have they all been updated? Huh

Personally, I would try with a "clean" copy of the Bitcoin Core source code... and just try compiling Bitcoin Core itself with just modified icons to see if you can determine which icon files are the ones you need to modify.

Once you have that sorted, you should be able to do the same to your altcoin (and find/modify the necessary references in the various resource and make files etc)
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 07, 2021, 03:08:28 PM
#19
etc... to make sure that you have found and edited all instances of the image files?
Also... did you rename any of these from "bitcoin.xxx" to "yourcoin.xxx"? Huh
Yes and yes. I know, it's impossible, but I have edited the correct file! Tongue
HCP
legendary
Activity: 2086
Merit: 4316
April 07, 2021, 02:59:41 PM
#18
If we're talking about image files, I do have changed the correct file.
Well apparently you haven't... otherwise your app would be showing the correct icon file! Tongue Wink

Jokes aside... have you tried doing a search for all image files located in the source code directory tree? ie. go into the base folder when you extracted the source code and then try:
Code:
find . -name "*.ico"
Code:
find . -name "*.png"
Code:
find . -name "*.svg"

etc... to make sure that you have found and edited all instances of the image files?


Also... did you rename any of these from "bitcoin.xxx" to "yourcoin.xxx"? Huh
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 07, 2021, 02:30:34 PM
#17
Then the only logical explanation is that you haven't changed the correct file...
If we're talking about image files, I do have changed the correct file.

How did you get the source? Did you download a .tar.gz or did you clone the repo using git? Huh
I downloaded the .tar.gz from bitcoincore.org and paste it on my Ubuntu LTS directory.
HCP
legendary
Activity: 2086
Merit: 4316
April 07, 2021, 02:21:01 PM
#16
I just ran make clean, then I saw that there's no bitcoin-qt, so I ran make again, after cleaning. I still have the same issue.
Then the only logical explanation is that you haven't changed the correct file...

So, either you're editing the wrong file in your local git repo... or some process is overwriting/reverting your change during the build process... I would be inclined to think that it's the former.

How did you get the source? Did you download a .tar.gz or did you clone the repo using git? Huh
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 06, 2021, 03:58:03 AM
#15
you might need to try doing something like a make clean etc to get it to clear everything out.
I just ran make clean, then I saw that there's no bitcoin-qt, so I ran make again, after cleaning. I still have the same issue. I wonder if I'll have to execute every single building command, I doubt that it'll solve this problem, though...

Code:
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g')
sudo bash -c "echo 0 > /proc/sys/fs/binfmt_misc/status"
cd depends
make HOST=x86_64-w64-mingw32
cd ..
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
make
HCP
legendary
Activity: 2086
Merit: 4316
April 05, 2021, 05:45:21 PM
#14
It sounds like make is not detecting the changes you have made and is simply re-using the cached components... you might need to try doing something like a make clean etc to get it to clear everything out.

Unfortunately, that is likely to result in a very long compilation time as it will have to recompile the entire project again... and not just the changes. Undecided


Note: I'm not overly familiar with the structure of the Bitcoin Core make setup... so it's possible there are other make targets that you could use
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 05, 2021, 04:31:32 AM
#13
Did you replace the icon in /src/qt/res/icons/bitcoin.png by any chance?
Yes, I have. And once I compiled it I got the same bitcoin icon on my bitcoin-qt.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
April 05, 2021, 04:28:06 AM
#12
Did you replace the icon in /src/qt/res/icons/bitcoin.png by any chance?

Because that's the one referenced in the Qt5 resource file: https://github.com/bitcoin/bitcoin/blob/7fca189a2a9a524834d9485c4e391877c00c1971/src/qt/bitcoin.qrc
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 05, 2021, 04:11:12 AM
#11
In the case of Windows the icon is compiled as an .ICO icon into the exe file can can be extracted with Resource Hacker.
Yes, but shouldn't there be a bitcoin icon somewhere? There's nothing in the source code, I've replaced every image file. I don't get what I'm missing. Does it have to do with cache?

It looks like the setup.nsi.in file is the only file that references it, it's some kind of MSI packager for Windows that's referenced in the Makefile.am file since Bitcoin Core is only built from configure/make.
Okay, I'll take a look at it.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
April 05, 2021, 03:59:12 AM
#10
In the case of Windows the icon is compiled as an .ICO icon into the exe file can can be extracted with Resource Hacker.

The icons in share/ only effect the installer that is created. The icons that are used in bitcoin-qt are in src/qt/res
Where exactly is the installer located?

It looks like the setup.nsi.in file is the only file that references it, it's some kind of MSI packager for Windows that's referenced in the Makefile.am file since Bitcoin Core is only built from configure/make.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 04, 2021, 04:20:57 PM
#9
You have recompiled each time?
Every time that I change an image I run make so yes, I recompiled.

The icons in share/ only effect the installer that is created. The icons that are used in bitcoin-qt are in src/qt/res
Where exactly is the installer located?
staff
Activity: 3374
Merit: 6530
Just writing some code
April 04, 2021, 03:55:53 PM
#8
You have recompiled each time?

The icons in share/ only effect the installer that is created. The icons that are used in bitcoin-qt are in src/qt/res
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 04, 2021, 03:25:03 PM
#7
Did you change bitcoin.ico? That's the icon file.
The one at share\pixmaps? Yes. I have also changed the bitcoin.ico on qt\res\icons.
Pages:
Jump to: