This question is answered.


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

Posts: 1,656
Registered: 14-Dec-2007
How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 19:24
 
  Click to reply to this thread Reply
I thought that all files in the res folder in the image directory were automatically copied to the res folder in the output directory.

But if I save a woff file into the res folder in the image directory, this woff file is not copied to the res folder in the output directory if I click the Make button.

What do I have to do to copy my woff file to the res folder in the output directory?
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 19:34   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I thought that all files in the res folder in the image directory were automatically copied to the res folder in the output directory.

But if I save a woff file into the res folder in the image directory, this woff file is not copied to the res folder in the output directory if I click the Make button.

All files should be copied to the output. Have you any code that might be deleting the file before album build is complete? If not, attach the file so others can try it, or try using another skin entirely, does that work?
AndreWolff

Posts: 1,656
Registered: 14-Dec-2007
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 19:41   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I found the solution, I added a line to filetypes.xml:
	<type name="Unsupported image" icon="image.png">
		<ext>tiff</ext>
		<ext>psd</ext>
		<ext>ico</ext>
		<ext>svg</ext>
		<ext>woff</ext>
	</type>
But now I have to do this for each new version, so David please add this to the standard filetypes.xml file.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 19:48   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I found the solution, I added a line to filetypes.xml:
	<type name="Unsupported image" icon="image.png">
		<ext>tiff</ext>
		<ext>psd</ext>
		<ext>ico</ext>
		<ext>svg</ext>
		<ext>woff</ext>
	</type>
But now I have to do this for each new version, so David please add this to the standard filetypes.xml file.
Adding woff files to the supported file types (visible in jAlbum’s explore view) doesn’t really make sense - it is not something the average user wants to include in an album. It would be better to code your skin so that you explicitly copy the woff file to the output res folder.
AndreWolff

Posts: 1,656
Registered: 14-Dec-2007
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 19:56   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Adding woff files to the supported file types (visible in jAlbum’s explore view) doesn’t really make sense
Well, if it works I can add it to another group, but we both thought that all files from the image res folder would be copied to the res output folder! That is the best solution.
jGromit

Posts: 6,757
Registered: 31-Jan-2006
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 20:15   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
private void copyRes(String sourceFile) {
	try {
		File src = new File(rootImageDirectory + "/res/" + sourceFile);
		File dest = new File(rootOutputDirectory + "/res/");			
		if(src.exists()) IO.copyFile(src, dest, true);
	}
	catch(IOException e) {}
}
AndreWolff

Posts: 1,656
Registered: 14-Dec-2007
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 20:29   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Thanks for showing this code.

I don't think many users are interested in web fonts, my skins do support already Google fonts, so I do not want to change something for woff files fonts.

I just liked to make a recipe in the manual so that users can still use woff files with some extra code in the css code box and let the user save the woff file in the res directory in the image directory.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 20:43   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
Adding woff files to the supported file types (visible in jAlbum’s explore view) doesn’t really make sense
Well, if it works I can add it to another group, but we both thought that all files from the image res folder would be copied to the res output folder! That is the best solution.
I (based on an old post), like you, was mistaken. I have updated the wiki to indicate only supported file types are copied, see jAlbum/Where are all my files
AndreWolff

Posts: 1,656
Registered: 14-Dec-2007
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 20:53   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I (based on an old post), like you, was mistaken.
I know, but what is the problem if jAlbum copies all files in the image res directory to the output res directory?
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 21:02   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
I (based on an old post), like you, was mistaken.
I know, but what is the problem if jAlbum copies all files in the image res directory to the output res directory?
Nothing, but updating the supported file types to allow any file type to be copied from the project’s res folder is not sensible. Maybe David will provide a patch to copy anything in the project’s res folder, given that that folder is a ‘special case’.
AndreWolff

Posts: 1,656
Registered: 14-Dec-2007
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 21:07   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Maybe David will provide a patch to copy anything in the project’s res folder, given that that folder is a ‘special case’.
Yes, that is the best solution I think.

Why should somebody put a file in the image directory res folder if that file is not copied to the res folder in the output directory?
jGromit

Posts: 6,757
Registered: 31-Jan-2006
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 23:40   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Maybe David will provide a patch to copy anything in the project’s res folder, given that that folder is a ‘special case’.

I'm about 95% sure this used to be the case - I recall being surprised when I tried to stash a something.js file in res, and it wasn't copied to the output.

I wouldn't want jAlbum to accept totally unsupported files anywhere other than the image directory's res folder, however. But within res, those files should be permitted, using unknown.png as the thumbnail (interesting that such a file already exists in the jAlbum program directory, which suggests that my memory is correct), and they should all be copied to the output directory's res folder.
jGromit

Posts: 6,757
Registered: 31-Jan-2006
Re: How to copy files to the res folder in the output directory?
Posted: 23-Sep-2019 23:47   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
On a semi-related note, it's time to remove the swf entry from filetypes.xml:
	<type name="Flash Video" icon="movie.png" mimeType="video/x-flv">
		<ext>swf</ext>
		<ext>flv</ext>
	</type>
The ffmpeg conversion routine actually can handle flv files, but not an swf file.
ctwist

Posts: 559
Registered: 27-Sep-2003
Re: How to copy files to the res folder in the output directory?
Posted: 24-Sep-2019 02:49   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
From an old comment in the Mirage code:
// Copy the Zoomify viewer from the project or album res directory to the output res directory.
// jAlbum copies some files, but ignores some file types (e.g. .js files).
Don't ask me to remember the details.
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 10:55   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
ctwist wrote:
From an old comment in the Mirage code:
// Copy the Zoomify viewer from the project or album res directory to the output res directory.
// jAlbum copies some files, but ignores some file types (e.g. .js files).
Don't ask me to remember the details.

I have found an old post about copy all files from the project res folder to the output’s res folder. If David does update jAlbum to copy all of the res folder’s contents then I would like to add another change.

The copying of the folder’s contents should be performed after the copying/processing of the skin’s res folder. A user would expect their project files to overwrite the skin’s files.
Legend
Forum admins
Helpful Answer
Correct Answer

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