-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Allow for Non Default/Unusual KSP Install Location #23
Comments
Aye, right now the KSP directory is hard coded, which is going to be wrong for most people. I think what we need is:
In both cases, we need a way of storing that. I wonder if C#/Mono provides a standardised way to access a system registry that we can place it into? |
I definitely would like to see this feature as well, since I run KSP off an external HDD (so that I can take the game with me whenever I'm visiting a friend). |
@sumghai : Thank you! I hadn't even thought about people with portable installs. It looks like Mono does support registry features, so we'll use that to store our default KSP location. The CKAN is written with the idea of having multiple KSP installs in mind, each which keeps their own meta-info, so once we know where the install is, everything else should work fine. (And CKAN should be fine being on portable media.) The gotcha, of course, is that portable media can change location, especially on Windows. While one will always be able to specify the KSP location on the command-line, that's a bit of a pain. It feels like an easy option here is to have CKAN check the directory it's installed in first, and then go checking the registry or other locations to find KSP. That means all that's required for a portable install is to drop it into the same directory as KSP itself. (And since any released code will be using @sumghai : Would that suit your portable use-case? |
A most excellent idea! |
@pjf Out of curiosity, how would the registry work on Linux? Assume I know very little about C#/mono :-) |
@techman83: My understanding is that the registry will cheerfully hold keys which are set by Mono applications, but starts off empty. So looking in it for Steam paths under Mac and Linux will return nothing, but we can quite happily set our own key in there, and expect to find it later on. (As an aside, we now have a logging system (using log4net), and a |
We now look in the local directory to see if we can find KSP there. This means one can just copy the client into your KSP install, and it will Just Work™. Addresses part of #23.
@techman83 , @sumghai : I've made it so that CKAN will look in the current working directory first, and only then other locations when searching for KSP. This means that CKAN client as part of a portable install should always work, regardless of whether there's another KSP on the system. I've built an executable that should work on everything, but you can always build your own using monodevelop/xbuild/visual studio. You can add Given that I'm now building actual executables, I'll need to figure out some sort of test/devel release process soon, lest I go mad from needing to manually copy a file into Dropbox. :) |
CKAN - Multiple KSP InstallsIt's a common use case for modders to have multiple installations/copies of KSP. We can safely assume any install folder will be writable by CKAN (or else how would we
This then allows users to specify which install they want to operate against. If one is not
If no installs defined, CKAN should attempt to automatically detect default. (E.G. Steam). This leaves an open question re: portable installs. Per-user data shouldn't generally be bundled in the same folder as the executable for non-portable installs. |
@Wizarth : Ooh, I like the idea of being able to give installs names. Then I could I'm not sure if we want to call them installs, since that sounds a lot like the The main thing I want to make sure of is that no matter what we do here, we should never require a typical user to care about them. That means autoconfiguring With regards to portable installs (which now work!), we're checking to see if the ckan executable is actually located in the KSP directory itself. That means we don't have any bootstrapping issues (the CKAN registry and assets get written the first time it runs), so I think we already have the functionality we need there. (Although we should still permit the user to do a Also, if you can figure out how to get our cmdline argument parser to recognise switches before the verb, that by itself would be a blessing. (There's a reason why So that's a yes please, I'd love this. I'm guessing the list of installs themselves should live in the Windows/Mono registry, as we can't access the CKAN registry until we know where it is. |
I'm going to split this into three tickets:
The first is essential, and the last is nice to have. |
Using the build script (after remembering to pull the tags and not just master :P), the produced executable works nicely in the KSP directory (I removed the symlink and cleared out the CKAN data)
That's a pretty workable solution for now. Awesome work!! |
Part of the work on GH KSP-CKAN#23.
We now look in the local directory to see if we can find KSP there. This means one can just copy the client into your KSP install, and it will Just Work™. Addresses part of KSP-CKAN#23.
CKAN-core now buildable and testable by itself
Small fix to headless mode
Pass GUI.user to Repo.Update
I'm weird, but I'm probably not alone :) - I have installed KSP on my SSD, but most other steam games reside in my home folder which is spinning rust.
A symlink makes things happy for now.
The text was updated successfully, but these errors were encountered: