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 stand-alone server running 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.
Ensure that you have the following tools packaged:
- iPhoneOS16.2.sdk
- iPhoneOS17.5.sdk
- iPhoneSimulator16.2.sdk
- iPhoneSimulator17.5.sdk
- MacOSX13.1.sdk
- MacOSX14.5.sdk
- XcodeDefault14.2.xctoolchain.darwin
- XcodeDefault15.4.xctoolchain.darwin
NOTE: Complete list of needed packages see link
Setup all needed packages via
DM_PACKAGES_URL=<url_where_package_located> ./server/scripts/standalone/setup-standalone-env.sh
It's download packages, unpack it to correct folder and generate .env file with correct pathes
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.
To run stand-alone Extender instance use folowing 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.
Note that Prerequisites should be completed and manifestmergetool.jar already downloaded or built.
-
Download VSCode: https://code.visualstudio.com/download
-
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.
-
Open folder with Extender sources in VSCode.
-
Go to
Run and Debug
and openlaunch.json
-
Add following launch configuration
{ "type": "java", "name": "Spring Boot-ExtenderApplication<server>", "request": "launch", "cwd": "${workspaceFolder}", "mainClass": "com.defold.extender.ExtenderApplication", "projectName": "server", "args": "--spring.config.location=classpath:./,file:${workspaceFolder}/server/configs/ --extender.sdk.location=${workspaceFolder}/server/app/sdk --spring.profiles.active=standalone-dev", "envFile": ["${workspaceFolder}/server/envs/.env", "${workspaceFolder}/server/envs/user.env", "${workspaceFolder}/server/envs/macos.env"] }
-
Select
Spring Boot-ExtenderApplication<server>
in dropdown and start debug session.