Page 1 of 1

Linux and the APPICON

Posted: Fri Sep 01, 2023 11:16 am
by Juan Carlos
I have a problem with the instruction @APPICON and Linux Ubuntu program and games, the executable doesn't show the appicon although this icon on Windows is showed correctly, by default Linux shows an ugly gear wheel, what is the problem? I spoke about this issue on MacOS PPC several years ago, but now the problem is on Linux.
Thanks.

Re: Linux and the APPICON

Posted: Fri Sep 01, 2023 5:56 pm
by plouf
I have no knowledge about linux behaviour
Just an idea , have you try using SaveIcon() aka hollywoods own format ?

Re: Linux and the APPICON

Posted: Sat Sep 02, 2023 10:11 am
by Juan Carlos
plouf wrote: Fri Sep 01, 2023 5:56 pm I have no knowledge about linux behaviour
Just an idea , have you try using SaveIcon() aka hollywoods own format ?
No, I not though in the SaveIcon() solution, the icons on Linux are different to Windows, these look have less colors and perhaps Hollywood on Linux not support the PNG icons, as on Windows or MacOS, I remember a same problem on MacOS PPC, here even the behavior was strange sometimes it shows fine the PNG icons other times not, unfortunately I haven't a MacOS PPC system running on my Macs because I like MorphOS better.
Thanks for your suggestion.

Re: Linux and the APPICON

Posted: Wed Sep 06, 2023 10:21 pm
by airsoftsoftwair
Can you post a screenshot? I'm not sure which icon you're referring to.

Re: Linux and the APPICON

Posted: Thu Sep 07, 2023 11:09 am
by Juan Carlos
airsoftsoftwair wrote: Wed Sep 06, 2023 10:21 pm Can you post a screenshot? I'm not sure which icon you're referring to.
Yes here is the example:
https://www.morguesoft.eu/Fotos/LinuxShot01.png
The game project hast the @APPICON and it works fine on Windows, but on Linux the system shows that gear wheel, even in the own Hollywood, Hollywood Player and Interpreter, I think that perhaps the problem will be in Linux Ubuntu and my version LiteOS that it look to use icons since past with 4 colors.

Re: Linux and the APPICON

Posted: Sat Sep 09, 2023 8:17 pm
by MH2
I has this cod on my big project. Different Icon on different sys OS

Code: Select all

/**********************************/
/*** Load library with all data ***/
/**********************************/
/* force the preprocessor to parse */ 
/* different code depending on     */
/* which platform HW is running.   */
/***************************************************************/
/*https://www.hollywood-mal.com/docs/html/hollywood/atIF.html*/
/***************************************************************/
/*  Open Playbox program on macOS  */
/***********************************/
@IF #HW_MACOS
@APPICON {Ic16x16 = "./HD-ICO/ROD-PLAYBOX_16x16.png", 
 Ic24x24 = "./HD-ICO/ROD-PLAYBOX_24x24.png",
 Ic32x32 = "./HD-ICO/ROD-PLAYBOX_32x32.png",
 Ic48x48 = "./HD-ICO/ROD-PLAYBOX_48x48.png",
 Ic64x64 = "./HD-ICO/ROD-PLAYBOX_64x64.png",
 Ic96x96 = "./HD-ICO/ROD-PLAYBOX_96x96.png",
 Ic128x128 = "./HD-ICO/ROD-PLAYBOX_128x128.png",
 Ic256x256 = "./HD-ICO/ROD-PLAYBOX_256x256.png",
 Ic512x512 = "./HD-ICO/ROD-PLAYBOX_512x512.png",
 Ic1024x1024 = "./HD-ICO/ROD-PLAYBOX_1024x1024.png"}

