You are here

[appinfo.ini][ExtractIcon] Documentation not clear about app with multiple icons

1 post / 0 new
nmarghetti
Offline
Last seen: 4 years 7 months ago
Joined: 2020-04-05 08:14
[appinfo.ini][ExtractIcon] Documentation not clear about app with multiple icons

I was reading some documentation and found something that is not clear to me here https://portableapps.com/development/portableapps.com_format#appinfo

It says that the ExtractIcon option works only for apps with a single icon:

ExtractIcon (optional) is used if the app's appropriate appicon.ico within the AppInfo directory. This should only be used when legally required for launchers in specific apps as it cause the application to be accessed more slowly. When not needed it should be left out of appinfo.ini. This option is only available for apps with a single icon.

But also a few lines below it says that you can use several ExtractIcon:

Like the main icon, ExtractIcon1, ExtractIcon2, etc can be used where legally required. These should not normally be used or included.

I tried and it indeed I have been able to use it with an app with single icon, but when I try with multiple icon, it does not work. I have also played with the ExtractName and I faced the same, it works well only for only one icon.

Let's illustrate that with LibreOffice. The default config is as follow:

[Control]
Icons=7
Start=LibreOfficePortable.exe
Start1=LibreOfficeBasePortable.exe
Name1=LibreOffice Portable Base
Start2=LibreOfficeCalcPortable.exe
Name2=LibreOffice Portable Calc
...

I have played with it to change the icon the main app and it works well (both case of ExtractIcon works there, with the .ico or .exe):

[Control]
Icons=1
Start=LibreOfficePortable.exe
ExtractIcon=App\AppInfo\appicon3.ico
#ExtractIcon=LibreOfficeMathPortable.exe

Then if I try to play with 2 apps, both app are using respectively appicon1.iso appicon2.iso:

[Control]
Icons=2
Start=LibreOfficeCalcPortable.exe
ExtractIcon=LibreOfficeMathPortable.exe
ExtractIcon=App\AppInfo\appicon3.ico

Start1=LibreOfficeCalcPortable.exe
ExtractIco1=App\AppInfo\appicon3.ico
Name1=Calc
Start2=LibreOfficeImpressPortable.exe
Name2=Impress
ExtractIcon2=LibreOfficeMathPortable.exe

So for me it makes sense if as the documentation says, it works only for app with one icon.
But then, why the documentation also says that we can use ExtractIcon1, ExtractIcon2,... (even though it also say they should not be included).

Also I have notice that if appicon1.iso or appicon2.iso does not exist, it does not fallback to appicon.iso, it just stays empty.
To explain more my situation, I just wanted to add some scripts to be ran by PortableApps, and to display the ico of an exe in the menu.
It worked fine for one, but for 2 I had to add appicon1.ico and appicon2.ico (knowing they are both the same, so it is a copy).

Anyway, I managed to have what I wanted but still there might have some improvement to be done.
On the documentation to clarify better that ExtractIcon1, ExtractIcon2, etc. dont work if I am not mistaken.
On the PortableApps itself, maybe it would be good to use appicon.ico for an app if its appiconX.ico does not exist.