KnossosNET / Knossos.NET

Repository for the Knossos.NET launcher, currently in development.
GNU General Public License v3.0
21 stars 10 forks source link

Ignore installed builds whiout any valid executables when clicking play #168

Closed Shivansps closed 3 months ago

Shivansps commented 4 months ago

Build selection is done by what is selected by the dependency semantic version, semantic version can give you an invalid build, in the case of Wings of Dawn and linux.

17.0.0 contains linux exec, but 17.0.1 does not, if you manually install 17.0.0 linux build and 17.0.1 windows build is installed, wod will still try to select 17.0.1 on linux what will fail. This pr makes that when clicking play, builds whiout valid executables will not be longer considered for builds selection.

Not sure if something can be done during mod install to avoid this same scenario. As things are installing wod on linux will install an empty 17.0.1 because there arent any linux executables in that build.

EDIT: Ok i got a check in during mod install, this will try a maximum of 10 times to get an alternative build that sastifies the dependency if the currently selected one has an incompatible enviroment string. This is nasty but it is the only thing i could think off since repo_minimal does not allow to properly do this check at the mod install stage.

I checked it with x64 and arm64 linux and it seens to behave as expected, but ill suggest that more testing is done here during mod install.

JohnAFernandez commented 4 months ago

Ok, I'll wait on more testing during mod install before merging.

JohnAFernandez commented 3 months ago

Mod installation worked fine for me with these changes. I'm going to go ahead and merge.