fixed linux app image build

This commit is contained in:
EinTim23 2025-01-12 20:54:26 +01:00
parent cbc96614d0
commit aa734cf45a
2 changed files with 5 additions and 1 deletions

View File

@ -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();

View File

@ -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)