From aa734cf45a34bcb63d8344cdc6fa49ced6b62127 Mon Sep 17 00:00:00 2001 From: EinTim23 Date: Sun, 12 Jan 2025 20:54:26 +0100 Subject: [PATCH] fixed linux app image build --- src/backends/linux.cpp | 3 +++ vendor/CMakeLists.txt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backends/linux.cpp b/src/backends/linux.cpp index 6b91b30..40528ca 100644 --- a/src/backends/linux.cpp +++ b/src/backends/linux.cpp @@ -12,6 +12,9 @@ DBusConnection* conn = nullptr; std::string getExecutablePath() { + if (const char* appImagePath = std::getenv("APPIMAGE")) + return std::string(appImagePath); + char result[PATH_MAX]{}; ssize_t count = readlink("/proc/self/exe", result, PATH_MAX); return (count != -1) ? std::string(result, count) : std::string(); diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 3419eef..6470b68 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -11,9 +11,10 @@ SET(BUILD_STATIC_LIBS ON) SET(BUILD_SHARED_LIBS OFF) SET(BUILD_CURL_EXE OFF) SET(MBEDTLS_INCLUDE_DIRS ../mbedtls/include) -file(REMOVE curl/CMake/FindMbedTLS.cmake) #replace curls FindMbedTLS that expects mbedtls to be prebuilt with a dummy +file(RENAME curl/CMake/FindMbedTLS.cmake curl/CMake/FindMbedTLS.cmake.bak) #replace curls FindMbedTLS that expects mbedtls to be prebuilt with a dummy set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/dummy ${CMAKE_MODULE_PATH}) add_subdirectory("curl") +file(RENAME curl/CMake/FindMbedTLS.cmake.bak curl/CMake/FindMbedTLS.cmake) set(wxBUILD_SHARED OFF) set(wxBUILD_MONOLITHIC ON) set(wxUSE_GUI ON)