christian.ridderstrom | 1 Mar 04:00 2007

Commented and modified version of pdfview.nsi

I've attached a commented/modified version of pdfview.nsi. There are some 
initial questions inside the file, there will likely be more. To archive 
the discussion, I'm CC:ing the developers list.

Some statistics:   Lines  Blank lines   Comment lines	Inline comments
pdfview.nsi	   174	  53		22		2
pdfview.mod.nsi	   186	  40		63		29

Since I don't know what is most convenient, and the file isn't that long, 
I also pasted the file on this page

Maybe it'd be better if I committed it under another name, I don't know.

Here are some of the larger questions I have:

* What is the syntax of using pdfview.exe?

* Should it be possible to do 'pdview.exe -h' ?

* Why write this application in NSIS?

* Where are pdfopen/pdfclose stored?

* Where/how are they installed?

* Would this application be useful on non-Windows platforms?

* Does it matter that lyxc.exe, lyx.exe (launcher) and pdfview.exe all use
(Continue reading)

christian.ridderstrom | 1 Mar 04:12 2007

Re: Commented and modified version of pdfview.nsi

> * This thing with macros still confuse me.... Must HideConsole be a macro?

Another thing that confuses me is the quotations... it get's extra juicy 
when used with a macro as in this case:

!macro HideConsole COMMAND_LINE
   # <snip>

Function bla
   !insertmacro HideConsole '"$EXEDIR\pdfclose.exe" --file "$PDFFile"'

The invocation of the macro uses single quotes and double quotes.
Then inside the macro definition there are backquotes.

What happens if $EXEDIR contains e.g. single, double or back quotes?

To put it mildly, I have no idea whatsoever if the code above is valid.


PS. Btw, if that macro/function combination could be rewritten as one 
function, would it affect the quoting?  Is this what you'd get?

Function bla
   Push '"$EXEDIR\pdfclose.exe" --file "$PDFFile"'
   CallInstDLL "$EXEDIR\Console.dll" Exec
(Continue reading)