| 
									
										
										
										
											2019-01-29 22:58:21 +01:00
										 |  |  | # Build the image using the --build-arg option, e.g.: | 
					
						
							|  |  |  | # docker build -t boret/myimage:0.1 --build-arg=mxe_sha=123ABC456 . | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2019-01-25 10:45:54 +13:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-24 13:35:09 -08:00
										 |  |  | # Start from Ubuntu | 
					
						
							| 
									
										
										
										
											2023-12-06 04:27:13 -08:00
										 |  |  | From ubuntu:22.04 | 
					
						
							| 
									
										
										
										
											2020-10-28 14:19:45 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | # very often master is broken, so we pass in a known good SHA | 
					
						
							| 
									
										
										
										
											2019-01-29 22:58:21 +01:00
										 |  |  | ARG mxe_sha=master | 
					
						
							|  |  |  | ENV _ver=${mxe_sha} | 
					
						
							| 
									
										
										
										
											2019-11-24 13:35:09 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # update and set up the packages we need for this cross build | 
					
						
							| 
									
										
										
										
											2020-05-30 12:21:22 +01:00
										 |  |  | RUN apt-get update  &&  apt-get upgrade -y && \ | 
					
						
							| 
									
										
										
										
											2020-10-28 14:19:45 -07:00
										 |  |  | DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | 
					
						
							| 
									
										
										
										
											2019-01-25 10:45:54 +13:00
										 |  |  |     autoconf \ | 
					
						
							|  |  |  |     automake \ | 
					
						
							|  |  |  |     autopoint \ | 
					
						
							|  |  |  |     bash \ | 
					
						
							|  |  |  |     binutils \ | 
					
						
							|  |  |  |     bison \ | 
					
						
							|  |  |  |     bzip2 \ | 
					
						
							| 
									
										
										
										
											2020-05-30 12:21:22 +01:00
										 |  |  |     ca-certificates \ | 
					
						
							| 
									
										
										
										
											2019-01-25 10:45:54 +13:00
										 |  |  |     flex \ | 
					
						
							|  |  |  |     g++ \ | 
					
						
							|  |  |  |     g++-multilib \ | 
					
						
							|  |  |  |     gettext \ | 
					
						
							|  |  |  |     git \ | 
					
						
							|  |  |  |     gperf \ | 
					
						
							|  |  |  |     intltool \ | 
					
						
							|  |  |  |     libc6-dev-i386 \ | 
					
						
							|  |  |  |     libgdk-pixbuf2.0-dev \ | 
					
						
							|  |  |  |     libltdl-dev \ | 
					
						
							|  |  |  |     libssl-dev \ | 
					
						
							| 
									
										
										
										
											2020-05-30 12:21:22 +01:00
										 |  |  |     libtool \ | 
					
						
							| 
									
										
										
										
											2019-01-25 10:45:54 +13:00
										 |  |  |     libtool-bin \ | 
					
						
							|  |  |  |     libxml-parser-perl \ | 
					
						
							|  |  |  |     make \ | 
					
						
							|  |  |  |     openssl \ | 
					
						
							|  |  |  |     p7zip-full \ | 
					
						
							|  |  |  |     patch \ | 
					
						
							|  |  |  |     perl \ | 
					
						
							|  |  |  |     pkg-config \ | 
					
						
							| 
									
										
										
										
											2023-12-06 04:27:13 -08:00
										 |  |  |     python3 \ | 
					
						
							|  |  |  |     python3-mako \ | 
					
						
							| 
									
										
										
										
											2019-01-25 10:45:54 +13:00
										 |  |  |     ruby \ | 
					
						
							|  |  |  |     sed \ | 
					
						
							|  |  |  |     unzip \ | 
					
						
							|  |  |  |     wget \ | 
					
						
							|  |  |  |     xz-utils \ | 
					
						
							|  |  |  |     lzip \ | 
					
						
							| 
									
										
										
										
											2019-05-17 15:55:17 -07:00
										 |  |  |     scons | 
					
						
							| 
									
										
										
										
											2019-11-24 13:35:09 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-28 14:19:45 -07:00
										 |  |  | # checkout MXE at the right version | 
					
						
							| 
									
										
										
										
											2019-11-24 13:35:09 -08:00
										 |  |  | RUN mkdir -p /win | 
					
						
							| 
									
										
										
										
											2022-03-15 13:49:10 -07:00
										 |  |  | RUN cd /win ; git clone https://github.com/mxe/mxe ; \ | 
					
						
							| 
									
										
										
										
											2019-01-25 10:45:54 +13:00
										 |  |  |     cd mxe ; \ | 
					
						
							| 
									
										
										
										
											2019-01-29 22:58:21 +01:00
										 |  |  |     git checkout ${_ver} ; | 
					
						
							| 
									
										
										
										
											2020-10-28 14:19:45 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-30 12:21:22 +01:00
										 |  |  | # Patch the qtconnectivity build to explicilty enable native-win32-bluetooth and ensure another | 
					
						
							|  |  |  | # backend is not picked | 
					
						
							| 
									
										
										
										
											2020-10-28 14:19:45 -07:00
										 |  |  | ADD qtconnectivity-1.patch /win/mxe/src/qtconnectivity-1.patch | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Move the settings into place to build everything that we need | 
					
						
							|  |  |  | # separate download from build so that we can redo the build | 
					
						
							|  |  |  | ADD settings.mk /win/mxe/settings.mk | 
					
						
							| 
									
										
										
										
											2023-12-06 13:20:20 -08:00
										 |  |  | RUN cd /usr/bin ; ln -s -f python3 python | 
					
						
							| 
									
										
										
										
											2019-05-17 15:55:17 -07:00
										 |  |  | RUN cd /win/mxe ; \ | 
					
						
							| 
									
										
										
										
											2020-10-28 14:19:45 -07:00
										 |  |  |     make -j 6 download 2>&1 | tee mxe-build.log | 
					
						
							| 
									
										
										
										
											2019-01-29 17:43:16 +01:00
										 |  |  | RUN cd /win/mxe ; \ | 
					
						
							| 
									
										
										
										
											2020-10-28 14:19:45 -07:00
										 |  |  |     make -j 6 2>&1 | tee -a mxe-build.log ; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # for some reason smtk2ssrf needs a static build of mdbtools | 
					
						
							|  |  |  | RUN cd /win/mxe ; \ | 
					
						
							|  |  |  |     make MXE_TARGETS=x86_64-w64-mingw32.static glib mdbtools -j 6 2>&1 | tee -a mxe-build.log ; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RUN apt-get remove -y bison flex gperf libc6-dev-i386 libgdk-pixbuf2.0-dev libxml-parser-perl python ruby xz-utils scons && rm -rf /var/lib/apt/lists/* | 
					
						
							| 
									
										
										
										
											2020-10-30 11:15:34 -07:00
										 |  |  | RUN rm -rf /win/mxe/pkg /win/mxe/log /win/mxe/docs |