Merge remote-tracking branch 'remotes/origin/master' into lm_sla_dialog_scaling
4
Build.PL
@ -3,7 +3,7 @@
|
|||||||
print "This script is currently used for installing Perl dependenices for running\n";
|
print "This script is currently used for installing Perl dependenices for running\n";
|
||||||
print "the libslic3r unit / integration tests through Perl prove.\n";
|
print "the libslic3r unit / integration tests through Perl prove.\n";
|
||||||
print "If you don't plan to run the unit / integration tests, you don't need to\n";
|
print "If you don't plan to run the unit / integration tests, you don't need to\n";
|
||||||
print "install these dependencies to build and run Slic3r.\n";
|
print "install these dependencies to build and run PrusaSlicer.\n";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
@ -122,7 +122,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
print "In the next step, you need to build the Slic3r C++ library.\n";
|
print "In the next step, you need to build the PrusaSlicer C++ library.\n";
|
||||||
print "1) Create a build directory and change to it\n";
|
print "1) Create a build directory and change to it\n";
|
||||||
print "2) run cmake .. -DCMAKE_BUILD_TYPE=Release\n";
|
print "2) run cmake .. -DCMAKE_BUILD_TYPE=Release\n";
|
||||||
print "3) run make\n";
|
print "3) run make\n";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
project(Slic3r)
|
project(PrusaSlicer)
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
include("version.inc")
|
include("version.inc")
|
||||||
@ -22,11 +22,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(SLIC3R_STATIC "Compile Slic3r with static libraries (Boost, TBB, glew)" ${SLIC3R_STATIC_INITIAL})
|
option(SLIC3R_STATIC "Compile PrusaSlicer with static libraries (Boost, TBB, glew)" ${SLIC3R_STATIC_INITIAL})
|
||||||
option(SLIC3R_GUI "Compile Slic3r with GUI components (OpenGL, wxWidgets)" 1)
|
option(SLIC3R_GUI "Compile PrusaSlicer with GUI components (OpenGL, wxWidgets)" 1)
|
||||||
option(SLIC3R_FHS "Assume Slic3r is to be installed in a FHS directory structure" 0)
|
option(SLIC3R_FHS "Assume PrusaSlicer is to be installed in a FHS directory structure" 0)
|
||||||
option(SLIC3R_WX_STABLE "Build against wxWidgets stable (3.0) as oppsed to dev (3.1) on Linux" 0)
|
option(SLIC3R_WX_STABLE "Build against wxWidgets stable (3.0) as oppsed to dev (3.1) on Linux" 0)
|
||||||
option(SLIC3R_PROFILE "Compile Slic3r with an invasive Shiny profiler" 0)
|
option(SLIC3R_PROFILE "Compile PrusaSlicer with an invasive Shiny profiler" 0)
|
||||||
option(SLIC3R_PCH "Use precompiled headers" 1)
|
option(SLIC3R_PCH "Use precompiled headers" 1)
|
||||||
option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1)
|
option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1)
|
||||||
option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1)
|
option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1)
|
||||||
@ -207,13 +207,13 @@ endif()
|
|||||||
add_definitions(-DwxUSE_UNICODE -D_UNICODE -DUNICODE -DWXINTL_NO_GETTEXT_MACRO)
|
add_definitions(-DwxUSE_UNICODE -D_UNICODE -DUNICODE -DWXINTL_NO_GETTEXT_MACRO)
|
||||||
|
|
||||||
if (SLIC3R_PROFILE)
|
if (SLIC3R_PROFILE)
|
||||||
message("Slic3r will be built with a Shiny invasive profiler")
|
message("PrusaSlicer will be built with a Shiny invasive profiler")
|
||||||
add_definitions(-DSLIC3R_PROFILE)
|
add_definitions(-DSLIC3R_PROFILE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Disable optimization even with debugging on.
|
# Disable optimization even with debugging on.
|
||||||
if (0)
|
if (0)
|
||||||
message(STATUS "Perl compiled without optimization. Disabling optimization for the Slic3r build.")
|
message(STATUS "Perl compiled without optimization. Disabling optimization for the PrusaSlicer build.")
|
||||||
message("Old CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
|
message("Old CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||||
message("Old CMAKE_CXX_FLAGS_RELWITHDEBINFO: ${CMAKE_CXX_FLAGS_RELEASE}")
|
message("Old CMAKE_CXX_FLAGS_RELWITHDEBINFO: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||||
message("Old CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS_RELEASE}")
|
message("Old CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||||
@ -336,9 +336,9 @@ add_custom_target(pot
|
|||||||
COMMENT "Generate pot file from strings in the source tree"
|
COMMENT "Generate pot file from strings in the source tree"
|
||||||
)
|
)
|
||||||
|
|
||||||
# libslic3r, Slic3r GUI and the slic3r executable.
|
# libslic3r, PrusaSlicer GUI and the PrusaSlicer executable.
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT slic3r_app_console)
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT PrusaSlicer_app_console)
|
||||||
|
|
||||||
# Perl bindings, currently only used for the unit / integration tests of libslic3r.
|
# Perl bindings, currently only used for the unit / integration tests of libslic3r.
|
||||||
# Also runs the unit / integration tests.
|
# Also runs the unit / integration tests.
|
||||||
@ -360,7 +360,7 @@ endif()
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
|
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
|
||||||
else ()
|
else ()
|
||||||
set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/slic3r-prusa3d")
|
set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/PrusaSlicer")
|
||||||
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${SLIC3R_FHS_RESOURCES}")
|
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${SLIC3R_FHS_RESOURCES}")
|
||||||
endif ()
|
endif ()
|
||||||
configure_file(${LIBDIR}/platform/unix/fhs.hpp.in ${LIBDIR_BIN}/platform/unix/fhs.hpp)
|
configure_file(${LIBDIR}/platform/unix/fhs.hpp.in ${LIBDIR_BIN}/platform/unix/fhs.hpp)
|
||||||
|
12
deps/CMakeLists.txt
vendored
@ -1,12 +1,12 @@
|
|||||||
#
|
#
|
||||||
# This CMake project downloads, configures and builds Slic3r PE dependencies on Unix and Windows.
|
# This CMake project downloads, configures and builds PrusaSlicer dependencies on Unix and Windows.
|
||||||
#
|
#
|
||||||
# When using this script, it's recommended to perform an out-of-source build using CMake.
|
# When using this script, it's recommended to perform an out-of-source build using CMake.
|
||||||
#
|
#
|
||||||
# All the dependencies are installed in a `destdir` directory in the root of the build directory,
|
# All the dependencies are installed in a `destdir` directory in the root of the build directory,
|
||||||
# in a traditional Unix-style prefix structure. The destdir can be used directly by CMake
|
# in a traditional Unix-style prefix structure. The destdir can be used directly by CMake
|
||||||
# when building Slic3r - to do this, set the CMAKE_PREFIX_PATH to ${destdir}/usr/local.
|
# when building PrusaSlicer - to do this, set the CMAKE_PREFIX_PATH to ${destdir}/usr/local.
|
||||||
# Warning: On UNIX/Linux, you also need to set -DSLIC3R_STATIC=1 when building Slic3r.
|
# Warning: On UNIX/Linux, you also need to set -DSLIC3R_STATIC=1 when building PrusaSlicer.
|
||||||
#
|
#
|
||||||
# For better clarity of console output, it's recommended to _not_ use a parallelized build
|
# For better clarity of console output, it's recommended to _not_ use a parallelized build
|
||||||
# for the top-level command, ie. use `make -j 1` or `ninja -j 1` to force single-threaded top-level
|
# for the top-level command, ie. use `make -j 1` or `ninja -j 1` to force single-threaded top-level
|
||||||
@ -20,7 +20,7 @@
|
|||||||
# therefore, unfortunatelly, the installation cannot be copied/moved elsewhere without re-installing wxWidgets.
|
# therefore, unfortunatelly, the installation cannot be copied/moved elsewhere without re-installing wxWidgets.
|
||||||
#
|
#
|
||||||
|
|
||||||
project(Slic3r-deps)
|
project(PrusaSlicer-deps)
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
@ -36,8 +36,8 @@ set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination direct
|
|||||||
option(DEP_DEBUG "Build debug variants (only applicable on Windows)" ON)
|
option(DEP_DEBUG "Build debug variants (only applicable on Windows)" ON)
|
||||||
option(DEP_WX_STABLE "Build against wxWidgets stable 3.0 as opposed to default 3.1 (Linux only)" OFF)
|
option(DEP_WX_STABLE "Build against wxWidgets stable 3.0 as opposed to default 3.1 (Linux only)" OFF)
|
||||||
|
|
||||||
message(STATUS "Slic3r deps DESTDIR: ${DESTDIR}")
|
message(STATUS "PrusaSlicer deps DESTDIR: ${DESTDIR}")
|
||||||
message(STATUS "Slic3r deps debug build: ${DEP_DEBUG}")
|
message(STATUS "PrusaSlicer deps debug build: ${DEP_DEBUG}")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
||||||
|
2
deps/wxwidgets-pngprefix.h
vendored
@ -1,4 +1,4 @@
|
|||||||
// Patched in Slic3r: These two were missing:
|
// Patched in PrusaSlicer: These two were missing:
|
||||||
#define png_write_eXIf wx_png_write_eXIf
|
#define png_write_eXIf wx_png_write_eXIf
|
||||||
#define png_handle_eXIf wx_png_handle_eXIf
|
#define png_handle_eXIf wx_png_handle_eXIf
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ Alternatively, if you would like to use XCode GUI, modify the `cmake` command to
|
|||||||
|
|
||||||
cmake .. -GXcode -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local"
|
cmake .. -GXcode -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local"
|
||||||
|
|
||||||
and then open the `Slic3r.xcodeproj` file.
|
and then open the `PrusaSlicer.xcodeproj` file.
|
||||||
This should open up XCode where you can perform build using the GUI or perform other tasks.
|
This should open up XCode where you can perform build using the GUI or perform other tasks.
|
||||||
|
|
||||||
### Note on Mac OS X SDKs
|
### Note on Mac OS X SDKs
|
||||||
|
@ -44,8 +44,8 @@ Note that if you're building a 32-bit variant, you will need to change the `"Vis
|
|||||||
|
|
||||||
Conversely, if you're using Visual Studio version other than 2013, the version number will need to be changed accordingly.
|
Conversely, if you're using Visual Studio version other than 2013, the version number will need to be changed accordingly.
|
||||||
|
|
||||||
If `cmake` has finished without errors, go to the build directory and open the `Slic3r.sln` solution file in Visual Studio.
|
If `cmake` has finished without errors, go to the build directory and open the `PrusaSlicer.sln` solution file in Visual Studio.
|
||||||
Before building, make sure you're building the right project (use one of those starting with `slic3r_app_...`) and that you're building
|
Before building, make sure you're building the right project (use one of those starting with `PrusaSlicer_app_...`) and that you're building
|
||||||
with the right configuration, i.e. _Release_ vs. _Debug_. When unsure, choose _Release_.
|
with the right configuration, i.e. _Release_ vs. _Debug_. When unsure, choose _Release_.
|
||||||
Note that you won't be able to build a _Debug_ variant against a _Release_-only dependencies package.
|
Note that you won't be able to build a _Debug_ variant against a _Release_-only dependencies package.
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.8 KiB |
@ -1,4 +1,4 @@
|
|||||||
project(Slic3r-native)
|
project(PrusaSlicer-native)
|
||||||
|
|
||||||
add_subdirectory(admesh)
|
add_subdirectory(admesh)
|
||||||
add_subdirectory(avrdude)
|
add_subdirectory(avrdude)
|
||||||
@ -64,39 +64,36 @@ endif()
|
|||||||
|
|
||||||
# Create a slic3r executable
|
# Create a slic3r executable
|
||||||
# Process mainfests for various platforms.
|
# Process mainfests for various platforms.
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/slic3r.rc.in ${CMAKE_CURRENT_BINARY_DIR}/slic3r.rc @ONLY)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc @ONLY)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/slic3r.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/slic3r.manifest @ONLY)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.manifest @ONLY)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_library(slic3r SHARED slic3r.cpp slic3r.hpp)
|
add_library(PrusaSlicer SHARED PrusaSlicer.cpp PrusaSlicer.hpp)
|
||||||
else ()
|
else ()
|
||||||
add_executable(slic3r slic3r.cpp slic3r.hpp)
|
add_executable(PrusaSlicer PrusaSlicer.cpp PrusaSlicer.hpp)
|
||||||
endif ()
|
endif ()
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
if(SLIC3R_GUI)
|
# Binary name on unix like systems (OSX, Linux)
|
||||||
set_target_properties(slic3r PROPERTIES OUTPUT_NAME "slic3r-gui")
|
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
|
||||||
else()
|
|
||||||
set_target_properties(slic3r PROPERTIES OUTPUT_NAME "slic3r-console")
|
|
||||||
endif()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(slic3r libslic3r)
|
target_link_libraries(PrusaSlicer libslic3r)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# add_compile_options(-stdlib=libc++)
|
# add_compile_options(-stdlib=libc++)
|
||||||
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
|
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
|
||||||
# -liconv: boost links to libiconv by default
|
# -liconv: boost links to libiconv by default
|
||||||
target_link_libraries(slic3r "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
|
target_link_libraries(PrusaSlicer "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
|
||||||
elseif (MSVC)
|
elseif (MSVC)
|
||||||
# Manifest is provided through slic3r.rc, don't generate your own.
|
# Manifest is provided through PrusaSlicer.rc, don't generate your own.
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
||||||
else ()
|
else ()
|
||||||
# Boost on Raspberry-Pi does not link to pthreads explicitely.
|
# Boost on Raspberry-Pi does not link to pthreads explicitely.
|
||||||
target_link_libraries(slic3r ${CMAKE_DL_LIBS} -lstdc++ Threads::Threads)
|
target_link_libraries(PrusaSlicer ${CMAKE_DL_LIBS} -lstdc++ Threads::Threads)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries.
|
# Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries.
|
||||||
if (SLIC3R_GUI)
|
if (SLIC3R_GUI)
|
||||||
target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES})
|
target_link_libraries(PrusaSlicer libslic3r_gui ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
# Configure libcurl and its dependencies OpenSSL & zlib
|
# Configure libcurl and its dependencies OpenSSL & zlib
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
@ -104,13 +101,13 @@ if (SLIC3R_GUI)
|
|||||||
# Required by libcurl
|
# Required by libcurl
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
target_include_directories(slic3r PRIVATE ${CURL_INCLUDE_DIRS})
|
target_include_directories(PrusaSlicer PRIVATE ${CURL_INCLUDE_DIRS})
|
||||||
target_link_libraries(slic3r ${CURL_LIBRARIES} ${ZLIB_LIBRARIES})
|
target_link_libraries(PrusaSlicer ${CURL_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||||
if (SLIC3R_STATIC)
|
if (SLIC3R_STATIC)
|
||||||
if (NOT APPLE)
|
if (NOT APPLE)
|
||||||
# libcurl is always linked dynamically to the system libcurl on OSX.
|
# libcurl is always linked dynamically to the system libcurl on OSX.
|
||||||
# On other systems, libcurl is linked statically if SLIC3R_STATIC is set.
|
# On other systems, libcurl is linked statically if SLIC3R_STATIC is set.
|
||||||
target_compile_definitions(slic3r PRIVATE CURL_STATICLIB)
|
target_compile_definitions(PrusaSlicer PRIVATE CURL_STATICLIB)
|
||||||
endif()
|
endif()
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
# As of now, our build system produces a statically linked libcurl,
|
# As of now, our build system produces a statically linked libcurl,
|
||||||
@ -118,34 +115,34 @@ if (SLIC3R_GUI)
|
|||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
|
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
|
||||||
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
|
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
|
||||||
target_include_directories(slic3r PRIVATE ${OPENSSL_INCLUDE_DIR})
|
target_include_directories(PrusaSlicer PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||||
target_link_libraries(slic3r ${OPENSSL_LIBRARIES})
|
target_link_libraries(PrusaSlicer ${OPENSSL_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_libraries(slic3r user32.lib Setupapi.lib OpenGL32.Lib GlU32.Lib)
|
target_link_libraries(PrusaSlicer user32.lib Setupapi.lib OpenGL32.Lib GlU32.Lib)
|
||||||
elseif (MINGW)
|
elseif (MINGW)
|
||||||
target_link_libraries(slic3r -lopengl32)
|
target_link_libraries(PrusaSlicer -lopengl32)
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
target_link_libraries(slic3r "-framework OpenGL")
|
target_link_libraries(PrusaSlicer "-framework OpenGL")
|
||||||
else ()
|
else ()
|
||||||
target_link_libraries(slic3r -ldl -lGL -lGLU)
|
target_link_libraries(PrusaSlicer -ldl -lGL -lGLU)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# On Windows, a shim application is required to produce a console / non console version of the Slic3r application.
|
# On Windows, a shim application is required to produce a console / non console version of the Slic3r application.
|
||||||
# Also the shim may load the Mesa software OpenGL renderer if the default renderer does not support OpenGL 2.0 and higher.
|
# Also the shim may load the Mesa software OpenGL renderer if the default renderer does not support OpenGL 2.0 and higher.
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_executable(slic3r_app_gui WIN32 slic3r_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/slic3r.rc)
|
add_executable(PrusaSlicer_app_gui WIN32 PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc)
|
||||||
target_compile_definitions(slic3r_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
target_compile_definitions(PrusaSlicer_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
||||||
add_dependencies(slic3r_app_gui slic3r)
|
add_dependencies(PrusaSlicer_app_gui PrusaSlicer)
|
||||||
set_target_properties(slic3r_app_gui PROPERTIES OUTPUT_NAME "slic3r" PDB_NAME "slic3r_gui")
|
set_target_properties(PrusaSlicer_app_gui PROPERTIES OUTPUT_NAME "prusa-slicer")
|
||||||
|
|
||||||
add_executable(slic3r_app_console slic3r_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/slic3r.rc)
|
add_executable(PrusaSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc)
|
||||||
target_compile_definitions(slic3r_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE)
|
target_compile_definitions(PrusaSlicer_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE)
|
||||||
add_dependencies(slic3r_app_console slic3r)
|
add_dependencies(PrusaSlicer_app_console PrusaSlicer)
|
||||||
set_target_properties(slic3r_app_console PROPERTIES OUTPUT_NAME "slic3r-console")
|
set_target_properties(PrusaSlicer_app_console PROPERTIES OUTPUT_NAME "prusa-slicer-console")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Link the resources dir to where Slic3r GUI expects it
|
# Link the resources dir to where Slic3r GUI expects it
|
||||||
@ -154,7 +151,7 @@ if (MSVC)
|
|||||||
foreach (CONF ${CMAKE_CONFIGURATION_TYPES})
|
foreach (CONF ${CMAKE_CONFIGURATION_TYPES})
|
||||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${CONF}" WIN_CONF_OUTPUT_DIR)
|
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${CONF}" WIN_CONF_OUTPUT_DIR)
|
||||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${CONF}/resources" WIN_RESOURCES_SYMLINK)
|
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${CONF}/resources" WIN_RESOURCES_SYMLINK)
|
||||||
add_custom_command(TARGET slic3r POST_BUILD
|
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
||||||
COMMAND if exist "${WIN_CONF_OUTPUT_DIR}" "("
|
COMMAND if exist "${WIN_CONF_OUTPUT_DIR}" "("
|
||||||
if not exist "${WIN_RESOURCES_SYMLINK}" "("
|
if not exist "${WIN_RESOURCES_SYMLINK}" "("
|
||||||
mklink /J "${WIN_RESOURCES_SYMLINK}" "${SLIC3R_RESOURCES_DIR_WIN}"
|
mklink /J "${WIN_RESOURCES_SYMLINK}" "${SLIC3R_RESOURCES_DIR_WIN}"
|
||||||
@ -166,7 +163,7 @@ if (MSVC)
|
|||||||
endforeach ()
|
endforeach ()
|
||||||
else ()
|
else ()
|
||||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/resources" WIN_RESOURCES_SYMLINK)
|
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/resources" WIN_RESOURCES_SYMLINK)
|
||||||
add_custom_command(TARGET slic3r POST_BUILD
|
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
||||||
COMMAND if not exist "${WIN_RESOURCES_SYMLINK}" "(" mklink /J "${WIN_RESOURCES_SYMLINK}" "${SLIC3R_RESOURCES_DIR_WIN}" ")"
|
COMMAND if not exist "${WIN_RESOURCES_SYMLINK}" "(" mklink /J "${WIN_RESOURCES_SYMLINK}" "${SLIC3R_RESOURCES_DIR_WIN}" ")"
|
||||||
COMMENT "Symlinking the resources directory into the build tree"
|
COMMENT "Symlinking the resources directory into the build tree"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
@ -174,13 +171,13 @@ if (MSVC)
|
|||||||
endif ()
|
endif ()
|
||||||
elseif (XCODE)
|
elseif (XCODE)
|
||||||
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
|
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
|
||||||
add_custom_command(TARGET slic3r POST_BUILD
|
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
||||||
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/resources"
|
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/resources"
|
||||||
COMMENT "Symlinking the resources directory into the build tree"
|
COMMENT "Symlinking the resources directory into the build tree"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
else ()
|
else ()
|
||||||
add_custom_command(TARGET slic3r POST_BUILD
|
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
||||||
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/../resources"
|
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/../resources"
|
||||||
COMMENT "Symlinking the resources directory into the build tree"
|
COMMENT "Symlinking the resources directory into the build tree"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
@ -189,11 +186,11 @@ endif()
|
|||||||
|
|
||||||
# Slic3r binary install target
|
# Slic3r binary install target
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
install(TARGETS slic3r RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(TARGETS PrusaSlicer RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
install(TARGETS slic3r_app_gui RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(TARGETS PrusaSlicer_app_gui RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
install(TARGETS slic3r_app_console RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(TARGETS PrusaSlicer_app_console RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
endif ()
|
endif ()
|
||||||
else ()
|
else ()
|
||||||
install(TARGETS slic3r RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
install(TARGETS PrusaSlicer RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include "libslic3r/Format/OBJ.hpp"
|
#include "libslic3r/Format/OBJ.hpp"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
#include "slic3r.hpp"
|
#include "PrusaSlicer.hpp"
|
||||||
|
|
||||||
#ifdef SLIC3R_GUI
|
#ifdef SLIC3R_GUI
|
||||||
#include "slic3r/GUI/GUI.hpp"
|
#include "slic3r/GUI/GUI.hpp"
|
@ -48,10 +48,10 @@ public:
|
|||||||
wc.lpfnWndProc = OpenGLVersionCheck::supports_opengl2_wndproc;
|
wc.lpfnWndProc = OpenGLVersionCheck::supports_opengl2_wndproc;
|
||||||
wc.hInstance = (HINSTANCE)GetModuleHandle(nullptr);
|
wc.hInstance = (HINSTANCE)GetModuleHandle(nullptr);
|
||||||
wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND);
|
wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND);
|
||||||
wc.lpszClassName = L"slic3r_opengl_version_check";
|
wc.lpszClassName = L"PrusaSlicer_opengl_version_check";
|
||||||
wc.style = CS_OWNDC;
|
wc.style = CS_OWNDC;
|
||||||
if (RegisterClass(&wc)) {
|
if (RegisterClass(&wc)) {
|
||||||
HWND hwnd = CreateWindowW(wc.lpszClassName, L"slic3r_opengl_version_check", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, wc.hInstance, (LPVOID)this);
|
HWND hwnd = CreateWindowW(wc.lpszClassName, L"PrusaSlicer_opengl_version_check", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, wc.hInstance, (LPVOID)this);
|
||||||
if (hwnd) {
|
if (hwnd) {
|
||||||
message_pump_exit = false;
|
message_pump_exit = false;
|
||||||
while (GetMessage(&msg, NULL, 0, 0 ) > 0 && ! message_pump_exit)
|
while (GetMessage(&msg, NULL, 0, 0 ) > 0 && ! message_pump_exit)
|
||||||
@ -271,11 +271,11 @@ int wmain(int argc, wchar_t **argv)
|
|||||||
|
|
||||||
wchar_t path_to_slic3r[MAX_PATH + 1] = { 0 };
|
wchar_t path_to_slic3r[MAX_PATH + 1] = { 0 };
|
||||||
wcscpy(path_to_slic3r, path_to_exe);
|
wcscpy(path_to_slic3r, path_to_exe);
|
||||||
wcscat(path_to_slic3r, L"slic3r.dll");
|
wcscat(path_to_slic3r, L"PrusaSlicer.dll");
|
||||||
// printf("Loading Slic3r library: %S\n", path_to_slic3r);
|
// printf("Loading Slic3r library: %S\n", path_to_slic3r);
|
||||||
HINSTANCE hInstance_Slic3r = LoadLibraryExW(path_to_slic3r, nullptr, 0);
|
HINSTANCE hInstance_Slic3r = LoadLibraryExW(path_to_slic3r, nullptr, 0);
|
||||||
if (hInstance_Slic3r == nullptr) {
|
if (hInstance_Slic3r == nullptr) {
|
||||||
printf("slic3r.dll was not loaded\n");
|
printf("PrusaSlicer.dll was not loaded\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ int wmain(int argc, wchar_t **argv)
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
if (slic3r_main == nullptr) {
|
if (slic3r_main == nullptr) {
|
||||||
printf("could not locate the function slic3r_main in slic3r.dll\n");
|
printf("could not locate the function slic3r_main in PrusaSlicer.dll\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// argc minus the trailing nullptr of the argv
|
// argc minus the trailing nullptr of the argv
|
@ -22,4 +22,4 @@ PRODUCTVERSION @SLIC3R_RC_VERSION@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
2 ICON "@SLIC3R_RESOURCES_DIR@/icons/PrusaSlicer.ico"
|
2 ICON "@SLIC3R_RESOURCES_DIR@/icons/PrusaSlicer.ico"
|
||||||
1 24 "slic3r.manifest"
|
1 24 "PrusaSlicer.manifest"
|
@ -22,7 +22,7 @@ namespace Slic3r {
|
|||||||
|
|
||||||
static const std::string VENDOR_PREFIX = "vendor:";
|
static const std::string VENDOR_PREFIX = "vendor:";
|
||||||
static const std::string MODEL_PREFIX = "model:";
|
static const std::string MODEL_PREFIX = "model:";
|
||||||
static const std::string VERSION_CHECK_URL = "https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/Slic3rPE.version";
|
static const std::string VERSION_CHECK_URL = "https://raw.githubusercontent.com/prusa3d/PrusaSlicer-settings/master/live/PrusaSlicer.version";
|
||||||
|
|
||||||
void AppConfig::reset()
|
void AppConfig::reset()
|
||||||
{
|
{
|
||||||
|
@ -915,6 +915,11 @@ int GUI_App::extruders_cnt() const
|
|||||||
preset.config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
preset.config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GUI_App::open_web_page_localized(const std::string &http_address)
|
||||||
|
{
|
||||||
|
wxLaunchDefaultBrowser(http_address + "&lng=" + this->current_language_code());
|
||||||
|
}
|
||||||
|
|
||||||
void GUI_App::window_pos_save(wxTopLevelWindow* window, const std::string &name)
|
void GUI_App::window_pos_save(wxTopLevelWindow* window, const std::string &name)
|
||||||
{
|
{
|
||||||
if (name.empty()) { return; }
|
if (name.empty()) { return; }
|
||||||
|
@ -171,6 +171,8 @@ public:
|
|||||||
|
|
||||||
PrintHostJobQueue& printhost_job_queue() { return *m_printhost_job_queue.get(); }
|
PrintHostJobQueue& printhost_job_queue() { return *m_printhost_job_queue.get(); }
|
||||||
|
|
||||||
|
void open_web_page_localized(const std::string &http_address);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool on_init_inner();
|
bool on_init_inner();
|
||||||
void window_pos_save(wxTopLevelWindow* window, const std::string &name);
|
void window_pos_save(wxTopLevelWindow* window, const std::string &name);
|
||||||
|
@ -33,7 +33,7 @@ namespace Slic3r {
|
|||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
MainFrame::MainFrame() :
|
MainFrame::MainFrame() :
|
||||||
DPIFrame(NULL, wxID_ANY, wxString(SLIC3R_BUILD) + " " + _(L("based on Slic3r")), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, "mainframe"),
|
DPIFrame(NULL, wxID_ANY, wxString(SLIC3R_APP_NAME) + " " + wxString(SLIC3R_BUILD) + " " + _(L("based on Slic3r")), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, "mainframe"),
|
||||||
m_printhost_queue_dlg(new PrintHostQueueDialog(this))
|
m_printhost_queue_dlg(new PrintHostQueueDialog(this))
|
||||||
{
|
{
|
||||||
// Fonts were created by the DPIFrame constructor for the monitor, on which the window opened.
|
// Fonts were created by the DPIFrame constructor for the monitor, on which the window opened.
|
||||||
@ -545,16 +545,16 @@ void MainFrame::init_menubar()
|
|||||||
auto helpMenu = new wxMenu();
|
auto helpMenu = new wxMenu();
|
||||||
{
|
{
|
||||||
append_menu_item(helpMenu, wxID_ANY, _(L("Prusa 3D &Drivers")), _(L("Open the Prusa3D drivers download page in your browser")),
|
append_menu_item(helpMenu, wxID_ANY, _(L("Prusa 3D &Drivers")), _(L("Open the Prusa3D drivers download page in your browser")),
|
||||||
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://www.prusa3d.com/drivers/"); });
|
[this](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/downloads"); });
|
||||||
append_menu_item(helpMenu, wxID_ANY, _(L("Software &Releases")), _(L("Open the software releases page in your browser")),
|
append_menu_item(helpMenu, wxID_ANY, _(L("Software &Releases")), _(L("Open the software releases page in your browser")),
|
||||||
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/slic3r/releases"); });
|
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/PrusaSlicer/releases"); });
|
||||||
//# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{
|
//# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{
|
||||||
//# wxTheApp->check_version(1);
|
//# wxTheApp->check_version(1);
|
||||||
//# });
|
//# });
|
||||||
//# $versioncheck->Enable(wxTheApp->have_version_check);
|
//# $versioncheck->Enable(wxTheApp->have_version_check);
|
||||||
append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Website")), SLIC3R_APP_NAME),
|
append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Website")), SLIC3R_APP_NAME),
|
||||||
wxString::Format(_(L("Open the %s website in your browser")), SLIC3R_APP_NAME),
|
wxString::Format(_(L("Open the %s website in your browser")), SLIC3R_APP_NAME),
|
||||||
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("https://www.prusa3d.com/slic3r-prusa-edition/"); });
|
[this](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/slicerweb"); });
|
||||||
// append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Manual")), SLIC3R_APP_NAME),
|
// append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Manual")), SLIC3R_APP_NAME),
|
||||||
// wxString::Format(_(L("Open the %s manual in your browser")), SLIC3R_APP_NAME),
|
// wxString::Format(_(L("Open the %s manual in your browser")), SLIC3R_APP_NAME),
|
||||||
// [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); });
|
// [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); });
|
||||||
|