You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-89Lines changed: 2 additions & 89 deletions
Original file line number
Diff line number
Diff line change
@@ -2,95 +2,8 @@
2
2
3
3
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.
4
4
5
-
6
-
## Running on Docker
7
-
This describes how to build and run the extender server using Docker. It involves 4 steps:
8
-
9
-
1. Download and prepare required packages
10
-
2. Serve the required packages
11
-
3. Build the Docker image
12
-
4. Run the Docker image in a container
13
-
14
-
15
-
### Prerequisites
16
-
Make sure you have [Docker](https://www.docker.com) installed and running.
17
-
18
-
### Download and prepare required packages
19
-
Most of the SDKs used by Extender server have licenses that prevent third party redistribution. To efficiently work with the build server it is recommended to package the SDKs and serve them from a private URL. The URL is defined as the DM_PACKAGES_URL environment variable.
20
-
21
-
The [Dockerfile](./server/docker-base/Dockerfile) lists the actual packages needed per platform:
We have prepared scripts to package the required files. Use the scripts in the [defold/scripts/package](https://github.com/defold/defold/tree/dev/scripts/package) folder to create these packages.
36
-
37
-
NOTE: If you only plan to use the extender server to build for a single platform you may remove the setup steps for the other platforms to speed up the build process.
38
-
39
-
### Serve the required packages
40
-
When the packages are downloaded you need to make them available when the Docker container is built. The recommended way is to serve the files using Python:
41
-
42
-
```sh
43
-
# Using python 2
44
-
$ export DM_PACKAGES_URL=http://localhost
45
-
$ cd local_sdks && python -m SimpleHTTPServer
46
-
```
47
-
48
-
```sh
49
-
# Using python 3
50
-
$ export DM_PACKAGES_URL=http://localhost:9999
51
-
$ cd local_sdks && python -m http.server 9999
52
-
```
53
-
54
-
### Build the Docker image
55
-
Build the Extender Docker image by running:
56
-
57
-
```sh
58
-
./server/scripts/build.sh
59
-
```
60
-
61
-
To speed things up, tests can be disabled by passing `-xtest` to the command line.
62
-
63
-
```sh
64
-
$ ./server/scripts/build.sh -xtest
65
-
```
66
-
67
-
NOTE: The first time you build it will take a while (approx. 45 minutes). After that the Docker cache will speed it up.
68
-
69
-
NOTE: For Windows, I ran this using Git Bash. It may be possible to speed it up by creating a .bat file for it, and running it in the Command Prompt.
70
-
71
-
72
-
### Run the Docker image in a container
73
-
Start the container based on the Docker image that was built by running:
74
-
75
-
Bash:
76
-
77
-
```sh
78
-
$ ./server/scripts/run-local.sh
79
-
```
80
-
81
-
Command Prompt:
82
-
83
-
```cmd
84
-
> server\scripts\run-local.bat
85
-
```
86
-
87
-
The Extender server is now available on port `http://localhost:9000`
88
-
89
-
90
-
### Stop the server
91
-
You can stop the server by pressing `Ctrl-C` from the terminal prompt where it was started.
92
-
93
-
NOTE: On Windows, it may be that the Ctrol+C doesn't work. Then you can stop the container using the Docker Desktop client.
5
+
* Server description and setup/run instructions - [link](/server/README.md)
Copy file name to clipboardExpand all lines: README_DEBUGGING.md
+35-49Lines changed: 35 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,11 @@ There is a debug script that you can run to download a specific SDK version, or
12
12
13
13
$ ./server/scripts/debug_defoldsdk.py [<sha1>]
14
14
15
-
This downloads the latest sdk to the folder `defoldsdk/<sha1>/defoldsdk`. It also sets the environment variable `DYNAMO_HOME` and then starts the extender server.
15
+
This downloads the latest sdk to the folder `defoldsdk/<sha1>/defoldsdk`; creates link from `defoldsdk/<sha1>/defoldsdk` to `./dynamo_home`; sets the environment variable `DYNAMO_HOME` and then starts the extender server with profile `all`. If you want to run docker compose with other profiles - it can be done via COMPOSE_PROFILES variable. For example
16
16
17
-
## Building .proto files
18
-
19
-
If you are building a native extension that has .proto files, and you are using a non-Linux DYNAMO_HOME, then chances are that you don't have the `libdlib_shared.so` file installed.
20
-
21
-
It is needed for building the proto files, and you can install it from a previous defoldsdk.
22
-
23
-
* Download the defoldsdk.zip from d.defold.com
24
-
* Extract the file to `${DYNAMO_HOME}/lib/x86_64-linux`:
@@ -34,20 +27,33 @@ It is needed for building the proto files, and you can install it from a previou
34
27
***DM_DEBUG_JOB_UPLOAD** - Output the file names in the received payload
35
28
***DYNAMO_HOME** - If set, used as the actual SDK for the builds
36
29
37
-
Note: if you wish to add more of these, remember to also add them to `server/scripts/run-local.sh` and `server\scripts\run-local.bat`
30
+
That variables can be pass to `python ./server/scripts/debug_defoldsdk.py` or to `docker compose` command. For example
38
31
39
-
# Debug the Docker container
32
+
```sh
33
+
DM_DEBUG_COMMANDS=1 DM_DEBUG_JOB_UPLOAD=1 docker compose -f ./server/docker/docker-compose.yml --profile linux up
34
+
```
40
35
41
-
Run the following command when the container is running:
36
+
## Building .proto files
42
37
43
-
Bash:
44
-
```
45
-
$ ./server/scripts/debug-local.sh
46
-
```
38
+
If you are building a native extension that has .proto files, and you are using a non-Linux DYNAMO_HOME, then chances are that you don't have the `libdlib_shared.so` file installed.
39
+
40
+
It is needed for building the proto files, and you can install it from a previous defoldsdk.
41
+
42
+
* Download the defoldsdk.zip from d.defold.com
43
+
* Extract the file to `${DYNAMO_HOME}/lib/x86_64-linux`:
The command will connect to the container using the `extender` user, and executes bash.
@@ -56,44 +62,24 @@ The command will connect to the container using the `extender` user, and execute
56
62
57
63
## Preparation
58
64
59
-
* For locally built SDK's (in DYNAMO_HOME), it's good to map the same folder path locally as is in the Docker container
60
-
61
-
$ ln -s $DYNAMO_HOME /dynamo_home
62
-
63
-
* Set the `DM_DEBUG_JOB_FOLDER` to a static folder, which both your computer and the Docker container can reach.
65
+
* For locally built SDK's (in DYNAMO_HOME), it's good to map the same folder path locally as is in the Docker container. Create a symlink to ./dynamo_home folder:
66
+
```sh
67
+
ln -sf $DYNAMO_HOME ./dynamo_home
68
+
```
69
+
* Run docker compose with following environment variables:
70
+
```sh
71
+
DM_DEBUG_JOB_FOLDER=/dynamo_home/job123456 DM_DEBUG_COMMANDS=1 docker compose -f ./server/docker/docker-compose.yml --profile linux up
72
+
```
73
+
Set the `DM_DEBUG_JOB_FOLDER` to a static folder, which both your computer and the Docker container can reach.
64
74
E.g. `DM_DEBUG_JOB_FOLDER=/dynamo_home/job123456`
65
75
This will help when you debug the generated engine executable, since the debugger will find the object files on your local drive.
66
76
67
-
* Build the container (if it wasn't already built):
0 commit comments