pjf

The Comprehensive Kerbal Archive Network (CKAN) Package Manager; v1.18.0 [19 June 2016]

3332 posts in this topic

Moderator edit: This thread is deprecated, please see the new thread here:

 

-= Download the latest release =-

 

Introduction

When I first discovered Kerbal Space Program, I found it was great. And then I discovered the mods; and they turned a great game into an amazing one.

About 70 mod installs later, I realised that installing mods was time-consuming, and error-prone. Each mod seemed to have its own set of dependencies, its own way of being packaged, its own way of being installed. Worst of all, some mods would conflict with each other, something I'd often discover after it was already too late.

I saw the same problems were plaguing mod authors as well. Users would be asking for help because they had installed the wrong version, or were experiencing conflicts with existing mods.

Having searched for a better way to install and manage mods, I set about making my own. Taking lessons from decades of package installation and management experience in the Debian and Perl projects, each of which successfully manage tens of thousands of distinct packages, I am very glad to present to you...

The Comprehensive Kerbal Archive Network (CKAN)

The CKAN is a mod management solution for Windows, Mac and Linux that targets the .NET/Mono 4.5 framework. It leverages strong metadata about the mods it installs to ensure they are compatible with the user's version of KSP, free of conflicts, and are installed in a reliable and predictable fashion.

If you've used Linux, then the CKAN is apt-get for KSP. Like the App Store or Play Store for your phone, the CKAN knows which version of KSP you're running, which mods are compatible, and how to install, uninstall, and manage them.

The CKAN provides strong guarantees on consistency. It will not allow conflicting mods to be installed, nor a mod to be installed without its dependencies. It will never leave mods in a half-installed state. It will never overwrite a file owned by another mod, nor a mod that was installed outside of the CKAN.

Demonstration Videos

The CKAN has gained a lot of coverage on YouTube, so here are videos by:

 

 

 


The GUI is now stable on all platforms. To run it, simply double-click the ckan.exe file, or run it with mono ckan.exe.

1qXpwk7.png

For those who prefer a command-line interface, the instructions can be expanded below:

Spoiler

 

Our stable release offers a command-line interface:

 



update Update list of available mods

available List available mods

install Install a KSP mod

remove Remove an installed mod

scan Scan for manually installed KSP mods

list List installed modules

show Show information about a mod

clean Clean away downloaded files from the cache

ksp Manage KSP installs

version Show the version of the CKAN client being used.

$ ckan.exe help

To get started, you'll want to download the client and run a ckan update to refresh its mod database:

 

Downloading updates... Downloading https://github.com/KSP-CKAN/CKAN-meta/archive/master.zip Updated information on 60 available modules

$ ./ckan.exe update

The client will automatically configure itself if it can find your KSP install. If it can't find your install, you can tell it where to find it:

 

 

$ ckan.exe ksp add default /path/to/my/KSP/install

You can list available mods:

 

Mods available for KSP 0.25.0
* AdvancedFlyByWire (1.2.3_0) - Advanced Fly-By-Wire
* AGExt (1.21a) - Action Groups Extended
* AJE (1.6.4) - Advanced Jet Engine (AJE)
* AMEG (1.1) - AMEG
* CommunityResourcePack (0.2.3) - Community Resource Pack
* ...

$ ckan.exe available

And installing them is easy:

 

About to install... * DogeCoinFlag 1.02 Continue? [Y/N] Downloading "https://kerbalstuff.com/mod/269/Dogecoin Flag/download/1.02" 15 kbps - downloading - 0 MiB left - 99% Installing mod "DogeCoinFlag 1.02" Updating registry Commiting filesystem changes Rescanning GameData Done!

$ ./ckan.exe install DogeCoinFlag

However the CKAN is aware of dependencies, and is capable of finding and installing all the mods required for a working install:

 

About to install... * RealismOverhaul v6.1.2c (cached) * RealFuels rf-v8.1 (cached) * TACLS-Config-RealismOverhaul v6.1.2c (cached) * TACLS v0.10.1 (cached) * EngineIgnitor-Unofficial-Repack 3.4.1.1 (cached) * Toolbar 1.7.7 * TweakScale v1.44 (cached) Continue? [Y/N]

$ ./ckan.exe install RealismOverhaul

For a lightweight install, we can skip recommendations:

 

About to install... * RealismOverhaul v6.1.2c (cached) * RealFuels rf-v8.1 (cached) * TACLS-Config-RealismOverhaul v6.1.2c (cached) * TACLS v0.10.1 (cached) Continue? [Y/N]

./ckan.exe install --no-recommends RealismOverhaul

You can also use --with-suggests to get an extended install, with suggested modules installed as well.

Some mods give you options as to which configuration or assets you can use:

 

Too many mods provide RSSTextures. Please pick from the following: * RSSTextures2048 (Real Solar System Textures - 2048 x 1024) * RSSTextures4096 (Real Solar System Textures - 4096 x 2048) * RSSTextures8192 (Real Solar System Textures - 8192 x 4096) $ ckan.exe install --no-recommends RealSolarSystem RSSTextures2048 About to install... * RSSTextures2048 1.0 (cached) * RealSolarSystem v8.2.1 (cached)

$ ckan.exe install --no-recommends RealSolarSystem

The CKAN is available for you to use right now. All our source code is released under an MIT license, and all mod meta-data under a CC-0 license.

 

 

 

Adding support for new mods

 

The CKAN is designed to be friendly to mod authors. There's no requirement for authors to include metadata in their files, or change their release process in any way. Where possible, new releases are indexed automatically from systems which provide us with release APIs. Dozens of mods already have CKAN support, and new ones are being added every day.

If you'd like to see more mods available via the CKAN, then we have a quickstart guide, along with a full metadata spec for more complex operations. Contributions are very welcome, and we'd love you to add your favourite mods. You do not need to be the author of a mod in order to write the metadata for it.

Reporting bugs

 

You can run any command with --verbose or --debug at the end to see extra information as to what's going on.

Please report bugs and suggestions to our issues tracker on github.

Please include the output of ckan.exe version when reporting bugs.

Thanks

 

The CKAN has been an amazing team effort, with dozens of contributors providing code, metadata, advice, and support. However, there are a few I would like to personally thank:

 

  • nlight: For countless contributions, for endless patience with reviewing my code, for keeping me sane during many late nights coding.
  • invultri: For questioning how we do things, for providing great architectural advice, for expanding our test suite.
  • techman83: For endless amounts of enthusiasm, moral support, advice, and help.
  • darklight: For enthusiasm and vision, and the determination to make the CKAN great.
  • ippo: For making the documents amazing. For being so good at finding bugs. For always cheering me up.
  • NathanKell: For ludicrous amounts of support, for making the world a better place.
  • RichardLake: For refactoring, testing, fixing and improving EVERYTHING.
  • dbent: For consisting improving our code architecture.
  • Daz: For doing an *amazing* job on metadata and support.
  • plague006: For consistently improving our user experience.
  • Postremus: For systematically eliminating all our bugs, no matter how big or small.

 

 

Further resources:

 

 

We love contributions of all sorts, and have just a few simple rules for those who wish to help the CKAN awesome!

 


-= Download the latest release =-

Edited by Red Iron Crown
Fixed link
68 people like this

Share this post


Link to post
Share on other sites

This is a massive enough project, and will provide massive enough advantages for pretty much all of us, that it's now stickied. :)

Congratulations on a great release!

Share this post


Link to post
Share on other sites

A awesome tool for a awesome game ;) thanks.

Share this post


Link to post
Share on other sites

This will be good but it's still a little rough ...

For example. Attempting to install AJE


E:\Games\kspmods\ckan>ckan install AJE
Too many mods provide RSSTextures. Please pick from the follow

* RSSTextures2048 (Real Solar System Textures - 2048 x 1024)
* RSSTextures4096 (Real Solar System Textures - 4096 x 2048)
* RSSTextures8192 (Real Solar System Textures - 8192 x 4096)

Edit: Nevermind, just saw this on the OP. The error message is not clear enough though. It should probably state that it is trying to install RSS from recommended mods.

Alright, let's try this


E:\Games\kspmods\ckan>ckan install --no-recommends RealFuels
About to install...

* RealFuels rf-v8.1
* RealismOverhaul v6.1.2c
* AJE 1.6.4
* KerbalJointReinforcement v2.4.4
* ModuleRCSFX 3.1
* RealChute 1.2.5.3
* TACLS-Config-RealismOverhaul v6.1.2c
* TACLS v0.10.1

Continue? [Y/N]

I know RealFuels works fine without full RO :sticktongue: Err i mean ... there are RF configurations for stock engines. So no RO needed.

Edited by DaMichel

Share this post


Link to post
Share on other sites

If it works the way I think it works (have an interface where mod authors can put up their mods in a repository and the users download it)..

This is the greatest project ever ! REP !

Edited by MegaUZI

Share this post


Link to post
Share on other sites
If it works the way I think it works (have an interface where mod authors can put up their mods in a repository and the users download it)..

This is the greatest project ever ! REP !

Actually, it doesn't work that way, it's even better :)

CKAN is not a repository of mods, it's a repository of metadata about mods, plus a client that can use that metadata to manage them.

Let's break down the metadata for TAC LS:


{
"spec_version": 1,
"identifier": "TACLS",
"name": "TAC Life Support (TACLS)",
"abstract": "Adds life support requirements and resources to all kerbals",
"license": "CC-BY-NC-SA-3.0",
"ksp_version": "0.25",
"release_status": "stable",

This first section describes the mod: its name, description, license... stuff like that. It's important to have them, but here the real fun begins:


"depends": [
{
"name": "ModuleManager"
},
{
"name": "TACLS-Config"
}
],

This section tells the CKAN client that this mod cannot work at all if you have not installed these two packages, ModuleManager and a TACLS-Config. You just cannot install TACLS and not have MM: this section tells the client to install them first, and it will refuse to install TACLS if it can't install the two dependencies first. The result is that you eliminate installation problems: this way, the user is guaranteed to have the dependencies that your mod needs to function.


"recommends": [
{
"name": "MiniAVC"
}
],
"suggests": [
{
"name": "KSP-AVC"
}
],

This section does almost the same, but with a weaker constraint: TACLS doesn't *need* AVC to work, but it would be great to have it in conjunction: both recommends and suggests, however, are optional, and you are not forced to install them if you don't want to.


"install": [
{
"file": "GameData/ThunderAerospace",
"install_to": "GameData",
"filter_regexp": "PluginData/TacLifeSupport/LifeSupport\\.cfg$"
}
],
"resources": {
"repository": "https://github.com/taraniselsu/TacLifeSupport"
},
"author": "taraniselsu",
"version": "v0.10.1",
"download": "https://github.com/taraniselsu/TacLifeSupport/releases/download/v0.10.1/TacLifeSupport_0.10.1.13.zip",
"x_generated_by": "netkan",
"download_size": 5997448
}

Here's the real meat of the file: the installation instructions. This section tells the client where it can download the file, and after that, what to do with the contents of the zip.

The real beauty in this is that it's the package manager that adapts to the modder, and not the contrary: we don't need to enforce neither a particular folder structure, nor a particular repository*. And that's why this project is so great :)

* Curse is not yet supported because Curse does not expose an API that the client can use, meaning that the only way to download from curse is to do it manually using a browser, and thus CKAN can't support it until Curse supports us.

Share this post


Link to post
Share on other sites

Is there a way to "recommend" a package, but only if all of its dependencies are already present or being installed for another reason?

