Skip to content

How to Build Engine Runtime Libraries

Seongjae Park edited this page Apr 30, 2019 · 26 revisions

You can build Blueshift Engine runtime libraries. But Blueshift Editor is not open source yet.

Note: Building from source code is intended for users who want to use/test new features or customize the C++ source code. For most users, we recommend the binary releases.

Jump to:

Prerequisite

Clone the repository (for all platforms)

Before we can build the engine, we need to clone the repository recursively.

git clone --recursive https://github.com/PolygonTek/BlueshiftEngine.git

Build using build scripts

Windows (64 bit)

  • Run Build/Build-Win64.bat to build engine from the sources.

macOS

  • Run Build/Build-macOS.command to build engine for macOS from the sources.

iOS

  • Run Build/Build-iOS.command to build engine for iOS from the sources.

Android

  • Set JAVA_HOME environment variable to "C:\Program Files (x86)\Java\jdk1.8.0_161"
  • Set ANDROID_HOME environment variable to "%USERPROFILE%\AppData\Local\Android\Sdk"
  • Make sure that NDK is installed in Configure/SDK Manager/SDK Tools
  • Run Build/Build-Android.bat or Build/Build-Android.command to build engine for Android from the sources. (JDK 8 Required)

Build using IDE

Windows (64 bit)

  • Run cmake-vs2017-Win64.bat to generate Visual Studio 2017 solution file.
  • Open Build/msvc2017/Blueshift.sln

macOS

  • Run cmake-macOS.command to generate XCode project file.
  • Open Build/xcode-macOS/Blueshift.xcodeproj

iOS

  • Run cmake-iOS.command to generate XCode project file.
  • Open Build/xcode-iOS/Blueshift.xcodeproj

Android

  • Run Android Studio
  • If you run Android Studio for the first time. Make sure that CMake is installed in Configure/SDK Manager/SDK Tools
  • Open a project folder located at Build/Android/Blueshift Select from View/Tool Windows/Build Variants menu Build/Make Project

When iOS/macOS build failed

  • Ensure Apple's command line tools are installed (xcode-select --install to launch the installer).

When Android build failed

  • Check JAVA_HOME environment variable set correctly (test typing java -version in the console)
  • Use shorter project path instead of deep path hierarchy