mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 13:04:03 -06:00
Merge remote-tracking branch 'origin/dev_native' into ys_dev_native
This commit is contained in:
commit
bcbeb56217
8 changed files with 76 additions and 70 deletions
|
@ -19,7 +19,6 @@ add_subdirectory(libnest2d)
|
|||
include_directories(${LIBDIR}/qhull/src)
|
||||
#message(STATUS ${LIBDIR}/qhull/src)
|
||||
|
||||
|
||||
# ##############################################################################
|
||||
# Configure rasterizer target
|
||||
# ##############################################################################
|
||||
|
@ -36,23 +35,65 @@ else()
|
|||
add_subdirectory(png/zlib)
|
||||
set(ZLIB_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/png/zlib ${CMAKE_CURRENT_BINARY_DIR}/png/zlib)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
message(STATUS "ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIR}")
|
||||
add_subdirectory(png/libpng)
|
||||
set_target_properties(zlibstatic PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_target_properties(png_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
# target_include_directories(png_static PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||
set(PNG_LIBRARIES png_static zlibstatic)
|
||||
set(PNG_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/png/libpng ${CMAKE_CURRENT_BINARY_DIR}/png/libpng)
|
||||
endif()
|
||||
|
||||
add_subdirectory(libslic3r)
|
||||
|
||||
if (SLIC3R_GUI)
|
||||
message(STATUS "WXWIN environment set to: $ENV{WXWIN}")
|
||||
find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl)
|
||||
include(${wxWidgets_USE_FILE})
|
||||
endif()
|
||||
|
||||
add_subdirectory(slic3r)
|
||||
|
||||
# Create a slic3r executable
|
||||
add_executable(slic3r slic3r.cpp)
|
||||
target_link_libraries(slic3r libslic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES})
|
||||
# Add the OpenGL and GLU libraries.
|
||||
if(SLIC3R_GUI)
|
||||
set_target_properties(slic3r PROPERTIES OUTPUT_NAME "slic3r-gui")
|
||||
else()
|
||||
set_target_properties(slic3r PROPERTIES OUTPUT_NAME "slic3r-console")
|
||||
endif()
|
||||
target_link_libraries(slic3r libslic3r)
|
||||
if (APPLE)
|
||||
# add_compile_options(-stdlib=libc++)
|
||||
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
|
||||
# -liconv: boost links to libiconv by default
|
||||
target_link_libraries(slic3r "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
|
||||
elseif (NOT MSVC)
|
||||
target_link_libraries(slic3r -ldl -lstdc++)
|
||||
endif ()
|
||||
|
||||
# Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries.
|
||||
if (SLIC3R_GUI)
|
||||
target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES})
|
||||
|
||||
# Configure libcurl & OpenSSL
|
||||
find_package(CURL REQUIRED)
|
||||
target_include_directories(slic3r PRIVATE ${CURL_INCLUDE_DIRS})
|
||||
target_link_libraries(slic3r ${CURL_LIBRARIES})
|
||||
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.
|
||||
target_compile_definitions(slic3r PRIVATE CURL_STATICLIB)
|
||||
endif()
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# As of now, our build system produces a statically linked libcurl,
|
||||
# which links the OpenSSL library dynamically.
|
||||
find_package(OpenSSL REQUIRED)
|
||||
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
|
||||
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
|
||||
target_include_directories(slic3r PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
target_link_libraries(slic3r ${OPENSSL_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
target_link_libraries(slic3r user32.lib Setupapi.lib OpenGL32.Lib GlU32.Lib)
|
||||
elseif (MINGW)
|
||||
|
@ -60,6 +101,6 @@ if (SLIC3R_GUI)
|
|||
elseif (APPLE)
|
||||
target_link_libraries(slic3r "-framework OpenGL")
|
||||
else ()
|
||||
target_link_libraries(slic3r -lGL -lGLU)
|
||||
target_link_libraries(slic3r -ldl -lGL -lGLU)
|
||||
endif ()
|
||||
endif ()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "Analyzer.hpp"
|
||||
#include "PreviewData.hpp"
|
||||
#include <float.h>
|
||||
#include <wx/intl.h>
|
||||
#include <I18N.hpp>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
|
|
@ -97,7 +97,9 @@ wxBitmap* BitmapCache::insert(const std::string &bitmap_key, const wxBitmap *beg
|
|||
if (bmp->GetWidth() > 0) {
|
||||
if (bmp->GetDepth() == 32) {
|
||||
wxAlphaPixelData data(*const_cast<wxBitmap*>(bmp));
|
||||
data.UseAlpha();
|
||||
//FIXME The following method is missing from wxWidgets 3.1.1.
|
||||
// It looks like the wxWidgets 3.0.3 called the wrapped bitmap's UseAlpha().
|
||||
//data.UseAlpha();
|
||||
if (data) {
|
||||
for (int r = 0; r < bmp->GetHeight(); ++ r) {
|
||||
wxAlphaPixelData::Iterator src(data);
|
||||
|
|
|
@ -1008,7 +1008,7 @@ void get_settings_choice(wxMenu *menu, int id, bool is_part)
|
|||
if (!settings_list)
|
||||
return;
|
||||
|
||||
if (wxGetMultipleChoices(selections, _(L("Select showing settings")), category_name, names) ==0 )
|
||||
if (wxGetSelectedChoices(selections, _(L("Select showing settings")), category_name, names) == -1)
|
||||
return;
|
||||
|
||||
std::vector <std::string> selected_options;
|
||||
|
|
|
@ -2645,7 +2645,7 @@ void Tab::update_presetsctrl(wxDataViewTreeCtrl* ui, bool show_incompatible)
|
|||
wxDataViewTreeStoreContainerNode *node = ui->GetStore()->FindContainerNode(root_sys);
|
||||
if (node)
|
||||
{
|
||||
wxDataViewTreeStoreNodeList::iterator iter;
|
||||
wxDataViewTreeStoreNodes::iterator iter;
|
||||
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
||||
{
|
||||
wxDataViewTreeStoreNode* child = *iter;
|
||||
|
@ -2731,7 +2731,7 @@ void Tab::update_tab_presets(wxComboCtrl* ui, bool show_incompatible)
|
|||
wxDataViewTreeStoreContainerNode *node = popup->GetStore()->FindContainerNode(root_sys);
|
||||
if (node)
|
||||
{
|
||||
wxDataViewTreeStoreNodeList::iterator iter;
|
||||
wxDataViewTreeStoreNodes::iterator iter;
|
||||
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
||||
{
|
||||
wxDataViewTreeStoreNode* child = *iter;
|
||||
|
|
|
@ -111,6 +111,7 @@ class PrusaCollapsiblePaneMSW : public PrusaCollapsiblePane//wxCollapsiblePane
|
|||
wxButton* m_pDisclosureTriangleButton = nullptr;
|
||||
wxBitmap m_bmp_close;
|
||||
wxBitmap m_bmp_open;
|
||||
wxString m_strLabel;
|
||||
public:
|
||||
PrusaCollapsiblePaneMSW() {}
|
||||
PrusaCollapsiblePaneMSW( wxWindow *parent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue