mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	This fixes the missing 'Print' functionality in Windows. Signed-off-by: Michael Keller <github@ike.ch>
		
			
				
	
	
		
			96 lines
		
	
	
	
		
			2.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			96 lines
		
	
	
	
		
			2.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
| # Build the image using the --build-arg option, e.g.:
 | |
| # docker build -t boret/myimage:0.1 --build-arg=mxe_sha=123ABC456 .
 | |
| 
 | |
| # We need to stick with 22.04 for now because the latest MXE version
 | |
| # (db430dc676e6f5d77604af150b8acc1403af4fd7) does not build a working
 | |
| # version of QtWebKit, which breaks printing in Subsurface.
 | |
| FROM ubuntu:22.04 as base
 | |
| 
 | |
| # update and set up the packages we need for the build
 | |
| RUN apt-get update  &&  \
 | |
|     apt-get dist-upgrade -y && \
 | |
|     apt-get install -y \
 | |
|     autoconf \
 | |
|     automake \
 | |
|     autopoint \
 | |
|     bash \
 | |
|     binutils \
 | |
|     bzip2 \
 | |
|     ca-certificates \
 | |
|     g++ \
 | |
|     g++-multilib \
 | |
|     gettext \
 | |
|     git \
 | |
|     intltool \
 | |
|     libltdl-dev \
 | |
|     libssl-dev \
 | |
|     libtool \
 | |
|     libtool-bin \
 | |
|     make \
 | |
|     openssl \
 | |
|     p7zip-full \
 | |
|     patch \
 | |
|     perl \
 | |
|     pkg-config \
 | |
|     sed \
 | |
|     unzip \
 | |
|     wget \
 | |
|     lzip && \
 | |
|     apt-get clean
 | |
| 
 | |
| 
 | |
| FROM base as build
 | |
| 
 | |
| # set up the packages we need additionally for this cross build
 | |
| RUN apt-get install -y \
 | |
|     bison \
 | |
|     flex \
 | |
|     gperf \
 | |
|     libc6-dev-i386 \
 | |
|     libgdk-pixbuf2.0-dev \
 | |
|     libxml-parser-perl \
 | |
|     python3 \
 | |
|     python3-mako \
 | |
|     python3-setuptools \
 | |
|     python-is-python3 \
 | |
|     ruby \
 | |
|     xz-utils \
 | |
|     scons
 | |
| 
 | |
| # Default to 'master' if no build argument is passed in
 | |
| ARG mxe_sha=master
 | |
| # Very often master is broken, so we pass in a known good SHA
 | |
| ENV _ver=${mxe_sha}
 | |
| 
 | |
| WORKDIR /win
 | |
| 
 | |
| # checkout MXE at the right version
 | |
| RUN git clone https://github.com/mxe/mxe && \
 | |
|     cd mxe && \
 | |
|     git checkout ${_ver}
 | |
| 
 | |
| WORKDIR /win/mxe
 | |
| 
 | |
| # Move the settings into place to build everything that we need
 | |
| ADD settings.mk .
 | |
| 
 | |
| # Patch the qtconnectivity build to explicilty enable native-win32-bluetooth and ensure another
 | |
| # backend is not picked
 | |
| ADD qtconnectivity-1.patch src/
 | |
| 
 | |
| # separate download from build so that we can redo the build
 | |
| RUN make -j download 2>&1 | tee mxe-build.log
 | |
| 
 | |
| RUN make -j 2>&1 | tee -a mxe-build.log
 | |
| 
 | |
| # for some reason smtk2ssrf needs a static build of mdbtools
 | |
| RUN make MXE_TARGETS=x86_64-w64-mingw32.static glib mdbtools -j 2>&1 | tee -a mxe-build.log
 | |
| 
 | |
| RUN rm -rf pkg log docs
 | |
| 
 | |
| 
 | |
| FROM base as final
 | |
| 
 | |
| WORKDIR /win
 | |
| 
 | |
| COPY --from=build /win/mxe mxe
 |