On Sat, 25 Oct 2025 04:12:28 GMT, Alexander Matveev <[email protected]> 
wrote:

>> Alexey Semenyuk has refreshed the contents of this pull request, and 
>> previous commits have been removed. The incremental views will show 
>> differences compared to the previous content of the PR. The pull request 
>> contains eight new commits since the last revision:
>> 
>>  - DefaultLauncherIcon: blessed-modifier-order.sh  fix
>>  - FileAssociations: revert redundant change
>>  - Fix fa icon verification on Linux
>>  - LinuxPackagingPipeline, WinPackagingPipeline: remove unused 
>> normalizeShortcuts() methods
>>  - IconTest: revamp
>>  - LinuxHelper: revamp
>>  - Don't add the default launcher icon to app image on Linux
>>  - Make Launcher interface provide complete information about the source of 
>> the launcher icon; Before this change, the function getting a resource for 
>> an additional launcher icon took both the additional launcher and the main 
>> launcher as input. Now its result doesn't depend on the main launcher.
>
> src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackagingPipeline.java
>  line 62:
> 
>> 60:         pkg.ifPresent(_ -> {
>> 61:             
>> builder.task(LinuxAppImageTaskID.LAUNCHER_ICONS).noaction().add();
>> 62:         });
> 
> Can you explain what this code do? We already have `LAUNCHER_ICONS` task at 
> line 55. Why we need a second one and without action?

This is the same task but with a disabled action. Task graph doesn't allow 
multiple tasks with the same ID.

By default, the `LAUNCHER_ICONS` task copies launcher icon files to the app 
image. However, when bundling a native package, this action should not be 
executed because the `DesktopIntegration` class adds launcher icons to the 
package.

Before this change, jpackage copied launcher icon files twice when building a 
native package: in `LAUNCHER_ICONS` task and in `DesktopIntegration` class.

Function name `add()` is confusing. Should be `apply()` or `commit()`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27928#discussion_r2462876011

Reply via email to