|
![]() |
#1 |
Junior Member
Join Date: Jul 2017
Posts: 21
|
INSTALLOPTIONS_EXTRACT PluginsDir
Attempting to use InstallOptions with a custom menu.ini file. However when I put my INI file in a different directory and fully define the path, the compiler shows "$PLUGINSDIR\" in front of my fully qualified file name.
Is there any way to redefine $PLUGINSDIR or is there a way to make individual function calls ignore this variable? This was not a problem until I attempted to use this command to reset the "state" value in the INI before using it again. !insertmacro INSTALLOPTIONS_WRITE "{my path}\menu.ini" "field 3" "state" "{my value}" From the compiler: !insertmacro: INSTALLOPTIONS_EXTRACT InitPluginsDir File: "menu.ini"->"$PLUGINSDIR\{my path}\menu.ini" Is there any way to make this work? |
![]() |
![]() |
![]() |
#2 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 923
|
Just use a relative path. $pluginsdir is a temp directory specifically for files used during the install. You don't have to use the MUI installoptions macros, you can use the installoptions plugin directly as well. Although it's probably better to use nsDialogs which superseded installoptions.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#3 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
There is a "extract as" macro IIRC, otherwise you can manually extract like Jason suggested.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Jul 2017
Posts: 21
|
Relative path is cumbersome when paths are so different. I will consider moving to nsDialogs.
Thanks |
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
You don't have to use the EXTRACT macro, you can use File and extract wherever you want.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|