This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
wiki:development:build-howto-macos:x2goclient [2011/11/15 09:13] sunweaver created |
wiki:development:build-howto-macos:x2goclient [2015/08/27 01:43] (current) ionic Fix QMAKE_MAX_SDK => QMAKE_MAC_SDK typo. |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | wiki-writing-todo (FIXME) | + | ===== Build X2Go Client using MacPorts ===== |
| + | |||
| + | X2Go Client is available from MacPorts, maintained by Clemens Lang, who currently also builds the official X2Go Client DMGs. | ||
| + | |||
| + | If you just want to get a working version of X2Go Client you can just run '' | ||
| + | |||
| + | If you want to build a re-distributable DMG image such as the one available from the website, follow these steps (assuming you already have MacPorts installed): | ||
| + | |||
| + | **Steps summarized: | ||
| + | |||
| + | | ||
| + | - Install the build-time dependency dylibbundler | ||
| + | - Get X2Go Client from X2Go Git | ||
| + | - Build X2Go Client DMG image | ||
| + | |||
| + | So, first install the X2Go Client dependencies and dylibbundler: | ||
| + | |||
| + | < | ||
| + | $ sudo port install depof: | ||
| + | </ | ||
| + | |||
| + | Once the dependencies are installed, tweak some file permissions: | ||
| + | |||
| + | < | ||
| + | $ sudo chmod u+w / | ||
| + | </ | ||
| + | |||
| + | If you omit the file permission tweak, dylibbundler will fail to bundle OpenSSL with X2Go Client. | ||
| + | |||
| + | At last, checkout X2Go Client from Git: | ||
| + | < | ||
| + | $ git clone git:// | ||
| + | </ | ||
| + | |||
| + | If you want to build a specific version of X2Go Client, select that version with '' | ||
| + | |||
| + | In the X2Go Client source directory, simply run the '' | ||
| + | |||
| + | < | ||
| + | $ ./ | ||
| + | </ | ||
| + | |||
| + | to generate '' | ||
| + | |||
| + | ===== Build/ | ||
| + | |||
| + | X2Go Client and it's dependencies are already formulated in Homebrew | ||
| + | |||
| + | We assume you've already installed Homebrew. | ||
| + | If not, please visit the [[http:// | ||
| + | |||
| + | It is possible to install X2Go Client in one command: < | ||
| + | |||
| + | |||
| + | ===== Build X2Go Client from Scratch ===== | ||
| + | |||
| + | ==== Variables ==== | ||
| + | |||
| + | This document makes use of several variables to address paths in a generic, but distinct way. They are not meant to be used via shell, but for human parsing. No program of the x2go suite actually uses them for anything. You may " | ||
| + | |||
| + | ^ Name ^ Description ^ Default value ^ | ||
| + | | $X2GO_BASE_DIR | Parent directory of the x2goclient source tree | /usr/src | | ||
| + | | $X2GO_CLIENT_DIR | Directory containing the x2goclient source tree | $X2GO_BASE_DIR/ | ||
| + | | $X2GO_DIST_SRC | Directory containing x2goclient dependencies source trees | $X2GO_CLIENT_DIR/ | ||
| + | | $X2GO_DIST_INST | Installation directory of x2goclient dependencies | $X2GO_DIST_SRC/ | ||
| + | | $NX_BASE_DIR | Common NX directory | /usr/src/NX | | ||
| + | | $NX_LIBS_SRC | Directory containing the NX libs source tree | $NX_BASE_DIR/ | ||
| + | | $NX_DIST_SRC | Directory containing NX libs dependencies source trees | $NX_BASE_DIR/ | ||
| + | | $NX_DIST_INST | Installation directory of NX libs dependencies | $NX_DIST_SRC/ | ||
| + | |||
| + | ==== Get the sources ==== | ||
| + | |||
| + | === x2goclient === | ||
| + | |||
| + | Prepare $X2GO_BASE_DIR if need be. | ||
| + | |||
| + | < | ||
| + | # mkdir -p " | ||
| + | # cd " | ||
| + | </ | ||
| + | |||
| + | Fetch the x2goclient sources. | ||
| + | |||
| + | < | ||
| + | # git clone git:// | ||
| + | </ | ||
| + | |||
| + | Prepare the dependencies directories. | ||
| + | |||
| + | < | ||
| + | # mkdir " | ||
| + | # mkdir " | ||
| + | </ | ||
| + | |||
| + | |||
| + | === NX libraries === | ||
| + | |||
| + | Prepare $NX_BASE_DIR. | ||
| + | |||
| + | < | ||
| + | # mkdir -p " | ||
| + | # cd " | ||
| + | </ | ||
| + | |||
| + | Fetch the NX libraries sources. | ||
| + | |||
| + | < | ||
| + | $ wget http:// | ||
| + | $ tar xzf nx-libs-< | ||
| + | $ mv nx-libs-< | ||
| + | </ | ||
| + | |||
| + | Prepare the dependencies directories. | ||
| + | |||
| + | < | ||
| + | # mkdir " | ||
| + | # mkdir " | ||
| + | </ | ||
| + | |||
| + | ==== Dependencies ==== | ||
| + | |||
| + | * for optional sound support: PulseAudio | ||
| + | * build dependencies: | ||
| + | * Apple Developer SDK | ||
| + | * Qt 4 | ||
| + | * libssh >= 0.4.7 | ||
| + | * libjpeg or libjpeg-turbo | ||
| + | * libpng | ||
| + | * nx-binaries | ||
| + | |||
| + | === Qt4 === | ||
| + | |||
| + | Qt4 is a hard dependency. | ||
| + | You can either download and install the [[http:// | ||
| + | |||
| + | If you decide to build from source, follow these instructions, | ||
| + | |||
| + | == Download == | ||
| + | |||
| + | Download the source package from [[http:// | ||
| + | |||
| + | Put it into $X2GO_DIST_SRC. | ||
| + | |||
| + | Unpack it. | ||
| + | |||
| + | < | ||
| + | # cd " | ||
| + | # tar -xzvf qt...tar.gz | ||
| + | # cd qt-... | ||
| + | </ | ||
| + | |||
| + | == Configuration == | ||
| + | |||
| + | Configure the qt source tree. We will disable unused stuff and build universal (for deployment.) | ||
| + | |||
| + | If you don't intend to deploy x2goclient, you can remove all -arch parameters and further speed up compilation. | ||
| + | |||
| + | If you don't want to debug x2goclient, replace -debug-and-release with -release for added speed. | ||
| + | |||
| + | Remember to substitute the variables with the correct path values! | ||
| + | |||
| + | < | ||
| + | # CXX=" | ||
| + | </ | ||
| + | |||
| + | If everything went through cleanly, proceed to the next step. | ||
| + | |||
| + | |||
| + | == Building == | ||
| + | |||
| + | Run make and pray. Pray strongly. To whomever or whatever you want, just pray. | ||
| + | |||
| + | < | ||
| + | # make | ||
| + | </ | ||
| + | |||
| + | If everything went through without errors, install Qt. | ||
| + | |||
| + | < | ||
| + | # make install | ||
| + | </ | ||
| + | |||
| + | |||
| + | === libssh === | ||
| + | |||
| + | == Dependencies == | ||
| + | |||
| + | libssh uses CMake to configure the source build. Please download and install CMake from [[http:// | ||
| + | |||
| + | == Download == | ||
| + | |||
| + | Download the source package from [[http:// | ||
| + | |||
| + | Put it into $X2GO_DIST_SRC. | ||
| + | |||
| + | Unpack the source. | ||
| + | |||
| + | < | ||
| + | # tar -xzvf libssh-...tar.gz | ||
| + | # cd libssh-... | ||
| + | </ | ||
| + | |||
| + | == Configuration == | ||
| + | |||
| + | Create a build subdir. | ||
| + | |||
| + | < | ||
| + | # mkdir build | ||
| + | # cd build | ||
| + | </ | ||
| + | |||
| + | Configure libssh. | ||
| + | |||
| + | Again, substitute variables. If you don't need multiarch support, replace " | ||
| + | |||
| + | < | ||
| + | # cmake -D " | ||
| + | </ | ||
| + | |||
| + | == Building == | ||
| + | |||
| + | Build the source. | ||
| + | |||
| + | < | ||
| + | # make | ||
| + | </ | ||
| + | |||
| + | Install libssh. | ||
| + | |||
| + | < | ||
| + | # make install | ||
| + | </ | ||
| + | |||
| + | Remove the shared libraries (we only need the static one.) | ||
| + | |||
| + | < | ||
| + | # rm " | ||
| + | </ | ||
| + | |||
| + | |||
| + | **Run the following commands as a regular, non-root user. You'll need the root password to install them.** | ||
| + | |||
| + | **1. | ||
| + | Install nxproxy from the nx-libs-lite tarball** | ||
| + | |||
| + | < | ||
| + | $ wget http:// | ||
| + | $ tar xzf nx-libs-< | ||
| + | $ cd nx-libs-< | ||
| + | $ PREFIX=/usr make | ||
| + | $ su -c "make install" | ||
| + | </ | ||
| + | |||
| + | |||
| + | **2a. | ||
| + | Install x2goclient from git** | ||
| + | |||
| + | < | ||
| + | $ git clone git:// | ||
| + | $ cd x2goclient | ||
| + | $ export PREFIX=/ | ||
| + | $ make build_client && make install_client | ||
| + | </ | ||
| + | |||
| + | **2b. | ||
| + | Also build+install x2goplugin** | ||
| + | |||
| + | < | ||
| + | $ make build_plugin && make install_plugin | ||
| + | </ | ||