Skip to content
⌘ NSIS Forum Archive

Q: 2 $instdir

7 posts

sanface#

Q: 2 $instdir

Hello,

I've to install the application in the standard $INSTDIR and I want to put the exe in the local cgi-bin directory.
Can I give to the user the possibility to select both?
How can I use 2 different $INSTDIR or how can I solve this problem?

Thanks

Fabrizio
kichik#
In 2.0b4 you can use two directory pages and give each one a different variable to handle. One can handle $INSTDIR and the other $SECONDINSTDIR.

Gaim's installer script is a good example for this. If you're not using the MUI then simply use DirVar and PageEx to get the same outcome.
sanface#
Probably I've understood

I've used
!insertmacro MUI_PAGE_DIRECTORY
Var SECONDINSTDIR
!define MUI_DIRECTORYPAGE_VARIABLE $SECONDINSTDIR
!insertmacro MUI_PAGE_DIRECTORY

Is it correct?

Fabrizio
sanface#
A simple error

In the second directory (a cgi-bin dir) I don't want NSIS add to the selected dir name_program-ver.
Is it possible to configure this?

Fabrizio
kichik#
Currently you're only able to set it for both at once and it depends on the InstallDir instruction. I have put it on my todo list.
sanface#
> Currently you're only able to set it for both at once and it
> depends on the InstallDir instruction.

🙁

> I have put it on my todo list.

🙂 🙂 🙂