Skip to content

Fix JabRef-post-image.wsf to make it agnostic to the location of the … #13033

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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
Copy link

trag-bot bot commented Apr 30, 2025

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

@jabref-machine
Copy link
Collaborator

Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of [x] (done), [ ] (not done yet) or [/] (not applicable).

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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