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

jarify with fxml: no .jrubyfx_cache in the jarfile #115

Open
brucetesar opened this issue Jul 15, 2017 · 1 comment
Open

jarify with fxml: no .jrubyfx_cache in the jarfile #115

brucetesar opened this issue Jul 15, 2017 · 1 comment

Comments

@brucetesar
Copy link

I set out to jarify the Demo.rb for jrubyfx, and I ended up dealing with 3 different issues. I'm posting the first here, and will put the other two in separate issue posts. I've found workarounds for each, but I don't know how general/good they are. However, they make it possible for me to sucessfully jarify Demo and run it from the jar. I'm on the Win10 x64 platform.

Issue
.jrubyfx_cache is referenced, but neither the folder nor its contents are included in the created jarfile, producing the exception <Errno::ENOTDIR: Not a directory - classpath:/.jrubyfx_cache>

The reason .jrubyfx_cache isn't included in the created jarfile is that it isn't copied into the temp directory of contents for the jar. It isn't copied into the contents directory because globs by default ignore file/folder names starting with a period '.'
Example: if src = "fxml/*", then FileList[src] will not include "fxml/.jrubyfx_cache" even though it exists.

Workaround
In the jrubyfx gem, modify the file lib/jrubyfx_tasks.rb:
After line 72, add the following 2 lines:
# copy the folder .jrubyfx_cache and contents to the target folder
cp_r src.sub(/\*$/, ".jrubyfx_cache"), target

@bolandross
Copy link

Just stumbled upon the same issue, a fix would be great.

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