Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 199v3 #711

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ before_install:
- sudo dpkg --install libwxgtk2.9-dev_2.9.3-1_amd64.deb
- sudo pip install cpp-coveralls --use-mirrors
script:
- cmake . -DBUILD_CEF=off -DWITH_ARES=off -DDEBUG=on -DFORCE_BUNDLED_WXGTK=off -DWITH_GTEST=ON -DBUILD_TESTS=ON
- cmake . -DBUILD_CEF=off -DDEBUG=on -DFORCE_BUNDLED_WXGTK=off -DWITH_GTEST=ON -DBUILD_TESTS=ON
- make -j4
- ctest --output-on-failure .
after_success:
Expand Down
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
# FORCE_BUNDLED_WXGTK ON: bundle wxGTK 2.9.3
# ON OFF: use system wxGTK (has to be 2.9.x, work stable on 2.9.3)
# DEBUG_EXTERNAL OFF same as DEBUG, but for externap deps
# WITH_ARES ON build CURL with ares support (c-ares REQUIRED)
# DIR_TYPE SINGLE how should game data be stored?
# SINGLE: in a single dir in $HOME
# XDG: like the official xdg specification
Expand Down Expand Up @@ -150,9 +149,7 @@ if(NOT BUILD_ONLY_CEF)
endif()
find_package(Boost COMPONENTS date_time filesystem thread system ${Boost_ADDITION_LIBS})

if(NOT WITH_ARES)
find_package(CURL 7.19.1 ${REQUIRED_IF_OPTION})
endif()
find_package(CURL 7.19.1 ${REQUIRED_IF_OPTION})

if(NOT WIN32)
find_package(GTK2 REQUIRED)
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Required dependencies:
* GCC (4.6 or later, multilib support for 32 bit compatibility on 64 bit systems)
* cmake (2.8.5 or later)
* PkgConfig (for building DEB and RPM packages)
* Boost (date_time, filesystem, thread system, test_exec_monitor, unit_test_framework)
* Boost (date_time, filesystem, thread, system, test_exec_monitor, unit_test_framework)
* Freetype
* GTK2
* libX11 (with libXt)
Expand All @@ -50,10 +50,9 @@ Required dependencies:
* tinyxml2
* V8
* Python
* C-ares
* Curl

Optional dependencies (will be built by cmake if not existing):
- Curl (if there is no ares support)
- wxWidgets (2.9.3 or later)
- Breakpad
- CEF (Chromium Embedded)
Expand Down
13 changes: 1 addition & 12 deletions cmake/modules/BuildCURL.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# TODO: create args for manipulting curl build
# eg: WITH_IDN, IPV6, ...

if(WITH_ARES)
find_package(cares REQUIRED)
set(BUILD_WITH_ARES --enable-ares)
else()
set(BUILD_WITH_ARES --disable-ares)
endif()

if(DEBUG)
set(CURL_DEBUG yes)
else()
Expand Down Expand Up @@ -94,7 +87,7 @@ else()
--disable-tftp --disable-file --without-libidn --without-gnutls
--without-nss --without-cyassl --with-ssl --without-axtls
--without-libssh2 --enable-hidden-symbols --enable-cookies --without-sspi
--disable-manual --enable-optimize=-O2 ${BUILD_WITH_ARES} ${CONFIGURE_DEBUG}
--disable-manual --enable-optimize=-O2 --disable-ares ${CONFIGURE_DEBUG}
--prefix=${CURL_INSTALL_DIR}
)
endif()
Expand Down Expand Up @@ -126,7 +119,3 @@ else()
list(APPEND CURL_LIBRARIES "rt")
endif()
endif()

if(WITH_ARES)
list(APPEND CURL_LIBRARIES ${CARES_LIBRARIES})
endif()
7 changes: 0 additions & 7 deletions cmake/modules/CheckOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ if(NOT BUILD_ONLY_CEF)
###############################################################################

if(UNIX)
option(WITH_ARES "build cURL with c-ares support" ON)
option(DEBUG_EXTERNAL "build external libs with debug support" OFF)
option(INSTALL_DESKTOP_FILE "install the generated desktop file to /usr/share/applications/" OFF)
option(FORCE_BUNDLED_WXGTK "force building of bundled wxGTK" ON)
Expand All @@ -57,12 +56,6 @@ if(NOT BUILD_ONLY_CEF)
# check set options, print warnings, what ever
###############################################################################

if(NOT WITH_ARES)
message("WW building Desura without c-ares is not supported.")
message("WW Make sure, that your system installed cURL has ares support.")
message("WW Ignore this if you are aware of what you do. See #189 for further information.")
endif()

option(WITH_FLASH "enable flash support" ON)
endif()

