Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows XP support is broken #51

Closed
VisualKei opened this issue Mar 31, 2022 · 18 comments
Closed

Windows XP support is broken #51

VisualKei opened this issue Mar 31, 2022 · 18 comments
Labels
backlog This isn't a priority add/fix at this time bug Something isn't working help wanted Extra attention is needed question Further information is requested

Comments

@VisualKei
Copy link

I can imagine it's odd to complain about this outdated OS, but such a lightweight image viewer is particularly useful on an old and weak machine not worth upgrading. And you still declare the compatibility with XP SP3, so there are 2 problems here:

  1. The Min Windows Version of .exe & .dlls is set to 6.0 and not to 5.1 as for XP, so the program doesn't even start.
  2. The webp.dll links to 4 functions in kernel32.dll that are absent in XP. Dependancy Walker mentions InitializeConditionVariable(), InitializeCriticalSectionEx(), SleepConditionVariableCS() and WakeConditionVariable(). Other files are OK.

I hope it won't be difficult to fix this, so please can you do it.

@sylikc
Copy link
Owner

sylikc commented Mar 31, 2022

Thanks for the catch.

I stopped having a real XP box to test on for years... I think the easiest fix is unfortunately to change the documentation to drop the support.

I can go fire up an old VM and figure out which was the last version which did have support and change the documentation to reflect that.

Unfortunately, moving forward, I can't really guarantee support on such and old OS. webp.dll hasn't really been changed in awhile, so I would have to guess XP support ended awhile back.

@VisualKei
Copy link
Author

