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 version setting is overwritten #682

Closed
har-nick opened this issue Dec 9, 2022 · 24 comments
Closed

Windows version setting is overwritten #682

har-nick opened this issue Dec 9, 2022 · 24 comments
Labels
bug Something isn't working help wanted Features/Bug Fixes that welcome contributions ModOrganizer 2 Issues related to installing or using ModOrganizer 2 with SteamTinkerLaunch

Comments

@har-nick
Copy link

har-nick commented Dec 9, 2022

System Information

  • SteamTinkerLaunch version: MO2-Overhaul branch
  • Distribution: Arch Linux

Issue Description

When setting a version through winecfg manually, or through STL's GAME menu to launch winecfg before launching the game, it's seemingly overwritten back to XP. I believe it happens when STL's game-specific landing menu opens.

I've worked around it with the aforementioned GAME menu setting to open winecfg and setting it before launch.

Logs

No logs atm as I'm not at my PC, sorry!

@har-nick har-nick added the bug Something isn't working label Dec 9, 2022
@sonic2kk
Copy link
Owner

sonic2kk commented Dec 9, 2022

Interesting catch! This isn't something I would've expected, but I'll have a look and see if something is potentially overwriting it. I wonder if maybe there is a winetrick messing with it... Interesting!

Getting set to Windows XP is very much less than ideal and can cause issues, but just out of curiosity, has it broken anything for you yet? :-)

@har-nick
Copy link
Author

har-nick commented Dec 10, 2022

As far as I can tell it hasn't broken anything. The only alert I get is when trying to launch Synthesis without setting it to Windows 7.

Also for winetricks, I have vcrun2015-2019 and dotnet-sdk saved and installed.

@sonic2kk sonic2kk added the ModOrganizer 2 Issues related to installing or using ModOrganizer 2 with SteamTinkerLaunch label Dec 10, 2022
@sonic2kk
Copy link
Owner

I wonder if there are any overrides with the Winetrick for the Windows version here. I know to install dotnet, Winetricks reverts the Windows version, but it usually resets it afterwards. If you installed these winetricks with STL, you can uncheck them from the Winetricks menu. Just in case Winetricks tries to reinstall them each time, and when it catches that they're already installed, it's already changed the Windows version and fails to set it back (though I doubt very much this is the case and if it is, it would be a Winetricks bug probably).

The alert is surely not ideal so I'll see if I can figure out a way to fix it. I'll also look to see if it happens on my end with my much more vanilla setup. I had a quick skim of the code last night and I didn't see anything that stood out as changing the Wine version.

I'll take a look more carefully at the code for MO2 and the MO2 overhaul commit itself and if I still can't find anything, I'll see if this is a Winetricks issue that has a workaround :-)

@sonic2kk
Copy link
Owner

Do you know if this behaviour happens with other 64bit Wineprefixes using those Winetricks? I'm wondering if maybe these Winetricks force a Windows version change.

I haven't found anything in the code yet that would cause this which is why I'm asking, in case this is a Winetricks thing. But I kind of doubt that is the case, just covering as much as I can :-)

@har-nick
Copy link
Author

har-nick commented Dec 13, 2022

when it catches that they're already installed, it's already changed the Windows version and fails to set it back

I haven't any prefixes set up at the moment, but this is likely along the lines of what happened. I don't know if the mismatch may cause it, but the saving feature is likely the culprit in some way. I downloaded the Visual C++ packages at one time, and then dotnet after when I was setting up Synthesis. I believe the vcrun packages were saved, but dotnet was not, despite me opting to do so.

Do you know if this behaviour happens with other 64bit Wineprefixes using those Winetricks?

I can't say it has, but I've only ever used STL for Mod Organizer 2 with New Vegas and Skyrim, so I haven't tested it across that many prefixes.

@sonic2kk
Copy link
Owner

and then dotnet after when I was setting up Synthesis. I believe the vcrun packages were saved, but dotnet was not, despite me opting to do so.

That's quite insightful! If you aren't already, you'll want to install any dotnet Winetricks using GE-Proton (Proton-tkg may also work). Vanilla Proton 7.0 and Proton Experimental both have issues with installing dotnet Winetricks. This could be why it isn't saving, it may not be correctly or fully installing. At the very least, dotnet40 and above require this.

The vcrun2019 Winetrick shouldn't cause issues here I think based on experience with Hedge Mod Manager (which requires this Winetrick also), but I don't think I've ever tried to install dotnet-sdk. I guess I'll give this a try myself and investigate to see if it's this Winetrick that rolls back the Windows version.

Thanks!

@sonic2kk
Copy link
Owner

