Skip to content

Latest commit

 

History

History
118 lines (93 loc) · 4.97 KB

BUILDING.md

File metadata and controls

118 lines (93 loc) · 4.97 KB

Building Guide

Software needed

Steps

Windows only

In a terminal prompt with administrator privileges, enable git symlinks globally:

git config --global core.symlinks true

Use this elevated prompt for the next steps.

Clone the repo recursively, either with your preferred Git GUI or with the command below:

git clone https://github.com/skyline-emu/skyline.git --recursive

Open Android Studio

First time users only

If you opened Android Studio for the first time, choose the Standard install type and complete the setup wizard leaving all settings to their default value.

If you get any errors on "Intel® HAXM" or "Android Emulator Hypervisor Driver for AMD Processors", you can safely ignore them as they won't be used for Skyline.

Import the project by clicking on the Open icon, then in the file picker choose the skyline folder you just cloned in the steps above:

Exclude the following folders from indexing:

  • app/libraries/llvm
  • app/libraries/boost

To exclude a folder, switch to the project view:

In the project view navigate to the app/libraries folder, right-click on the folder you want to exclude and navigate the menus to the Exclude option:

If an Invalid Gradle JDK configuration found error comes up, select Use Embedded JDK:

An error about NDK not being configured will be shown:

Ignore the suggested version reported by Android Studio. Instead, find the NDK version to download inside the app/build.gradle file:

ndkVersion 'X.Y.Z'

From that same file also note down the CMake version required:

externalNativeBuild {
    cmake {
        version 'A.B.C+'
        path "CMakeLists.txt"
    }
}

Open the SDK manager from the top-right toolbar:

Navigate to the SDK Tools tab and enable the Show Package Details checkbox in the bottom-right corner:

Expand the NDK (Side by side) and CMake entries, select the appropriate version from the previous step, then click OK.

Finally, sync the project:

Common issues (and how to fix them)

  • Cmake Error: CMake was unable to find a build program corresponding to "Ninja"

Check that you installed the correct CMake version in the Android Studio SDK Manager. If you're sure you have the correct one, you may try adding the path to CMake binaries installed by Android Studio to the local.properties file:

cmake.dir=<path-to-cmake-folder>

E.g. on Windows:

cmake.dir=C\:\\Users\\skyline\\AppData\\Local\\Android\\Sdk\\cmake\\3.18.1
  • 'shader_compiler/*.h' file not found

You didn't clone the repository with symlinks enabled. Windows requires administrator privileges to create symlinks so it's likely it didn't create them. In an administrator terminal prompt navigate to the Skyline root project folder and run:

git submodule deinit app/libraries/shader-compiler
git config core.symlinks true
git submodule foreach git config core.symlinks true
git submodule update --init --recursive app/libraries/shader-compiler

If you'd like to, you can enable symlinks globally by running: (this will only affect new repositories)

git config --global core.symlinks true