QT and standalones -- incompatible?
Dr. Robert E. Ball
reball at redshift.com
Fri May 5 19:47:37 EDT 2006
Hello Peter, and thank you for responding -- and quickly, too. Yes, I am
working on a Mac, but I want to develop a standalone for Windows as well.
I thought I was doing what you suggested with the script in the openCard
handler:
put the defaultFolder & "/" & "Movie trial.mov" into movieName
set the fileName of player "Play" to movieName
I put the fileName of player "Play" into a field so I can take a look at it,
and I thought it gave me the absolute path to the .mov file regardless of
the computer. In the Mac application package, it starts with /Users/ and
ends with MacOS/Movie trial.mov
However, I am missing the Contents folder ahead of the MacOS folder in the
fileName. I thought the default folder would be the application folder, but
apparently it isn't. I can see in the finder window that I am missing this
folder.
You have been very helpful. I will add the folders ahead of the MacOS
folder. Thanks so much.
The people on this list are invaluable. RunRev should pay you.
Bob
On 5/5/06 4:26 PM, "Peter Reid" <preid at reidit.co.uk> wrote:
> Hi Robert
>
> Are you trying to do this on a Mac running OS X? If so the problem
> could be to do with the way OS X application packages work - an
> application package is really a folder. If you get the current folder
> relative to the stack within the development environment and then try
> the same when running as a standalone, you'll find a significant
> difference!
>
> For example, I have a small stack called SoundTest.rev that looks for
> a folder called Sounds at the same level in the filing system, i.e.
> in the same parent folder:
>
> Sounds
> SoundTest.rev
>
> In the development environment I can locate the content of the Sounds
> folder as follows:
>
> put the filename of this stack into gSoundPath
> set itemDelimiter to "/"
> put "Sounds/" into the last item of gSoundsPath
>
> My global variable gSoundsPath now has the path to the contents of my
> Sounds folder.
>
> However, if this were saved as a standalone application, then I'd
> find the following folder structure:
>
> Sounds (my original folder)
> SoundTest.app (my standalone program, which is an OS X 'package')
> Contents
> MacOS
> SoundTest (the real standalone program!)
>
> When I get the 'filename' of SoundTest this time, I get the path down
> to SoundTest inside the MacOS folder (which is inside the Contents
> folder, which is inside the SountTest.app package/folder).
>
> The solution is to change the script above to cater for running in
> both the development environment and as a standalone application as
> follows:
>
> put the filename of this stack into gSoundPath
> set itemDelimiter to "/"
> if the environment is "development" then
> put "Sounds/" into the last item of gSoundsPath
> else
> put "Sounds/" into item -4 to -1 of gSoundsPath
> end if
>
> Now my global variable gSoundsPath has the path to the contents of my
> Sounds folder irrespective of wether my stack is running in the
> development environment or as a standalone application!
>
> I hope the above helps.
>
> Cheers
>
> Peter
>
>
>> I can not develop a standalone on one computer that will play a QT movie
>> (Movie trial.mov) on another computer. I have determined the absolute file
>> path to the player (with QT file) using
>>
>> put the defaultFolder & "/" & "Movie trial.mov" into movieName
>> set the fileName of player "Play" to movieName
>>
>> The file path is correct on any computer, but the movie won't play. It plays
>> just fine using the stack file, but not with the corresponding standalone.
>> The "Movie trial.mov" is included in the standalone package/folder with the
>> application.
>>
>>
>>
>> --
>> Robert E. Ball, PhD
>> Distinguished Professor, Emeritus
>> Department of Aeronautics and Astronautics
>> Naval Postgraduate School
>> Monterey, California
--
Robert E. Ball, PhD
Distinguished Professor, Emeritus
Department of Aeronautics and Astronautics
Naval Postgraduate School
Monterey, California
More information about the use-livecode
mailing list