Skip to content

Commit

Permalink
update docker container based on opensuse leap to cross build to windows
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Jun 21, 2023
1 parent 61d7898 commit 1ae9094
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions admin/win/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
FROM opensuse:42.1
FROM opensuse/leap:15.5

ENV TERM ansi
ENV HOME /root

ENV REFRESHED_AT 20170113

RUN zypper --non-interactive --gpg-auto-import-keys refresh
RUN zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_Leap_42.1/windows:mingw.repo
RUN zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/repositories/isv:ownCloud:toolchains:mingw:win32:2.3/openSUSE_Leap_42.1/isv:ownCloud:toolchains:mingw:win32:2.3.repo
RUN zypper --non-interactive --gpg-auto-import-keys ar https://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_15.5/windows:mingw:win32.repo
RUN zypper --non-interactive --gpg-auto-import-keys install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
mingw32-headers mingw32-runtime site-config mingw32-libwebp mingw32-libssp0 \
mingw32-cross-libqt5-qmake mingw32-cross-libqt5-qttools mingw32-libqt5* \
mingw32-qt5keychain* mingw32-angleproject* \
mingw32-cross-nsis mingw32-libopenssl* \
mingw32-sqlite* png2ico \
osslsigncode wget
mingw32-cross-gcc-c++ mingw32-filesystem \
mingw32-headers mingw32-runtime site-config mingw32-libssp0 \
mingw32-angleproject* \
mingw32-cross-nsis mingw32-libopenssl-devel mingw32-libopenssl \
mingw32-sqlite* \
wget

# RPM depends on curl for installs from HTTP
RUN zypper --non-interactive --gpg-auto-import-keys install curl
Expand Down

3 comments on commit 1ae9094

@dingjunzhe
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @mgallien , I have recently been studying how to build Windows Client Installer and see you recently update this Dockerfile.
I tried using the following instruction at:https://docs.nextCloud.com/desktop/lading.html #windows-installer-i- E-Deployment -Build-Cross-compile here

I am trying to build the Dockerfile located in desktop/admin/win/docker. Here are the commands I used: sudo docker build . -t nextcloud-client-win32:master
To run the Docker image in desktop: sudo docker run -v "$PWD:/home/user/client" nextcloud-client-win32:master /home/user/client/admin/win/docker/build.sh client/ $(id -u)
During the compilation process, I encountered the following error message:

Compiling with updater
-- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) 
-- Could NOT find PdfLatex (missing: PDFLATEX_EXECUTABLE) 
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR: Found unsuitable version "1.0.2h", but
  required is at least "1.1" (found
  /usr/i686-w64-mingw32/sys-root/mingw/lib/libcrypto.dll.a, )
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindOpenSSL.cmake:570 (find_package_handle_standard_args)
  CMakeLists.txt:219 (find_package)


-- Configuring incomplete, errors occurred!

It seems that the incorrect version of OpenSSL (1.0.2) was installed instead of the required version (1.1 or above).

My virtual machine's operating system is Ubuntu 20.04. Can you please help me fix this problem?

@mgallien
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dingjunzhe as far as I can say, cross compiling the files desktop client from linux to windows is currently not working and I have not time to improve this
I highly recommend using native windows to build for windows unless you are prepared to take this docker file and fix remaining issues I have not addressed
sorry but but you are on your own

@leemathewbrooks
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate this is an old comment, but I too have been fighting with this issue for the past few weeks.
I have however managed to get successful builds after modifying the image/Dockerfile somewhat so once I've got this tidied up I'll submit a PR for an updated Dockerfile.

Lee

Please sign in to comment.