Old 26th June 2007, 19:00   #1
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Install Directory problems

Hi,

What I am trying to do is no doubt simple in the scheme of NSIS however I cannot work out the syntax.

I am using InstallDirRegKey to find the directory I want to install the add-in. But I don't want it to go that directory I naturally want it to go to directory below this for our app.

Now I can force it (by changing the SetOutPath "$INSTDIR\" to add the additional directories) but I would like it displayed on the "Choose Install Location" page

code:

; Define your application name
!define APPNAME "HL2 Co-op: Follow Freeman"
!define APPNAMEANDVERSION "HL2 Co-op: Follow Freeman Beta 2"

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\HL2 Co-op: Follow Freeman"
InstallDirRegKey HKEY_CURRENT_USER Software\Valve\Steam "SourceModInstallPath"
OutFile "hl2coop.exe"



How do I do that?

I did use the forum search but "InstallDirRegKey" had no results found. Stupid old vbulletin software.

Thanks in advance.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 26th June 2007, 19:03   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Simply modify $INSTDIR to your liking in .onInit.
code:
!include LogicLib.nsh
Function .onInit
${If} $INSTDIR != ""
StrCpy $INSTDIR $INSTDIR\Blah
${EndIf}
FunctionEnd


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 26th June 2007, 19:14   #3
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Thanks mate

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump