Skip to content

Latest commit

 

History

History
42 lines (39 loc) · 2.08 KB

WINDOWS_BUILDING.md

File metadata and controls

42 lines (39 loc) · 2.08 KB

These instructions are likely out of date. We are working on better build instructions for Windows

Note: Tested with Windows 10 2004 using WSL 2

  1. 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
  2. Install Ubuntu 22.04 from Microsoft Store
  3. Open Ubuntu
  4. run the following to prevent conflicts with Windows
echo "[interop]
appendWindowsPath = false" | sudo tee -a /etc/wsl.conf
  1. run exit and in a command prompt run wsl --shutdown.
  2. Open Ubuntu
  3. Install bazelisk by following this link.
  4. Add the mono repository from here.
  5. 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
  1. cd to /krpc in Ubuntu (ex. /mnt/d/source/repos/krpc but yours is probably different)
  2. Using Windows administrator command prompt, cd /krpc/lib
  3. Run mklink /D ksp {Kerbal_Space_Program_Directory}
  4. cd to /krpc/lib/ksp
  5. Run mklink /D KSP_Data .\KSP_x64_Data
  6. cd to /krpc/lib in Ubuntu.
  7. Run ln -s /usr/lib/mono/4.5 mono-4.5
  8. cd to /krpc
  9. Build using bazel build //:krpc

To get build output in Windows, and enable Visual Studio to find all the libraries:

  1. Run wsl -l in command prompt. Find the entry that doesn't have docker in its name. This will be refered to as Distro
  2. cd to /krpc/bazel-bin in Ubuntu
  3. Run pwd -P and copy the result to clipboard. This will be refered to as OutputPath
  4. cd to /krpc in Windows
  5. Run mklink /D build-out "\\wsl$\{Distro goes here}/{Paste OutputPath here}"
  6. Build output is now in build-out in repository root

Special thanks to Tamer1an, Enroy, and jh0ker for helping me figure this all out.