diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4e686645..52be8e847 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -227,6 +227,9 @@ endif(WIN32)
add_definitions(-DwxUSE_UNICODE -D_UNICODE -DUNICODE -DWXINTL_NO_GETTEXT_MACRO)
+# Disable unsafe implicit wxString to const char* / std::string and vice versa. This implicit conversion breaks the UTF-8 encoding quite often.
+add_definitions(-DwxNO_UNSAFE_WXSTRING_CONV)
+
if (SLIC3R_PROFILE)
message("PrusaSlicer will be built with a Shiny invasive profiler")
add_definitions(-DSLIC3R_PROFILE)
@@ -325,13 +328,21 @@ find_package(TBB REQUIRED)
# add_definitions(-DTBB_USE_CAPTURED_EXCEPTION=0)
find_package(CURL REQUIRED)
-include_directories(${CURL_INCLUDE_DIRS})
+
+add_library(libcurl INTERFACE)
+target_link_libraries(libcurl INTERFACE CURL::libcurl)
+
+if (NOT WIN32)
+ # Required by libcurl
+ find_package(ZLIB REQUIRED)
+ target_link_libraries(libcurl INTERFACE ZLIB::ZLIB)
+endif()
if (SLIC3R_STATIC)
if (NOT APPLE)
# libcurl is always linked dynamically to the system libcurl on OSX.
# On other systems, libcurl is linked statically if SLIC3R_STATIC is set.
- add_definitions(-DCURL_STATICLIB)
+ target_compile_definitions(libcurl INTERFACE CURL_STATICLIB)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# As of now, our build system produces a statically linked libcurl,
@@ -339,7 +350,8 @@ if (SLIC3R_STATIC)
find_package(OpenSSL REQUIRED)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
- include_directories(${OPENSSL_INCLUDE_DIR})
+ target_include_directories(libcurl INTERFACE ${OPENSSL_INCLUDE_DIR})
+ target_link_libraries(libcurl INTERFACE ${OPENSSL_LIBRARIES})
endif()
endif()
@@ -397,7 +409,7 @@ find_package(cereal REQUIRED)
# l10n
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
add_custom_target(gettext_make_pot
- COMMAND xgettext --keyword=L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
+ COMMAND xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
-f "${L10N_DIR}/list.txt"
-o "${L10N_DIR}/PrusaSlicer.pot"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
diff --git a/deps/GMP/GMP.cmake b/deps/GMP/GMP.cmake
index 4e8228cba..08b286891 100644
--- a/deps/GMP/GMP.cmake
+++ b/deps/GMP/GMP.cmake
@@ -17,11 +17,27 @@ if (MSVC)
add_custom_target(dep_GMP SOURCES ${_output})
else ()
+ set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
+ set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
+ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
+ set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
+ set(_gmp_build_tgt armv7)
+ endif()
+
+ if (APPLE)
+ set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}")
+ set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu")
+ else ()
+ set(_gmp_build_tgt "") # let it guess
+ endif()
+
ExternalProject_Add(dep_GMP
# URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
BUILD_IN_SOURCE ON
- CONFIGURE_COMMAND ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" --with-pic
+ CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
BUILD_COMMAND make -j
INSTALL_COMMAND make install
)
diff --git a/deps/MPFR/MPFR.cmake b/deps/MPFR/MPFR.cmake
index cda7eeea9..ddbb178d8 100644
--- a/deps/MPFR/MPFR.cmake
+++ b/deps/MPFR/MPFR.cmake
@@ -21,9 +21,9 @@ else ()
ExternalProject_Add(dep_MPFR
URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2 # mirrors are allowed
BUILD_IN_SOURCE ON
- CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local --with-pic
+ CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local ${_gmp_build_tgt}
BUILD_COMMAND make -j
INSTALL_COMMAND make install
DEPENDS dep_GMP
)
-endif ()
\ No newline at end of file
+endif ()
diff --git a/deps/deps-linux.cmake b/deps/deps-linux.cmake
index 368ea1fc1..3727eba7b 100644
--- a/deps/deps-linux.cmake
+++ b/deps/deps-linux.cmake
@@ -31,6 +31,7 @@ ExternalProject_Add(dep_libopenssl
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./config
"--prefix=${DESTDIR}/usr/local"
+ "--libdir=lib"
no-shared
no-ssl3-method
no-dynamic-engine
@@ -54,7 +55,12 @@ ExternalProject_Add(dep_libcurl
--enable-versioned-symbols
--enable-threaded-resolver
--with-random=/dev/urandom
- --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
+
+ # CA root certificate paths will be set for openssl at runtime.
+ --without-ca-bundle
+ --without-ca-path
+ --with-ca-fallback # to look for the ssl backend's ca store
+
--disable-ldap
--disable-ldaps
--disable-manual
diff --git a/resources/icons/eject_sd.svg b/resources/icons/eject_sd.svg
new file mode 100644
index 000000000..0efe87bad
--- /dev/null
+++ b/resources/icons/eject_sd.svg
@@ -0,0 +1,11 @@
+
+
+
diff --git a/resources/icons/export_to_sd.svg b/resources/icons/export_to_sd.svg
index 516cec435..bd28c6a0a 100644
--- a/resources/icons/export_to_sd.svg
+++ b/resources/icons/export_to_sd.svg
@@ -1,168 +1,22 @@
-
-