Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 0576b1a

Browse files
author
Cosmin Munteanu
committed
Added compiling support for Ubuntu 14.04 LTS
1 parent 1704280 commit 0576b1a

File tree

3 files changed

+56
-12
lines changed

3 files changed

+56
-12
lines changed

install_prereqs.sh

+27
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,33 @@ fi
2020
#Get distro (snipper take from alsa-info.sh)
2121
DISTRO=`grep -ihs "buntu\|SUSE\|Fedora\|Debian\|CentOS\|Red Hat Enterprise Linux Server" /etc/{issue,*release,*version}`
2222
case $DISTRO in
23+
*buntu*14*)
24+
echo 'Ubuntu 14.04 detected. Installing required packages...'
25+
apt-get update
26+
apt-get install -y python-software-properties
27+
echo | add-apt-repository ppa:ubuntu-toolchain-r/test
28+
apt-get update
29+
apt-get install -y build-essential g++-4.8 libxml++2.6-dev libssl-dev \
30+
libboost-all-dev libpng-dev libdwarf-dev subversion subversion-tools \
31+
autotools-dev autoconf libtool cmake
32+
# replace old gcc/g++ with new one
33+
rm /usr/bin/g++
34+
ln -s /usr/bin/g++-4.8 /usr/bin/g++
35+
rm /usr/bin/gcc
36+
ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
37+
# installing things for FreeRDP
38+
apt-get -y install build-essential git-core cmake libssl-dev libx11-dev libxext-dev libxinerama-dev \
39+
libxcursor-dev libxdamage-dev libxv-dev libxkbfile-dev libasound2-dev libcups2-dev libxml2 libxml2-dev \
40+
libxrandr-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libxi-dev libavutil-dev \
41+
libavcodec-dev libxtst-dev libgtk-3-dev libgcrypt11-dev libssh-dev libpulse-dev \
42+
libvte-2.90-dev libxkbfile-dev libfreerdp-dev libtelepathy-glib-dev libjpeg-dev \
43+
libgnutls-dev libgnome-keyring-dev libavahi-ui-gtk3-dev libvncserver-dev \
44+
libappindicator3-dev intltool
45+
46+
apt-get -y --purge remove freerdp-x11 \
47+
remmina remmina-common remmina-plugin-rdp remmina-plugin-vnc remmina-plugin-gnome \
48+
remmina-plugin-nx remmina-plugin-telepathy remmina-plugin-xdmcp
49+
;;
2350
*buntu*12*)
2451
echo 'Ubuntu 12.04 detected. Installing required packages...'
2552
apt-get update

setup-all.sh

+26-11
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,31 @@ function cleanup()
3838
rm -rf $HOME/local/include/winpr
3939
fi
4040
}
41-
41+
function change_branch()
42+
{
43+
local REPO_PATH=$1
44+
local BRANCH=$2
45+
if [ ! -z "$BRANCH" ]; then
46+
local current=`pwd`
47+
cd $REPO_PATH
48+
git checkout $BRANCH
49+
cd $current
50+
fi
51+
}
4252
function git_clone_pull()
4353
{
4454
local REPO_PATH=$1
4555
local REPO_URL=$2
56+
local BRANCH=$3
4657
if [ -d "$REPO_PATH" ]; then
4758
pushd .
4859
cd $REPO_PATH
4960
git pull
61+
change_branch $REPO_PATH $BRANCH
5062
popd
5163
else
5264
git clone $REPO_URL
65+
change_branch $REPO_PATH $BRANCH
5366
fi
5467
}
5568