The last version that worked was David's 1.0.37. I think that the easiest thing you can do is to configure your Visual Studio compilation to target Win5.1 so that the program could at least start up. The WebP support isn't so important anyway, but even that is possible: there exists a completely fixed version based on your 1.0.39.1 that works fine even after replacing all dlls with yours targeted at Win6.0 (though I didn't check the webp support proper). I stumbled upon it on a certain forum and I don't know who's the author and how exactly did he fixed the webp.dll, but I will ask the uploader and try to find this out and maybe even invite that person to collaborate.

@sylikc
Copy link
Owner

sylikc commented Apr 1, 2022

Ok. Let me try those suggestions and do a little research on whether changing targetting has other side effects. If anything, I can always just make a separate XP build or something...

Yeah if you can point me to the forum or have that person come collaborate, I'm all ears.

@sylikc sylikc added bug Something isn't working question Further information is requested labels Apr 1, 2022
@sylikc
Copy link
Owner

sylikc commented Apr 1, 2022

Out of curiosity, does the WiX installer work on XP?

@sylikc
Copy link
Owner

sylikc commented Apr 1, 2022

I think that the easiest thing you can do is to configure your Visual Studio compilation to target Win5.1 so that the program could at least start up.

I have some bad news... so I read about targeting, and (from Configuring Programs for Windows XP):

The toolset supplied in Visual Studio 2019 and later doesn't include support for creating code for Windows XP. Support for Windows XP development is available by using the Visual Studio 2017 v141_xp toolset. You can install the v141_xp toolset as an individual component option in the Visual Studio Installer.

@sylikc
Copy link
Owner

sylikc commented Apr 1, 2022

I just installed VS 2017, and I'll be looking into XP testing... give me a bit of time to set up the environment and do some additional testing

@tumagonx
Copy link

tumagonx commented Jan 8, 2023

I used to built jpegview.exe linked to webp/wic/etc loaders dll statically and linked to actual image codec dll dynamically so I have:

jpegview.exe
|
|-- libwebp.dll
|-- libjpeg.dll
|-- libpng.dll
|-- libjxl.dll

This way user could update codec dll separately, and give freedom to users to use any compiler for codec (since all image codec except openexr using C-API interface), e.g GCC which through its pthread emulation will easily fixed those webp nt6 threadingapi issues.

@tumagonx
Copy link

tumagonx commented Jan 8, 2023

oh isn't pthread-win32 project compatible with Visualstudio?

@tumagonx
Copy link

tumagonx commented Jan 8, 2023

or just dont use threads, and everyone happy lol
WEBP_USE_THREAD

sylikc added a commit that referenced this issue Jan 8, 2023
…ut it won't build presumably because the lib files were built with 2019.

LINK : fatal error C1900: Il mismatch between 'P1' version '20210202' and 'P2' version '20180423'

TODO for another time, to make a 2017 release (to attempt XP compatibility), see #51
@sylikc
Copy link
Owner

sylikc commented Jan 8, 2023

I just tried building in VS2017... error linking, likely because the LIB files it's linking against are built from VS2019. I don't have the bandwidth for this at the moment...

if @tumagonx or someone else can try rebuilding all the libraries with VS2017 (have fun, I put some build instructions recently for JXL, but the others are pretty straightforward) and see if the project builds that'd be great!

@sylikc sylikc added the help wanted Extra attention is needed label Jan 8, 2023
@tumagonx
Copy link

tumagonx commented Jan 8, 2023

ThinPC - Microsoft Virtual PC 2007

I rolled up my VPC2007 to run Windows7 and run VS2017
I try to do your way (loader as dll and Webp as static lib) but I cant complete the build because one of your libs is made with vs2019(i think)? linker complain version mismatch

so I can only provide this webp 1.3.0rc build without threads support, but version 1.3.0 ask libsharpyuv see screenshot.

basically build webp through cmake by adding -DWEBP_USE_THREAD=OFF

Do you want my webp build or you want try it yourself?

@tumagonx
Copy link

tumagonx commented Jan 8, 2023

are you still plan to support XP though? I want to do full rebuild the libs but I'm more customised with GCC than vs, my way to this were mixing jpegview.exe with gcc build image codec dlls.

@tumagonx
Copy link

tumagonx commented Jan 8, 2023

webpnothreads.docx
in case OP need the webp.dll (rename to .docx to .7z)

@sylikc
Copy link
Owner

sylikc commented Jan 8, 2023

are you still plan to support XP though? I want to do full rebuild the libs but I'm more customised with GCC than vs, my way to this were mixing jpegview.exe with gcc build image codec dlls.

I don't know lol. I loved XP at one point, but I haven't ran an XP machine for probably almost 10 years. I wouldn't mind just dropping support for it. XP support is low-priority for JPEGView imho.

There's other higher priority issues like INI, translations, KeyMap and which are much more important. I wouldn't spend much time doing the building of the libraries for XP 😅.

@tumagonx
Copy link

tumagonx commented Jan 8, 2023

that's fine if you drop it, XP diehards are content being self-supported. no problem :)

@sylikc sylikc added the backlog This isn't a priority add/fix at this time label Jan 19, 2023
sylikc added a commit that referenced this issue Feb 1, 2023
…it hasn't worked due to a WinSDK problem anyways #51
@sylikc sylikc closed this as completed in 29fc121 Feb 2, 2023
@sylikc
Copy link
Owner

sylikc commented Feb 2, 2023

@VisualKei I have gotten a build that works with XP. Can you test to make sure this is what you expect?

This will track the latest version, just without the aPNG/JXL/HEIC format support.

JPEGView-dev-TestRelease-WinXP.zip

This is a test release that currently tracks with HEAD code on master. It's a pre-release, but if it checks out, I'll make these custom releases with each formal release.

@sylikc sylikc reopened this Feb 2, 2023
@tumagonx
Copy link

tumagonx commented Feb 4, 2023

works great for me, thanks!

@sylikc
Copy link
Owner

sylikc commented Feb 4, 2023

cool. Alright let me know if there are any more problems, I'll make this a regular release.

Though, since it doesn't have any new format support, I'll only make releases if there's some other main program changes, like the keymap refactor #127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog This isn't a priority add/fix at this time bug Something isn't working help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants