You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: