Skip to content

Upgrading to 1.7.6 broke icons on Windows #436

Open
@dkoding

Description

@dkoding

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:

After upgrading to 1.7.6 from 1.6.6 winConfig.icoFile no longer works

Steps to reproduce the issue/enhancement:

I use the following config in both cases

def basePackageConfig = {
    mainClass = project.mainClassName
    bundleJre = true
    generateInstaller = false
    createZipball = true
    administratorRequired = false
    runnableJar = file('build/libs/' + applicationName + '-' + appVersion + '-obfuscated.jar')
    assetsDir = file('src/main/resources')
    licenseFile = file("LICENSE.txt")
    platform = io.github.fvarrui.javapackager.model.Platform.windows
    copyDependencies = false

    winConfig {
        headerType = HeaderType.gui
        wrapJar = true
        generateSetup = false
        generateMsm = false
        generateMsi = false
        icoFile = file('src/main/resources/'+applicationName+'.ico')
    }
}

What is the expected behavior?

The icon file should be placed in directory /build/applicationName/applicationName.ico and assigned to the .exe file

What is the current behavior?

No icon file in directory /build/applicationName/applicationName.ico and the .exe file has the coffee cup icon.

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

In 1.7.6 i get the current message:

Resolving resources ...
    License file found: C:\work\ragnarok\desktop\LICENSE.txt
    Icon file resolved: C:\work\ragnarok\desktop\src\main\resources\PuzzlePlayer.ico
    Skipped adding the icon file as additional resource because the target platform is Windows
    Effective additional resources [C:\work\ragnarok\desktop\LICENSE.txt]
Resources resolved!

In 1.6.6 the icon file is NOT skipped.

The icon IS updated in the launch4j directory - as app.ico

What is the motivation / use case for changing the behavior?

It does not work as-is.

Please tell us about your environment:

  • JavaPackager version: 1.7.6
  • OS version: Windows 10
  • JDK version: OpenJDK 17
  • Build tool:
    • Maven
    • Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    feedbackWaiting for feedback

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions