edouard@37: # Beremiz public distribution # edouard@37: edouard@37: This repository holds recipes and patches to build the Beremiz related edouard@37: bundles, packages, installers and images available on edouard@37: [Beremiz website](http://www.beremiz.org/). edouard@37: edouard@37: Patches have same license as projects beeing patched. For other files, edouard@37: unless made explicit in file header, GPLv3 applies. edouard@37: edouard@37: edouard@37: ## Prerequisites ## edouard@37: edouard@37: A usable Docker is required. Docker is used to ensure a reproducible build edouard@37: environment. edouard@37: edouard@37: Other containerization/virtualization could be used to achieve the same effect. edouard@37: edouard@37: Reference build environment is obtained by applying [provision_focal64.sh](provision_focal64.sh) on Ubuntu 20.04 amd64. edouard@37: edouard@37: ## Build ## edouard@37: edouard@37: The top Makefile expects source code of Beremiz, Matiec and CanFestival to be edouard@37: sibling to beremiz_public_dist directory, in the 'source directory'. edouard@37: For example : edouard@37: edouard@37: ``` edouard@37: ~/src edouard@37: /beremiz edouard@37: /beremiz_public_dist edouard@37: /CanFestival-3 edouard@37: /matiec edouard@37: ``` edouard@37: edouard@37: If any of Beremiz, Matiec or CanFestival repositories are missing, they will be edouard@37: cloned aside beremiz_public_dist from https://hg.beremiz.org . edouard@37: edouard@37: Intermediate and final results are all placed in a single 'build directory' edouard@37: during build process. edouard@37: edouard@37: ### Prepare Docker image ### edouard@37: edouard@37: The script [rebuild_docker.sh](rebuild_docker.sh) is used for that purpose. edouard@37: edouard@37: Synopsis: edouard@37: edouard@37: ./rebuild_docker.sh [build directory] edouard@37: edouard@37: Example: edouard@37: edouard@37: ``` edouard@37: #!sh edouard@37: mkdir ~/src edouard@37: cd ~/src edouard@37: hg clone https://hg.beremiz.org/beremiz_public_dist edouard@37: cd beremiz_public_dist edouard@37: ./rebuild_docker.sh edouard@37: ``` edouard@37: edouard@37: Source and Build Volumes : edouard@37: edouard@37: Role | Docker Volume | Host path in example | Rationale edouard@37: ------------------|-------------------|----------------------|------------------------------------------------ edouard@37: source directory | /home/devel/src | ~/src | Always relative to CWD : "../" edouard@37: build directory | /home/devel/build | ~/build | First argument to rebuild_docker.sh or ~/build edouard@37: edouard@37: 'build directory' can be specified as absolute path argument of rebuild_docker.sh. edouard@37: If not specified it defaults to ~/build edouard@37: edouard@37: ``` edouard@37: #!sh edouard@37: ./rebuild_docker.sh ~/build_next edouard@37: ``` edouard@37: edouard@37: Note: 'build directory' is created if not already existing. edouard@37: edouard@37: ### Build Windows Installer ### edouard@37: edouard@37: The script [build_in_docker.sh](build_in_docker.sh) is used for that purpose. edouard@37: edouard@37: ``` edouard@37: #!sh edouard@37: ./build_in_docker.sh edouard@37: ``` edouard@37: edouard@37: Note: 'build directory' must exist before calling build_in_docker.sh, otherwise edouard@37: Docker will create it as root user. Be sure to create it again if you delete it. edouard@37: edouard@37: Resulting installer is Beremiz-1.2.exe in 'build directory'. edouard@37: edouard@37: ## Manhole ## edouard@37: edouard@37: Once Docker image ready, the scripts [enter_docker.sh](enter_docker.sh) and edouard@37: [enter_docker_as_root.sh](enter_docker_as_root.sh) let you issue build edouard@37: commands, or install additional packages. edouard@37: edouard@37: [clean_docker_container.sh](clean_docker_container.sh) and [create_docker_container.sh](create_docker_container.sh) and edouard@37: [clean_docker_image.sh](clean_docker_image.sh) and [build_docker_image.sh](build_docker_image.sh) are invoked by edouard@37: [rebuild_docker.sh](rebuild_docker.sh).