For example, if I were packaging Interstellar, I would like to recommend my resource-sharing pack if Community Resource Pack and ORSX are installed, but without causing those dependencies to become recommended if they're not.

1 person likes this

Share this post


Link to post
Share on other sites
Is there a way to "recommend" a package, but only if all of its dependencies are already present or being installed for another reason?

For example, if I were packaging Interstellar, I would like to recommend my resource-sharing pack if Community Resource Pack and ORSX are installed, but without causing those dependencies to become recommended if they're not.

I think that's essentially a suggest... or maybe I don't understand what you mean :/

Share this post


Link to post
Share on other sites
Is there a way to "recommend" a package, but only if all of its dependencies are already present or being installed for another reason?

For example, if I were packaging Interstellar, I would like to recommend my resource-sharing pack if Community Resource Pack and ORSX are installed, but without causing those dependencies to become recommended if they're not.

Being fan of Debian and using Terminal to install packages I really welcome what you have done. I was thinking about such a aproach before aswell. It would be great to do repository style mod installer where authors of mods will be able to upload their mods in a fashion that your plugin will be able to handle and install it in KSP with all dependencies or lets say if particular module cant work with other, dont allow installation or ask for removal of interfering module. Also when Squad finnish the game they should consider adding this method of mod installing to KSP so its native.

Share this post


Link to post
Share on other sites
I think that's essentially a suggest... or maybe I don't understand what you mean :/

I want it to be installed by default like a regular recommendation if you install all of the packages that it bridges. That doesn't happen with a suggest.

Share this post


Link to post
Share on other sites

is it compatible with windows 8??

