treeform / puppy

Puppy fetches via HTTP and HTTPS
MIT License
184 stars 27 forks source link

on Windows OS lower then 8.1 puppy is not working #70

Closed veksha closed 2 years ago

veksha commented 2 years ago

This is my workaround. I modified platform.nim and windefs.nim

#windefs.nim
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY* = 0
#platform.nim
import osinfo\win
let osvi = getVersionInfo()
let win81andup = osvi.majorVersion>6 or (osvi.majorVersion==6 and osvi.minorVersion>=3)

...
hSession = WinHttpOpen(
      cast[ptr WCHAR](wideUserAgent[0].unsafeAddr),
      if win81andup: WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY else: WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,
      nil,
      nil,
      0
    )
...

of course osinfo must be installed with nimble install osinfo

guzba commented 2 years ago

Hello, thanks for reporting this. I am unable to test to confirm this works, nor really be sure Puppy works on pre-Windows 10 at all. Given everything pre-Windows 10 is not supported even by Microsoft, I'm not eager to take on responsibility for Puppy working on something I cannot test or then need to worry about over time. If you need this, maintaining a fork of Puppy for old versions of Windows is probably easiest since you can be sure it works for what you need but don't need to worry about others. We'll see what @treeform says.

veksha commented 2 years ago

be sure it works for what you need but don't need to worry about others. We'll see what @treeform says.

just letting you guys know. this probably is not needed for 99.5% of people :-) but I had a few bug reports from people.saying that my software is not working on windows 7. so some dinosaurs still use it on old laptops for listening to music in their garages.

guzba commented 2 years ago

Instead of checking version codes which look like their own form of arcane knowledge (>= 6.3 == 8.1?), we could just try and then fall back on error as #71

veksha commented 2 years ago

Instead of checking version codes which look like their own form of arcane knowledge (>= 6.3 == 8.1?), we could just try and then fall back on error as #71

or just let user specify it as optional parameter to a procedure. it will be more simple and clean.

guzba commented 2 years ago

No, that doesn't make sense on Linux or Mac. I strongly oppose bringing anything platform specific into the cross-platform API especially something for vintage Windows like this.

guzba commented 2 years ago

We talked about this and given we do not know the differences between these settings and cannot test them we're not making any changes now. Basically https://github.com/treeform/puppy/issues/70#issuecomment-1094124598