Test of "set renderoptions=type:directx" fails on Windows XP

21 views
Skip to first unread message

Michael Soyka

unread,
Dec 26, 2019, 9:47:23 PM12/26/19
to vim_dev
Vim developers,

When the DIRECTX feature is enabled at compilation, the setting of option 'renderoptions' to "type:directx" causes gvim to load "dwrite.dll" which is not available from Microsoft for Windows XP systems.  The load attempt generates error E474 which causes the test script "opt_test.vim" to abort which in turn prevents the script from running the remaining tests (the file "opt_test.vim" is auto-generated by Make_ming.mak). 

As I see it, there are two options: either do not test 'renderoptions' on Windows XP or surround the "set" commands with try/catch/endtry and ignore error E474 on Windows XP.  In either case, the test must know it is running on Windows XP and I don't think that is easy to determine in a vim script (that's not say there aren't ways).  In addition, since the test file "opt_test.vim" is auto-generated, option 'renderoptions' would have to be special-cased in "gen_opt_test.vim".

I don't know how the community prefers to address this and so I am just reporting the problem and not proposing a patch.  However, I am willing to work on this if a plan-of-attack can be agreed-upon. 

-mike

Bram Moolenaar

unread,
Dec 27, 2019, 7:50:18 AM12/27/19
to vim...@googlegroups.com, Michael Soyka
We do have the platform information internally. I suppose it can be
useful to know the Windows version for several things. Let me add the
windowsversion() function and use it in the options test. Please verify
this works on Windows XP.

--
[clop clop]
MORTICIAN: Who's that then?
CUSTOMER: I don't know.
MORTICIAN: Must be a king.
CUSTOMER: Why?
MORTICIAN: He hasn't got shit all over him.
The Quest for the Holy Grail (Monty Python)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Michael Soyka

unread,
Dec 27, 2019, 2:11:30 PM12/27/19
to vim_dev


On Friday, December 27, 2019 at 7:50:18 AM UTC-5, Bram Moolenaar wrote:

Michael Soyka wrote:

> When the DIRECTX feature is enabled at compilation, the setting of option
> 'renderoptions' to "type:directx" causes gvim to load "dwrite.dll" which is
> not available from Microsoft for Windows XP systems.  The load attempt
> generates error E474 which causes the test script "opt_test.vim" to abort
> which in turn prevents the script from running the remaining tests (the
> file "opt_test.vim" is auto-generated by Make_ming.mak).  
>
> As I see it, there are two options: either do not test 'renderoptions' on
> Windows XP or surround the "set" commands with try/catch/endtry and ignore
> error E474 on Windows XP.  In either case, the test must know it is running
> on Windows XP and I don't think that is easy to determine in a vim script
> (that's not say there aren't ways).  In addition, since the test file
> "opt_test.vim" is auto-generated, option 'renderoptions' would have to be
> special-cased in "gen_opt_test.vim".
>
> I don't know how the community prefers to address this and so I am just
> reporting the problem and not proposing a patch.  However, I am willing to
> work on this if a plan-of-attack can be agreed-upon.  

We do have the platform information internally.  I suppose it can be
useful to know the Windows version for several things.  Let me add the
windowsversion() function and use it in the options test.  Please verify
this works on Windows XP.

I certainly will.  

Michael Soyka

unread,
Dec 27, 2019, 3:03:36 PM12/27/19
to vim_dev


On Friday, December 27, 2019 at 7:50:18 AM UTC-5, Bram Moolenaar wrote:

Michael Soyka wrote:

> When the DIRECTX feature is enabled at compilation, the setting of option
> 'renderoptions' to "type:directx" causes gvim to load "dwrite.dll" which is
> not available from Microsoft for Windows XP systems.  The load attempt
> generates error E474 which causes the test script "opt_test.vim" to abort
> which in turn prevents the script from running the remaining tests (the
> file "opt_test.vim" is auto-generated by Make_ming.mak).  
>
> As I see it, there are two options: either do not test 'renderoptions' on
> Windows XP or surround the "set" commands with try/catch/endtry and ignore
> error E474 on Windows XP.  In either case, the test must know it is running
> on Windows XP and I don't think that is easy to determine in a vim script
> (that's not say there aren't ways).  In addition, since the test file
> "opt_test.vim" is auto-generated, option 'renderoptions' would have to be
> special-cased in "gen_opt_test.vim".
>
> I don't know how the community prefers to address this and so I am just
> reporting the problem and not proposing a patch.  However, I am willing to
> work on this if a plan-of-attack can be agreed-upon.  

We do have the platform information internally.  I suppose it can be
useful to know the Windows version for several things.  Let me add the
windowsversion() function and use it in the options test.  Please verify
this works on Windows XP.

I tried patch v8.2.0047 and the option test now passes.  
Reply all
Reply to author
Forward
0 new messages