Actually, I cannot see dotnet-sdk in my list of available Winetricks. I have very little experience with fiddling around with dotnet stuff and Wine so sorry if that's just my own misunderstanding here but if you have any more info here I can give it a try with a regular 64bit vanilla Wine prefix, then try again with some Proton prefixes and MO2 itself :-)

@har-nick
Copy link
Author

har-nick commented Dec 14, 2022

If you aren't already, you'll want to install any dotnet Winetricks using GE-Proton

That's probably it then. If I remember rightly, I was experiencing issues I didn't understand at the time with synthesis not finding the runtime when installing it through the winetricks menu, so ran it through the one-time-launch option, which did install.

Actually, I cannot see dotnet-sdk in my list of available Winetricks

That's my fault for not specifying the right packages, sorry! I installed dotnet48 without realising the Synthesis required the SDK, not just the runtime. I installed the SDK through one-time-launch after installing dotnet48 .

I have a new prefix set up now, so I'll start testing again.

@har-nick
Copy link
Author

Just launched MO2, and it seems to be using GE-Proton by default. If that is indeed the default, then that's what I used to install dotnet48, as I didn't change it.

@sonic2kk
Copy link
Owner

Thanks for the clarification!

I installed dotnet48 without realising the Synthesis required the SDK, not just the runtime. I installed the SDK through one-time-launch after installing dotnet48

Am I correct in understanding here that the SDK is a separate executable that was installed? Just making sure, so that I can go through and try to replicate the problem as best I can :-)

Just launched MO2, and it seems to be using GE-Proton by default

Ah! I had a look and I think you're right. I think this might be because previously MO2 needed dotnet48 installed. Totally forgot about this, not enough coffee today 😅

I think the only other suggestion I have is, to ensure that dotnet48 installs correctly, you'll want to make sure your Winetricks is up-to-date if you installed it systemwide. If SteamTinkerLaunch installed it for you it should've pulled down the latest from source, but otherwise if it's installed e.g. via a package manager, sometimes this can be too out-of-date and some winetricks can fail to install -- Including dotnet48, as I have painfully learned recently. You can check your Winetricks version with winetricks --version and you'll want to ensure you're running 20220411-next (some distributions package a version from as far back as 2020 and this causes some failures with newer Wine / Proton versions). If you need to update, you can run sudo winetricks --self-update.

Apart from this, I'll keep on digging to see if we can get to the bottom of this :-)

@har-nick
Copy link
Author

Am I correct in understanding here that the SDK is a separate executable that was installed?

That's correct. I installed it x64 binary for Windows from this page.

Here's a direct link to it.

Totally forgot about this, not enough coffee today

Know that feeling all too well lol!

ensure that dotnet48 installs correctly

I believe it did install correctly, since Synthesis adequately enough after that.

SteamTinkerLaunch installed it for you it should've pulled down the latest from source.

Installed via Git after the MO2 overhaul branch was merged.

Winetricks is up-to-date if you installed it systemwide

I was using wine-staging at the time. Would that have any bearing?

@har-nick
Copy link
Author

har-nick commented Dec 14, 2022

Looking back at the wintricks menu, I was completely wrong. I think it stemmed from when I was having issues with Steam pulling Proton versions, so I downloaded the latest Proton version manually.

I definitely installed the packages using Proton Experimental 7.0, and not GE-Proton.

@har-nick
Copy link
Author

Okay, I've managed to replicate it using dotnet48 and vcrun2019.

Give me some time and I'll make a full video of the process.

@har-nick
Copy link
Author

har-nick commented Dec 14, 2022

Okay I've found the cause. It seems like STL isn't respecting the Proton version selected in the winetricks menu. Running the game afterwards does however.

image

image

image

image

@sonic2kk
Copy link
Owner

sonic2kk commented Dec 14, 2022

It seems like STL isn't respecting the Proton version selected in the winetricks menu

The notification in the second screenshot is from the Wine installation if I understand correctly, which should be respecting the Proton version. It shows that it is using wine-7.0 (Staging) which I believe is what GE-Proton is based on. At least, Winetricks logs using GE-Proton show that it is using Wine 7.0 (Staging) as well.

A little bit of background that I think I didn't mention: When installing dotnet48 (at least for 64bit prefixes), the Windows version is set to Windows XP by Winetricks. However, this should be reverted after installation finishes I think. If you go to /dev/shm/steamtinkerlaunch after installing dotnet48, you should see a file called installDotNet.log that lets you see all of the Winetricks installation process. It's basically all of what would be the command line output for Winetricks.

If you select regular Proton, what does the notification say about the log out of curiosity?

The interesting thing here too is that MO2 should be running in its own prefix at ~/.config/steamtinkerlaunch/mo2/compatdata, and your installed Winetricks should only be installed for the game's prefix. Either way the core of the issue seems to be that when installing dotnet48, the Windows version setting is always overwritten back to Windows XP for some reason. I would guess this is Winetricks' doing but I can't say I've experienced this before, so there could certainly be something on the STL side going wrong here that could be looked into! But I'm not sure how related it is to MO2, that's another thing I'll have to look into.

