Platform Setup
Basic setup of Ceramic allows to build apps with the web
target and run these through electron
.
In order to build native apps (using C++
target) and support additional platforms, specific setup is required.
Mac
Building for Mac can only be done from Mac
- Install Xcode from the Mac App Store
You should then be able to build a native Mac app when you select Build/Run Mac
from Visual Studio Code.
Windows
Building for Windows can only be done from Windows
- Install Visual Studio Community with Visual C++ build tools (2019 version should be fine).
You should then be able to build a native Windows app when you select Build/Run Windows
from Visual Studio Code.
iOS
Building for iOS can only be done from Mac
- Install Xcode from the Mac App Store
- Install Cocoapods
You should then be able to build a native Windows app when you select Build/Run iOS
from Visual Studio Code.
Android
Building for Android can be done from Mac, Linux and Windows
- Install Android Studio
- Install NDK r21e (other versions are not guaranteed to work so you should use this one).
HXCPP needs to know where your Android SDK and Android NDK are installed. To solve that, you need to add some info inside your .hxcpp-config.xml
(that should be located inside your home directory. If not, you can create it).
.hxcpp-config.xml
<xml>
<section id="vars">
<set name="SDK_ROOT" value="C:/Path/to/your/SDKs/" />
<set name="ANDROID_SETUP" value="true" />
<set name="ANDROID_SDK" value="C:/Path/to/your/Android/sdk" />
<set name="ANDROID_NDK_ROOT" value="C:/Path/to/your/Android/NDK" />
<set name="ANDROID_NDK_DIR" value="C:/Path/to/your/Android/NDK" />
</section>
</xml>
If you are on macOS Catalina or above, you may need to disable Gatekeeper to make the NDK binaries work:
sudo spctl --master-disable
Linux
Building for Linux can only be done from Linux
Install g++
if not installed already:
sudo apt-get install g++
Install SDL (on linux, ceramic app is linking to the SDL installed on your machine).
sudo apt-get install libsdl2-dev
Your SDL version should be equal or above 2.0.22
. On Ubuntu, you might need to add an additional repository like ppa:savoury1/multimedia
as explained here, in order to get latest SDL version.
Install required dependencies:
sudo apt-get install libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev libopenal-dev
You should then be able to build a native Linux app when you select Build/Run Linux
from Visual Studio Code.
Unity
Building for unity can be done from Mac and Windows. Linux is considered in a future release but not implemented yet.
If you have multiple versions of Unity installed on your machine, Ceramic will give priority to the most recent 2021.x
version because it is the current LTS. In general, you are encouraged to stick with Unity 2021 branch for now, until Unity 2022 becomes the next LTS and Ceramic export to that version is fully tested and functional.
- Download Unity Hub and install Unity
2021.LTS
You should then be able to export a Unity project when you select Build/Run Unity
from Visual Studio Code.
You can specify an exact version of Unity to use in your project's ceramic.yml
:
app:
unity:
version: 2021.3.14f1
If you installed Unity on a non-standard path, you can also specify the path to your Unity installation:
app:
unity:
path: 'C:/Path/To/Your/Unity/Editor/'
Continue reading ➔ Reference: ceramic.yml