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

Usability improvements for adding game instance #3964

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Dec 18, 2023

Motivations

  • When you add a KSP1 instance in GUI, you have to pick buildID.txt or buildID64.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.
    • It's also confusing that the file chooser says "Build metadata file," since no user knows what that means.
  • The Manage Game Instances window sorts game instances by version without regard to which game it is, so KSP2 with its low version numbers always shows up before the beginning of KSP1.

Problems

  • Someday, KSP2 is probably going to start installing mods into a GameData/Mods folder. If/when this happens, current CKAN clients will detect those instances as KSP1 game folders.
  • If you install a very old version of KSP1 (e.g., 1.0.5), it will only have a 32-bit executable, but our game command line defaults to the 64-bit executable, so the game won't run.

Causes

  • KerbalSpaceProgram.GameInFolder just checks for GameData, 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

  • Now you have to pick the game EXE for KSP1 as well. The allowed filenames are platform-specific and include current 64-bit and historical 32-bit versions.
    • This is only true for Windows and Linux. For Mac, you still have to choose buildID64.txt or buildID.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.
    • The file chooser now says "Game program file" on English, which hopefully will be easier to understand than "Build metadata file". Other locales will have to wait for translation updates through the normal Crowdin process.
      image
  • Now IGame.FirstReleaseDate tracks each game's initial release date, so we can sort KSP2 instances chronologically after KSP1.
  • Now KerbalSpaceProgram.GameInFolder requires that at least one of the files in KerbalSpaceProgram.InstanceAnchorFiles (which has replaced IGame.BuildIDFiles and contains the platform-specific executable names) exists in the game folder, which will prevent GameData folders from confusing it.
  • Now the default game command line for KSP1 depends on the files that are present in the game dir. If you have the old 32-bit EXE, then that will be used as the default, otherwise the 64-bit EXE will be used.

Fixes #3962.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Core (ckan.dll) Issues affecting the core part of CKAN labels Dec 18, 2023
@HebaruSan HebaruSan merged commit 457407e into KSP-CKAN:master Dec 18, 2023
8 checks passed
@HebaruSan HebaruSan deleted the feature/buildid-no-more branch December 18, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a new KSP1 instance should allow for selecting the ksp_x64 exe to reduce confusion
2 participants