-
-
Notifications
You must be signed in to change notification settings - Fork 348
Building CKAN
Building CKAN from the main repo is simple, but may be non-obvious to new users. This guide will explain how to build the most recent version of CKAN from source.
First, check the Build Environment page to make sure you have all the tools you need to run the build process on your platform.
Next clone a copy of the code from the repo. If using command line git
:
git clone --depth 1 https://github.com/KSP-CKAN/CKAN.git
cd CKAN
-
cd
to CKAN directory and pull the latest commits:cd path/to/CKAN/ git pull
-
Remove _build/ directory, if exists:
rm -rf _build
-
Run cake build script. For Windows:
-
Open Powershell
-
Make the build script runnable:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
-
Run the build script:
.\build.ps1
For Linux or macOS:
./build
If nothing failed, the new
ckan.exe
will reside in theCKAN/_build/
directory. -
The CKAN team uses tests to protect ourselves from breaking existing code.
Windows:
.\build.ps1 test
Linux or macOS:
./build test
All tests must pass before a pull request can be merged. If a test fails, look for problems with your changes and try to fix them. If you can't, it can sometimes be appropriate to update or remove an old test that is no longer applicable, but make sure you are not doing this simply because you don't understand what the test does or how to fix it.
If you are compiling the disk image on Linux:
sudo apt-get install libplist-utils xorriso
For Linux and macOS:
./build osx
Now the disk image is in CKAN/_build/osx/
.
Linux only:
./build deb
The package will be in CKAN/_build/deb
.
Linux only:
./build rpm
The package will be in CKAN/_build/rpm/RPMS/noarch
.
Contact us on the KSP forum or on our Discord server