|
@@ -4,15 +4,7 @@
|
|
Here we list some relevant build information, in order to make the integrations with your extensions as easy as possible.
|
|
Here we list some relevant build information, in order to make the integrations with your extensions as easy as possible.
|
|
|
|
|
|
Here are some things to consider when you create an extension for the Defold engine.
|
|
Here are some things to consider when you create an extension for the Defold engine.
|
|
-
|
|
|
|
-# Static linkage
|
|
|
|
-
|
|
|
|
-The custom engine is built using static linkage.
|
|
|
|
-The main reason is that on iOS, multiple executable binaries in an .ipa aren't allowed in the app store.
|
|
|
|
-
|
|
|
|
-# No Exceptions:
|
|
|
|
-
|
|
|
|
-We don't make use of any exceptions in the engine, as it decreases executable size and improves the runtime performance. This may be beneficial for you to if you wish to get a minimal extension.
|
|
|
|
|
|
+For more general guidelines on how to develop cross platform native code, and also extension/Lua apis, please refer to [Native Extensions - Best Practices](/manuals/extensions_best_practices)
|
|
|
|
|
|
# C++ version
|
|
# C++ version
|
|
|
|
|
|
@@ -20,60 +12,46 @@ In the engine itself we use no C++ version higher than C++98. While you may use
|
|
|
|
|
|
When creating libraries (such as extensions), it's good to keep the lowest common denominator as a target.
|
|
When creating libraries (such as extensions), it's good to keep the lowest common denominator as a target.
|
|
|
|
|
|
-# Standard Template Libraries - STL
|
|
|
|
-
|
|
|
|
-Since the Defold engine doesn't use any STL code (except std::sort), it may work for you to use STL in your extension. Again, bear in mind that ABI incompatibilites may hinder you when using your extension in conjunction with other extensions.
|
|
|
|
-
|
|
|
|
-In the Defold engine, we use `const char*` instead of `std::string`. And writing your own dynamic array or hash table isn't very hard, but there are also good alternatives found online.
|
|
|
|
-
|
|
|
|
# Toolchain
|
|
# Toolchain
|
|
|
|
|
|
-Clang - MscOS, iOS, (Win32)
|
|
|
|
|
|
+Clang - macOS, iOS, Win32
|
|
GCC - Android, Linux (deprecated)
|
|
GCC - Android, Linux (deprecated)
|
|
-CL - Windows (deprecated)
|
|
|
|
-
|
|
|
|
-_NOTE: We are aiming to compile all platforms with Clang in the near future in order to streamline our builds_
|
|
|
|
|
|
|
|
## SDK Versions
|
|
## SDK Versions
|
|
|
|
|
|
-* Android:
|
|
|
|
|
|
+* Android: NDK 10e, Build Tools 23.0.2, Api Level 14
|
|
* iOS: iPhoneOS11.2.sdk
|
|
* iOS: iPhoneOS11.2.sdk
|
|
* MacOS: MacOSX10.13.sdk
|
|
* MacOS: MacOSX10.13.sdk
|
|
* Windows: WindowsKits 8.1 + 10.0, Microsoft Visual Studio 14.0
|
|
* Windows: WindowsKits 8.1 + 10.0, Microsoft Visual Studio 14.0
|
|
* Linux: Ubuntu 16.04, gcc 5.4.0, libssl-dev, uuid-dev, libxi-dev, libopenal-dev, libgl1-mesa-dev, libglw1-mesa-dev, freeglut3-dev
|
|
* Linux: Ubuntu 16.04, gcc 5.4.0, libssl-dev, uuid-dev, libxi-dev, libopenal-dev, libgl1-mesa-dev, libglw1-mesa-dev, freeglut3-dev
|
|
-* Html5: Emscripten 1.35.0,
|
|
|
|
|
|
+* Html5: Emscripten 1.38.0,
|
|
|
|
|
|
## C++ version + ABI compatibility
|
|
## C++ version + ABI compatibility
|
|
|
|
|
|
-We build our engine using `-std=c++98`
|
|
|
|
-
|
|
|
|
-For iOS/MacOS, we use `-miphoneos-version-min=6.0` and `-mmacosx-version-min=10.7` respectively.
|
|
|
|
-
|
|
|
|
* Linux: `GCC 5.4.0`
|
|
* Linux: `GCC 5.4.0`
|
|
* Android:`GCC 4.8`
|
|
* Android:`GCC 4.8`
|
|
* Html5: `Emscripten 1.35.0`
|
|
* Html5: `Emscripten 1.35.0`
|
|
* Win32: `Microsoft Visual Studio 14.0` alt `clang-6.0`
|
|
* Win32: `Microsoft Visual Studio 14.0` alt `clang-6.0`
|
|
* iOS/MacOS: `apple-clang` alt `clang-6.0`
|
|
* iOS/MacOS: `apple-clang` alt `clang-6.0`
|
|
|
|
|
|
-# Win32 + Clang
|
|
|
|
-
|
|
|
|
-A recent addition is to be able to build the Windows builds using clang.
|
|
|
|
-This allows for faster builds on our servers, and also it allows us to streamline our builds.
|
|
|
|
-
|
|
|
|
-_NOTE: This feature is new, so it's not enabled by default yet_
|
|
|
|
-
|
|
|
|
-You can use this feature by adding the flag `use-clang` to your app manifest:
|
|
|
|
|
|
+For iOS/MacOS, we use `-miphoneos-version-min=6.0` and `-mmacosx-version-min=10.7` respectively.
|
|
|
|
|
|
- platforms:
|
|
|
|
- x86_64-win32:
|
|
|
|
- use-clang: true
|
|
|
|
|
|
+We don't specify a specific C++ version, so we use the default of each compiler.
|
|
|
|
|
|
|
|
+# Win32 + Clang
|
|
|
|
|
|
-## CL.exe / LINK.exe
|
|
|
|
|
|
+A recent addition is to be able to build the Windows builds using clang.
|
|
|
|
+This allows for faster builds on our servers, and also allows us to streamline our builds.
|
|
|
|
|
|
-Although this feature is still supported, it will soon be deprecated.
|
|
|
|
|
|
+# Static linkage
|
|
|
|
|
|
|
|
+The custom engine is built using static linkage.
|
|
|
|
+The main reason is that on iOS version < 8, multiple executable binaries in an .ipa aren't allowed in the app store.
|
|
|
|
|
|
|
|
+# No C++ Exceptions
|
|
|
|
|
|
|
|
+We don't make use of any exceptions in the engine.
|
|
|
|
+It isn't generally used in game engines, since the data is (mostly) known beforehand, during development.
|
|
|
|
+Removing the support for C++ exceptions decreases executable size and improves the runtime performance.
|
|
|
|
|
|
|
|
|