diff --git a/android/WSL.README.md b/android/WSL.README.md index 27384c2c51..884969b98e 100644 --- a/android/WSL.README.md +++ b/android/WSL.README.md @@ -4,15 +4,14 @@ Allow Windows users to use built-in WSL for setting up for BOINC Android development -## Limitations +## Known Issues (WSL1) -* Windows 10 only -* Windows Defender may affect compile times (see [Tips#1](#Tips)) -* fork/exec error on WSL (see [Tips#1](#Tips)) +* Slow build times +* fork/exec error ## Prerequisites -* Windows 10 +* Windows 10 x86_64 version 1607 or later (for WSL1) * [Android Studio (Windows)](https://developer.android.com/studio#downloads) * [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10) # IMPORTANT # * [Ubuntu from Microsoft Store](https://wiki.ubuntu.com/WSL#Installing_Ubuntu_on_WSL_via_the_Microsoft_Store_.28Recommended.29) @@ -42,23 +41,29 @@ We are going to use Ubuntu 18.04 as an example, other versions should be similar ===== BOINC for all platforms build done ===== If you ever had problem at this point, try `git clean -fxd ..` and run again - -1. Copy the main BOINC repo to Android Studio readable path. Replace `` with appropriate location. - - $ cp -fr ~/boinc /mnt/c//boinc + + While waiting please do another repository cloning at Android Studio. ## Android Studio -Import project from `C:\\boinc\android\BOINC` +Open Android Studio and choose `Check out project from Version Control > Git` + +Set URL as `https://github.com/boinc/boinc` and clone it. When asked about creating Android Studio project, select No. + +Once the native client build is complete, copy the native client binaries to cloned repo at Android Studio side. Replace `` with appropriate location. + + $ cp -frv ~/boinc/android/BOINC/app/src/main/assets/* /mnt/c//boinc/android/BOINC/app/src/main/assets/ + +Then import project from `C:\\boinc\android\BOINC` After Gradle sync completed, you can now start development or compile the APK. +## Workarounds + +While WSL1 makes building the native client easily, it is prone to errors and speed issues. You may want to checkout [WSL#2469](https://github.com/microsoft/WSL/issues/2469) for workarounds. Note that [Microsoft does not recommend this](https://github.com/Microsoft/WSL/issues/873#issuecomment-463442051) and users are expected do it at their own discretion. You can read more about WSL1 and its issues at [WSL#873](https://github.com/Microsoft/WSL/issues/873#issuecomment-425272829). This should be fixed with the release of WSL2. + ## Tips -1. For compatibility and speed reasons, you may want to temporarily disable Windows Defender Real Time Protection. - - Start Menu > search Virus & Threat Protection > Manage settings > toggle Real-time protection to Off - 1. Speed up compiling by adding: $ MAKEFLAGS="-j$(nproc --all)" ./build_all.sh