building.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. Building the Client
  2. ===================
  3. This section explains how to build the ownCloud Client from source
  4. for all major platforms. You should read this section if you want
  5. to development on the desktop client.
  6. Linux
  7. -----
  8. 1. Add the `ownCloud repository from OBS`_.
  9. 2. Install the dependencies (as root, or via sudo):
  10. * Debian/Ubuntu: ``apt-get update; apt-get build-dep owncloud-client``
  11. * openSUSE: ``zypper ref; zypper si -d owncloud-client``
  12. * Fedora/CentOS: ``yum install yum-utils; yum-builddep owncloud-client``
  13. 3. Follow the `generic build instructions`_.
  14. Mac OS X
  15. --------
  16. Follow the `generic build instructions`_.
  17. You can install the missing dependencies via MacPorts_ or Homebrew_.
  18. This is only needed on the build machine, since non-standard libs
  19. will be deployed in the app bundle.
  20. The only exception to this rule is libiniparser_, which lacks a decent
  21. build system. If you are using Homebrew_, you can just add it::
  22. brew tap dschmidt/owncloud
  23. brew install iniparser
  24. Otherwise, you need to copy the header and lib files to
  25. ``/usr/local/include`` and ``/usr/local/lib`` respectively.
  26. .. note::
  27. You should not call ``make install`` at any time, since the product of the
  28. mirall build is an app bundle. Call ``make package`` instead to create an
  29. install-ready disk image.
  30. Windows (cross-compile)
  31. -----------------------
  32. Due to the amount of dependencies that csync entails, building the client
  33. for Windows is **currently only supported on openSUSE**, by using the MinGW
  34. cross compiler. You can set up openSUSE 12.1 or 12.2 in a virtual machine
  35. if you do not have it installed already.
  36. In order to cross-compile, the following repositories need to be added
  37. via YaST or ``zypper ar`` (adjust when using openSUSE 12.2)::
  38. http://download.opensuse.org/repositories/isv:/ownCloud:/devel:/mingw:/win32/openSUSE_12.1/isv:ownCloud:devel:mingw:win32.repo
  39. http://download.opensuse.org/repositories/windows:/mingw/openSUSE_12.1/windows:mingw.repo
  40. http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/windows:mingw:win32.repo
  41. Next, install the cross-compiler packages and the cross-compiled dependencies::
  42. zypper si -d mingw32-csync
  43. zypper install kdewin-png2ico
  44. For the installer, the NSIS installer packages are also required::
  45. zypper install mingw32-cross-nsis mingw32-cross-nsis-plugin-processes \
  46. mingw32-cross-nsis-plugin-uac
  47. Now, follow the `generic build instructions`_, but make sure to append
  48. the following parameter to both cmake calls::
  49. -DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake
  50. Finally, just build by running ``make``. ``make package`` will produce
  51. an NSIS-based installer, provided the NSIS mingw32 packages are installed.
  52. Generic Build Instructions
  53. --------------------------
  54. .. _`generic build instructions`
  55. The ownCloud Client requires Mirall and CSync_. Mirall is the GUI frontend,
  56. while CSync is responsible for handling the actual synchronization process.
  57. At the moment, ownCloud Client requires a forked version of CSync. Both
  58. CMake and Mirall can be downloaded at ownCloud's `Client Download Page`_.
  59. If you want to build the leading edge version of the client, you should
  60. use the latest versions of Mirall and CSync via Git_, like so::
  61. git clone git://git.csync.org/users/freitag/csync.git ocsync
  62. git clone git://github.com/owncloud/mirall.git
  63. Next, create build directories::
  64. mkdir ocsync-build
  65. mkdir mirall-build
  66. This guide assumes that all directories are residing next to each other.
  67. Next, make sure to check out the 'dav' branch in the newly checked out
  68. `ocsync` directory::
  69. cd ocsync
  70. git checkout dav
  71. The first package to buidld is CSync::
  72. cd ocsync-build
  73. cmake -DCMAKE_BUILD_TYPE="Debug" -DLOG_TO_CALLBACK=ON -DWITH_LOG4C=OFF ../ocsync
  74. make
  75. You probably have to satisfy some dependencies. Make sure to install all the
  76. needed development packages. You will need ``iniparser``, ``sqlite3`` as well as
  77. ``neon`` for the ownCloud module. ``libssh`` and ``libsmbclient`` are optional
  78. and not required for the client to work. If you want to install the client, run
  79. ``make install`` as a final step.
  80. Next, we build mirall::
  81. cd ../mirall-build
  82. cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall \
  83. -DCSYNC_LIBRARY_PATH=../ocsync-build \
  84. -DCSYNC_INCLUDE_PATH=../ocsync/src
  85. If this succeeds, call ``make``. The owncloud binary should appear in the
  86. ``bin`` directory. You can also run ``make install`` to install the client to
  87. ``/usr/local/bin``.
  88. To build in installer (requires the mingw32-cross-nsis packages)::
  89. make package
  90. .. _`ownCloud repository from OBS`: http://software.opensuse.org/download/package?project=isv:ownCloud:devel&package=owncloud-client
  91. .. _CSync: http://www.csync.org
  92. .. _`Client Download Page`: http://owncloud.org/sync-clients/
  93. .. _Git: http://git-scm.com
  94. .. _MacPorts: http://www.macports.org
  95. .. _Homebrew: http://mxcl.github.com/homebrew/
  96. .. _libiniparser: http://ndevilla.free.fr/iniparser/