Skip to content

Conversation

@alexeysemenyukoracle
Copy link

@alexeysemenyukoracle alexeysemenyukoracle commented Apr 29, 2025

Fix JabRef-post-image.wsf script to make it independent of the project build location.

Build-only change to eliminate dependencies on the context in which the "post-image" jpackage script is called on Windows.

Closes #13034

Important: the baseline for the fix is v6.0-alpha2 tag. There is no JabRef-post-image.wsf in the main branch after #12990, so this PR can not be integrated as-is.

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • [/] Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • [/] Tests created for changes (if applicable)
  • [/] Manually tested changed features in running JabRef (always required)
  • [/] Screenshots added in PR description (if change is visible to the user)
  • [/] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • [/] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@Siedlerchr
Copy link
Member

Siedlerchr commented Apr 29, 2025

Thanks for the contribution! Looks good from my side. Would you please resolce the conflicts then we can merge it!

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 29, 2025
@Siedlerchr
Copy link
Member

Due to the modularization which we merged after the alpha, the jpackage resources are now under jabgui/buildres/windows and in the corresponding build gradle file.

@alexeysemenyukoracle
Copy link
Author

Right, but there is no JabRef-post-image.wsf script in these resources anymore. Instead, there is "main.wxs". If this is a permanent fix and not a temporary workaround for jpackage's bug in JDK24, then this pull request can be discarded. Otherwise, I can merge and integrate it later.

@JabRef JabRef deleted a comment from jabref-machine Apr 29, 2025
@Siedlerchr
Copy link
Member

I totally overlooked that it was integrated into the main.wxs now. I think it was originally meant to be a workaround by @koppor but could be a permanent solution now as well if it works as intended.

@koppor
Copy link
Member

koppor commented Apr 30, 2025

I think, we should get this in. The idea of the script was IMHO: Take the JDK generated main.w... file as "leading X and add necessary things afterwards.

I will try to take care later.

(And @alexeysemenyukoracle thank you so much for the time invested!)

@koppor
Copy link
Member

koppor commented Apr 30, 2025

As far as I understood openjdk/jdk#19318 (comment) and https://bugs.openjdk.org/browse/JDK-8355651, we should update to JDK25 to have the script working again? 😅

@koppor koppor added status: depends-on-external A bug or issue that depends on an update of an external library and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Apr 30, 2025
@koppor
Copy link
Member

koppor commented Apr 30, 2025

@koppor koppor mentioned this pull request Apr 30, 2025
1 task
@koppor
Copy link
Member

koppor commented Apr 30, 2025

Windows:

> Could not copy file 'D:\a\jabref\jabref\jabgui\buildres\windows\JabRef-post-image.wsf' to 'D:\a\jabref\jabref\jabgui\build\jpackage-resource-dir\JabRef-post-image.wsf'.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
   > Error - Invalid filter specification for org.apache.tools.ant.filters.ReplaceTokens

The ChatGPT-solution (dc293db) seems to be wired... Needs more investigation.

@alexeysemenyukoracle
Copy link
Author

I'd stick to the current workaround with "main.wxs" and revisit this PR later when you decide to migrate to a newer JDK version.

@koppor
Copy link
Member

koppor commented Jun 7, 2025

I merged upstream/main (and resolved conflicts). CI shows

 > Could not copy file 'D:\a\jabref\jabref\jabgui\buildres\windows\JabRef-post-image.wsf' to 'D:\a\jabref\jabref\jabgui\build\jpackage-resource-dir\JabRef-post-image.wsf'.

   > Error - Invalid filter specification for org.apache.tools.ant.filters.ReplaceTokens
[Incubating] Problems report is available at: file:///D:/a/jabref/jabref/build/reports/problems/problems-report.html

Too late here for a proper-follow-up now. 😅

@koppor koppor added the dev: no-bot-comments If set, there should be no comments from our bots label Jun 17, 2025
@trag-bot
Copy link

trag-bot bot commented Jun 17, 2025

@trag-bot didn't find any issues in the code! ✅✨

@calixtus
Copy link
Member

calixtus commented Oct 9, 2025

Refs #14057

@koppor koppor force-pushed the fix-jpackage-post-image branch from 7960957 to fd40141 Compare October 11, 2025 13:32
@koppor koppor marked this pull request as draft October 11, 2025 13:35
@koppor
Copy link
Member

koppor commented Oct 30, 2025

Note that this is blocked by JDK-8358723, which is about broken signing of macOS binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev: no-bot-comments If set, there should be no comments from our bots status: depends-on-external A bug or issue that depends on an update of an external library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve JabRef-post-image.wsf ("post-image" script for jpackage)

4 participants