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

Added support to add files to jpackage resources argument #3647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alchitry
Copy link

@alchitry alchitry commented Sep 8, 2023

I wanted to add a driver (udev rule) file to my Linux install and to do this I needed to override the postinst script that jpackage generates. This can be done by providing a postinst script in the directory pointed to by the --resource-dir flag.

This is currently not exposed and is used only by the MacOS target.

I added an override that allows a directory to be supplied to each OS target. It may be better if this could be specified for each TargetFormat type instead of per OS but I don't think it matters as I think jpackage will ignore the files it doesn't recognize.

See https://docs.oracle.com/en/java/javase/20/jpackage/override-jpackage-resources.html for the relavant reasons to override this.

@alchitry
Copy link
Author

alchitry commented Sep 8, 2023

I ended up writing a task to modify the generated deb instead as I think it is the more correct solution. I do think this addition could still be helpful for some use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant