Extender
Extender is a build server that builds native extensions of the Defold engine. The build server can either by run using Docker or as a standalone server running on macOS.
- Server description and setup/run instructions - link
- Debugging FAQ - link
- Live build progress (SSE) - link
Running as a stand-alone server on macOS
The stand-alone server is currently used on a machine runing macOS. The server is used to build darwin targets (macOS+iOS) using the Apple tools (XCode+Apple Clang). It is also possible to use this setup when developing on macOS.
Prerequisites
Ensure that on host is installed:
Before running Extender you need to have prepackaged toolchains and sdks. Full instruction how it can be done you can find here.
Ensure that you have the following tools packaged:
- iPhoneOS27.1.sdk
- iPhoneSimulator27.1.sdk
- MacOSX27.0.sdk
- XcodeDefault27.1.xctoolchain.darwin
NOTE: Complete list of needed packages see link
Xcode 27 runs only on Apple silicon, and Xcode 27.1 requires macOS Tahoe 26.6 or later. Swift Package Manager builds also need the full Xcode 27.1 app. If it is installed somewhere other than /Applications/Xcode.app, add a "27.1" entry under extender.spm.xcode-developer-dirs in the server configuration, pointing to its Contents/Developer path.
After obtain packages with sdks and toolchains you make it available via HTTP. The easiest way to do these is to run Python HTTP server on local machine. For example,
cd <path_where_packages_located>
python -m http.server
It starts local web server that available at http://localhost:8000.
(Macos only supported)
Generate file with environment variables via
./server/envs/generate_user_env.sh
It produces file with environemnt variables (user.env) which contains specific to your host pathes.
Run this script again when the JDK or the Xcode toolchain version in server/envs/macos.env changes. It updates the toolchain paths in user.env.
Setup all needed packages via
DM_PACKAGES_URL=<url_where_package_located> ./server/scripts/standalone/setup-standalone-env.sh
If you run local HTTP server from previous step replace <url_where_package_located> with http://localhost:8000.
It downloads the packages and unpacks them into platformsdk.
For deployed builds, route osx-xcode27_1 to this Apple silicon host in the frontend configuration. Keep older Xcode routes on hosts with their matching toolchains and SDKs.
Local Extender's application
There are two ways to obtain Extender's jars:
- Download ready-to-use jars from public repo. See instructions here (step 5).
- Build jars locally. See instruction here.
As result you should have 2 jars in ./server/apps/ folder: extender.jar and manifestmergetool.jar.
Run
To run stand-alone Extender instance use following script:
./server/scripts/standalone/service-standalone.sh start
Script takes commad as 1st argument. Command can be one of the following:
- start - start new Extender instance
- stop - stop already running Extender instance
- restart - stop and start Extender instance from the scratch
If you want to use different Spring profile you can pass it via 2nd argument. For example,
./server/scripts/standalone/service-standalone.sh start standalone-dev
Note: all Spring profiles should be located in ./server/configs/ folder.
As a result Extender should start and start listening 9010 port (that port set by default). E.g. Extender can be reached via http://localhost:9010.
Logs of extender can be found in ./server/app/logs/ folder.
If you want to use other port (not 9010) you can change property server.port in ./server/configs/application-standalone-dev.yml.
Show the output
The output can be found in ./server/app/logs/stdout.log
To show the log as it updates:
tail -F server/app/logs/stdout.log
Develop/debug standalone Extender using VSCode
Note that Prerequisites should be completed and manifestmergetool.jar already downloaded or built.
- Download VSCode: https://code.visualstudio.com/download
- Open folder with Extender sources in VSCode.
- Install following extensions:
- Spring Boot Extension Pack https://marketplace.visualstudio.com/items?itemName=vmware.vscode-boot-dev-pack
- Spring Boot Dashboard https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-spring-boot-dashboard
- Language Support for Java(TM) by Red Hat https://marketplace.visualstudio.com/items?itemName=redhat.java
- Gradle for Java https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle
- Debugger for Java https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug. Note: version should be v0.58.2024090204 (pre-release) or greater.
- Select
Spring Boot-ExtenderApplication<server> in dropdown and start debug session.
Develop/debug standalone Extender using IntelliJ IDEA
Note that Prerequisites should be completed and manifestmergetool.jar already downloaded or built.
- Download IntelliJ IDEA: https://www.jetbrains.com/idea/download
- Run IntelliJ IDEA and open folder with Extender's sources from the welcome screen.
- Select
Run standalone Extender in Run configurations dropdown and start debug session.