Old 13th December 2006, 23:00   #1
fashtas
Junior Member
 
Join Date: Dec 2006
Posts: 9
Question 2 dir paths, different defaults, auto-add for 1, Possible?

I am trying to get 2 different directory screens working in an installer.

One has the path for the program files, and adds the Default Program Directory to the end if the user browses to a new path

The second has the path for the data files, and does *not* want to append anything to the end of the path if the uses browses somewhere other than the initial default

I've attached a cut down version of the code I am using which will add "myTest2PathDir" to the end of any browsed to path on both directory windows.

I am aware that if I add a backslash at the end of the path for the install directory (thus)...

code:

InstallDir "$PROGRAMFILES\myTest2PathDir\"



...I can avoid the adding to the end of a browse path, but ideally I want it for the one (program), not the other (data)
Attached Files
File Type: nsi test2path.nsi (1,004 Bytes, 96 views)
fashtas is offline   Reply With Quote
Old 13th December 2006, 23:14   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
There is a page at wiki that might help you,

http://nsis.sourceforge.net/Setting_...Directory_Page

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 13th December 2006, 23:47   #3
fashtas
Junior Member
 
Join Date: Dec 2006
Posts: 9
Thank you for the response

Yes I looked at that page before. It doesn't actually compile, and if I fix the code by commenting out 2 lines, it is looking for a icon file that doesn't exist [line 26] and calling !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE [line 59] which cannot be found) it doesn't seem to work correctly

Perhaps it is the MUI_RESERVEFILE_WELCOMEFINISHPAGE I removed? I was unsure what that is supposed to do

At any rate the two data directory screens both share the same path, changing one changes the other, and neither append anything when browsing which is what I wanted to do with the install path

From a little debugging, it seems the PRE event is never being called

I had also investigated the forum link on that page, but it seems as if it is referencing older MUI builds? For example it uses !insertmacro MUI_PAGECOMMAND_DIRECTORY which won't compile, where as !insertmacro MUI_PAGE_DIRECTORY not only compiles but works well
fashtas is offline   Reply With Quote
Old 13th December 2006, 23:49   #4
fashtas
Junior Member
 
Join Date: Dec 2006
Posts: 9
I had a look, I am using "NSIS Modern User Interface version 1.75 - © 2002-2006 Joost Verburg" for the MUI Modern interfance
fashtas is offline   Reply With Quote
Old 14th December 2006, 09:58   #5
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Re: 2 dir paths, different defaults, auto-add for 1, Possible?

Quote:
Originally posted by fashtas
...I can avoid the adding to the end of a browse path, but ideally I want it for the one (program), not the other (data)
I guess you should set up a custom page for the second (data) dir.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine 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