update readme and disable curl on windows

This commit is contained in:
Jeff Becker 2019-11-26 17:11:13 -05:00
parent d12c75ce1e
commit d685057754
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
3 changed files with 11 additions and 2 deletions

View File

@ -188,7 +188,7 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
if(NOT IOS AND NOT ANDROID)
if(NOT IOS AND NOT ANDROID AND NOT WIN32)
find_package(CURL REQUIRED)
endif()

View File

@ -31,8 +31,11 @@
#if defined(ANDROID) || defined(IOS)
#include <unistd.h>
#else
#if defined(_WIN32)
#else
#include <curl/curl.h>
#endif
#endif
bool
llarp_loadServiceNodeIdentityKey(const fs::path &fpath,
@ -247,6 +250,10 @@ namespace llarp
#if defined(ANDROID) || defined(IOS)
LogError("running a service node on mobile device is not possible.");
return false;
#else
#if defined(_WIN32)
LogError("running a service node on windows is not possible.");
return false;
#else
CURL *curl = curl_easy_init();
if(curl)
@ -318,6 +325,7 @@ namespace llarp
LogError("failed to init curl");
return false;
}
#endif
#endif
}
return llarp_findOrCreateIdentity(ident_keyfile, _identity);

View File

@ -71,12 +71,13 @@ Build requirements:
* gcovr (if generating test coverage with gcc)
* libuv >= 1.27.0
* libsodium (A patch that removes `undocumented system call` from the Win32 build is in `llarp/win32`.)
* libcurl
### Linux
build:
$ sudo apt install build-essential cmake git libcap-dev curl libuv1-dev libsodium-dev
$ sudo apt install build-essential cmake git libcap-dev curl libuv1-dev libsodium-dev libcurl-dev
$ git clone https://github.com/loki-project/loki-network
$ cd loki-network
$ make