Page 1 of 1
Installer problem [SOLVED]
Posted: Thu Sep 13, 2012 12:18 am
by jon
LC 4.5.3 windows 7
I compiled my stacks into a standalone exe with two stacks outside of the exe in order to save hi scores.
Now in the IDE the hi scores are saved when I close the hi score stack and re-open it, the compiled exe file does the same.Thats good it all works.
When I use inno setup or install creator free the hi scores stack does not save the hi scores after I close the stack then re-open it. Has anyone had this problem?
Any advice as to why welcome.
Thank you as always, Jon.
Re: Installer problem
Posted: Thu Sep 13, 2012 10:23 am
by Klaus
Hi Jon,
are you sure you have write permissons in the folder where you place your standalone?
Best
Klaus
Re: Installer problem
Posted: Thu Sep 13, 2012 1:38 pm
by jon
Hi Klaus
Thanks for that, sometimes it's hard to see the wood for the trees.
I had it installing into program files (*86)
Regards, Jon
Re: Installer problem [SOLVED]
Posted: Thu Sep 13, 2012 1:48 pm
by Klaus
Hi Jon,
here are the folder that I use on Mac and Windows, write permission guaranteed
Hint: Create subfolder(s) here for your app!
Mac:
specialfolderpath("preferences") -> /Users/klaus/Library/Preferences
or, which should be used now according to Apple:
specialfolderpath("asup") -> /Library/Application Support
Windows (>= XP):
specialFolderPath(35) -> (some kind of prefs folder) for
all users!
or
specialfolderpath(26) -> for the
current user only!
Best
Klaus
Re: Installer problem [SOLVED]
Posted: Thu Sep 13, 2012 2:05 pm
by jon
Thank you Klaus

Re: Installer problem [SOLVED]
Posted: Thu Sep 13, 2012 2:46 pm
by Klaus
Hi Jon,
the trick is to copy the files that need to be modified/written to to one of these folders,
when the app starts the first time!
Something like this:
Code: Select all
on openstack
## Files that you add via the "copy files" tab in the standalone builder ca be found in hte specialfolder("engine") on iOS
put specialfolderpath("engine") & "/your_hiscore_stack1.livecode" into tHiScoreFile
put specialfolderpath(26) & "/subfolder_of_your_app/hiscore1" into tHiScoreFileUser
## No suffix neccessary, but won't hurt of course :-)
## Check if the files have already been copied before, if not, copy them:
if there is NOT a file tHiScoreFileUser then
put url("binfile:" & tHiScoreFile) into url("binfile:" & tHiScoreFileUser)
end if
## Now your app is ready to access the hiscore stacks!
## Other openstack stuff here...
end openstack
Best
Klaus
Re: Installer problem [SOLVED]
Posted: Thu Sep 13, 2012 2:50 pm
by jon
Thanks again Klaus
I just copied your snippet so I can go and play around with it.
This folder path stuff has me baffled but I should be able to figure it out now.

Re: Installer problem [SOLVED]
Posted: Thu Sep 13, 2012 2:56 pm
by Klaus
jon wrote:...This folder path stuff has me baffled but I should be able to figure it out now.
Yeah, go, Jon, go!
