Skip to content

Latest commit

 

History

History
40 lines (38 loc) · 2 KB

WINDOWS_BUILDING.md

File metadata and controls

40 lines (38 loc) · 2 KB

Note: Tested with Windows 10 2004 using WSL 2

  1. git clone https://github.com/kylewill0725/krpc to a folder in Windows. This folder from now on will be called /krpc
  2. Install Ubuntu 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. Note: Windows Store Ubuntu is Ubuntu 20.04LTS unless other version is in name.
  5. Run command (note: This is about 1.5GB download)
sudo apt-get install mono-complete python-setuptools python-virtualenv \
python-dev autoconf libtool luarocks texlive-latex-base \
texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra \
libxml2-dev libxslt1-dev librsvg2-bin python3-dev python3-setuptools \
python3-virtualenv enchant latexmk openjdk-8-jdk
  1. cd to /krpc in Ubuntu (ex. /mnt/d/source/repos/krpc but yours is probably different)
  2. Using Windows 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:

  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.