More functions to see linked files

Feature requests for future versions of Hollywood can be voiced here
User avatar
jap
Posts: 61
Joined: Sun Feb 14, 2010 12:24 pm
Contact:

More functions to see linked files

Post by jap »

Could you make OpenFile(), Exists(), and all file reading functions see files linked into an executable?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: More functions to see linked files

Post by airsoftsoftwair »

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.
User avatar
jap
Posts: 61
Joined: Sun Feb 14, 2010 12:24 pm
Contact:

Re: More functions to see linked files

Post by jap »

You are right, my mistake :oops: I had OpenFile and ReadChr calls inside an "If Exists ( path$ ) ... EndIf" structure. They can see the linked files but not Exists.
User avatar
jap
Posts: 61
Joined: Sun Feb 14, 2010 12:24 pm
Contact:

Re: More functions to see linked files

Post by jap »

Any progress on this matter?
I noticed that IsPicture() does not see the linked files either.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: More functions to see linked files

Post by airsoftsoftwair »

Are you using an older version? In Hollywood 5.0 both Exists() and IsPicture() work fine with linked files.
User avatar
jap
Posts: 61
Joined: Sun Feb 14, 2010 12:24 pm
Contact:

Re: More functions to see linked files

Post by jap »

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
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: More functions to see linked files

Post by airsoftsoftwair »

Oops, sorry, you're right. The bug is still there in 5.0. I've fixed it now.
- 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)
I think these are all functions where it didn't work or did I miss another one?
User avatar
jap
Posts: 61
Joined: Sun Feb 14, 2010 12:24 pm
Contact:

Re: More functions to see linked files

Post by jap »

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"?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: More functions to see linked files

Post by airsoftsoftwair »

No, this should work fine or did you discover a problem with it? Normally I don't see why there should be a conflict.
User avatar
jap
Posts: 61
Joined: Sun Feb 14, 2010 12:24 pm
Contact:

Re: More functions to see linked files

Post by jap »

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.
Post Reply