Installation
Currently, the only implemented installation method is via cloning the GitHub repository and building with CMake and Pip. See bellow for specifical instructions for Linux and Windows.
Linux and Mac
Requirements: Git 2.14+, GCC 9+, CMake 3+, Pip 22+ (Python 3.8+), LibXml2 2.9.3.
If you are on Linux OS you can install libxml2 with:
$ sudo apt-get update
$ sudo apt-get install libxml2
for Ubuntu, or similarly for other Linux distributions, using the corresponding package manager.
In case you are in MacOS libxml2 can be installed by using Homebrew:
$ brew install libxml2
The following mandatory steps are valid for both MacOS and linux systems:
First of all, clone this repository with all its submodules to a local repository.
$ git clone --recurse-submodules https://github.com/KDSource/KDSource
Go to source directory and install with
cmake:$ cd /path/to/kdsourcesource $ mkdir build && cd build $ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/kdsourceinstall $ make install $ cd ..
Where
/path/to/kdsourcesourceis the folder where the source distribution of KDSource was cloned, and/path/to/kdsourceinstallis the folder where you wish to install KDSource internal files.Install Python API with
pip:$ cd python $ pip install . $ cd ..
KDSource is ready to be used in
/path/to/kdsourceinstall. For example, you can see thekdtoolcommand options with:$ /path/to/kdsourceinstall/bin/kdtool --help
If you wish to have KDSource tools available in your path, execute:
$ export PATH=$PATH:/path/to/kdsourceinstall/bin
Or add this command to
~/.profile(and update withsource ~/.profile).
Windows
Requirements: Git 2.14+, MinGW-GCC 11+, CMake 3+, Pip 22+ (Python 3.8+), LibXml2 2.9.3.
You can install KDSource, including LibXml2, using the INSTALL.ps1 PowerShell script:
> .\INSTALL.ps1
The script requires 7-Zip, with 7z command in the system path.
If you prefer a step-by-step approach, you can download libxml2 in the following link:
64 bits: http://xmlsoft.org/sources/win32/64bit/
32 bits: http://xmlsoft.org/sources/win32/ Download and extract the
libxml2andiconvarchives, and add the path to thebinsubdirectory of each library to the systemPATHvariable.
Important: The architecture (32 vs 64 bits) of the installed libxml2 and iconv must be the same as the MinGW and CMake architecture. Also make sure that other libxml2 or iconv files with different architecture are not in the PATH, or at least not ahead of the ones to be used.
The following instructions use the PowerShell command prompt, and therefore assume that the bin subdirectory of Git, MinGW and CMake are in the system PATH.
First of all, clone this repository with all its submodules to a local repository.
> git clone --recurse-submodules https://github.com/KDSource/KDSource
Go to source directory and install with
cmake:> cd C:\\path\\to\\kdsourcesource > mkdir build && cd build > cmake .. -DCMAKE_INSTALL_PREFIX=C:\\path\\to\\kdsourceinstall -G "MinGW Makefiles" > set C_INCLUDE_PATH=C:\\path\\to\\iconv\\include > mingw32-make install > cd ..
Where
C:\\path\\to\\kdsourcesourceis the folder where the source distribution of KDSource was cloned, andC:\\path\\to\\kdsourceinstallis the folder where you wish to install KDSource internal files.C:\\path\\to\\iconvis the folder whereiconvwas extracted.Add the
C:\\path\\to\\kdsourceinstall\libsubdirectory to the systemPATH.Install Python API with
pip:> cd python > pip install . > cd ..
KDSource is ready to be used in
C:\\path\\to\\kdsourceinstall. For example, you can see thekdtool-resamplecommand options with:> C:\\path\\to\\kdsourceinstall\\bin\\kdtool-resample --help
If you wish to have KDSource tools available in your path, add the
binsubdirectory to the systemPATH.Note: Currently, the
kdtoolapplication is not available on Windows, but the resampling tool can be invoked directly withkdtool-resample, as shown in the example above.