@@ -224,7 +237,6 @@ git_clone_pull EHS https://github.com/cloudbase/EHS.git || { echo 'Unable to dow
224237
cd EHS || exit 99
225238
echo '---- Starting ehs build ----'
226239
mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make || exit 4
227-
make || exit 4
228240
echo '---- Finished building ehs ----'
229241
if [[ $sudo_present -eq 1 ]]; then
230242
echo 'sudo available. Please enter your password to install ehs: '
@@ -236,8 +248,9 @@ fi
236248
echo '---- Finished installing ehs ----'
237249
cd ../.. || exit 99
238250
echo '---- Checking out freerdp master ----'
239-
git_clone_pull FreeRDP https://github.com/FreeRDP/FreeRDP.git || { echo 'Unable to download FreeRDP from github'; exit 99; }
251+
git_clone_pull FreeRDP https://github.com/FreeRDP/FreeRDP.git stable-1.1 || { echo 'Unable to download FreeRDP'; exit 99; }
240252
cd FreeRDP || exit 99
253+
echo '---- Start installing freerdp ----'
241254
mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr .. || exit 6
242255
echo '---- Building freerdp ----'
243256
make || exit 6
@@ -247,38 +260,40 @@ if [[ $sudo_present -eq 1 ]]; then
247260
sudo make install || exit 7
248261
if [ -d /etc/ld.so.conf.d ]; then
249262
sudo touch /etc/ld.so.conf.d/freerdp.conf
250-
sudo echo '/usr/lib/x86_64-linux-gnu' > /etc/ld.so.conf.d/freerdp.conf
263+
echo '/usr/lib/x86_64-linux-gnu' > ./freerdp.conf
264+
sudo mv ./freerdp.conf /etc/ld.so.conf.d/
251265
sudo ldconfig
252266
fi
253267
else
254268
echo 'sudo command unavailable. Please enter root password to install freerdp'
255269
su -c make install || exit 7
256270
if [ -d /etc/ld.so.conf.d ]; then
257271
su -c touch /etc/ld.so.conf.d/freerdp.conf
258-
su -c echo '/usr/lib/x86_64-linux-gnu' > /etc/ld.so.conf.d/freerdp.conf
272+
echo '/usr/lib/x86_64-linux-gnu' > ./freerdp.conf
273+
su -c mv ./freerdp.conf /etc/ld.so.conf.d/
259274
su -c ldconfig
260275
fi
261276
fi
262277
echo '---- Finished installing freerdp ----'
263278
cd ../.. || exit 99
264279
echo '---- Checking out casablanca master ----'
265-
git_clone_pull casablanca https://git01.codeplex.com/casablanca || { echo 'Unable to download casablanca from codeplex'; exit 99; }
266-
cd casablanca/Binaries/Release$BITNESS/ || exit 99
267-
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ../../Release || exit 8
280+
git_clone_pull casablanca https://git.codeplex.com/casablanca || { echo 'Unable to download casablanca from codeplex'; exit 99; }
281+
cd casablanca/Release || exit 99
282+
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release . || exit 8
268283
make || exit 8
269-
make test || exit 9
284+
#make test || exit 9
270285
if [[ $sudo_present -eq 1 ]]; then
271286
echo 'sudo available. Please enter your password to install casablanca: '
272287
sudo cp Binaries/libcpprest.so /usr/lib || exit 10
273288
sudo ldconfig || exit 10
274289
sudo mkdir -p /usr/include/casablanca || exit 10
275-
sudo cp -r ../../Release/include/* /usr/include/casablanca || exit 10
290+
sudo cp -r ../Release/include/* /usr/include/casablanca || exit 10
276291
else
277292
echo 'sudo command unavailable. Please enter root password to install casablanca'
278293
su -c cp Binaries/libcpprest.so /usr/lib$BITNESS || exit 10
279294
su -c ldconfig || exit 10
280295
su -c mkdir -p /usr/include/casablanca || exit 10
281-
su -c cp -r ../../Release/include/* /usr/include/casablanca || exit 10
296+
su -c cp -r ../Release/include/* /usr/include/casablanca || exit 10
282297
fi
283298
echo '---- Going back to webconnect ----'
284299
popd

wsgate/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ if(CMAKE_COMPILER_IS_GNUCC)
186186
# option to enable compiler warnings
187187
option(GCC_ENABLE_WARNINGS "Enable gcc/g++ compiler warnings" OFF)
188188

189+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
190+
189191
if(GCC_ENABLE_WARNINGS)
190192
# set compiler warnings
191193
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
@@ -601,4 +603,4 @@ endif()
601603

602604
add_executable(wsgate ${WSGATE_SOURCES})
603605

604-
target_link_libraries(wsgate ${LIBS})
606+
target_link_libraries(wsgate ${LIBS})

0 commit comments

Comments
 (0)