Installer problem [SOLVED]

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Installer problem [SOLVED]

Post by jon » Thu Sep 13, 2012 12:18 am

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.
Last edited by jon on Thu Sep 13, 2012 1:40 pm, edited 2 times in total.
I dare not shake the dew drop from a rose lest I disturb the stars.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Installer problem

Post by Klaus » Thu Sep 13, 2012 10:23 am

Hi Jon,

are you sure you have write permissons in the folder where you place your standalone?


Best

Klaus

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Installer problem

Post by jon » Thu Sep 13, 2012 1:38 pm

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
I dare not shake the dew drop from a rose lest I disturb the stars.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Installer problem [SOLVED]

Post by Klaus » Thu Sep 13, 2012 1:48 pm

Hi Jon,

here are the folder that I use on Mac and Windows, write permission guaranteed :D

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

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Installer problem [SOLVED]

Post by jon » Thu Sep 13, 2012 2:05 pm

Thank you Klaus

:D
I dare not shake the dew drop from a rose lest I disturb the stars.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Installer problem [SOLVED]

Post by Klaus » Thu Sep 13, 2012 2:46 pm

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

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Installer problem [SOLVED]

Post by jon » Thu Sep 13, 2012 2:50 pm

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.

:shock:
I dare not shake the dew drop from a rose lest I disturb the stars.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Installer problem [SOLVED]

Post by Klaus » Thu Sep 13, 2012 2:56 pm

jon wrote:...This folder path stuff has me baffled but I should be able to figure it out now.
Yeah, go, Jon, go! :D

Post Reply