Re: [LyXWin Installer] small version updated again
Paul A. Rubin wrote: In the "Software summary" dialog, where it lists the paths it will set as defaults, it runs the paths for Acrobat and Python together. This appears to be just cosmetic (a missed newline). Thanks for the feedback. After installation, acrord32 is listed as the viewer for all PDF file types. However, the "path prefix" entry in Edit | Preferences | Paths is a bit odd. What I see is: C:\Program Files\LyX\bin;C:\PROGRA~1\Python23;C:\TeX\MiKTeX\miktex\bin;C:\gs\gs8.13\bin;C:\Program Files\ImageMagick-6.0.3-Q16;C:\Program Files\Adobe\Acrobat 7.0\Reader;F:\LyXTest\bin;F:\miktex\miktex\bin;f:\freeware\ghostscript\gs\gs8.51\bin;F:\Freeware\ImageMagic > The first half (through Acrobat Reader) are fine, but I don't have an > F: drive on my laptop (I take it you do?), so they are all wrong. Oh seems that I compiled the path_prefix.dll in a wrong way. I'll check this. But good to know that the pdf stuff works for you too. I loaded a document containing JPG images and exported it successfully to DVI, from which I infer that ImageMagick is being found (on my C: drive), the errant path prefix notwithstanding. "Successful" here means that yap could view the entire file, including the images. However, when I try to View | DVI, something goes wrong. LyX runs yap, which loads the DVI file and displays the first page; but when I try to scroll to the second page (where the first graphic appears), I get an MSVC++ runtime error saying that yap asked to terminate "in an unusual way". Such an error could appear with older Yap versions, but: I looked in the temporary buffer directory. The .tex file refers to images as "C:/.../obnoxiously_long_filename".eps (note that the extension is .eps and that it is outside the quotation marks seems to be the problem. It could be a problem of the wrong paths. I'll check this. thanks and regards Uwe
Re: [LyXWin Installer] small version updated again
Uwe Stöhr wrote: Hello Paul, I implement a solution that checks which program is associated to the .pdf file extension. Could you please thest if this installer finds Adobe Reader on your computer: http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15-2.exe thanks in advance and regards Uwe Hi, Uwe, The installer listed the correct directory on the screen with all the helper applications detected. In the "Software summary" dialog, where it lists the paths it will set as defaults, it runs the paths for Acrobat and Python together. This appears to be just cosmetic (a missed newline). After installation, acrord32 is listed as the viewer for all PDF file types. However, the "path prefix" entry in Edit | Preferences | Paths is a bit odd. What I see is: C:\Program Files\LyX\bin;C:\PROGRA~1\Python23;C:\TeX\MiKTeX\miktex\bin;C:\gs\gs8.13\bin;C:\Program Files\ImageMagick-6.0.3-Q16;C:\Program Files\Adobe\Acrobat 7.0\Reader;F:\LyXTest\bin;F:\miktex\miktex\bin;f:\freeware\ghostscript\gs\gs8.51\bin;F:\Freeware\ImageMagic The first half (through Acrobat Reader) are fine, but I don't have an F: drive on my laptop (I take it you do?), so they are all wrong. I loaded a document containing JPG images and exported it successfully to DVI, from which I infer that ImageMagick is being found (on my C: drive), the errant path prefix notwithstanding. "Successful" here means that yap could view the entire file, including the images. However, when I try to View | DVI, something goes wrong. LyX runs yap, which loads the DVI file and displays the first page; but when I try to scroll to the second page (where the first graphic appears), I get an MSVC++ runtime error saying that yap asked to terminate "in an unusual way". I looked in the temporary buffer directory. The .tex file refers to images as "C:/.../obnoxiously_long_filename".eps (note that the extension is .eps and that it is outside the quotation marks -- not sure if the latter is an issue. The graphics files in the temp directory are all .jpg files, no .eps in sight. -- Paul
Re: [LyXWin Installer] small version updated again
Paul A. Rubin wrote: Don't know if it makes a difference, but it might be safer to use HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\InstallPath Hello Paul, I implement a solution that checks which program is associated to the .pdf file extension. Could you please thest if this installer finds Adobe Reader on your computer: http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15-2.exe thanks in advance and regards Uwe
Re: [LyXWin Installer] small version updated again
Angus Leeming wrote: - I need the registry path for Acroread. If anybody has installed it, please send it to me. Under HKLM I have "Software\Adobe\Acrobat\Exe" which stores "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" so perhaps you can use the same test for both? Don't know if it makes a difference, but it might be safer to use HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\InstallPath which on my laptop shows "C:\Program Files\Adobe\Acrobat 7.0\Reader" (i.e. everything but the file name). The only question is whether, on a multi-user machine, there would be different copies of Reader in limited-access directories. Seems unlikely, but ... -- Paul
Re: [LyXWin Installer] small version updated again
Jean-Marc Lasgouttes a écrit: Isn't there a way in NSIS to check whether the pdf extension is registered? There is no reason to force the user to use acrobat if he prefers gsview or whatever. Good idea. The actual version: http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15.exe checks now for the program associated with the file extension ".pdf". So it should work for all pdf viewers. Angus, could you please test if Acroread is recognized? Thanks. Johann Kellerman wrote: > I started working on this. My thoughts was to extract the pdf viewer > associated with pdf's on the windows machine. > > With: > > Function getFileAssociation > Exch $R1 > Push $R0 > ReadRegStr $R0 HKCR "$R1" "" > ReadRegStr $R1 HKCR "$R0\shell\open\command" "" > Pop $R0 > Exch $R1 > FunctionEnd > > And then using: > Push ".pdf" > Call getFileAssociation > pop $acrobat_path > -- Thanks Johann, based on your idea I implemented it now as --- !macro GetFileExtProg ProgPath AppExe Extension ReadRegStr ${AppExe} HKCU \ "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\${Extension}\OpenWithList" "a" ${if} ${AppExe} != "" ReadRegStr ${ProgPath} HKLM \ "Software\Microsoft\Windows\CurrentVersion\App Paths\${AppExe}" "Path" ;remove the "\" at the end StrCpy ${ProgPath} ${ProgPath} -1 ${endif} !macroend - This macro is in http://fkurth.de/uwest/LyX/Installer/Scripts/LyXUtils.nsh The call is: !insertmacro GetFileExtProg $PDFVPath $PDFProg ".pdf" regards Uwe
Re: [LyXWin Installer] small version updated again
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes: Uwe> - If Acrobat/Acrored if found by LyX's configure script the Uwe> following entry is made to lyxrc.defaults: Uwe> \viewer pdf "acrobat" Isn't there a way in NSIS to check whether the pdf extension is registered? There is no reason to force the user to use acrobat if he prefers gsview or whatever. So what would be nice for all viewers is to check whether the extension is registered and in this case to use "start" with proper options as a viewers. Actually, we should add code in LyX itself to use the built-in viewers if they exist. I am not sure it would be so difficult to do. JMarc
RE: [LyXWin Installer] small version updated again
>- I need the registry path for Acroread. If anybody has installed it, please send it to me. I started working on this. My thoughts was to extract the pdf viewer associated with pdf's on the windows machine. With: Function getFileAssociation Exch $R1 Push $R0 ReadRegStr $R0 HKCR "$R1" "" ReadRegStr $R1 HKCR "$R0\shell\open\command" "" Pop $R0 Exch $R1 FunctionEnd And then using: Push ".pdf" Call getFileAssociation pop $acrobat_path -- The result is: "C:\Program Files\acrobat\acrord32.exe" "%1" So you'll still need to do some parsing, but this will cater for acrobat and other pdf viewers. So maybe in lyxrc.defaults add the line \viewer pdf "acrord32" ?? Regards, Johann
Re: [LyXWin Installer] small version updated again
Uwe Stöhr wrote: I wrote: But we need also the entries \viewer pdf2 "acrobat" \viewer pdf3 "acrobat" Simple fix attached, please apply. I've a better solution. The entries should only be made if pdflatex and dvipdfm does really exists. The attached patch works for me. This is overkill and anyway you should be hacking the .m4 file. If the converters to pdf2, pdf3 don't exist then it doesn't matter how the viewer is defined. It just won't be used. Angus, two questions about the configure file: - What script language is it? sh. But it is generated from configure.m4: $ m4 configure.m4 > configure - Where can I find it in the CVS reposotory? I find only the file configure.mt4 nut this one is different from the one shipped with LyxWin pre 136. You need to look at BRANCH_1_3_X again... Angus thanks and regards Uwe
Re: [LyXWin Installer] small version updated again
I wrote: But we need also the entries \viewer pdf2 "acrobat" \viewer pdf3 "acrobat" Simple fix attached, please apply. I've a better solution. The entries should only be made if pdflatex and dvipdfm does really exists. The attached patch works for me. Angus, two questions about the configure file: - What script language is it? - Where can I find it in the CVS reposotory? I find only the file configure.mt4 nut this one is different from the one shipped with LyxWin pre 136. thanks and regards Uwe --- configureOld Wed Jun 15 03:35:49 2005 +++ configure Wed Jun 15 04:11:22 2005 @@ -116,6 +116,43 @@ Searching some useful programs + +# Search for a program to preview pdf +echo $ac_n "checking for a PDF preview""... $ac_c" +echo "$ac_t""(acrobat acrord32 gsview32 acroread gv ghostview xpdf)" +PDF_VIEWER= +for ac_prog in acrobat acrord32 gsview32 acroread gv ghostview xpdf +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog ; ac_word=$2 +if test -n "$ac_word"; then + echo $ac_n "+checking for \"$ac_word\"""... $ac_c" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + for ac_dir in $PATH; do +test -z "$ac_dir" && ac_dir=. +if test -x $ac_dir/$ac_word; then + PDF_VIEWER="$ac_prog" + break +fi + done + IFS="$ac_save_ifs" + + if test -n "$PDF_VIEWER"; then +ac_result=yes + + else +ac_result=no + fi + echo "$ac_t""$ac_result" + test -n "$PDF_VIEWER" && break +fi +done + +if test -z "$PDF_VIEWER" ; then + PDF_VIEWER=none +fi + + # Search LaTeX2e echo $ac_n "checking for a LaTeX2e program""... $ac_c" echo "$ac_t""(latex latex2e)" @@ -179,6 +216,7 @@ echo $ac_n "checking for the pdflatex program""... $ac_c" echo "$ac_t""(pdflatex)" latex_to_pdf= +latexpdf= for ac_prog in pdflatex do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -197,7 +235,7 @@ if test -n "$latex_to_pdf"; then ac_result=yes - +latexpdf="$PDF_VIEWER" else ac_result=no fi @@ -480,41 +518,6 @@ esac EPS_VIEWER=$GHOSTVIEW -# Search for a program to preview pdf -echo $ac_n "checking for a PDF preview""... $ac_c" -echo "$ac_t""(acrobat acrord32 gsview32 acroread gv ghostview xpdf)" -PDF_VIEWER= -for ac_prog in acrobat acrord32 gsview32 acroread gv ghostview xpdf -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog ; ac_word=$2 -if test -n "$ac_word"; then - echo $ac_n "+checking for \"$ac_word\"""... $ac_c" - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - for ac_dir in $PATH; do -test -z "$ac_dir" && ac_dir=. -if test -x $ac_dir/$ac_word; then - PDF_VIEWER="$ac_prog" - break -fi - done - IFS="$ac_save_ifs" - - if test -n "$PDF_VIEWER"; then -ac_result=yes - - else -ac_result=no - fi - echo "$ac_t""$ac_result" - test -n "$PDF_VIEWER" && break -fi -done - -if test -z "$PDF_VIEWER" ; then - PDF_VIEWER=none -fi - # Search something to preview dvi echo $ac_n "checking for a DVI previewer""... $ac_c" @@ -665,6 +668,7 @@ echo $ac_n "checking for a DVI to PDF converter""... $ac_c" echo "$ac_t""(dvipdfm)" dvi_to_pdf_command= +dvipdf= for ac_prog in dvipdfm do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -683,7 +687,7 @@ if test -n "$dvi_to_pdf_command"; then ac_result=yes - +dvipdf="$PDF_VIEWER" else ac_result=no fi @@ -1346,6 +1350,8 @@ \\viewer dvi "$DVI_VIEWER" \\viewer html "$HTML_VIEWER" \\viewer pdf "$PDF_VIEWER" +\\viewer pdf2 "$latexpdf" +\\viewer pdf3 "$dvipdf" \\viewer ps "$PS_VIEWER" \\viewer eps "$EPS_VIEWER"
Re: [LyXWin Installer] small version updated again
Uwe Stöhr wrote: Hello LyXers, again an update to the installer: http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v14-2.exe Angus Leeming wrote: In other words, I think that the installer should lead the user through the installation. It shouldn't "just do it" for him. That's why I think a summary page at the beginning listing everything that LyX has found (or not found) that it can use would be a good thing. It is implemented now. Please have a look if you could agree with this solution. But there are more improvements: Wooo! Slow downn! I can't keep up ;-) - The installer comes now with the actual documentation files (Argh, I just see that I shipped the wrong files for LateXConfig.lyx) - The installer searches now for Acrobat and add its path to lyxrc.default so that LyX can find it while configuring. Good. - Now also LyX's configuration files are deleted while uninstalling LyX. The files are under C:\Documents and Settings\name of current user\Application Data\ Be careful here. Don't delete this unless the user explicitly asks you to. A MessageBox? I've been merging your UI language stuff and Helge's suggestion to use a lyx.bat file. A couple of minor issues (I hope) still to deal with but I hope to commit it to the CVS repository v. soon. Remaining issues: - I need the registry path for Acroread. If anybody has installed it, please send it to me. Under HKLM I have "Software\Adobe\Acrobat\Exe" which stores "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" so perhaps you can use the same test for both? \viewer pdf "acrobat" But we need also the entries \viewer pdf2 "acrobat" \viewer pdf3 "acrobat" Simple fix attached, please apply. Will do. Angus