mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 04:08:54 +03:00
Bring build documentation up to date, use docker for Win32 xbuild
This commit is contained in:
parent
834a971e2a
commit
b0acc475b0
3 changed files with 68 additions and 67 deletions
|
@ -28,9 +28,6 @@ Linux
|
||||||
|
|
||||||
4. (Optional) Call ``make install`` to install the client to the ``/usr/local/bin`` directory.
|
4. (Optional) Call ``make install`` to install the client to the ``/usr/local/bin`` directory.
|
||||||
|
|
||||||
.. note:: This step requires the ``mingw32-cross-nsis`` packages be installed on
|
|
||||||
Windows.
|
|
||||||
|
|
||||||
Mac OS X
|
Mac OS X
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -63,7 +60,9 @@ To set up your build environment for development using HomeBrew_:
|
||||||
|
|
||||||
5. For compilation of the client, follow the :ref:`generic-build-instructions`.
|
5. For compilation of the client, follow the :ref:`generic-build-instructions`.
|
||||||
|
|
||||||
6. In the build directory, run ``admin/osx/create_mac.sh <build_dir>
|
6. Install the Packages_ package creation tool.
|
||||||
|
|
||||||
|
7. In the build directory, run ``admin/osx/create_mac.sh <build_dir>
|
||||||
<install_dir>``. If you have a developer signing certificate, you can specify
|
<install_dir>``. If you have a developer signing certificate, you can specify
|
||||||
its Common Name as a third parameter (use quotes) to have the package
|
its Common Name as a third parameter (use quotes) to have the package
|
||||||
signed automatically.
|
signed automatically.
|
||||||
|
@ -130,43 +129,41 @@ Windows Installer Build (Cross-Compile)
|
||||||
|
|
||||||
Due to the large number of dependencies, building the client installer for Windows
|
Due to the large number of dependencies, building the client installer for Windows
|
||||||
is **currently only officially supported on openSUSE**, by using the MinGW cross compiler.
|
is **currently only officially supported on openSUSE**, by using the MinGW cross compiler.
|
||||||
You can set up openSUSE 13.1, 13.2 or openSUSE Factory in a virtual machine if you do not
|
You can set up any currently supported version of openSUSE in a virtual machine if you do not
|
||||||
have it installed already.
|
have it installed already.
|
||||||
|
|
||||||
To cross-compile:
|
In order to make setup simple, you can use the provided Dockerfile to build your own image.
|
||||||
|
|
||||||
1. Add the following repository using YaST or ``zypper ar`` (adjust when using another openSUSE version)::
|
1. Assuming you are in the root of the ownCloud Client's source tree, you can
|
||||||
|
build an image from this Dockerfile like this::
|
||||||
|
|
||||||
zypper ar https://build.opensuse.org/project/show/isv:ownCloud:toolchains:mingw:win32:stable
|
cd admin/win32/docker
|
||||||
|
docker build . -t ownCloud-client-win32:<version>
|
||||||
|
|
||||||
2. Install the cross-compiler packages and the cross-compiled dependencies::
|
Replace ``<version>`` by the version of the client you are building, e.g.
|
||||||
|
|version| for the release of the client that this document describes.
|
||||||
|
If you do not wish to use docker, you can run the commands in ``RUN`` manually
|
||||||
|
in a shell, e.g. to create your own build environment in a virtual machine.
|
||||||
|
|
||||||
zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
|
.. note:: Docker images are specific to releases. This one refers to |version|.
|
||||||
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
|
Newer releases may have different dependencies, and thus require a later
|
||||||
mingw32-headers mingw32-runtime site-config mingw32-libwebp \
|
version of the docker image! Always pick the docker image fitting your release
|
||||||
mingw32-cross-libqt5-qmake mingw32-cross-libqt5-qttools mingw32-libqt5*
|
of ownCloud client!
|
||||||
|
|
||||||
3. For the installer, install the NSIS installer package::
|
2. From within the source tree Run the docker instance::
|
||||||
|
|
||||||
zypper install mingw32-cross-nsis mingw32-cross-nsis-plugin-uac mingw32-cross-nsis-plugin-nsprocess
|
docker run ownCloud-client-win32:<version> -v "$PWD:/home/jenkins/client" \
|
||||||
|
admin/win32/docker/build.sh $(id -u)
|
||||||
|
|
||||||
4. Follow the :ref:`generic-build-instructions`
|
It will run the build, create an NSIS based installer, as well as run tests.
|
||||||
|
You will find the resulting binary in an newly created ``build-win32`` subfolder.
|
||||||
|
|
||||||
.. note:: When building for Windows platforms, you must specify a special
|
If you do not wish to use docker, and ran the ``RUN`` commands above in a virtual machine,
|
||||||
toolchain file that enables cmake to locate the platform-specific tools. To add
|
you can run the indented commands in the lower section of ``build.sh`` manually in your
|
||||||
this parameter to the call to cmake, enter
|
source tree.
|
||||||
``-DCMAKE_TOOLCHAIN_FILE=../client/admin/win/Toolchain-mingw32-openSUSE.cmake``.
|
|
||||||
|
|
||||||
5. Build by running ``make``.
|
4. Finally, you should sign the installer to avoid warnings upon installation.
|
||||||
|
This requires a `Microsoft Authenticode`_ Certificate ``osslsigncode`` to sign the installer::
|
||||||
.. note:: Using ``make package`` produces an NSIS-based installer, provided
|
|
||||||
the NSIS mingw32 packages are installed.
|
|
||||||
|
|
||||||
6. If you want to sign the installer, acquire a `Microsoft Authenticode`_ Certificate and install ``osslsigncode`` to sign the installer::
|
|
||||||
|
|
||||||
zypper install osslsigncode
|
|
||||||
|
|
||||||
7. Sign the package::
|
|
||||||
|
|
||||||
osslsigncode -pkcs12 $HOME/.codesign/packages.pfx -h sha1 \
|
osslsigncode -pkcs12 $HOME/.codesign/packages.pfx -h sha1 \
|
||||||
-pass yourpass \
|
-pass yourpass \
|
||||||
|
@ -179,6 +176,7 @@ To cross-compile:
|
||||||
for ``-in``, use the URL to the time stamping server provided by your CA along with the Authenticode certificate. Alternatively,
|
for ``-in``, use the URL to the time stamping server provided by your CA along with the Authenticode certificate. Alternatively,
|
||||||
you may use the official Microsoft ``signtool`` utility on Microsoft Windows.
|
you may use the official Microsoft ``signtool`` utility on Microsoft Windows.
|
||||||
|
|
||||||
|
If you're familiar with docker, you can use the version of ``osslsigncode`` that is part of the docker image.
|
||||||
|
|
||||||
.. _generic-build-instructions:
|
.. _generic-build-instructions:
|
||||||
|
|
||||||
|
@ -193,20 +191,20 @@ You can download the desktop sync client from the ownCloud `Client Download Page
|
||||||
|
|
||||||
To build the most up to date version of the client:
|
To build the most up to date version of the client:
|
||||||
|
|
||||||
1. Clone the latest versions of the client from Git_ as follows:
|
1. Clone the latest versions of the client from Git_ as follows::
|
||||||
|
|
||||||
``git clone git://github.com/owncloud/client.git``
|
git clone git://github.com/owncloud/client.git
|
||||||
``git submodule init``
|
git submodule init
|
||||||
``git submodule update``
|
git submodule update
|
||||||
|
|
||||||
2. Create the build directory:
|
2. Create the build directory::
|
||||||
|
|
||||||
``mkdir client-build``
|
mkdir client-build
|
||||||
``cd client-build``
|
cd client-build
|
||||||
|
|
||||||
3. Configure the client build:
|
3. Configure the client build::
|
||||||
|
|
||||||
``cmake -DCMAKE_BUILD_TYPE="Debug" ../client``
|
cmake -DCMAKE_BUILD_TYPE="Debug" ../client
|
||||||
|
|
||||||
.. note:: You must use absolute paths for the ``include`` and ``library``
|
.. note:: You must use absolute paths for the ``include`` and ``library``
|
||||||
directories.
|
directories.
|
||||||
|
@ -241,3 +239,4 @@ The following are known cmake parameters:
|
||||||
.. _Qt: http://www.qt.io/download
|
.. _Qt: http://www.qt.io/download
|
||||||
.. _`Microsoft Authenticode`: https://msdn.microsoft.com/en-us/library/ie/ms537361%28v=vs.85%29.aspx
|
.. _`Microsoft Authenticode`: https://msdn.microsoft.com/en-us/library/ie/ms537361%28v=vs.85%29.aspx
|
||||||
.. _QtKeychain: https://github.com/frankosterfeld/qtkeychain
|
.. _QtKeychain: https://github.com/frankosterfeld/qtkeychain
|
||||||
|
.. _Packages: http://s.sudre.free.fr/Software/Packages/about.html
|
||||||
|
|
|
@ -288,3 +288,5 @@ epub_copyright = u'2013, The ownCloud developers'
|
||||||
|
|
||||||
# Include todos?
|
# Include todos?
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
|
rst_epilog = '.. |version| replace:: %s' % version
|
||||||
|
|
Loading…
Reference in a new issue