red / red

Red is a next-generation programming language strongly inspired by Rebol, but with a broader field of usage thanks to its native-code compiler, from system programming to high-level scripting and cross-platform reactive GUI, while providing modern support for concurrency, all in a zero-install, zero-config, single ~1MB file!

Home Page:http://red-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WindowsXP compile target does not work for any source: error in draw-gdi.reds, in function: exec/gui/draw-begin

wesinator opened this issue · comments

commented

Describe the bug
The WindowsXP target of redc does not work for any source.

any source file will give this error:

Target: WindowsXP
 
Compiling to native code...
*** Compilation Error: left and right argument must be of same type for: <>
*** left: float32!, right: integer!
*** in file: %/C/<winpath>/<user>/<working_dir>/modules/view/backends/windows/draw-gdi.reds
*** in function: exec/gui/draw-begin
*** at line: 651
*** near: [<> dpi-factor 100 [
        ratio: (as float32! dpi-factor) / (as float32! 100.0)
        GdipScaleWorldTransform graphics ratio ratio 0
        ctx/scale-ratio: ratio
    ]]

To reproduce
Steps to reproduce the behavior:

  1. calculator example (this is the example I used but the error is the same for any source file).
  2. compile with redc -r -t WindowsXP calculator.red

Expected behavior
Compiles an XP compatible binary in the view mode, that does not use the unsupported Windows GetGestureInfo API.

Screenshots
redc_windowsxp_mode_err

Platform version
Tested on Windows 10 and Windows XP compilation hosts.

red-toolchain-21feb24-58b8f8937

Also, the red REPL seems to be compiled for the Windows target that uses Windows 7+ gesture APIs, which means the binary doesn't load even though it technically would work on XP:
redview_xp_getgestureinfo

it would make more sense for the red REPL to be compiled with a WindowsXP target (once this bug is fixed), given that the system is already 32-bit only anyway.