-
Notifications
You must be signed in to change notification settings - Fork 0
Compilation
debian based
sudo apt-get install build-essential git-core cmake libssl-dev libx11-dev libxext-dev libxinerama-dev libxcursor-dev libxdamage-dev libxv-dev libxkbfile-dev libasound2-dev libcups2-dev libxml2 libxml2-dev
Building 1.0.1 or master requires:
sudo apt-get install libavutil-dev libavcodec-dev
rhel based
sudo yum install gcc cmake openssl-devel libX11-devel libXext-devel libXinerama-devel libXcursor-devel libXdamage-devel libXv-devel libxkbfile-devel alsa-lib-devel cups-devel ffmpeg-devel
Optionally, you can install the following dependencies:
debian based
sudo apt-get install libcunit1-dev libdirectfb-dev xmlto doxygen libxtst-dev
where cunit is for the unit tests, directfb is for dfreerdp, xmlto is for man pages, and doxygen for API documentation.
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON .
If you are using Eclipse, you can also generate Eclipse project files:
cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON .
make
sudo make install
Now create /etc/ld.so.conf.d/freerdp.conf and add the following line to it:
/usr/local/lib/freerdp
For a 64-bit rhel based OS add:
/usr/local/lib64/freerdp
Depending on your OS/distribution, you may also need to add this line:
/usr/local/lib
Run ldconfig. You should now have xfreerdp installed in /usr/local/bin:
awake@envy:~$ which xfreerdp
/usr/local/bin/xfreerdp
Plugins are installed in /usr/local/lib/freerdp:
awake@envy:/usr/local/lib/freerdp$ ls
cliprdr.so disk.so drdynvc.so printer.so rail.so rdpdbg.so rdpdr.so rdpsnd_alsa.so rdpsnd.so
keymaps are installed in /usr/local/share/freerdp:
awake@envy:/usr/local/share/freerdp$ ls keymaps/
aliases ataritt empty fujitsu ibm macosx sony xfree86 xkb.pl
amiga digital_vndr evdev hp macintosh sgi_vndr sun xfree98
After launching FreeRDP at least once, ~/.freerdp will be created to store known hosts:
awake@envy:~/.freerdp$ ls
cacert known_hosts
CA certificates can be added to ~/.freerdp/cacert for additional trusted CAs.
The best way to install cmake is via homebrew.
To make a universal binary build, use:
cmake -D “CMAKE_OSX_ARCHITECTURES:STRING=i386;x86_64” .
FreeRDP is now available as a homebrew recipe.
brew install freerdp
sudo brew link freerdp
To install ffmpeg with MacPorts:
sudo port install ffmpeg-devel
Here are working instructions for compiling ffmpeg on Mac OS X (tested on Mountain Lion):
http://www.martinlos.com/?p=41
If attempting to compile for media redirection on mac, and enabling ffmpeg using cmake, make sure ffmpeg configure is run with —arch=x86_64. For example, the following is a working configuration step before running make for ffmpeg:
./configure --enable-runtime-cpudetect --enable-libxvid --arch=x86_64 --disable-stripping --enable-gpl --enable-nonfree --cc=clang --extra-cflags="-I/sw64/include -m64" --extra-ldflags=-m64 --enable-libmp3lame --enable-libfaac --enable-shared --enable-static
Use the following steps for compiling and installing Pulseaudio:
sudo port install json-c
sudo port install gettext
sudo port install intltool
sudo port install speex
sudo port install libsndfile
sudo ./configure --with-udev-rules-dir=/usr/local/lib/udev/rules.d --with-mac-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk --with-mac-version-min=10.8
sudo make install
Compiling with Visual C++ 2010 Express
See this page
FreeRDP can be compiled for Windows (32/64 Bit) on a Linux system using the Mingw cross-compilers. The following instruction was tested with Mingw-w64 2.0 and gcc-4.7 on Scientific Linux 6.1 (x64) but should work relatively independent of the Mingw/gcc version.
1. Install the Mingw-cross compilers (most Linux distros offer binary packages for Mingw in their repos). On older distros you may need to compile the latest version of Mingw from source. If you want to create 32 Bit binaries only, then Mingw32 is sufficient, otherwise you should install Mingw-w64.
2. Download the latest version of openssl (http://www.openssl.org/), compile it using the Mingw cross-compilers and install it. Instructions how to do this can be found on http://www.blogcompiler.com/.
3. Download FreeRDP and unpack the source archive. Create a subdirectory in the FreeRDP source tree called “mingw_build” where FreeRDP will be build. Open a terminal and goto this directory. Enter the command
cmake -DCMAKE_SYSTEM_NAME="Windows" \
-DCMAKE_C_COMPILER="/opt/mingw64/bin/x86_64-w64-mingw32-gcc" \
-DCMAKE_RC_COMPILER="/opt/mingw64/bin/x86_64-w64-mingw32-windres" \
-DCMAKE_INSTALL_PREFIX="/opt/mingw64" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-DFREERDP_EXPORTS -Dsprintf_s=snprintf" \
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/mingw64/lib" \
-DWITH_SSE2=OFF \
-DWITH_SSE2_TARGET=OFF \
-DOPENSSL_INCLUDE_DIR="/opt/mingw64/include" \
-DLIB_EAY="/opt/mingw64/lib/libcrypto.a" \
-DSSL_EAY="/opt/mingw64/lib/libssl.a" \
..
This will configure FreeRDP for cross-compilation. Note that you need to adjust the paths according to your installation of Mingw and OpenSSL. Using the command above the wfreerdp.exe binary will be statically linked and can be executed on any Windows machine.
Note: You need a recent version of cmake (I used 2.8.7) as the logic in the FindOpenSSL cmake makro is broken (for cross-compilation) in older versions.