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

Add additional dependencies #37

Open
Darrel12 opened this issue Jun 10, 2019 · 5 comments
Open

Add additional dependencies #37

Darrel12 opened this issue Jun 10, 2019 · 5 comments

Comments

@Darrel12
Copy link

Darrel12 commented Jun 10, 2019

Looking at How to package extra files into app I see that the solution was to manually copy the desired file into the Contents directory. I would like to propose an additional terminal option to add a library folder.

Ex: jar2app XXXX.jar --additional-libs=/path/to/library/

The reason being is that there are occasionally JARs that have an external lib folder that is required for the JAR's execution such as MSGViewer. It makes sense to have it packaged along with it as a standard approach instead of extra steps seeing as it's necessary for core operation rather than an extraneous bit of data to be used by the JAR.

If you like the idea, I'll try to find some spare time to fork this repo and add it in myself.

Edit: Since this is for libraries/files to be used as dependencies for the JAR being added and the JAR usually looks in the CWD, the additions would go in the XXXX.app/Contents/Java/ folder rather than simply XXXX.app/Contents/ as it was done in the aforementioned issue.

@Darrel12 Darrel12 reopened this Jun 10, 2019
@Darrel12 Darrel12 changed the title add librar Add additional dependencies Jun 10, 2019
@Lucina
Copy link
Contributor

Lucina commented Jun 10, 2019

Would you think naming the terminal option --additional-files would be more appropriate? Passing a semicolon-delimited list of files and folders to copy over is what I was thinking.

@Darrel12
Copy link
Author

Darrel12 commented Jun 10, 2019

I agree, that naming convention sounds better. Semicolon-delimited is a perfect option for multiple additions. I updated the OP to specify that the additions are going into the Java folder of Contents since my primary concern is for the JAR's dependencies. How does that sound to you?

I was thinking there could be an additional comma-delimited sub-parameter within each semicolon-delimited item to specify the subfolder that the file should go into. Or perhaps a 1:1 mapping from --additional-files to an optional specification, something like --additional-files-dir if the user wants to specify the directory for the respective addition's desired location.

I'm thinking in terms of automated build environments, but it does introduce more complexity. Do you think it is a good idea, or just stick with --additional-files and keep it to the XXXX.app/Contents/Java folder?

@Lucina
Copy link
Contributor

Lucina commented Jun 10, 2019

The two use cases I can see are dependency jars and resources loaded from plain files. --additional-files for resources > Contents and --additional-jars for jars > Contents/Java, perhaps. Both with support for sub-parameters, and essentially the same except for the destination. I think that should suffice.

@Darrel12
Copy link
Author

I like that since my libs are all jars so --additional-jars sounds like a good choice. I'll try to find some time in the next few days or perhaps this weekend to get started. Thanks.

@Darrel12
Copy link
Author

#38

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

No branches or pull requests

2 participants