-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
80 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
title: Native extensions - extension manifest | ||
brief: This manual describes the extension manifest and how it correlates to the application manifest. | ||
--- | ||
|
||
# Extension manifest | ||
|
||
The extension manifest is a configuration file with flags and defines used when building a single extension. This configuration is combined with an application level configuration and a base level configuration for the Defold engine itself. | ||
|
||
## App Manifest | ||
|
||
The application manifest (file extension `.appmanifest`) is an application level configuration of how to build your game on the build servers. The application manifest lets you remove parts of the engine that you don't use. If you don't need a physics engine, you can remove that from the executable to reduce it's size. Learn how to exclude unused feature [in the application manifest manual](/manuals/app-manifest). | ||
|
||
## Engine manifest | ||
|
||
The Defold engine has a build manifest (`build.yml`) which is included with each release of the engine and the Defold SDK. The manifest controls which SDK versions to use, which compilers, linkers and other tools to run and which default build and link flags to pass to these tools. The manifest can be found in share/extender/build_input.yml [on GitHub](https://github.com/defold/defold/blob/dev/share/extender/build_input.yml). | ||
|
||
## Extension Manifest | ||
|
||
The extension manifest (`ext.manifest`) on the other hand is a configuration file specifically for an extension. The extension manifest controls how the source code of the extension is compiled and linked and which additional libraries to include. | ||
|
||
The three different manifest files all share the same syntax so that they can be merged and fully control how the extensions and the game is built. | ||
|
||
For each extension that is built, the manifests are combined as follows: | ||
|
||
manifest = merge(game.appmanifest, ext.manifest, build.yml) | ||
|
||
This allows the user to override the default behaviour of the engine and also each extension. And, for the final link stage, we merge the app manifest with the defold manifest: | ||
|
||
manifest = merge(game.appmanifest, build.yml) | ||
|
||
|
||
### The ext.manifest file | ||
|
||
Apart from the name of the extension, the manifest file can contain platform specific compile flags, link flags, libs and frameworks. If the *ext.manifest* file does not contain a "platforms" segment, or a platform is missing from the list, the platform you bundle for will still build, but without any extra flags set. | ||
|
||
Here is an example: | ||
|
||
```yaml | ||
name: "AdExtension" | ||
|
||
platforms: | ||
arm64-ios: | ||
context: | ||
frameworks: ["CoreGraphics", "CFNetwork", "GLKit", "CoreMotion", "MessageUI", "MediaPlayer", "StoreKit", "MobileCoreServices", "AdSupport", "AudioToolbox", "AVFoundation", "CoreGraphics", "CoreMedia", "CoreMotion", "CoreTelephony", "CoreVideo", "Foundation", "GLKit", "JavaScriptCore", "MediaPlayer", "MessageUI", "MobileCoreServices", "OpenGLES", "SafariServices", "StoreKit", "SystemConfiguration", "UIKit", "WebKit"] | ||
flags: ["-stdlib=libc++"] | ||
linkFlags: ["-ObjC"] | ||
libs: ["z", "c++", "sqlite3"] | ||
defines: ["MY_DEFINE"] | ||
|
||
armv7-ios: | ||
context: | ||
frameworks: ["CoreGraphics", "CFNetwork", "GLKit", "CoreMotion", "MessageUI", "MediaPlayer", "StoreKit", "MobileCoreServices", "AdSupport", "AudioToolbox", "AVFoundation", "CoreGraphics", "CoreMedia", "CoreMotion", "CoreTelephony", "CoreVideo", "Foundation", "GLKit", "JavaScriptCore", "MediaPlayer", "MessageUI", "MobileCoreServices", "OpenGLES", "SafariServices", "StoreKit", "SystemConfiguration", "UIKit", "WebKit"] | ||
flags: ["-stdlib=libc++"] | ||
linkFlags: ["-ObjC"] | ||
libs: ["z", "c++", "sqlite3"] | ||
defines: ["MY_DEFINE"] | ||
``` | ||
#### Allowed keys | ||
Allowed keys are for platform specific compile flags are: | ||
* `frameworks` - Apple frameworks to include when building (iOS and OSX) | ||
* `flags` - Flags that should be passed to the compiler | ||
* `linkFlags` - Flags that should be passed to the linker | ||
* `libs` - Additional libraries to include when linking | ||
* `defines` - Defines to set when building | ||
* `aaptExtraPackages` - Extra package name that should be generated (Android) | ||
* `aaptExcludePackages` - Regexp (or exact names) of packages to exclude (Android) | ||
* `aaptExcludeResourceDirs` - Regexp (or exact names) of resource dirs to exclude (Android) | ||
* `excludeLibs`, `excludeJars`, `excludeSymbols` - These flags are used to remove things previously defined in the platform context. | ||
|
||
For all the keywords, we apply white listing filter. This is to avoid illegal path handling and accessing files outside of the build upload folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Supported platforms are `ios`, `android`, `osx`, `win32`, `linux`, `web`. | ||
|
||
Supported `arc-platform` pairs are `armv7-ios`, `arm64-ios`, `x86_64-ios`, `armv7-android`, `arm64-android`, `x86-osx`, `x86_64-osx`, `x86-win32`, `x86_64-win32`, `x86_64-linux`, `js-web` and `wasm-web`. | ||
Supported `arc-platform` pairs are `arm64-ios`, `x86_64-ios`, `armv7-android`, `arm64-android`, `arm64-osx`, `x86_64-osx`, `x86-win32`, `x86_64-win32`, `x86_64-linux`, `js-web` and `wasm-web`. |