Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to 1.7.6 broke icons on Windows #436

Open
2 of 5 tasks
dkoding opened this issue Oct 23, 2024 · 1 comment
Open
2 of 5 tasks

Upgrading to 1.7.6 broke icons on Windows #436

dkoding opened this issue Oct 23, 2024 · 1 comment
Labels
feedback Waiting for feedback

Comments

@dkoding
Copy link

dkoding commented Oct 23, 2024

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)

@fvarrui
Copy link
Owner

fvarrui commented Oct 23, 2024

Hi @dkoding!
This is probably a misunderstanding. ICO file is merged as EXE metadata, so there's no need to copy into apps folder.

    Skipped adding the icon file as additional resource because the target platform is Windows

It just warns you that the ICO file is not going to be copied as an additional resource, next to your EXE. If you need to distribute your ICO file next to your EXE, you should take a look at additionalResources property.

And if the problem is that, after change your ICO and rebuild your app, EXE is still showing the previous icon, this is caused by Windows Explorer cache. A quick trick if so: kill explorer.exe and start it again.

@fvarrui fvarrui added feedback Waiting for feedback question Further information is requested and removed feedback Waiting for feedback question Further information is requested labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback Waiting for feedback
Projects
None yet
Development

No branches or pull requests

2 participants