Fix icon on Linux#15188
Conversation
| GenericName=BibTeX Editor | ||
| Comment=APPLICATION_DESCRIPTION | ||
| Exec=APPLICATION_LAUNCHER | ||
| STARTUP_DIRECTORY |
There was a problem hiding this comment.
This looks odd but this is correct?
There was a problem hiding this comment.
There was a problem hiding this comment.
Ah seems like they introduce it recently, because in the tag it's not yet there for jdk25 https://github.com/openjdk/jdk/blob/jdk-25%2B36/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.desktop
|
Might be related #14965 |
|
jabref/jabgui/buildres/windows/main.wxs Line 163 in 10196d5 |
✅ All tests passed ✅🏷️ Commit: b9d94f0 Learn more about TestLens at testlens.app. |
Update workaround at |
|
do you have verbose enabled for windows jpackager call? |
|
|
Gemini suggests |
Would do it in a follow-up. First fix Linux :) |
Review Summary by QodoFix icon handling and restructure jpackage configuration per OS
WalkthroughsDescription• Restructure jpackage configuration to properly handle platform-specific icons • Add jpackageResources directory configuration for each target OS • Include appImageOptions with icon paths for Windows, Linux, macOS • Consolidate license file and file associations across all targets • Update documentation and desktop entry file formatting Diagramflowchart LR
A["jpackage Config"] --> B["Windows Target"]
A --> C["Linux Target"]
A --> D["macOS Target"]
B --> E["Icon + Resources"]
C --> E
D --> E
E --> F["Platform-specific Installers"]
File Changes1. jabgui/build.gradle.kts
|
Code Review by Qodo
1. Commented-out --resource-dir option
|
| // Generic options, but different for each target | ||
| "--icon", "$projectDir\\buildres\\windows\\JabRef.ico", | ||
| "--file-associations", "$projectDir\\buildres\\windows\\bibtexAssociations.properties", | ||
| // "--resource-dir", layout.projectDirectory.dir("buildres").dir("windows").asFile.absolutePath, |
There was a problem hiding this comment.
1. Commented-out --resource-dir option 📘 Rule violation ✓ Correctness
New commented-out code was introduced in the Gradle build script, increasing noise and encouraging dead/uncertain configuration to accumulate.
Agent Prompt
## Issue description
A commented-out configuration line (`--resource-dir`) was added to the Gradle build script.
## Issue Context
The project guideline prohibits commented-out code to avoid dead code accumulation and review noise.
## Fix Focus Areas
- jabgui/build.gradle.kts[87-87]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| targetsWithOs("linux") { | ||
| jpackageResources = layout.projectDirectory.dir("buildres").dir("linux") | ||
| appImageOptions.addAll( | ||
| // Generic options, but different for each target | ||
| "--icon", "$projectDir/buildres/linux/JabRef.png", | ||
| ) | ||
| options.addAll( | ||
| "--linux-menu-group", "Office;", | ||
| // Needs to be listed everyhwere, because of https://github.com/gradlex-org/java-module-packaging/issues/104 | ||
| "--license-file", "$projectDir/buildres/LICENSE_with_Privacy.md", | ||
|
|
||
| // Generic options, but different for each target | ||
| "--icon", "$projectDir/buildres/linux/JabRef.png", | ||
| "--file-associations", "$projectDir/buildres/linux/bibtexAssociations.properties", | ||
| "--resource-dir", layout.projectDirectory.dir("buildres").dir("linux").asFile.absolutePath, |
There was a problem hiding this comment.
2. Duplicate resource dir config 🐞 Bug ⛯ Reliability
Linux and macOS packaging set both jpackageResources and pass an explicit --resource-dir option. If the plugin already maps jpackageResources to --resource-dir, the resulting jpackage invocation can be ambiguous or fail due to duplicate flags.
Agent Prompt
### Issue description
Linux and macOS targets configure the jpackage resources directory twice (DSL + explicit `--resource-dir`). This can lead to duplicated CLI args or unclear precedence.
### Issue Context
The `javaModulePackaging` DSL already has `jpackageResources`; adding `--resource-dir` manually is likely redundant and risky.
### Fix Focus Areas
- jabgui/build.gradle.kts[103-122]
- jabgui/build.gradle.kts[128-146]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
…anner * upstream/tryToFixBanner: (194 commits) Enable loading of main.wxs Fix icon on Linux (#15188) chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.5 (#15178) New Crowdin updates (#15173) Reduce complexity in dependencies setup (#15169) Start new development cycle snapcraft snapcraft use snapctl update metadata fiels try with mesa candidate fix snapcraft and skmanrc to use correct version Release v6.0-alpha.5 chore(sbom): update CycloneDX SBOM files (#15172) Chore(deps): Bump jablib/src/main/resources/csl-styles (#15171) Added "DOI" and URL to entry preview [#14193] (#15121) Fix condition to check running CI in workflow Add maintainer permission check to workflow Add debug output for running checks Fix matrix ...
|
The build of this PR is available at https://builds.jabref.org/pull-15188/. |
|
I'm sorry, but the build at https://builds.jabref.org/pull-15188/ doesn't add a launcher or an icon to the system. |
…les-wizard-12709 * upstream/main: (106 commits) Merge common gating parts into composite action (JabRef#15197) Support protected institutional authors in PersonNamesChecker (JabRef#15175) adapt wix (JabRef#14969) Improve CI (JabRef#15189) Revert "Reduce complexity in dependencies setup (JabRef#15169)" (JabRef#15191) Fix compilation Fix heylogs test Fix icon on Linux (JabRef#15188) chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.5 (JabRef#15178) New Crowdin updates (JabRef#15173) Reduce complexity in dependencies setup (JabRef#15169) Start new development cycle snapcraft snapcraft use snapctl update metadata fiels try with mesa candidate fix snapcraft and skmanrc to use correct version Release v6.0-alpha.5 chore(sbom): update CycloneDX SBOM files (JabRef#15172) ...
* Reorder to match the official JDK .template ordering * Try to enable correct resources * Include global options at each target * Add word to dictionary * Refine jpackage.md * Streamline options * Add --resource-dir * Remove --resource-dir for Windows * Use backslashes on Windows * Remove ; for linux-menu-group * Do not pass resource dir to windows





Related issues and pull requests
--resource-diralso to--type debgradlex-org/java-module-packaging#108PR Description
Fixes icons
Steps to test
See icon working :)
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)