I have modified the testRTikZDevice.R so that it will also run on Windows and have also created run-tests.bat which is the Windows counterpart to run-tests.sh except the dangerous parts of run-tests have been commented out. (run-tests.sh automatically wiped out the contents of the output folder and it automatically rebuilt and installed the package whereas run-tests.bat gives messages asking the user to do those.)<br>
<br>The changes to testRTikZDevice.R are that the R_PDFLATEXCMD environment variable now defaults to "pdflatex" if its not otherwise specified and the new GSCMD environment variable defaults to "gswin32c.exe" on Windows and "gs" for other platforms. Also the use of sink(tempfile()), as you suggested below, is incorporated.<br>
<br>Will send these two files offline.<br><br><div class="gmail_quote">On Sat, Dec 5, 2009 at 1:10 PM, Cameron Bracken <span dir="ltr"><<a href="mailto:cameron.bracken@gmail.com" target="_blank">cameron.bracken@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I would have been surprised if there were not issues on windows. We<br>
developed the tests for use in development (hence the reason they are<br>
in inst/tests and not the standard tests/ location) and so did not<br>
really have cross platform compatibility in mind. Good to know the<br>
tests run successfully on windows.<br>
<br>
The reference to /dev/null is just there to suppress the output of the<br>
packages on loading and so does not affect the test at all. A similar<br>
way would be<br>
<br>
sink(tempfile())<br>
<load packages><br>
sink()<br>
<br>
-Cameron<br>
<br>
<br>
<br>
On Sat, Dec 5, 2009 at 10:18 AM, Gabor Grothendieck<br>
<div><div></div><div><<a href="mailto:ggrothendieck@gmail.com" target="_blank">ggrothendieck@gmail.com</a>> wrote:<br>
> You can ignore the problem I previously reported. I have it mostly working<br>
> now. In MiKTeX 2.8 there can be a local repository for all users and per<br>
> user and it was updating one but using the other. I think I have it<br>
> straight now.<br>
><br>
> There are a few problems with running the test that seem to be Windows<br>
> related:<br>
><br>
> 1. the testRTikZDevice.R script uses an environment variable R_PDFLATEXCMD<br>
> but that was not set so I set it manually like this:<br>
><br>
> set R_PDFLATEXCMD=pdflatex<br>
> Rscript testRTikZDevice.R --output=output<br>
><br>
> The script should supply a default of "pdflatex" so that this is not<br>
> necessary..<br>
><br>
> 2. Also in test 19 it stops because of a reference to /dev/null which is not<br>
> present on Windows. Note that in the case of Windows NUL is the<br>
> corresponding filename. Or, if that test is not important you could just<br>
> eliminate it.<br>
><br>
> On Sat, Dec 5, 2009 at 10:38 AM, Gabor Grothendieck<br>
> <<a href="mailto:ggrothendieck@gmail.com" target="_blank">ggrothendieck@gmail.com</a>> wrote:<br>
>><br>
>> Thanks. I have upgraded to MiKTeX 2.8 but it still fails. See below and<br>
>> attached test.log. If I look in the MiKTeX package manager (mpm from<br>
>> commandn line) I see a pgf latex package was installed today so I presume<br>
>> its the latest. I do not see a separate tikz latex package so I presume its<br>
>> part of pgf.<br>
>><br>
>> C:\tmp2\tikzDevice\inst\tests>Rscript testRTikZDevice.R --output=output ><br>
>> test.log<br>
>> Loading required package: filehash<br>
>> Loading required package: methods<br>
>> filehash: Simple key-value database (2.0-1 2008-12-19)<br>
>> tikzDevice: A Device for R Graphics Output in PGF/TikZ Format (v0.4.8)<br>
>> Checking for a LaTeX compiler...<br>
>><br>
>><br>
>> A working LaTeX compiler was found in:<br>
>> The PATH using the command latex<br>
>><br>
>> Global option tikzLatex set to:<br>
>> C:\PROGRA~1\MIKTEX~1.8\miktex\bin\latex.exe<br>
>><br>
>> MiKTeX-pdfTeX 2.8.3563 (1.40.10) (MiKTeX 2.8)<br>
>> Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh<br>
>> TeX is a trademark of the American Mathematical Society.<br>
>><br>
>><br>
>> Error in getMetricsFromLatex(TeXMetrics) :<br>
>> ******** There was a problem calculating string metrics,<br>
>> ******** likely there was a problem with your custom packages.<br>
>> ******** See the LaTeX log file above for details.<br>
>> Calls: system.time ... localTitle -> title -> <Anonymous> -><br>
>> getMetricsFromLatex<br>
>><br>
>> Execution halted<br>
>><br>
>> On Fri, Dec 4, 2009 at 6:23 PM, Cameron Bracken<br>
>> <<a href="mailto:cameron.bracken@gmail.com" target="_blank">cameron.bracken@gmail.com</a>> wrote:<br>
>>><br>
>>> It seems like you are using an outdated version of pgf/tikz:<br>
>>><br>
>>> Package: tikz 2007/06/07 v1.18 (rcs-revision 1.87)<br>
>>><br>
>>> There must be something in one of the tests that depends on version<br>
>>> 2.00. This is likely causing the error. It is really worth upgrading<br>
>>> (<a href="http://sourceforge.net/projects/pgf/" target="_blank">http://sourceforge.net/projects/pgf/</a>). If I'm not mistaken this<br>
>>> version is included in MikTeX 2.8.<br>
>>><br>
>>> It is not listed currently as a SystemRequirement but it really should<br>
>>> be.<br>
>>><br>
>>> -Cameron<br>
>>><br>
>>><br>
>>><br>
>>> On Fri, Dec 4, 2009 at 4:03 PM, Gabor Grothendieck<br>
>>> <<a href="mailto:ggrothendieck@gmail.com" target="_blank">ggrothendieck@gmail.com</a>> wrote:<br>
>>> > I commented out the source statement but am still getting an error on<br>
>>> > this.<br>
>>> > Here is the output and test.log is attached.<br>
>>> ><br>
>>> > C:\tmp2\tikzDevice\inst\tests>findstr source testRTikZDevice.R<br>
>>> > # source('testXeLaTeX.R')<br>
>>> ><br>
>>> > C:\tmp2\tikzDevice\inst\tests>Rscript testRTikZDevice.R --output=output<br>
>>> > ><br>
>>> > test.l<br>
>>> > og<br>
>>> > Loading required package: filehash<br>
>>> > Loading required package: methods<br>
>>> > filehash: Simple key-value database (2.0-1 2008-12-19)<br>
>>> > tikzDevice: A Device for R Graphics Output in PGF/TikZ Format (v0.4.8)<br>
>>> > Checking for a LaTeX compiler...<br>
>>> ><br>
>>> ><br>
>>> > A working LaTeX compiler was found in:<br>
>>> > The PATH using the command latex<br>
>>> ><br>
>>> > Global option tikzLatex set to:<br>
>>> > C:\PROGRA~1\MIKTEX~1.7\miktex\bin\latex.exe<br>
>>> ><br>
>>> > MiKTeX-pdfTeX 2.7.2808 (1.40.4) (MiKTeX 2.7)<br>
>>> > Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh<br>
>>> > TeX is a trademark of the American Mathematical Society.<br>
>>> ><br>
>>> ><br>
>>> > Error in getMetricsFromLatex(TeXMetrics) :<br>
>>> > ******** There was a problem calculating string metrics,<br>
>>> > ******** likely there was a problem with your custom packages.<br>
>>> > ******** See the LaTeX log file above for details.<br>
>>> > Calls: system.time ... localTitle -> title -> <Anonymous> -><br>
>>> > getMetricsFromLatex<br>
>>> ><br>
>>> > Execution halted<br>
>><br>
><br>
><br>
</div></div></blockquote></div><br>