@ -14,7 +14,7 @@ Please note that the compilation script doesn't build the updater.
@@ -14,7 +14,7 @@ Please note that the compilation script doesn't build the updater.
[Install Docker ](https://docs.docker.com/install ).
Create 3 directories:
Create 2 directories:
* `workspace` -- a directory that will contain a cache of qTox dependencies
and the final qTox cross-compilation build. You should create this directory.
@ -22,16 +22,13 @@ Create 3 directories:
@@ -22,16 +22,13 @@ Create 3 directories:
* `qtox` -- the root directory of a qTox repository. This directory must
contain the qTox source code that will be cross-compiled.
* `script` -- a directory that contains the `build.sh` script. You could
create this directory and copy the `build.sh` script in it, or you
could just use the `qtox/windows/cross-compile` directory for this.
These directories will be mounted inside a Docker container at `/workspace` and
`/qtox` .
These directories will be mounted inside a Docker container at `/workspace` ,
`/qtox` and `/script` .
The contents of `qtox` and `script` directories are not modified during
compilation. The `build.sh` script makes a temporary copy of the `qtox`
directory for compilation.
> Note:
> The contents of `qtox` directory are not modified during compilation. The
> `build.sh` script makes a temporary copy of the `qtox` directory for the
> compilation.
Once you sort out the directories, you are ready to run the `build.sh` script
in a Docker container.
@ -44,14 +41,12 @@ in a Docker container.
@@ -44,14 +41,12 @@ in a Docker container.
To start cross-compiling for 32-bit release version of qTox run:
```sh
sudo docker run --rm \
-v /absolute/path/to/your/workspace:/workspace \
-v /absolute/path/to/your/script:/script \
-v /absolute/path/to/your/qtox:/qtox \
debian:stretch-slim \
/bin/bash /script /build.sh i686 release
/bin/bash /qtox/windows/cross-compile /build.sh i686 release
```
If you want to debug some compilation issue, you might want to instead run:
@ -61,12 +56,11 @@ If you want to debug some compilation issue, you might want to instead run:
@@ -61,12 +56,11 @@ If you want to debug some compilation issue, you might want to instead run:
sudo docker run -it \
--rm \
-v /absolute/path/to/your/workspace:/workspace \
-v /absolute/path/to/your/script:/script \
-v /absolute/path/to/your/qtox:/qtox \
debian:stretch-slim \
/bin/bash
# Run the script
bash /script /build.sh i686 release
bash /qtox/windows/cross-compile /build.sh i686 release
```
These will cross-compile all of the qTox dependencies and qTox itself, storing
@ -85,19 +79,18 @@ faster.
@@ -85,19 +79,18 @@ faster.
> minutes using 8 hyperthreads to rebuild using the cached dependencies.
After cross-compiling has finished, you should find the comiled qTox in a
`workspace\i686\qtox` or `workspace\x86_64\qtox\ ` directory, depending on the
`workspace/i686/qtox` or `workspace/x86_64/qtox ` directory, depending on the
architecture.
You will also find `workspace\ dep-cache` directory, where all the
You will also find `workspace/ dep-cache` directory, where all the
cross-compiled qTox dependencies will be cached for the future builds. You can
remove any directory inside the `dep-cache` , which will result in the
`build.sh` re-compiling the removed dependency only.
_The `workspace` direcory structure for reference_
The `workspace` direcory structure for reference:
```
workspace/
workspace
├── i686
│ ├── dep-cache
│ │ ├── libexif