From 449fe8e02cd630e0c714aa2811790c5cae87d5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Thu, 2 Nov 2023 18:31:45 +0100 Subject: [PATCH] Support OTA updates in snap builds for Linux --- snap/snapcraft.yaml | 2 +- src/edapp.cpp | 2 +- src/edapp.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index eecbd54598..93496bd26e 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -105,7 +105,7 @@ parts: ./bootstrap ./configure \ --with-wx-prefix="$SNAPCRAFT_STAGE" \ - CPPFLAGS="-I${SNAPCRAFT_STAGE}/include -I${SNAPCRAFT_PART_INSTALL}/../build/deps/json/src" \ + CPPFLAGS="-DSNAPCRAFT -I${SNAPCRAFT_STAGE}/include -I${SNAPCRAFT_PART_INSTALL}/../build/deps/json/src" \ LDFLAGS="-Wl,--copy-dt-needed-entries -L${SNAPCRAFT_STAGE}/lib" \ PKG_CONFIG_PATH="${SNAPCRAFT_STAGE}"/lib/pkgconfig make -j1 diff --git a/src/edapp.cpp b/src/edapp.cpp index 08bdc4a65b..5627d70b9a 100644 --- a/src/edapp.cpp +++ b/src/edapp.cpp @@ -644,7 +644,7 @@ void PoeditApp::SetupLanguage() #ifdef SUPPORTS_OTA_UPDATES void PoeditApp::SetupOTALanguageUpdate(wxTranslations *trans, const wxString& lang) { - if (lang == "en") + if (lang == "en" || lang == "en_US") return; // normalize language code for requests diff --git a/src/edapp.h b/src/edapp.h index 1fc253f95a..0097721771 100644 --- a/src/edapp.h +++ b/src/edapp.h @@ -39,7 +39,7 @@ class WXDLLIMPEXP_FWD_BASE wxConfigBase; class WXDLLIMPEXP_FWD_BASE wxSingleInstanceChecker; -#if defined(HAVE_HTTP_CLIENT) && (defined(__WXMSW__) || defined(__WXOSX__)) +#if defined(HAVE_HTTP_CLIENT) && (defined(__WXMSW__) || defined(__WXOSX__) || defined(SNAPCRAFT)) #define SUPPORTS_OTA_UPDATES #endif