Note: Tested with Windows 10 2004 using WSL 2
- git clone https://github.com/krpc/krpc (or your own fork) to a folder in Windows. This folder from now on will be called
/krpc
- Install Ubuntu 22.04 from Microsoft Store
- Open Ubuntu
- run the following to prevent conflicts with Windows
echo "[interop]
appendWindowsPath = false" | sudo tee -a /etc/wsl.conf
- run
exit
and in a command prompt runwsl --shutdown
. - Open Ubuntu
- Install bazelisk by following this link.
- Add the mono repository from here.
- Run command (note: This is about 1.5GB download)
sudo apt-get install mono-complete python-setuptools \
python-dev-is-python3 autoconf libtool luarocks maven texlive-latex-base \
texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra \
libxml2-dev libxslt1-dev librsvg2-bin python3-dev python3-setuptools \
python3-virtualenv latexmk openjdk-8-jdk libenchant-2-2
- cd to
/krpc
in Ubuntu (ex./mnt/d/source/repos/krpc
but yours is probably different) - Using Windows administrator command prompt, cd
/krpc/lib
- Run
mklink /D ksp {Kerbal_Space_Program_Directory}
- cd to
/krpc/lib/ksp
- Run
mklink /D KSP_Data .\KSP_x64_Data
- cd to
/krpc/lib
in Ubuntu. - Run
ln -s /usr/lib/mono/4.5 mono-4.5
- cd to
/krpc
- Build using
bazel build //:krpc
To get build output in Windows, and enable Visual Studio to find all the libraries:
- Run
wsl -l
in command prompt. Find the entry that doesn't have docker in its name. This will be refered to asDistro
- cd to
/krpc/bazel-bin
in Ubuntu - Run
pwd -P
and copy the result to clipboard. This will be refered to asOutputPath
- cd to
/krpc
in Windows - Run
mklink /D build-out "\\wsl$\{Distro goes here}/{Paste OutputPath here}"
- Build output is now in
build-out
in repository root