> > and the \t issue when you write to 
> >   !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSummary.ini" "Field 2" "Text" \
> >                "$INSTDIR\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
> > \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath"
> > you have to quote the paths.
> 
> What do you mean with the "\t issue" did I missed something? And what 
> should I quote? This is a string of a label and threrfore still in quotes.

Sorry for the confusion. It was discussed in an earlier post. If you write to
the installoptions ini file. you have to quote (or rather escape) \t \r \n in
the paths. else they get turned into spaces, newlines etc. According the the
abovementioned section you should have \\t for tab (located in path strings like
c:\texmf). They have the nessacery function in installoption(see below).

So after constructing and writing out the complete path variable to anther
variable, the one that you send to Angus's plugin. You should escape al the path
names:

Push $GhostscriptPath
Call Nsis2Io
Pop $GhostscriptPath
Push $INSTDIR
Call Nsis2Io
Pop $R0           ; dont mess with instdir
Push $MiKTeXPath
Call Nsis2Io
Pop $MiKTeXPath
Push $PerlPath
Call Nsis2Io
Pop $PerlPath
Push $ImageMagickPath
Call Nsis2Io
Pop $ImageMagickPath
Push $PythonPath
Call Nsis2Io
Pop $PythonPath
;and then only --> note the $R0 change
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSummary.ini" "Field 2" "Text" \
                "$R0\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
 \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath"


Haven't tested it but it should work (hopefully)

I will look into skipping a page. I no it is possible to skip standard pages
with _PRE and _POST macros, but I'll try to construct a small installoptions
case and pass it along


Regards, 
Johann







; Convert an NSIS string to a form suitable for use by InstallOptions
; Usage:
;   Push <NSIS-string>
;   Call Nsis2Io
;   Pop <IO-string>
Function Nsis2Io
  Exch $0 ; The source
  Push $1 ; The output
  Push $2 ; Temporary char
  StrCpy $1 "" ; Initialise the output
loop:
  StrCpy $2 $0 1 ; Get the next source char
  StrCmp $2 "" done ; Abort when none left
    StrCpy $0 $0 "" 1 ; Remove it from the source
    StrCmp $2 "\" "" +3 ; Back-slash?
      StrCpy $1 "$1\\"
      Goto loop
    StrCmp $2 "$\r" "" +3 ; Carriage return?
      StrCpy $1 "$1\r"
      Goto loop
    StrCmp $2 "$\n" "" +3 ; Line feed?
      StrCpy $1 "$1\n"
      Goto loop
    StrCmp $2 "$\t" "" +3 ; Tab?
      StrCpy $1 "$1\t"
      Goto loop
    StrCpy $1 "$1$2" ; Anything else
    Goto loop
done:
  StrCpy $0 $1
  Pop $2
  Pop $1
  Exch $0
FunctionEnd



Reply via email to