It dosent work for me so :(

Share this post


Link to post
Share on other sites
is it compatible with windows 8??

It dosent work for me so :(

could you please be more specific? It works just fine on my windows 8.1 pc.

Share this post


Link to post
Share on other sites

This looks awesome, and I hope it takes hold. I'd much prefer a quick, easy and above all standardized way to install mods, especially if a way to easily and quickly check versions and things can be integrated successfully into every mod. I went through and checked all of my mods versions last night. Took me like 30 minutes, and I only have 12 or so installed.

Share this post


Link to post
Share on other sites
could you please be more specific? It works just fine on my windows 8.1 pc.

its so that when i start the program,it opens corectly and then its shows all the update and stuff,and after a second it closes,im not so good with this stuff so :P

EDIT: its a windows 8 pc

Share this post


Link to post
Share on other sites

The window closes because CKAN is done. You need to run CKAN from a command line so that its output stays visible after it's done (i.e. because it's not "CKAN"'s window anymore, it will stay open and wait for your next command).

Share this post


Link to post
Share on other sites
The window closes because CKAN is done. You need to run CKAN from a command line so that its output stays visible after it's done (i.e. because it's not "CKAN"'s window anymore, it will stay open and wait for your next command).

and how do i do that??

Share this post


Link to post
Share on other sites

Hi,

First of all, thanks a lot to all those who are contributing to this real good idea.

But to help all new starters as I am, and avoid to spend one hour to make it work, here is what I have done.

I am using Windows 7, and KSP is installed in D:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program which is, i guess a very common place.

I use run->cmd to get the prompt, and put me in CKAN dir.

As said at the beginning of this thread, I first wrote

D:\temp\CKAN>ckan update
I don't know where KSP is installed.
Use 'ckan ksp help' for assistance on setting this.

So ok, not a good directory. I use the second command:

D:\temp\CKAN>ckan ksp add default "D:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program"
Added "default" with root "D:\Program Files (x86)\Steam\steamapps\common\Kerbal
Space Program" to known installs

Yes !! Let's go:

D:\temp\CKAN>ckan update
I don't know where KSP is installed.
Use 'ckan ksp help' for assistance on setting this.

What ?!? You must be kidding me !

After some research, and resetting installation, I found out that after "ckan ksp add default" you must add

ckan ksp default default

I hope it will help, and may be user guide completed. Thanks again for this great job.

Edited by pascalfritz
Change QUOTE in CODE and add CODE around last command

Share this post


Link to post
Share on other sites
and how do i do that??

Go to the folder where you have put the exe: now you have to right click on some white space (like you do when creating a new folder) while also pressing shift: Shift+Right click will bring up the context menu, with also an additional voice called "Open command prompt here".

Now you can use that window to use ckan :)

Share this post


Link to post
Share on other sites

Hey everyone! I've been off-line since the release as I've been celebrating with ice-cream, but I'll try to quickly respond to everthing Ippo hasn't addressed. (And Ippo, thank you *so* much, you're being an incredibly ambassador for the project!)

ckan ksp default default

D'oh, this is a bug on our behalf. If there's only a single install, it should use that automatically. I'll open an issue to track it, and with luck we'll have this nailed in the next release!

Is there a way to "recommend" a package, but only if all of its dependencies are already present or being installed for another reason?

Alas no, but I absolutely see why you'd want to. That's a bit stronger than a suggests (which isn't installed by default), but weaker than a recommends (which installs something by default, including its dependencies). Leave it with me, and I'll do some thinking about if there's a way we can nicely express that in metadata.

~ Paul

(Who's now going through the incredible number of submission for new CKAN mods from the last 24 hours. Thank you all *so much*, this is like Kerbtaculian Christmas for me!)

Share this post


Link to post
Share on other sites

I'm very much amazed by how many submission you get. That's awesome. And thanks for addressing RSS / RF / json validation issues.

Please help me how exactly the indexing works. So you have this archive https://github.com/KSP-CKAN/NetKAN/tree/master/NetKAN with meta data. I guess this is processed automatically by netkan.exe on the server side. Is this done in "nightly builds" or when exactly?

The result of this processing goes into https://github.com/KSP-CKAN/CKAN-meta, correct? But as i understand, mod authors can also contribute directly into this repository, specifying specific a version plus downloads. And in this case mod authors have to update the data manually each time they have a new release, right?

Share this post


Link to post
Share on other sites

Thank you! I'm working through a whole bunch more submissions now, so if you haven't done a `ckan update` recently, you should. :)

Please help me how exactly the indexing works. So you have this archive https://github.com/KSP-CKAN/NetKAN/tree/master/NetKAN with meta data. I guess this is processed automatically by netkan.exe on the server side. Is this done in "nightly builds" or when exactly?

Right now it's happening when I run the `NetKAN/bin/netkan-all` script, which unfortunately makes assumptions as to where things are located on the system. We definitely do want this running nightly, as well as being triggered on a repository change. Although I don't have to be the one who runs it, anyone on the core team has access.

There has also been talk of providing a simple REST interface, which can be bumped to force re-indexing of a particular mod. Be it through humans jumping up and down, or bots subscribing to various feeds, that would also help a lot in ensuring mods get updated ASAP.

The result of this processing goes into https://github.com/KSP-CKAN/CKAN-meta, correct? But as i understand, mod authors can also contribute directly into this repository, specifying specific a version plus downloads. And in this case mod authors have to update the data manually each time they have a new release, right?

That's quite correct, although it doen't have to be the authors doing the update; very often it's wonderful fans, or a member of the CKAN team. However submitting files by hand is more work than anyone would like, which is why the NetKAN is so great; you just fill in the bits our bot can't figure out automatically, and it does the rest, including picking up new releases. One thing we really want is being able to fully support the KSP-AVC format (we only have partial support at the moment), this means that if people are already making new releases visible via AVC, we'll also be able to pick them up via the CKAN.

Also, have I mentioned how much we love contributors? I'm *so* thankful for all of yours! Thank you for helping make the CKAN great! (And if you need a hand with anything, including code or anything else, I'm *delighted* to help!)

~ Paul

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.