mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(windows): remove the script directory requirement
This commit is contained in:
parent
3c1d02d2cb
commit
5f7b9e67c1
@ -111,11 +111,10 @@ ls -lbh "$PWD"
|
||||
# Build
|
||||
sudo docker run --rm \
|
||||
-v "$PWD/workspace":/workspace \
|
||||
-v "$PWD/windows/cross-compile":/script \
|
||||
-v "$PWD":/qtox \
|
||||
-e TRAVIS_CI_STAGE="$STAGE" \
|
||||
debian:stretch-slim \
|
||||
/bin/bash /script/build.sh "$ARCH" "$BUILD_TYPE"
|
||||
/bin/bash /qtox/windows/cross-compile/build.sh "$ARCH" "$BUILD_TYPE"
|
||||
|
||||
# Purely for debugging
|
||||
ls -lbh workspace/"$ARCH"/dep-cache/
|
||||
|
@ -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:
|
||||
* `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.
|
||||
|
||||
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:
|
||||
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.
|
||||
> 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user