@DISPLAY {X=10, Y=0, Color = #WHITE, Title = "MacOS - Rakt Över Hårddisk", Borderless = True, Sizeable = True, DragRegion = {{X=0, Y=0, Width=512, Height=512}}}
@BGPIC 1, "./HD-ICO/ROD-PLAYBOX_512x512.png", {LoadAlpha = True}

@INCLUDE "./Libs/macos_f1_f10_rod_files.hws"
@INCLUDE "./Libs/macos_1_5_rod_files.hws"


/*************************************/
/*  Open Playbox program on Windows  */
/*************************************/
@ELSEIF #HW_WINDOWS
@APPICON {Ic16x16 = "./HD-ICO/ROD-PLAYBOX_16x16.png", 
 Ic24x24 = "./HD-ICO/ROD-PLAYBOX_24x24.png",
 Ic32x32 = "./HD-ICO/ROD-PLAYBOX_32x32.png",
 Ic48x48 = "./HD-ICO/ROD-PLAYBOX_48x48.png",
 Ic64x64 = "./HD-ICO/ROD-PLAYBOX_64x64.png",
 Ic96x96 = "./HD-ICO/ROD-PLAYBOX_96x96.png",
 Ic128x128 = "./HD-ICO/ROD-PLAYBOX_128x128.png",
 Ic256x256 = "./HD-ICO/ROD-PLAYBOX_256x256.png",
 Ic512x512 = "./HD-ICO/ROD-PLAYBOX_512x512.png",
 Ic1024x1024 = "./HD-ICO/ROD-PLAYBOX_1024x1024.png"}

@DISPLAY {X=1570, Y=0, Color = #WHITE, Title = "Windows - Rakt Över Hårddisk", Borderless = False, Sizeable = True, DragRegion = {{X=0, Y=0, Width=256, Height=256}}}
@BGPIC 1, "./HD-BGP/2_playbox_350x610.png", {LoadAlpha = False}

@INCLUDE "./Libs/winos_f1_f10_rod_files.hws"
@INCLUDE "./Libs/winos_1_5_rod_files.hws"

@ELSE

/*************************************/
/*  Open Playbox program on LinuxOS  */
/*************************************/

@APPICON {Ic16x16 = "./HD-ICO/ROD-PLAYBOX_16x16.png", 
 Ic24x24 = "./HD-ICO/ROD-PLAYBOX_24x24.png",
 Ic32x32 = "./HD-ICO/ROD-PLAYBOX_32x32.png",
 Ic48x48 = "./HD-ICO/ROD-PLAYBOX_48x48.png",
 Ic64x64 = "./HD-ICO/ROD-PLAYBOX_64x64.png",
 Ic96x96 = "./HD-ICO/ROD-PLAYBOX_96x96.png",
 Ic128x128 = "./HD-ICO/ROD-PLAYBOX_128x128.png",
 Ic256x256 = "./HD-ICO/ROD-PLAYBOX_256x256.png",
 Ic512x512 = "./HD-ICO/ROD-PLAYBOX_512x512.png",
 Ic1024x1024 = "./HD-ICO/ROD-PLAYBOX_1024x1024.png"}

@DISPLAY {X=1654, Y=-10, Color = #WHITE, Title = "LinuxOS - Rakt Över Hårddisk", Borderless = True, Sizeable = True, DragRegion = {{X=0, Y=0, Width=256, Height=256}}}
@BGPIC 1, "./HD-ICO/ROD-PLAYBOX_256x256.png", {LoadAlpha = True}

/*****************/
/*    LinuxOS    */
/*****************/
@INCLUDE "./Libs/linuxos_f1_f10_rod_files.hws"
@INCLUDE "./Libs/linuxos_1_5_rod_files.hws"
/*****************/

@ENDIF
Here is an example which uses a different background picture and window title for the individual platforms supported by Hollywood:
https://www.hollywood-mal.com/docs/html ... /atIF.html

Re: Linux and the APPICON

Posted: Mon Sep 11, 2023 9:14 pm
by Juan Carlos
Thank you for the suggestion in theory the @APPICON is common for WIndows, Linux and MacOS and it isn't necessary his extensive work.

Re: Linux and the APPICON

Posted: Wed Sep 13, 2023 9:38 pm
by airsoftsoftwair
Juan Carlos wrote: Thu Sep 07, 2023 11:09 am Yes here is the example:
https://www.morguesoft.eu/Fotos/LinuxShot01.png
Ok, now I see what you mean. Linux executables don't support embedding icons in them like on Windows or macOS so this is a Linux limitation. On Linux the only effect @APPICON will have is that the icon will appear in the title bar of the Hollywood window but it's not possible to embed it into the executable because Linux doesn't support this.

Re: Linux and the APPICON

Posted: Fri Sep 15, 2023 10:52 am
by Juan Carlos
airsoftsoftwair wrote: Wed Sep 13, 2023 9:38 pm
Juan Carlos wrote: Thu Sep 07, 2023 11:09 am Yes here is the example:
https://www.morguesoft.eu/Fotos/LinuxShot01.png
Ok, now I see what you mean. Linux executables don't support embedding icons in them like on Windows or macOS so this is a Linux limitation. On Linux the only effect @APPICON will have is that the icon will appear in the title bar of the Hollywood window but it's not possible to embed it into the executable because Linux doesn't support this.
Thank your for your answer and you have reason now I see that, the @APPICON only is showed in the title bar, humm you don't forget write this situation in the Manual to prevent confusions.