Usability improvements for adding game instance #3964
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivations
buildID.txt
orbuildID64.txt
in the file chooser. This has always been a bit confusing, because no user knows what this file is for or why we care about it. So far nobody seems to have been confused by having to pick the game EXE for KSP2.Problems
GameData/Mods
folder. If/when this happens, current CKAN clients will detect those instances as KSP1 game folders.Causes
KerbalSpaceProgram.GameInFolder
just checks forGameData
, which may not always be a good way to differentiate between games.KerbalSpaceProgram.DefaultCommandLine
just returns one string per platform, without checking whether it's valid.Changes
buildID64.txt
orbuildID.txt
, because the actual executable file is hidden away several layers deep inside an app bundle directory on Mac, but this is mostly irrelevant now that GUI doesn't run on Mac anymore.IGame.FirstReleaseDate
tracks each game's initial release date, so we can sort KSP2 instances chronologically after KSP1.KerbalSpaceProgram.GameInFolder
requires that at least one of the files inKerbalSpaceProgram.InstanceAnchorFiles
(which has replacedIGame.BuildIDFiles
and contains the platform-specific executable names) exists in the game folder, which will preventGameData
folders from confusing it.Fixes #3962.