(Android) Added networking support

This commit is contained in:
Leon Styhre 2023-11-21 19:31:32 +01:00
parent 498bdbd119
commit 10a048b416
3 changed files with 13 additions and 0 deletions

View file

@ -284,6 +284,10 @@ if(APPLE)
endif() endif()
endif() endif()
if(ANDROID)
set(BUNDLED_CERTS ON)
endif()
if(WIN32) if(WIN32)
set(BUNDLED_CERTS ON) set(BUNDLED_CERTS ON)
add_compile_definitions(UNICODE) add_compile_definitions(UNICODE)

View file

@ -162,6 +162,13 @@ GuiThemeDownloader::GuiThemeDownloader(std::function<void()> updateCallback)
git_libgit2_init(); git_libgit2_init();
#if defined(__ANDROID__) && defined(USE_BUNDLED_CERTIFICATES)
git_libgit2_opts(
GIT_OPT_SET_SSL_CERT_LOCATIONS,
ResourceManager::getInstance().getResourcePath(":/certificates/curl-ca-bundle.crt").c_str(),
nullptr);
#endif
// The promise/future mechanism is used as signaling for the thread to indicate that // The promise/future mechanism is used as signaling for the thread to indicate that
// repository fetching has been completed. // repository fetching has been completed.
std::promise<bool>().swap(mPromise); std::promise<bool>().swap(mPromise);

View file

@ -57,6 +57,8 @@ public:
const std::string platformIdentifier {" S"}; const std::string platformIdentifier {" S"};
#elif defined(RETRODECK) #elif defined(RETRODECK)
const std::string platformIdentifier {" R"}; const std::string platformIdentifier {" R"};
#elif defined(__ANDROID__)
const std::string platformIdentifier {" G"};
#elif defined(APPIMAGE_BUILD) #elif defined(APPIMAGE_BUILD)
const std::string platformIdentifier {" A"}; const std::string platformIdentifier {" A"};
#elif defined(__linux__) && defined(RASPBERRY_PI) #elif defined(__linux__) && defined(RASPBERRY_PI)