More functions to see linked files
More functions to see linked files
Could you make OpenFile(), Exists(), and all file reading functions see files linked into an executable?
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: More functions to see linked files
OpenFile() should already be able to open linked files. Of course, only if mode is set to #MODE_READ. Writing to linked files is not possible.
Re: More functions to see linked files
You are right, my mistake I had OpenFile and ReadChr calls inside an "If Exists ( path$ ) ... EndIf" structure. They can see the linked files but not Exists.
Re: More functions to see linked files
Any progress on this matter?
I noticed that IsPicture() does not see the linked files either.
I noticed that IsPicture() does not see the linked files either.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: More functions to see linked files
Are you using an older version? In Hollywood 5.0 both Exists() and IsPicture() work fine with linked files.
Re: More functions to see linked files
No, I'm using version 5.0 (19.2.12).
Is there a way to make sure that the files really are part of the executable by examining the executable, or something?
The files I've linked into the executable are in a subdirectory (total of 1062 files) and I'm trying to access them like this: IsPicture ( "data/image1.png" ). The database file should be okay. I've made an AmigaDOS script which creates the database file with a List command. It produces a file like this (with 1062 lines, of course ):
data/image1.png
data/image2.png
data/mymusic.mp3
Is there a way to make sure that the files really are part of the executable by examining the executable, or something?
The files I've linked into the executable are in a subdirectory (total of 1062 files) and I'm trying to access them like this: IsPicture ( "data/image1.png" ). The database file should be okay. I've made an AmigaDOS script which creates the database file with a List command. It produces a file like this (with 1062 lines, of course ):
data/image1.png
data/image2.png
data/mymusic.mp3
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: More functions to see linked files
Oops, sorry, you're right. The bug is still there in 5.0. I've fixed it now.
I think these are all functions where it didn't work or did I miss another one?- Fix: IsPicture(), IsSample(), IsMusic(), IsAnim(), IsVideo(), and Exists() didn't work with files linked
to the applet/executable using the LINKFILES argument (reported by Janne Peräaho)
Re: More functions to see linked files
I think you found them all. I've been trying to make these functions to read linked files: IsSample(), IsPicture(), IsMusic(), IsAnim(), and Exists().
While I was debugging my program I noticed something. I made a Mac OS X executable. Inside the application package the executable is in the Contents/MacOS folder. However, program's "home folder" is Contents/Resources and not the Contents/MacOS (I used ReadDirectory() to examine the "home folder"). This is not a problem? The functions can locate the executable and access the linked files despite of the "home folder"?
While I was debugging my program I noticed something. I made a Mac OS X executable. Inside the application package the executable is in the Contents/MacOS folder. However, program's "home folder" is Contents/Resources and not the Contents/MacOS (I used ReadDirectory() to examine the "home folder"). This is not a problem? The functions can locate the executable and access the linked files despite of the "home folder"?
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: More functions to see linked files
No, this should work fine or did you discover a problem with it? Normally I don't see why there should be a conflict.
Re: More functions to see linked files
Well, I was trying to list the contents of the "linked directory" with ReadDirectory() but it didn't work. I got an error message.
I was able to confirm that the linked files are in the directory by opening 4 of them. It looks to me that the ReadDirectory() function has a problem accessing a directory containing linked files.
I was able to confirm that the linked files are in the directory by opening 4 of them. It looks to me that the ReadDirectory() function has a problem accessing a directory containing linked files.