15 |
15 |
16 Other containerization/virtualization could be used to achieve the same effect. |
16 Other containerization/virtualization could be used to achieve the same effect. |
17 |
17 |
18 Reference build environment is obtained by applying [provision_focal64.sh](provision_focal64.sh) on Ubuntu 20.04 amd64. |
18 Reference build environment is obtained by applying [provision_focal64.sh](provision_focal64.sh) on Ubuntu 20.04 amd64. |
19 |
19 |
20 ## Build ## |
20 ## Preparing source ## |
21 |
21 |
22 The top Makefile expects source code of Beremiz, Matiec and CanFestival to be |
22 The top Makefile expects source code of Beremiz, Matiec and CanFestival to be |
23 sibling to beremiz_public_dist directory, in the 'source directory'. |
23 sibling to beremiz_public_dist directory, in the 'source directory'. |
24 For example : |
24 For example : |
25 |
25 |
26 ``` |
26 ``` |
27 ~/src |
27 ~/src |
28 /beremiz |
28 /beremiz |
29 /beremiz_public_dist |
29 /beremiz_public_dist |
30 /CanFestival-3 |
30 /canfestival |
31 /matiec |
31 /matiec |
32 ``` |
32 ``` |
33 |
33 |
34 If any of Beremiz, Matiec or CanFestival repositories are missing, they will be |
34 If any of Beremiz, Matiec or CanFestival repositories are missing, they will be |
35 cloned aside beremiz_public_dist from https://hg.beremiz.org . |
35 cloned aside beremiz_public_dist from https://hg.beremiz.org . |
36 |
36 |
37 Intermediate and final results are all placed in a single 'build directory' |
37 Intermediate and final results are all placed in a single 'build directory' |
38 during build process. |
38 during build process. |
|
39 |
|
40 ## Windows installer Build ## |
39 |
41 |
40 ### Prepare Docker image ### |
42 ### Prepare Docker image ### |
41 |
43 |
42 The script [rebuild_docker.sh](rebuild_docker.sh) is used for that purpose. |
44 The script [rebuild_docker.sh](rebuild_docker.sh) is used for that purpose. |
43 |
45 |
85 Note: 'build directory' must exist before calling build_in_docker.sh, otherwise |
87 Note: 'build directory' must exist before calling build_in_docker.sh, otherwise |
86 Docker will create it as root user. Be sure to create it again if you delete it. |
88 Docker will create it as root user. Be sure to create it again if you delete it. |
87 |
89 |
88 Resulting installer is Beremiz-1.2.exe in 'build directory'. |
90 Resulting installer is Beremiz-1.2.exe in 'build directory'. |
89 |
91 |
90 ## Manhole ## |
92 ### Manhole ### |
91 |
93 |
92 Once Docker image ready, the scripts [enter_docker.sh](enter_docker.sh) and |
94 Once Docker image ready, the scripts [enter_docker.sh](enter_docker.sh) and |
93 [enter_docker_as_root.sh](enter_docker_as_root.sh) let you issue build |
95 [enter_docker_as_root.sh](enter_docker_as_root.sh) let you issue build |
94 commands, or install additional packages. |
96 commands, or install additional packages. |
95 |
97 |
96 [clean_docker_container.sh](clean_docker_container.sh) and [create_docker_container.sh](create_docker_container.sh) and |
98 [clean_docker_container.sh](clean_docker_container.sh) and [create_docker_container.sh](create_docker_container.sh) and |
97 [clean_docker_image.sh](clean_docker_image.sh) and [build_docker_image.sh](build_docker_image.sh) are invoked by |
99 [clean_docker_image.sh](clean_docker_image.sh) and [build_docker_image.sh](build_docker_image.sh) are invoked by |
98 [rebuild_docker.sh](rebuild_docker.sh). |
100 [rebuild_docker.sh](rebuild_docker.sh). |
|
101 |
|
102 ## Snap Package Build ## |
|
103 |
|
104 snapcraft.yaml does not rely on HG or GIT repos, but refers to local sources, this is responsibility of caller to prepare sources for snapcraft. |
|
105 |
|
106 Reasons for this are : |
|
107 - no parameters or conditional variables exist to tell snapcraft.yaml where to get the source from |
|
108 - building from local source should be always possible |
|
109 - revisions.txt must be updated in any case so that it is always possible to know what version wqas used to build resulting package |
|
110 - when Snap is built from GitHub actions, Makefile isn't used at all, and GitHub action workflow organize sources and revisions.txt on its own. |
|
111 |
|
112 In the end, instead of just calling `snapcraft` to get a snap package, it is more complicated: |
|
113 |
|
114 ``` |
|
115 #!sh |
|
116 mkdir ~/src ~/build |
|
117 cd ~/src |
|
118 hg clone https://hg.beremiz.org/beremiz_public_dist |
|
119 cd ~/build |
|
120 make -f ~/src/beremiz_public_dist/Makefile DIST=snap |
|
121 |
|
122 ``` |
|
123 |