Is there a way to permantly replace the default .ico with a custome one? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Is there a way to permantly replace the default .ico with a custome one? (/showthread.php?tid=2084) Pages:
1
2
|
Is there a way to permantly replace the default .ico with a custome one? - Dav - 10-12-2023 I've been playing with making icons, and would like to replace the current built-in QB64-PE icon with another so all the .EXE's will have mine embedded instead of the one that came with QB64-PE. Is there a way to do that? I tried overwriting the qb64pe.ico in the source folders with mine but the generated EXE's still have the old one. Here's an image from one of the icons I'm trying to use. I'm using IcoFXPortable to make my .ico files. - Dav RE: Is there a way to permantly replace the default .ico with a custome one? - mnrvovrfc - 10-12-2023 (10-12-2023, 05:59 PM)Dav Wrote: I tried overwriting the qb64pe.ico in the source folders with mine but the generated EXE's still have the old one. This ICO file you're trying to replace, is the full path? Code: (Select All) (qb64folder)/internal/temp/icon.ico For EXE file already created then you will have to find the source code for them and recompile with the new ICO. At least on Windows `_ICON` and $EXEICON were supposed to work. On Linux most of the time I get the generic "X-dot-org" icon. Now I don't remember how to deal with the "dot-rc" file but you might have to modify "recompile-win.bat" to force the inclusion of the customized icon. RE: Is there a way to permantly replace the default .ico with a custome one? - SMcNeill - 10-12-2023 Here's how I'd go about doing this: 1) Get a copy of the repo itself -- NOT the already compiled Windows/Linux Builds. (https://github.com/QB64-Phoenix-Edition/QB64pe/archive/refs/heads/main.zip ) <-- This should be the link/file you're looking for, for the current, most up to date version. 2) Instead of having QB64PE.EXE already built, you'll need to build your own EXE with the "setup_win.cmd". (Or lnx, or mac, as per the OS you're installing on.) Take note of the relevant file, but DON'T build your version yet. 3) Instead, go into "internal/source/" and replace the "icon.ico" there with the icon you generated. It's easiest if you just name yours "icon.ico" and overwrite the old one. That way you won't have to alter the .rc file or anything else. 4) Now go back to the root directory for where you extracted QB64PE, and run the proper install script for you OS. You'll build QB64PE from scratch, and it'll find your file instead of our current icon, and use it for QB64PE. After that, you'll done and just run the built QB64PE.EXE like usual, with the icon you provided in place of the one we ship by default. RE: Is there a way to permantly replace the default .ico with a custome one? - DSMan195276 - 10-12-2023 (10-12-2023, 05:59 PM)Dav Wrote: I've been playing with making icons, and would like to replace the current built-in QB64-PE icon with another so all the .EXE's will have mine embedded instead of the one that came with QB64-PE. Is there a way to do that? I tried overwriting the qb64pe.ico in the source folders with mine but the generated EXE's still have the old one.This hasn't been clarified to you, but QB64-PE does not supply _any_ icon to built EXE's unless the program specifies one. The icon you're likely seeing is simply the default Windows icon it displays when a program lacks an icon. Thus there's no icon file you can overwrite to change it because QB64-PE simply isn't including an icon at all. The easiest solution is to add `$EXEICON:''` to all your source files. The other option would be making modifications to QB64-PE itself to include an icon into programs that don't request one. RE: Is there a way to permantly replace the default .ico with a custome one? - Dav - 10-12-2023 Hmm, thank you all for the very quick replies/advice. Great community here! - Dav RE: Is there a way to permantly replace the default .ico with a custome one? - RhoSigma - 10-12-2023 Easiest way, 1.) rename your qb64pe.exe to org-qb64.exe 2.) run org-qb64.exe 3.) load source\qb64pe.bas 4.) change the $EXEICON line (line 13) to your icon (with path if required) 5.) press F11 to rebuild qb64pe.exe with the new icon 6.) quit the IDE and delete the org-qb64.exe To get all your programs using your icon just place the same $EXEICON line in your programs. That's in fact the only logic way, as all the icon.ico stuff as mentioned above is just what you placed in the $EXEICON line and then temporarily used during the current build. Without $EXEICON or manually loading an image and pass it to _ICON your programs will always use the hardcoded image in libqb.cpp, which is in fact the same as the current PE icon. RE: Is there a way to permantly replace the default .ico with a custome one? - dbox - 10-12-2023 (10-12-2023, 05:59 PM)Dav Wrote: I've been playing with making icons, and would like to replace the current built-in QB64-PE icon with another so all the .EXE's will have mine embedded instead of the one that came with QB64-PE. Is there a way to do that? I tried overwriting the qb64pe.ico in the source folders with mine but the generated EXE's still have the old one. Nice! I like how you more subtly incorporated the flaming bird. Here's another one in the same vein... RE: Is there a way to permantly replace the default .ico with a custome one? - TerryRitchie - 10-12-2023 (10-12-2023, 07:27 PM)dbox Wrote:Sweet!(10-12-2023, 05:59 PM)Dav Wrote: I've been playing with making icons, and would like to replace the current built-in QB64-PE icon with another so all the .EXE's will have mine embedded instead of the one that came with QB64-PE. Is there a way to do that? I tried overwriting the qb64pe.ico in the source folders with mine but the generated EXE's still have the old one. RE: Is there a way to permantly replace the default .ico with a custome one? - Dav - 10-12-2023 Thanks, RhoSigma for the steps. dbox, I like the looks of that. - Dav RE: Is there a way to permantly replace the default .ico with a custome one? - a740g - 10-13-2023 (10-12-2023, 07:27 PM)dbox Wrote:(10-12-2023, 05:59 PM)Dav Wrote: I've been playing with making icons, and would like to replace the current built-in QB64-PE icon with another so all the .EXE's will have mine embedded instead of the one that came with QB64-PE. Is there a way to do that? I tried overwriting the qb64pe.ico in the source folders with mine but the generated EXE's still have the old one. That Q is Apple's Swift logo. |