My plan of attack here is to test this with installing dotnet48 for a random game with STL, then a random game without STL (just vanilla Winetricks with GE-Proton7-42), and then into a regular Wine prefix with my system Wine.


This was pretty useful, thank you!

@har-nick
Copy link
Author

installDotNet.log

I checked the path you gave and couldn't find a file under that name, sorry.

I did see a WINETRICKS.log, which I checked. This was the output:

------------------------------------------------------
warning: wineserver not found!
------------------------------------------------------

what does the notification say about the log

I'm not sure what you mean by that. Notification about what log?

@sonic2kk
Copy link
Owner

I checked the path you gave and couldn't find a file under that name, sorry.

That's interesting but probably fine 🙂

warning: wineserver not found!

Hmmm, this would indicate to me that the Wine version it tried to install those winetricks with wasn't found. Winetricks gives this error when it can't find a Wine executable to use. I'm not sure what could be causing it.

I'm not sure what you mean by that

Sorry, I phrased that horribly and it made no sense 😓 Let me try again.

When you select a Winetrick for installation (say vcrun2019, because iirc dotnet48 doesn't work with regular Proton), you'll see it says wine-7.0 (staging) when you use GE-Proton. If you select a regular Proton version like Proton 7.0-5, I think it will say wine-7.0 or maybe just proton 7.0-5. What I meant by my mess of a sentence was, if you use a regular Proton version, what Wine version does that notification use? That way, we can tell if it is respecting the Wine version or not :-)


I haven't gotten around to testing just yet on my end, but I will try to get around to it as soon as I can :-)

@sonic2kk
Copy link
Owner

Quick update: I just tested with Winecfg in the Hedge Mod Manager prefix (which installs dotnet48 and vcrun2019), and the Windows version doesn't seem to get overwritten...

@sonic2kk
Copy link
Owner

Something I recently came across is that apparently you can pass Winetricks a command line win10 which sets the prefix. It seems like it might do this when it installs things like dotnet48, to ensure it uses a compatible Windows version.

I'm not sure how many users this problem is affecting and I don't think I can reproduce it, but I guess there could be an option for "force MO2 Windows version" and if this is enabled and set, we could run Winetricks before each run.

This would have the side effect of requiring Winetricks which probably isn't a big deal.

@sonic2kk
Copy link
Owner

I'm pretty sure Winetricks has an option to do this by passing the registry key verb, but it seems like it's also possible to set the Windows version in the prefix's registry: https://wiki.winehq.org/Useful_Registry_Keys

There's a note about a Version registry key. I guess to remove the Winetricks dependency too. SteamTinkerLaunch also has a updateWineRegistryKey function that could be used to implement this.

@sonic2kk
Copy link
Owner

sonic2kk commented Jan 1, 2023

I'll need to do some more testing but maybe an option to force a Windows version for MO2 could work. Not sure how it would impact games the different ways of launching MO2 though.

@sonic2kk
Copy link
Owner

sonic2kk commented Jan 6, 2023

I have a feeling the issue with the Windows version may be related to Winetricks, as I have seen a couple of other users complain about similar errors to do with some programs saying that they need Windows 7 or higher. Not sure of the best way to resolve this, my idea of having a custom Windows version option is... flimsy, to be honest.

@sonic2kk sonic2kk added the help wanted Features/Bug Fixes that welcome contributions label Jan 18, 2023
@sonic2kk
Copy link
Owner

I am not sure how much progress will be made on this or what the path forward for this is. It does not seem to be an issue caused by SteamTInkerLaunch, but it would be nice to have this fixed.

It is not a "critical" bug or anything from what I can tell but it would be nice to have it fixed, though I don't know what would cause the Windows version to keep changing. I would guess perhaps Winetricks or may even the Proton version used. Maybe there is an issue with how Wine is saving the version to the registry in the prefix, but I'm really just thinking out loud here 😅 As far as I can see with MO2 (which I freshly reinstalled when testing a few MO2 issues recently) I don't experience it.

I will leave this issue open until there is a fix in place :-) Maybe someone will step up and tackle this at the "root", instead of implementing my idea of having a fixed Windows version that we can set (which Winecfg is supposed to be able to do).

@sonic2kk
Copy link
Owner

I can't reproduce the issue anymore, and I don't think it's a SteamTinkerLaunch issue, plus this issue is stale by now, so closing this :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Features/Bug Fixes that welcome contributions ModOrganizer 2 Issues related to installing or using ModOrganizer 2 with SteamTinkerLaunch
Projects
None yet
Development

No branches or pull requests

2 participants