RigorMortis
18th January 2009 05:29 UTC
User editable install directory - help!
From the subject you would assume I'm an idiot - but let's assume I'm not for a minute.
This installer is for a map pack which must be placed in a very specific directory to function. I found some code to extract the correct directory from the registry/filesystem, but it only functions inside of "section" and thus I cannot use "Page directory" to let people edit the directory if it happens to be wrong.
My question is: Is there a way to allow a user to modify a variable created inside of "Section," and if so, how can I do this?
Any help would be appreciated.
Anders
18th January 2009 06:01 UTC
read from the registry in .oninit and put the result in $instdir
RigorMortis
18th January 2009 08:27 UTC
I tried that, but unfortunately the install directory doesn't auto-populate with the supposed-correct directory... which is bad.
I'm unfortunately very new to NSIS and will probably be fighting with this until I give up and just don't use an installer... lol. This thing has been driving me nuts for weeks.
MSG
18th January 2009 08:36 UTC
Originally posted by RigorMortis
I tried that, but unfortunately the install directory doesn't auto-populate with the supposed-correct directory...
...What does that mean, exactly? If you StrCpy $INSTDIR in .onInit, the directory page will enter that value into the path field as the default. Unless you change the contents of $INSTDIR again at a later time.
RigorMortis
19th January 2009 01:25 UTC
Perhaps looking at the script you can see what I've done wrong?
Animaether
19th January 2009 01:29 UTC
looks like you've got the code to copy the dynamic Steam Account-generated folder to $INSTDIR in your section? you should put that StrCpy in .onInit after calling - and verifying the output from - Call GetSteamAccountName. ( actually, after the "gogogo:" label - no point in doing any code that may not actually get used.