-
Notifications
You must be signed in to change notification settings - Fork 0
Sharing a modlist (metapackages)
One of the many things CKAN can do is share your list of installed mods with another user by using metapackages. As a standard CKAN generates a metapackage of all your installed mods in .../<KSP root directory>/CKAN/installed-default.ckan
If you want to share your currently modlist with someone or take a snapshot of the stuff you have installed right now for a given KSP installation you can just copy that file and share/keep it.
*Install the mods you want your metapackage to contain
*In the CKAN client click File->Export installed mods->Joy and happyness for all
Metapackages are much like normal .ckan files but have an added
"kind": "metapackage",
Metapackages depend on other mods rather than defining the installation of a specific mod from a specific place.
An example of an empty metapackage is:
{
"spec_version": "v1.6",
"identifier": "YourMetapackageName",
"version": "1",
"license": "unknown",
"name": "User friendly name of your metapackage",
"abstract": "A short description of the metapackage",
"kind": "metapackage",
"depends": []
}
NOTE: Metapackage support was added in CKAN 1.6.0 so "spec_version" must always be at least v1.6!
And an example of a metapackage that installs FAR,KER and KAC would look like this:
{
"spec_version": "v1.6",
"identifier": "YourMetapackageName",
"version": "1",
"license": "unknown",
"name": "User friendly name of your metapackage",
"abstract": "A short description of the metapackage",
"kind": "metapackage",
"depends": [
{
"name": "FerramAerospaceResearch",
},
{
"name": "KerbalEngineerRedux",
},
{
"name": "KerbalAlarmClock",
}
]
}
Metapackages will solve dependencies for mods within them. The above example also installs ModuleManager since FAR depends on it.
Metapackages will not show suggestions and recommendations from the mods within them.
Apart from doing a blunt install of a list of mods you can add choices using the "recommends"
and "suggests"
keywords. Keeping the earlier example we add in recommendations for Deadly Reentry and Intake Build aid as well as suggestions for B9 and Firespitter. The metapackage would then look like this:
{
"spec_version": "v1.6",
"identifier": "YourMetapackageName",
"version": "1",
"license": "unknown",
"name": "User friendly name of your metapackage",
"abstract": "A short description of the metapackage",
"kind": "metapackage",
"depends": [
{
"name": "FerramAerospaceResearch",
},
{
"name": "KerbalEngineerRedux",
},
{
"name": "KerbalAlarmClock",
}
],
"recommends": [
{
"name": "DeadlyReentry"
},
{
"name": "IntakeBuildAid"
}
],
"suggests":[
{
"name": "B9"
},
{
"name": "Firespitter"
}
]
}
When adding "recommends"
and "suggests"
the Identifier of your metapackage will be seen in the CKAN gui like this:
Note: Recommends come pre-chosen and the user will have to un-tick those they don't want. Suggests start un-ticked and the user must tick those they want
GUI
You start by clicking "File"->"Install from .ckan"
This will open up a dialog window where you select your .ckan and then click "Open"
After selecting the file installation will ensue just like when installing other mods through CKAN.
Command line
Installing a metapackage through the command line is done via the following command
ckan install -c path/to/metapackage.ckan