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

Not working on Windows 7. Support? #278

Open
5 tasks done
60fpshacksrock opened this issue Sep 19, 2024 · 4 comments
Open
5 tasks done

Not working on Windows 7. Support? #278

60fpshacksrock opened this issue Sep 19, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@60fpshacksrock
Copy link

60fpshacksrock commented Sep 19, 2024

Before opening this issue, I ensure that...

  • I have read the FAQ and confirmed my issue is not mentioned in it.
  • I have checked both open and closed issues and confirmed this bug has not already been reported.
  • I am not asking for tech support (e.g. game closing on startup, error when trying to build, etc).
  • I am not asking for modding support or reporting a bug in a specific mod; this bug either occurs without mods enabled or is directly related to the mod loader.
  • This bug is not related to any unofficial fork/port of the decompilation, and any issues with those should be kept in the appropriate repository.

Expected Behavior

Work

Actual Behavior

It will not work due to needing XInput 1.4 and XAudio 2.9

Steps to Reproduce

  1. Try to run exe
  2. Warns about required dll's, which are not available on Windows 7
  3. Stops execution and exits

Screenshots

No response

Log File

No response

Decompilation Version

1.1.0 (https://github.com/RSDKModding/Sonic-Mania-Decompilation/releases/download/v1.1.0/mania-windows-x64.zip)

Game Version

1.04 / 1.05 (Mania Plus release)

Engine Revision

REV0U (RSDKv5U)

Platform

Windows

Additional Comments

No response

@60fpshacksrock 60fpshacksrock added the bug Something isn't working label Sep 19, 2024
@Mefiresu Mefiresu transferred this issue from RSDKModding/Sonic-Mania-Decompilation Sep 19, 2024
@Mefiresu
Copy link
Member

The releases and github actions artifacts are built with the Windows 10 SDK, which dynamically links with these specific versions that are not present on Windows 7.
There's no easy workaround for now, you would need to manually build with Windows 7 SDK (+ potentially fix compilation issues) for it to work on there.

For a more long term solution and future reference: XAudio 2.9 can be statically linked with support for Windows 7 (https://learn.microsoft.com/en-us/windows/win32/xaudio2/xaudio2-redistributable).
I assume the same thing exists for XInput.

@MegAmi24 MegAmi24 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
@Sonic-The-Hedgehog-LNK1123

The releases and github actions artifacts are built with the Windows 10 SDK, which dynamically links with these specific versions that are not present on Windows 7.

That statement is false, those library versions can be chosen independently of the Windows SDK version.

I have a Windows 7 compatible build, and it took 2 project-level changes:

I didn't get any compilation errors after these changes.

Example where XInput.lib is specified in one of the project files:

<AdditionalDependencies>libogg.lib;libtheora_static.lib;d3d9.lib;d3dcompiler.lib;XInput.lib;winmm.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>

Note: that line occurs 3 more times in that file (once for each configuration and platform), same for the RSDKv5U project file.

Also, this only applies to the DirectX 9 build, the (custom) DirectX 11 build seems to actually use some DirectX 11.1 features not available on Windows 7, even with the platform update

Maybe reopen this issue?, as it was closed based on incorrect assumptions.

@Mefiresu
Copy link
Member

That statement is false, those library versions can be chosen independently of the Windows SDK version.

I never said they couldn't be changed independently of the SDK version, I only said that the releases/actions builds use the W10 SDK, which means it defaults to linking with the versions that are provided by the SDK.

If you wanna be pedantic, my link states that it's a redistributable version made with support for older versions of Windows, and the Microsoft documentation for XAudio versions shows that the 2.7 version didn't ship with the OS, but with the DirectX SDK, and was the go-to version for Windows 7.

As for the XInput version you've linked with, they never actually backported the latest 1.4 version to Windows 7 and just kept the 9.1.0 version as a backwards compatible version.

Now for this project, the Windows build steps were made with Windows 10 in mind (safe to assume considering it's been there since 2015 and the end of support for Windows 7 was 4 years ago), so nobody bothered making sure it was backwards compatible with Windows 7 by manually linking with specific versions of each library, and we went with whatever the SDK/host OS shipped with (we're not even explicitly linking with XAudio anywhere and XInput is passed without a version).

I agree that this issue should be kept opened (changing it now).
That said, if you want to set up a way to provide support for Windows 7 for this project using CMake (the now preferred build system for this project), feel free to send a PR.

@Mefiresu Mefiresu reopened this Sep 20, 2024
@Sonic-The-Hedgehog-LNK1123

I never said they couldn't be changed independently of the SDK version, I only said that the releases/actions builds use the W10 SDK, which means it defaults to linking with the versions that are provided by the SDK.

Your original statement doesn't make that obvious to other people since the words "by default" are missing from your original statement. (at least the XInput9_1_0.lib library is provided by the SDK)

There's no easy workaround for now, you would need to manually build with Windows 7 SDK (+ potentially fix compilation issues) for it to work on there.

That statement is false, since the Windows 10 SDK can still target Windows 7, (and @MegAmi24 might have initially closed this issue based on your comment, as changing SDKs not being an option here)

XInput is passed without a version

That version-less library pretty much means the latest version available as of this Windows SDK release

I've never used CMake before, but I'm pretty sure that changing the mentioned line to XInput9_1_0 will cause it to link to XInput9_1_0.lib/dll.

For the XAudio Nuget package you apparently need to use VS_PACKAGE_REFERENCES somewhere in that file to add the Nuget package.

I hope my comments on CMake are helpful. I don't have my build system ready right now due to some real-life issues, but I'll test this when I get my build system ready and I have the time for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants
@MegAmi24 @Mefiresu @Sonic-The-Hedgehog-LNK1123 @60fpshacksrock and others