This question is answered.


Permlink Replies: 22 - Pages: 2 [ Previous | 1 2 ] - Last Post: 01-Oct-2019 10:59 Last Post By: davidekholm Threads: [ Previous | Next ]
davidekholm

Posts: 3,138
Registered: 18-Oct-2002
Re: How to copy files to the res folder in the output directory?
Posted: 24-Sep-2019 11:17   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Looking at the code ("the ever current documentation"), it seems like jAlbum does copy everything from the image directory's "res" folder to the album's "res" folder:
IO.copyDirectoryContent(srcResDir, resDir, true, null, Config.getConfig().isUseHardLinks());
The challenge rather seems to be to allow users to drag and drop any file type from the file system to that "res" folder. Today you have to open it in the file system and add the files straight to the file system directory.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: How to copy files to the res folder in the output directory?
Posted: 24-Sep-2019 11:24   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Looking at the code ("the ever current documentation"), it seems like jAlbum does copy everything from the image directory's "res" folder to the album's "res" folder:
What about the order of processing? If a skin provides default images, icons etc. shouldn’t they be replaced, in the output, by any in the project’s res folder (as long as they follow the appropriate subfolder structure)?
davidekholm

Posts: 3,138
Registered: 18-Oct-2002
Re: How to copy files to the res folder in the output directory?
Posted: 24-Sep-2019 11:35   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
davidekholm wrote:
Looking at the code ("the ever current documentation"), it seems like jAlbum does copy everything from the image directory's "res" folder to the album's "res" folder:
What about the order of processing? If a skin provides default images, icons etc. shouldn’t they be replaced, in the output, by any in the project’s res folder (as long as they follow the appropriate subfolder structure)?

Yes, and I was wrong. "srcResDir" refers to the skin's "res" folder. Everything in that one is copied, but probably not everything in the "res" folder of the project's image directory. I agree that it's more intuitive to have jAlbum simply copy everything from any res folder to the target res folder, and to do it in this order:
  • skin's "res" folder
  • skin's style's "res" folder
  • Album project's "res" folder
AndreWolff

Posts: 1,656
Registered: 14-Dec-2007
Re: How to copy files to the res folder in the output directory?
Posted: 24-Sep-2019 12:29   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Yes, and I was wrong. "srcResDir" refers to the skin's "res" folder. Everything in that one is copied, but probably not everything in the "res" folder of the project's image directory. I agree that it's more intuitive to have jAlbum simply copy everything from any res folder to the target res folder,
So my observation that a woff file in the image res folder is not copied to the output res folder in jAlbum 18.4 was correct?
Will that be corrected in the next version?
jGromit

Posts: 6,757
Registered: 31-Jan-2006
Re: How to copy files to the res folder in the output directory?
Posted: 24-Sep-2019 13:48   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
The challenge rather seems to be to allow users to drag and drop any file type from the file system to that "res" folder.

Yes, that's the tricky part, since you really don't want to allow users to drop arbitrary files into the album project itself. Some skins would ignore them, but others might get tripped up by them.

None of this affects my skins, in any event. For things like WOFF files, I give the user an Add/Remove button, and stash the files in .jalbum rather than res. That protects them from confused user actions.
davidekholm

Posts: 3,138
Registered: 18-Oct-2002
Re: How to copy files to the res folder in the output directory?
Posted: 24-Sep-2019 17:00   in response to: AndreWolff in response to: AndreWolff
Correct
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
Yes, and I was wrong. "srcResDir" refers to the skin's "res" folder. Everything in that one is copied, but probably not everything in the "res" folder of the project's image directory. I agree that it's more intuitive to have jAlbum simply copy everything from any res folder to the target res folder,
So my observation that a woff file in the image res folder is not copied to the output res folder in jAlbum 18.4 was correct?
Will that be corrected in the next version?

Yes, it was a correct observation. I intend to fix this, but can't promise if it goes in the next release. For now, edit filetypes.xml as a workaround.
AndreWolff

Posts: 1,656
Registered: 14-Dec-2007
Re: How to copy files to the res folder in the output directory?
Posted: 01-Oct-2019 10:15   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
It works now correctly in version 19, Thanks!
davidekholm

Posts: 3,138
Registered: 18-Oct-2002
Re: How to copy files to the res folder in the output directory?
Posted: 01-Oct-2019 10:59   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
You're welcome :-)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums