Programs on CD
    Klaus Major 
    k_major at osnabrueck.netsurf.de
       
    Thu Feb 14 14:41:05 EST 2002
    
    
  
Hi Shari,
> With my nifty new CD burner I can now put software on CD, not just 
> online downloads.  Which leads to a problemo...
Congrats to your new toy. I gave one to me as a christmas present ;-)
(Noone else did, so i had to :-D
> As CD's cannot write to themselves, and all of my programs write to 
> themselves, saving user info in fields etc., I am assuming the only way 
> to put a program on CD is to have it write all data to an external file 
> on the user's hard disk.  So if a user is playing a game with high 
> scores, the high score data is stored in a file on the HD, even if the 
> program itself is on a CD.
>
> But assuming anything is always a bad idea, so I'd like to know how 
> others are handling this, if differently.
>
> Perhaps the CD would just have an installer to install the program onto 
> their hard drive?  Hmm....
>
> Thoughts, anyone?
Yes, me...
You can manage "pref"-files very easily with MC/RR :-)
All you need is already built-in. (Love that...)
Example:
You want to store some highscore.
In this example it is stored into a text file in the
prefenrences folder on a mac.
See "specialfolderpath" in the index for more info.
on xxx
    get fld "highscore" ##or wherever you keep it
    put it into url("file:" & specialfolderpath(preferences) & 
"yourhighscore.prf")
end xxx
That's it...
Now if you want to retrieve the highscore file, try this:
on xxx
   if there is not a file (specialfolderpath(preferences) & 
"yourhighscore.prf") then exit xxx
   ## Do not forget to ALWAYS check the existence of something
   ## Users really do not like to see errors or, even worse, that nothing
   ## is happening...
   ##now the file exists and we can proceed...
  put url("file:" & specialfolderpath(preferences) & "yourhighscore.prf") 
into myhscore
  ## now do what ever you want with it. put it into a filed or cover it 
with cream
  ## or whatever you like :-D
end xxx
You see, the apps dont have to be on the harddisk...
On the other hand, you could create an (easy) installer
with MC/RR, too. Also rather easy ;-)
But it sure is a little more complex than a pref-file ;-)
Hope this helps...
Regards
Klaus Major
k_major at osnabrueck.netsurf.de
    
    
More information about the metacard
mailing list