alessivs / supermemo-wine

Project to make SuperMemo for Windows editions runnable with Wine
62 stars 5 forks source link

HTTPS image issue with SuperMemo 18 #29

Open cutie opened 2 years ago

cutie commented 2 years ago

I'm having issues getting https images to display and import properly in SuperMemo 18 and I'm a bit stumped. I do the following:

$ rm -fr /home/user/.wine/ /home/user/.local/share/wineprefixes/

$ wget https://archive.archlinux.org/packages/w/wine/wine-5.2-1-x86_64.pkg.tar.zst
$ wget https://archive.archlinux.org/packages/w/wine-gecko/wine-gecko-2.47.1-1-x86_64.pkg.tar.xz
$ wget https://archive.archlinux.org/packages/w/wine-mono/wine-mono-4.9.4-1-any.pkg.tar.xz
$ sudo pacman -U wine-5.2-1-x86_64.pkg.tar.zst wine-gecko-2.47.1-1-x86_64.pkg.tar.xz wine-mono-4.9.4-1-any.pkg.tar.xz

$ env WINEARCH=win32 sh winetricks arch=32 prefix=sm18
$ cp sm18inst.exe /home/user/.cache/winetricks/supermemo18/sm18inst.exe
$ sh winetricks prefix=sm18 supermemo18.verb

No obvious errors. But now, running $ env WINEPREFIX=/home/user/.local/share/wineprefixes/sm18 wine ~/.local/share/wineprefixes/sm18/drive_c/SuperMemo/sm18.exe gives me a version of SuperMemo 18 that does not show https images in HTML components. Editing the https <img> tag to http (where available) works correctly, so it must be the issue.

I attempt the fix here to patch in a verb to winetricks to add support for TLS 1.1/1.2 to IE8. I followed these steps and attempted to mess around with enabling Mixed content and various other things in the IE8 security settings to no avail; images will not load.

Any advice on how to proceed would be appreciated.

$ uname -rom
5.10.60-1-MANJARO x86_64 GNU/Linux
$ wine --version
wine-5.2
$ winetricks --version
20210206-next - sha256sum: 354ea7faad1b0e77d5e96453c263a1ab23ab502c87ae2aee60a82ec820d0058e
alessivs commented 2 years ago

After applying the patch and installing the verb ie8_tls12 you should be able to navigate to a https site such as Wikipedia in IE8. Example:

  1. WINEPREFIX=~/.local/share/wineprefixes/sm18 wine "C:\\Program Files\\Internet Explorer\\iexplore.exe"
  2. Visit https://en.wikipedia.org

If you cannot, then you have to enable TLS 1.1 and TLS 1.2 in Tools : Internet Options : Advanced : Security.

If you can, it is possible that there's a disagreement between IE's cache and the MSHTML component. See if the following setting is of any help:

  1. Clear temporary internet files: Tools : Internet Options : General : Browsing history : Delete. You can verify against c:\Users\you\Local Settings\Temporary Internet Files\Content.IE5\* (which you can also empty manually)
  2. Tell IE to always check for the original resource in Tools : Internet Options : General : Browsing history : Settings image
  3. Start SuperMemo and load the problematic component that grabs an image over https.

Verify that it is indeed grabbing from https by looking at the component's HTML source and that it is not being read from the collection's temp\ directory.

With this new setting, under normal operation, sucessful retrievals should load the image into the component, and each time, a new cached file should be created under Temporary Internet Files\Content.IE5\.