Expand Down
6 changes: 3 additions & 3 deletions install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
if [ -f /etc/debian_version ]; then # Debian (untested!)
echo -e "\e[1;31mDebian detected!\e[0m"
echo -e "\e[1;31mNote: you can build a DEB package running './build_desura.sh pack_deb'\e[0m"
DEPS="autoconf automake binutils bison build-essential cmake flex gcc gperf libasound2-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-system-dev libboost-test-dev libboost-thread-dev libbz2-dev libc-ares-dev libcups2-dev libdbus-glib-1-dev libevent-dev libflac-dev libgconf2-dev libgnome-keyring-dev libgtk2.0-dev libjpeg62-dev libnotify-dev libnss3-dev libpng12-dev libspeex-dev libsqlite3-dev libssl-dev libtinyxml2-dev libtool libv8-dev libx11-dev libxml2-dev libxpm-dev libxslt1-dev m4 scons xdg-utils yasm libxt-dev"
DEPS="autoconf automake binutils bison build-essential cmake flex gcc gperf libasound2-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-system-dev libboost-test-dev libboost-thread-dev libbz2-dev libcurl4-openssl-dev libcups2-dev libdbus-glib-1-dev libevent-dev libflac-dev libgconf2-dev libgnome-keyring-dev libgtk2.0-dev libjpeg62-dev libnotify-dev libnss3-dev libpng12-dev libspeex-dev libsqlite3-dev libssl-dev libtinyxml2-dev libtool libv8-dev libx11-dev libxml2-dev libxpm-dev libxslt1-dev m4 scons xdg-utils yasm libxt-dev"
if [ `uname -m` = 'x86_64' ]; then # 64 bit dependencies for 32BIT_SUPPORT
DEPS=$DEPS" libc6-dev-i386 gcc-multilib"
fi
Expand All @@ -29,13 +29,13 @@ if [ -f /etc/debian_version ]; then # Debian (untested!)
elif [ -f /etc/redhat-release ]; then # Red Hat
echo -e "\e[1;31mRed Hat detected!\e[0m"
echo -e "\e[1;31mNote: you can build a RPM package running './build_desura.sh pack_rpm'\e[0m"
yum install m4 autoconf gcc-c++ libstdc++-static glibc-devel binutils autoconf libtool gtk2-devel nss-devel GConf2-devel libgnome-keyring-devel dbus-glib-devel gperf bison cups-devel flex libjpeg-turbo-devel alsa-lib-devel bzip2-devel libXpm-devel libX11-devel openssl-devel libnotify-devel scons xdg-user-dirs v8-devel c-ares-devel sqlite-devel libxslt-devel yasm-devel libevent-devel boost-devel boost-static patch perl-Digest-MD5 libXt-devel
yum install m4 autoconf gcc-c++ libstdc++-static glibc-devel binutils autoconf libtool gtk2-devel nss-devel GConf2-devel libgnome-keyring-devel dbus-glib-devel gperf bison cups-devel flex libjpeg-turbo-devel alsa-lib-devel bzip2-devel libXpm-devel libX11-devel openssl-devel libnotify-devel scons xdg-user-dirs v8-devel libcurl-devel sqlite-devel libxslt-devel yasm-devel libevent-devel boost-devel boost-static patch perl-Digest-MD5 libXt-devel
elif [ -f /etc/arch-release ]; then # Arch Linux
echo -e "\e[1;31mArch Linux detected!\e[0m"
echo -e "\e[1;31mNote: there are PKGBUILDs in ./distro/archlinux/\e[0m"
# By using "pacman -T" to find out needed dependencies, we don't get
# conflicts if a package we have installed provides one of the dependencies.
DEPS="cmake make boost glib2 pkg-config sqlite m4 autoconf gcc glibc autoconf libtool gtk2 nss libgnome-keyring dbus-glib gperf bison cups flex libjpeg-turbo alsa-lib bzip2 libxpm libx11 openssl scons gconf libnotify xdg-user-dirs v8 c-ares sed flac libpng speex zlib xdg-utils libevent libxslt yasm libxml2 libxxf86vm flashplugin libx11 libxt"
DEPS="cmake make boost glib2 pkg-config sqlite m4 autoconf gcc glibc autoconf libtool gtk2 nss libgnome-keyring dbus-glib gperf bison cups flex libjpeg-turbo alsa-lib bzip2 libxpm libx11 openssl scons gconf libnotify xdg-user-dirs v8 curl sed flac libpng speex zlib xdg-utils libevent libxslt yasm libxml2 libxxf86vm flashplugin libx11 libxt"
arch=`uname -m`

if [ "${arch}" == "x86_64" ] ; then
Expand Down
1 change: 1 addition & 0 deletions src/static/util/code/UtilWeb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ HttpHInternal::~HttpHInternal()
void HttpHInternal::init(bool useSsl)
{
m_pCurlHandle = curl_easy_init();
curl_easy_setopt(m_pCurlHandle, CURLOPT_NOSIGNAL, 1); //this is needed to work stable without c-ares
m_pMemStruct = new MemoryStruct;

m_bLock = false;
Expand Down