Skip to content

Commit

Permalink
Improve documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonardLaszlo committed Dec 8, 2021
1 parent f1e9c5e commit 87220bf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,35 @@ The NW.js ARMv7 and ARMv8 (experimental) binaries are located under the [Release

64 bit and 32 bit binaries are packaged and released separately. The 64 bit package does not contain the SDK versions.

## Contributing

The most needed contribution at the moment is a self-hosted Github runner or a docker host for the build execution.
A virtual machine or access to a cloud ubuntu x64 instance could be useful as well.

The building process is resource intensive, the minimal requirements are:
- 10 GB of RAM,
- 4GB of swap,
- 110 GB of disk,
- and of course, as many CPU cores as possible.

Another way to support this project is to join as a maintainer, and patch the building script once in a while.

## Instructions for running your NW.js application on Linux ARMv7

After downloading the archive and unpacking it, the NW.js binary can be executed on Linux ARMv7 devices with:

`./nw --use-gl=egl --ignore-gpu-blacklist --disable-accelerated-2d-canvas --num-raster-threads=2`

Thanks **@gripped**, **@jtg-gg** and **@llamasoft** for their endless patience and continuous help!
Thanks **@gripped**, **@jtg-gg** and **@llamasoft** for their endless patience and help!

## Building the binaries

Starting the build of nw57 branch:

## Docker
``` Bash
./automatic-build.sh --branch nw57
```

If no branch is provided the script will use the latest version for the build.

Thanks to Docker containerisation, building NW.js for ARMv7 is now as easy as it gets.
However the building process is resource intensive, so brace yourselves. See:
Starting the build of nw57 branch in an existing docker container:

``` Bash
./automatic-build.sh
./automatic-build.sh --branch nw57 --docker-container 45c1550a0bb3
```

for a starting point.
Building the build environment docker image and upload it to docker hub:

``` Bash
./automatic-build.sh --branch nw57 --docker-image-build-only --upload-image
```

## Further reading

Expand Down
7 changes: 7 additions & 0 deletions automatic-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ if [ -z "$NWJS_BRANCH" ]; then
| python -c 'import sys, json; print(json.load(sys.stdin)["default_branch"])' )"
fi

# The Github token is needed for the release on Github.
# It can be provided manually or in a text file name .github-token, under the root of this repository.
# If not provided the script will skip uploading to Github.
if [ -z "$GITHUB_TOKEN" ]; then
GITHUB_TOKEN=$(cat .github-token)
fi
Expand All @@ -117,6 +120,9 @@ log "NW.js active branch: $NWJS_BRANCH"
log "Docker repository: $DOCKER_REPOSITORY"
log "Docker parameters: $DOCKER_PARAMS"

# This build script uses the latest build environment image from dockerhub.
# This function is used to build the build environment image for dockerhub
# or as a fallback when the image is not available.
function buildImage {
IMAGE_TAG="$DOCKER_REPOSITORY:$NWJS_BRANCH"
log "Start building $IMAGE_TAG"
Expand All @@ -127,6 +133,7 @@ function buildImage {
function prepareImage {
log "Check whether the image exists on the docker host"
IMAGE_IDS=()
# Read the docker images to the IMAGE_IDS array.
while IFS="" read -r line; do IMAGE_IDS+=("$line"); done < \
<(docker "$DOCKER_PARAMS" images --all --quiet "$DOCKER_REPOSITORY")
if [ "${#IMAGE_IDS[@]}" -gt 0 ]; then
Expand Down

0 comments on commit 87220bf

Please sign in to comment.