On Tue, Jun 19, 2012 at 12:47 PM, Prashant Bafna <appu.bafna@gmail.com> wrote:
> On Tue, Jun 19, 2012 at 11:29 AM, Hubert Figuière <hfiguiere@teaser.fr> wrote:
>>
>> On 18/06/12 10:42 PM, cvs@abisource.com wrote:
>>>
>>> Author: bafna_p
>>> Date: 2012-06-19 07:42:38 +0200 (Tue, 19 Jun 2012)
>>> New Revision: 31400
>>>
>>> Modified:
>>> abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp
>>> Log:
>>> adding the path of xsltml for windows as well
>>>
>>> Modified: abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp
>>> ===================================================================
>>> --- abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp 2012-06-18 19:25:13 UTC (rev 31399)
>>> +++ abiword/branches/gsoc2012math/plugins/latex/xp/ie_exp_LaTeX.cpp 2012-06-19 05:42:38 UTC (rev 31400)
>>> @@ -1599,9 +1599,14 @@
>>> return false;
>>> if (!cur)
>>> {
>>> - UT_UTF8String path(XAP_App::getApp()->getAbiSuiteLibDir());
>>> - path += "/xsltml/mmltex.xsl";
>>> -
>>> + #ifdef WIN32
>>> + UT_UTF8String path("../../plugins/latex/xsltml/mmltex.xsl");
>>> + // changed the path string as the below works for linux, however in windows it goes to msvc2008/Debug/xsltml which is wrong
>>> + #else
>>> + UT_UTF8String path(XAP_App::getApp()->getAbiSuiteLibDir());
>>> + path += "/xsltml/mmltex.xsl";
>>> + #endif
>>> +
>>
>> This is wrong too.
>>
>> Because you have absolutely no guarantee that the current directory will
>> be what it is.
>>
>> If XAP_App::getApp()->getAbiSuiteLibDir() does not return the correct
>> value then it is a bug.
>> Note that I don't know the implementation on Windows.
>>
>> Hub
>>
>
> Oh ok I got the error, However it is not a bug of
> XAP_App::getApp()->getAbiSuiteLibDir() because in msvc it returns
> msvc2008/Debug which is correct LibDir for a Windows build.
>
> What I think we should do is add the folder xsltml to
> msvc2008/Prefix/Share and create a Post build event for the Latex
> Plugin to copy this folder into the OutDir. (suggested PATCH attached)
>
> I see that this is the way it has been done for other things as well
> for e.g. the mathview plugin copies the gtkmathview XML files from
> msvc2008/Prefix/Share/gtkmathview to msvc2008/debug/math as a post
> build event.
>
> with this the xsltml will be in the debug folder and
>
> UT_UTF8String path(XAP_App::getApp()->getAbiSuiteLibDir());
> path += "/xsltml/mmltex.xsl";
>
> will work in windows as well.
>
Fixed in Revision 31408, the xsltml is now copied from
plugins/latex/xsltml to the Outdir (debug/release) as a post build
event.
Cheers !
Prashant
Received on Thu Jun 21 14:55:44 2012
This archive was generated by hypermail 2.1.8 : Thu Jun 21 2012 - 14:55:44 CEST