-
Notifications
You must be signed in to change notification settings - Fork 3
Development environment
For our development environment we are forced to use a cross-compiler for the following reasons:
- Faster to build, by using powerful multi-core machines
- We are going to build a CI/CD pipeline to make automated builds
- Using better and more complete IDEs that fit better the needs of each developer
- Compatible systems can be built anywhere
- WebKit is huge and a full IDE is necessary to work as fast as possible
There are different ways to set up a development environment. Below you will find guidance for two different ways, although the preferred setup is by using a Docker image.
By using a Docker image you can:
- Have the same development environment between the developers
- Changes that might be needed can be kept in a Git repository
- Anyone can use it, no matter the preferred operating system as long as Docker is installed and working
- Easy installation and fast setup
- The same Docker image can be used at a CI/CD pipeline
For compiling the Webkitty for AmigaOS 4 we have two different ways to use docker.
-
The first way is by using the Dockerfile that exists in the repo root folder. To do that you just need to do the following:
git clone https://github.com/walkero-gr/webkitty.git cd webkitty docker build .
There is a way to even export the files to a folder or an archive if the build is successful, with the following commands:
# export the build to a folder named webkitty-os4 DOCKER_BUILDKIT=1 docker build --output type=local,dest=webkitty-os4 . # export the build to an archive named webkitty-os4.tar DOCKER_BUILDKIT=1 docker build --output type=tar,dest=webkitty-os4.tar .
-
The second, and most prefered way to compile Webkitty for AmigaOS 4 is by using an image and creating a container to work with the code. There is a Docker image created, which you can find at Docker hub and it contains everything needed.
You can find the repo for this image at https://github.com/walkero-gr/WebkitOnDocker
To create a container based on this image run in the terminal:
docker run -it --rm --name webkitondocker -v "${PWD}:/opt/code" -w /opt/code walkero/webkitondocker /bin/bash
If you want to use it with docker-compose, you can create a docker-compose.yml file, with the following content:
version: '3' services: webkitondocker: image: 'walkero/webkitondocker' volumes: - './code:/opt/code' - ~/.ssh:/home/amidev/.ssh
And then you can create the Docker container with the following command:
docker-compose up -d
No matter which of the above ways you use to create the Docker container, to compile Webkitty you have to get into that container, and to do that, please follow the commands below:
# Use one of the commands below based on your preferred way to use Docker
# or by using the docker command
docker exec -it webkitondocker-1 bash
# By using the docker-compose
docker-compose exec webkitondocker bash
# when you login into the container you will see something like this:
# root@b748d3519d0e:/opt/code#
# first change the user, that has UID and GID equal to 1000, and that's probably
# the same with your user at the host machine. This will help on file
# permissions
su amidev
# Clone the repository and compile Webkitty
git clone https://github.com/walkero-gr/webkitty.git
cd webkitty
make Dummy/libdummy.a
cp Dummy/libdl.a /opt/sdk/ppc-amigaos/local/clib2/lib/
make jscore-amigaos
webkitondocker image is based on the following images https://hub.docker.com/repository/docker/walkero/amigagccondocker
Those are built with the latest 54.16 SDK and the new clib2 developed and maintained by afxgroup at https://github.com/afxgroup/clib2
If you prefer to use your system to compile the WebKit engine for AmigaOS 4, we recommend using Unix based system, like Linux. The way we build our Docker images is available at https://github.com/walkero-gr/AmigaGCConDocker
- At the file
base/Dockerfile
the building of our cross-compilers is available - In the file
sdk/Dockerfile
the building of our SDK folder with all the necessary libraries is presented - At the file
gcc/Dockerfile
the creation of the gcc final setup is available
A more detailed list of steps will be shared on this page during the development of the project