mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 23:01:22 -06:00
Change Application name to OrcaSlicer
This commit is contained in:
parent
81ca7720e9
commit
5b0ba1207e
93 changed files with 5629 additions and 10221 deletions
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
project(BambuStudio-native)
|
||||
project(OrcaSlicer-native)
|
||||
|
||||
add_subdirectory(build-utils)
|
||||
add_subdirectory(admesh)
|
||||
|
@ -106,55 +106,55 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/BambuStudio.rc.in ${CMAK
|
|||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/BambuStudio.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/BambuStudio.manifest @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY)
|
||||
if (WIN32)
|
||||
add_library(BambuStudio SHARED BambuStudio.cpp BambuStudio.hpp BaseException.cpp BaseException.h StackWalker.cpp StackWalker.h)
|
||||
add_library(OrcaSlicer SHARED BambuStudio.cpp BambuStudio.hpp BaseException.cpp BaseException.h StackWalker.cpp StackWalker.h)
|
||||
else ()
|
||||
add_executable(BambuStudio BambuStudio.cpp BambuStudio.hpp)
|
||||
add_executable(OrcaSlicer BambuStudio.cpp BambuStudio.hpp)
|
||||
endif ()
|
||||
|
||||
if (MINGW)
|
||||
target_link_options(BambuStudio PUBLIC "-Wl,-allow-multiple-definition")
|
||||
set_target_properties(BambuStudio PROPERTIES PREFIX "")
|
||||
target_link_options(OrcaSlicer PUBLIC "-Wl,-allow-multiple-definition")
|
||||
set_target_properties(OrcaSlicer PROPERTIES PREFIX "")
|
||||
endif (MINGW)
|
||||
|
||||
if (NOT WIN32 AND NOT APPLE)
|
||||
# Binary name on unix like systems (Linux, Unix)
|
||||
set_target_properties(BambuStudio PROPERTIES OUTPUT_NAME "orca-slicer")
|
||||
set_target_properties(OrcaSlicer PROPERTIES OUTPUT_NAME "orca-slicer")
|
||||
set(SLIC3R_APP_CMD "orca-slicer")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/unix/BuildLinuxImage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/BuildLinuxImage.sh @ONLY)
|
||||
endif ()
|
||||
|
||||
target_link_libraries(BambuStudio libslic3r cereal)
|
||||
target_link_libraries(OrcaSlicer libslic3r cereal)
|
||||
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(BambuStudio "-liconv -framework IOKit" "-framework CoreFoundation" "-framework AVFoundation" "-framework AVKit" "-framework CoreMedia" "-framework VideoToolbox" -lc++)
|
||||
target_link_libraries(OrcaSlicer "-liconv -framework IOKit" "-framework CoreFoundation" "-framework AVFoundation" "-framework AVKit" "-framework CoreMedia" "-framework VideoToolbox" -lc++)
|
||||
elseif (MSVC)
|
||||
# Manifest is provided through BambuStudio.rc, don't generate your own.
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
else ()
|
||||
# Boost on Raspberry-Pi does not link to pthreads explicitely.
|
||||
target_link_libraries(BambuStudio ${CMAKE_DL_LIBS} -lstdc++ Threads::Threads pangoft2-1.0)
|
||||
target_link_libraries(OrcaSlicer ${CMAKE_DL_LIBS} -lstdc++ Threads::Threads pangoft2-1.0)
|
||||
endif ()
|
||||
|
||||
# Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries.
|
||||
if (SLIC3R_GUI)
|
||||
# target_link_libraries(BambuStudio ws2_32 uxtheme setupapi libslic3r_gui ${wxWidgets_LIBRARIES})
|
||||
target_link_libraries(BambuStudio libslic3r_gui)
|
||||
# target_link_libraries(OrcaSlicer ws2_32 uxtheme setupapi libslic3r_gui ${wxWidgets_LIBRARIES})
|
||||
target_link_libraries(OrcaSlicer libslic3r_gui)
|
||||
if (MSVC)
|
||||
# Generate debug symbols even in release mode.
|
||||
target_link_options(BambuStudio PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>")
|
||||
target_link_libraries(BambuStudio user32.lib Setupapi.lib)
|
||||
target_link_options(OrcaSlicer PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>")
|
||||
target_link_libraries(OrcaSlicer user32.lib Setupapi.lib)
|
||||
elseif (MINGW)
|
||||
target_link_libraries(BambuStudio ws2_32 uxtheme setupapi)
|
||||
target_link_libraries(OrcaSlicer ws2_32 uxtheme setupapi)
|
||||
elseif (APPLE)
|
||||
target_link_libraries(BambuStudio "-framework OpenGL")
|
||||
target_link_libraries(OrcaSlicer "-framework OpenGL")
|
||||
else ()
|
||||
target_link_libraries(BambuStudio -ldl)
|
||||
target_link_libraries(OrcaSlicer -ldl)
|
||||
endif ()
|
||||
#if (WIN32)
|
||||
# find_library(PSAPI_LIB NAMES Psapi)
|
||||
# target_link_libraries(BambuStudio ${PSAPI_LIB})
|
||||
# target_link_libraries(OrcaSlicer ${PSAPI_LIB})
|
||||
#endif ()
|
||||
endif ()
|
||||
|
||||
|
@ -165,15 +165,15 @@ if (WIN32)
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -municode")
|
||||
endif()
|
||||
|
||||
add_executable(BambuStudio_app_gui WIN32 BambuStudio_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/BambuStudio.rc)
|
||||
add_executable(OrcaSlicer_app_gui WIN32 BambuStudio_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/BambuStudio.rc)
|
||||
# Generate debug symbols even in release mode.
|
||||
if(MSVC)
|
||||
target_link_options(BambuStudio_app_gui PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>")
|
||||
target_link_options(OrcaSlicer_app_gui PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>")
|
||||
endif()
|
||||
target_compile_definitions(BambuStudio_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
||||
add_dependencies(BambuStudio_app_gui BambuStudio)
|
||||
set_target_properties(BambuStudio_app_gui PROPERTIES OUTPUT_NAME "orca-slicer")
|
||||
target_link_libraries(BambuStudio_app_gui PRIVATE boost_headeronly)
|
||||
target_compile_definitions(OrcaSlicer_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
||||
add_dependencies(OrcaSlicer_app_gui OrcaSlicer)
|
||||
set_target_properties(OrcaSlicer_app_gui PROPERTIES OUTPUT_NAME "orca-slicer")
|
||||
target_link_libraries(OrcaSlicer_app_gui PRIVATE boost_headeronly)
|
||||
endif ()
|
||||
|
||||
# Link the resources dir to where Slic3r GUI expects it
|
||||
|
@ -182,13 +182,13 @@ set(output_dlls_Debug "")
|
|||
set(output_dlls_RelWithDebInfo "")
|
||||
if (WIN32)
|
||||
# This has to be a separate target due to the windows command line lenght limits
|
||||
add_custom_target(BambuStudioDllsCopy ALL DEPENDS BambuStudio)
|
||||
add_custom_target(COPY_DLLS ALL DEPENDS OrcaSlicer)
|
||||
|
||||
if (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}/resources" WIN_RESOURCES_SYMLINK)
|
||||
add_custom_command(TARGET BambuStudio POST_BUILD
|
||||
add_custom_command(TARGET OrcaSlicer POST_BUILD
|
||||
COMMAND if exist "${WIN_CONF_OUTPUT_DIR}" "("
|
||||
if not exist "${WIN_RESOURCES_SYMLINK}" "("
|
||||
mklink /J "${WIN_RESOURCES_SYMLINK}" "${SLIC3R_RESOURCES_DIR_WIN}"
|
||||
|
@ -200,15 +200,15 @@ if (WIN32)
|
|||
endforeach ()
|
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
bambustudio_copy_dlls(BambuStudioDllsCopy "Debug" "d" output_dlls_Debug)
|
||||
orcaslicer_copy_dlls(COPY_DLLS "Debug" "d" output_dlls_Debug)
|
||||
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
bambustudio_copy_dlls(BambuStudioDllsCopy "RelWithDebInfo" "" output_dlls_RelWithDebInfo)
|
||||
orcaslicer_copy_dlls(COPY_DLLS "RelWithDebInfo" "" output_dlls_RelWithDebInfo)
|
||||
else()
|
||||
bambustudio_copy_dlls(BambuStudioDllsCopy "Release" "" output_dlls_Release)
|
||||
orcaslicer_copy_dlls(COPY_DLLS "Release" "" output_dlls_Release)
|
||||
endif()
|
||||
else ()
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/resources" WIN_RESOURCES_SYMLINK)
|
||||
add_custom_command(TARGET BambuStudio POST_BUILD
|
||||
add_custom_command(TARGET OrcaSlicer POST_BUILD
|
||||
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"
|
||||
VERBATIM
|
||||
|
@ -219,13 +219,13 @@ if (WIN32)
|
|||
else ()
|
||||
if (APPLE AND NOT CMAKE_MACOSX_BUNDLE)
|
||||
# On OSX, the name of the binary matches the name of the Application.
|
||||
add_custom_command(TARGET BambuStudio POST_BUILD
|
||||
COMMAND ln -sf BambuStudio orca-slicer
|
||||
WORKING_DIRECTORY "$<TARGET_FILE_DIR:BambuStudio>"
|
||||
add_custom_command(TARGET OrcaSlicer POST_BUILD
|
||||
COMMAND ln -sf OrcaSlicer orca-slicer
|
||||
WORKING_DIRECTORY "$<TARGET_FILE_DIR:OrcaSlicer>"
|
||||
VERBATIM)
|
||||
else ()
|
||||
add_custom_command(TARGET BambuStudio POST_BUILD
|
||||
WORKING_DIRECTORY "$<TARGET_FILE_DIR:BambuStudio>"
|
||||
add_custom_command(TARGET OrcaSlicer POST_BUILD
|
||||
WORKING_DIRECTORY "$<TARGET_FILE_DIR:OrcaSlicer>"
|
||||
VERBATIM)
|
||||
endif ()
|
||||
if (XCODE)
|
||||
|
@ -238,11 +238,11 @@ else ()
|
|||
if (CMAKE_MACOSX_BUNDLE)
|
||||
set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/OrcaSlicer.app/Contents/Resources")
|
||||
set(MACOSX_BUNDLE_ICON_FILE Icon.icns)
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "Bambu Studio")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${SLIC3R_VERSION})
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "Orca Slicer")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${SoftFever_VERSION})
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright(C) 2021-2023 Lunkuo All Rights Reserved")
|
||||
endif()
|
||||
add_custom_command(TARGET BambuStudio POST_BUILD
|
||||
add_custom_command(TARGET OrcaSlicer POST_BUILD
|
||||
COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${BIN_RESOURCES_DIR}"
|
||||
COMMENT "Symlinking the resources directory into the build tree"
|
||||
VERBATIM)
|
||||
|
@ -262,11 +262,11 @@ endif()
|
|||
message(STATUS "libslic3r-CMAKE_BUILD_TYPE: ${build_type}")
|
||||
message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
|
||||
if (WIN32)
|
||||
install(TARGETS BambuStudio RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
install(TARGETS OrcaSlicer RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
if (MSVC)
|
||||
install(TARGETS BambuStudio_app_gui RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
install(TARGETS OrcaSlicer_app_gui RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
endif ()
|
||||
install(FILES ${output_dlls_${build_type}} DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
else ()
|
||||
install(TARGETS BambuStudio RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(TARGETS OrcaSlicer RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue