Skip to content

Commit 9d22ea8

Browse files
committed
Merge branch 'release-0430' into HEAD
1 parent 8571cc5 commit 9d22ea8

933 files changed

Lines changed: 32484 additions & 3171 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ set(DUMPTOOL_USER $ENV{DUMPTOOL_USER})
1212
set(DUMPTOOL_PASS $ENV{DUMPTOOL_PASS})
1313
set(DUMPTOOL_HOST $ENV{DUMPTOOL_HOST})
1414
set(DUMPTOOL_TO $ENV{DUMPTOOL_TO})
15-
15+
if(CX_DEBUG)
16+
add_definitions(-D_DEBUG1=1)
17+
endif()
1618
include("version.inc")
1719
include(GNUInstallDirs)
1820
include(CMakeDependentOption)
@@ -620,7 +622,7 @@ endforeach()
620622

621623
find_package(NLopt 1.4 REQUIRED)
622624

623-
625+
message(STATUS "SPNAV library found: ${SLIC3R_STATIC}")
624626
if(SLIC3R_STATIC)
625627
set(OPENVDB_USE_STATIC_LIBS ON)
626628
set(USE_BLOSC TRUE)
@@ -655,6 +657,28 @@ else()
655657
endif()
656658

657659
set(TOP_LEVEL_PROJECT_DIR ${PROJECT_SOURCE_DIR})
660+
function(copy_vld_dlls target config)
661+
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
662+
get_target_property(_alt_out_dir ${target} RUNTIME_OUTPUT_DIRECTORY)
663+
message("------copy_vld_dlls-------")
664+
if (_alt_out_dir)
665+
set (_out_dir "${_alt_out_dir}")
666+
message ("set out_dir to _alt_out_dir: ${_out_dir}")
667+
elseif (_is_multi)
668+
set(_out_dir "${CMAKE_CURRENT_BINARY_DIR}/${config}")
669+
message ("set out_dir to CMAKE_CURRENT_BINARY_DIR/config: ${_out_dir}")
670+
else ()
671+
set(_out_dir "${CMAKE_CURRENT_BINARY_DIR}")
672+
message ("set out_dir to CMAKE_CURRENT_BINARY_DIR: ${_out_dir}")
673+
endif ()
674+
file(GLOB ALL_FILES "$ENV{VLD_HOME}/bin/WIN64/*")
675+
message("xxxx = ${ALL_FILES}")
676+
foreach(FILE ${ALL_FILES})
677+
file(COPY ${FILE} DESTINATION "${_out_dir}")
678+
endforeach()
679+
file(COPY $ENV{VLD_HOME}/vld.ini DESTINATION "${_out_dir}")
680+
endfunction()
681+
658682
function(crealityprint_copy_dlls target config postfix output_dlls)
659683
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
660684
set(_bits 64)

CMakePresets.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"CMAKE_CONFIGURE_TYPE": "${presetName}",
1616
"BBL_RELEASE_TO_PUBLIC": "1",
1717
"CMAKE_INSTALL_PREFIX": "./OrcaSlicer",
18-
"CMAKE_PREFIX_PATH": "${sourceDir}/deps/build-dbg/OrcaSlicer_dep/usr/local/",
19-
"WIN10SDK_PATH": "C:/Program Files (x86)/Windows Kits/10/Include/10.0.22000.0",
2018
"GENERATE_ORCA_HEADER": "OFF"
2119
},
2220
"condition": {
@@ -50,7 +48,8 @@
5048
"inherits": "x64-release",
5149
"cacheVariables": {
5250
"CMAKE_BUILD_TYPE": "Release",
53-
"CMAKE_PREFIX_PATH": "${sourceDir}/deps/build/OrcaSlicer_dep/usr/local/"
51+
"CMAKE_PREFIX_PATH": "${sourceDir}/deps/build/OrcaSlicer_dep/usr/local/",
52+
"CX_DEBUG": "1"
5453
}
5554
},
5655
{
@@ -105,7 +104,8 @@
105104
"description": "Sets release build type",
106105
"inherits": "linux-debug",
107106
"cacheVariables": {
108-
"CMAKE_BUILD_TYPE": "Release"
107+
"CMAKE_BUILD_TYPE": "Release",
108+
"CMAKE_PREFIX_PATH": "${sourceDir}/deps/build/destdir/usr/local/"
109109
}
110110
},
111111
{

build_release_macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function build_deps() {
128128
echo "Building deps..."
129129
(
130130
set -x
131-
mkdir -p "$DEPS"
131+
mkdir -p "$DEPS_BUILD_DIR"
132132
cd "$DEPS_BUILD_DIR"
133133
if [ "1." != "$BUILD_ONLY". ]; then
134134
cmake .. \

cmake/modules/FindFFmpeg.cmake

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# FFmpeg 查找模块
2+
find_package(PkgConfig QUIET)
3+
4+
# 设置 FFmpeg 组件列表
5+
set(FFMPEG_COMPONENTS
6+
avcodec
7+
avformat
8+
avutil
9+
avdevice
10+
avfilter
11+
swscale
12+
swresample
13+
)
14+
15+
# 查找 FFmpeg 包含路径
16+
find_path(FFMPEG_INCLUDE_DIR
17+
NAMES libavcodec/avcodec.h
18+
PATHS
19+
/usr/include
20+
/usr/local/include
21+
/opt/local/include
22+
"C:/msys64/mingw64/include"
23+
"C:/msys64/usr/include"
24+
PATH_SUFFIXES ffmpeg
25+
DOC "FFmpeg 头文件目录"
26+
)
27+
28+
# 查找各组件库文件
29+
foreach(COMPONENT ${FFMPEG_COMPONENTS})
30+
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
31+
32+
# 优先尝试 pkg-config
33+
if(PKG_CONFIG_FOUND)
34+
pkg_check_modules(PC_${UPPERCOMPONENT} QUIET lib${COMPONENT})
35+
endif()
36+
37+
find_library(${UPPERCOMPONENT}_LIBRARY
38+
NAMES ${COMPONENT} lib${COMPONENT}
39+
HINTS ${PC_${UPPERCOMPONENT}_LIBRARY_DIRS}
40+
PATHS
41+
/usr/lib
42+
/usr/local/lib
43+
/opt/local/lib
44+
"C:/msys64/mingw64/lib"
45+
"C:/msys64/usr/lib"
46+
PATH_SUFFIXES ffmpeg
47+
DOC "FFmpeg ${COMPONENT} 库路径"
48+
)
49+
50+
if(${UPPERCOMPONENT}_LIBRARY)
51+
list(APPEND FFMPEG_LIBRARIES ${${UPPERCOMPONENT}_LIBRARY})
52+
endif()
53+
endforeach()
54+
55+
# 版本检测
56+
if(FFMPEG_INCLUDE_DIR AND EXISTS "${FFMPEG_INCLUDE_DIR}/libavutil/avutil.h")
57+
file(STRINGS "${FFMPEG_INCLUDE_DIR}/libavutil/avutil.h" FFMPEG_VERSION_MAJOR
58+
REGEX "#define LIBAVUTIL_VERSION_MAJOR [0-9]+")
59+
string(REGEX REPLACE "#define LIBAVUTIL_VERSION_MAJOR ([0-9]+)" "\\1" FFMPEG_VERSION_MAJOR "${FFMPEG_VERSION_MAJOR}")
60+
61+
file(STRINGS "${FFMPEG_INCLUDE_DIR}/libavutil/avutil.h" FFMPEG_VERSION_MINOR
62+
REGEX "#define LIBAVUTIL_VERSION_MINOR [0-9]+")
63+
string(REGEX REPLACE "#define LIBAVUTIL_VERSION_MINOR ([0-9]+)" "\\1" FFMPEG_VERSION_MINOR "${FFMPEG_VERSION_MINOR}")
64+
65+
set(FFMPEG_VERSION "${FFMPEG_VERSION_MAJOR}.${FFMPEG_VERSION_MINOR}")
66+
endif()
67+
68+
# 处理查找结果
69+
include(FindPackageHandleStandardArgs)
70+
find_package_handle_standard_args(FFmpeg
71+
REQUIRED_VARS
72+
FFMPEG_INCLUDE_DIR
73+
FFMPEG_LIBRARIES
74+
VERSION_VAR FFMPEG_VERSION
75+
HANDLE_COMPONENTS
76+
)
77+
78+
# 定义导入目标
79+
if(FFMPEG_FOUND AND NOT TARGET FFmpeg::FFmpeg)
80+
add_library(FFmpeg::FFmpeg INTERFACE IMPORTED)
81+
set_target_properties(FFmpeg::FFmpeg PROPERTIES
82+
INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIR}"
83+
INTERFACE_LINK_LIBRARIES "${FFMPEG_LIBRARIES}"
84+
)
85+
86+
# 为每个组件创建单独的目标
87+
foreach(COMPONENT ${FFMPEG_COMPONENTS})
88+
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
89+
if(TARGET FFmpeg::${COMPONENT} OR NOT ${UPPERCOMPONENT}_LIBRARY)
90+
continue()
91+
endif()
92+
93+
add_library(FFmpeg::${COMPONENT} UNKNOWN IMPORTED)
94+
set_target_properties(FFmpeg::${COMPONENT} PROPERTIES
95+
IMPORTED_LOCATION "${${UPPERCOMPONENT}_LIBRARY}"
96+
INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIR}"
97+
)
98+
endforeach()
99+
endif()
100+
101+
# 缓存变量
102+
mark_as_advanced(
103+
FFMPEG_INCLUDE_DIR
104+
FFMPEG_LIBRARIES
105+
FFMPEG_VERSION
106+
)

cmake/modules/NSIS.template.in

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,8 @@ Section "-Core installation"
719719

720720
ExecWait '"$INSTDIR\\${WebView2Installer}" /silent /install'
721721
ExecWait '"$INSTDIR\\${VCREDIST_X64Installer}" /silent /install'
722-
ExecWait '"$INSTDIR\\${STLTHUMB_X64Installer}" /silent /install'
722+
;ExecWait '"$INSTDIR\\${STLTHUMB_X64Installer}" /silent /install'
723+
;ExecWait 'msiexec /i ""$INSTDIR\\${STLTHUMB_X64Installer}" /fa /qn / REBOOT=Suppress'
723724

724725
;Store installation folder
725726
WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
@@ -809,12 +810,12 @@ WriteRegStr HKCR "cxprj_cxsw\shell\open\command" "" '"$INSTDIR\${PROCESS_NAME}"
809810
System::Call "Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)"
810811

811812
;add stl thumb
812-
;ExecWait '"regsvr32" /s "$INSTDIR\STLThumbWinShellExtension.dll"'
813-
;WriteRegStr HKCR ".stl\shellex\{e357fccd-a995-4576-b01f-234630154e96}" "" "{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}"
814-
;WriteRegStr HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}" "" "STLThumbWinShellExtension.STLThumbnailProvider Class"
815-
;WriteRegDWORD HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}" "DisableProcessIsolation" 1
816-
;WriteRegStr HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}\InprocServer32" "" "$INSTDIR\STLThumbWinShellExtension.dll"
817-
;WriteRegStr HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}\InprocServer32" "ThreadingModel" "Both"
813+
ExecWait '"regsvr32" /s "$INSTDIR\STLThumbWinShellExtension.dll"'
814+
WriteRegStr HKCR ".stl\shellex\{e357fccd-a995-4576-b01f-234630154e96}" "" "{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}"
815+
WriteRegStr HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}" "" "STLThumbWinShellExtension.STLThumbnailProvider Class"
816+
WriteRegDWORD HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}" "DisableProcessIsolation" 1
817+
WriteRegStr HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}\InprocServer32" "" "$INSTDIR\STLThumbWinShellExtension.dll"
818+
WriteRegStr HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}\InprocServer32" "ThreadingModel" "Apartment"
818819
SectionEnd
819820

820821
Section "-Add to path"
@@ -936,11 +937,11 @@ Section "Un.${APP_NAME}"
936937
!endif
937938

938939
; Remove stl thumb
939-
; ExecWait '"regsvr32" /s /u "$INSTDIR\STLThumbWinShellExtension.dll"'
940-
; Delete "$INSTDIR\stl-thumb.exe"
941-
; Delete "$INSTDIR\STLThumbWinShellExtension.dll"
942-
; DeleteRegKey HKCR ".stl\shellex\{e357fccd-a995-4576-b01f-234630154e96}"
943-
; DeleteRegKey HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}"
940+
ExecWait '"regsvr32" /s /u "$INSTDIR\STLThumbWinShellExtension.dll"'
941+
Delete "$INSTDIR\stl-thumb.exe"
942+
Delete "$INSTDIR\STLThumbWinShellExtension.dll"
943+
DeleteRegKey HKCR ".stl\shellex\{e357fccd-a995-4576-b01f-234630154e96}"
944+
DeleteRegKey HKCR "CLSID\{AF07F051-9D08-44A7-8C63-9296ADFEDDD7}"
944945

945946
;Remove the uninstaller itself.
946947
Delete "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe"

deps/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,15 @@ if(NOT FREETYPE_FOUND)
339339
include(FREETYPE/FREETYPE.cmake)
340340
set(FREETYPE_PKG "dep_FREETYPE")
341341
endif()
342-
342+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
343+
include(FFmpeg/ffmpeg.cmake)
344+
endif()
343345
include(OCCT/OCCT.cmake)
344346
include(OpenCV/OpenCV.cmake)
345347
include(aliyun-oss-cpp-sdk/aliyun-oss-cpp-sdk.cmake)
348+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
349+
include(metartc/metartc.cmake)
350+
endif()
346351
include(breakpad/breakpad.cmake)
347352
set(_dep_list
348353
dep_Boost
@@ -366,7 +371,9 @@ set(_dep_list
366371
dep_BREAKPAD
367372
dep_Assimp
368373
)
369-
374+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
375+
list(APPEND _dep_list "dep_metartc")
376+
endif()
370377
if (MSVC)
371378
# Experimental
372379
#list(APPEND _dep_list "dep_qhull")

deps/FFmpeg/ffmpeg.cmake

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
2+
set(_conf_cmd ./configure)
3+
set(_make_cmd make -j${NPROC})
4+
set(_install_cmd make -j${NPROC} install)
5+
ExternalProject_Add(dep_FFmpeg
6+
#EXCLUDE_FROM_ALL ON
7+
URL "https://ffmpeg.org/releases/ffmpeg-4.2.tar.bz2"
8+
URL_HASH SHA256=306bde5f411e9ee04352d1d3de41bd3de986e42e2af2a4c44052dce1ada26fb8
9+
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/FFmpeg
10+
CONFIGURE_COMMAND ${_conf_cmd}
11+
"--prefix=${DESTDIR}"
12+
"--enable-gpl"
13+
"--enable-libx264"
14+
"--enable-static"
15+
"--disable-x86asm"
16+
BUILD_IN_SOURCE ON
17+
BUILD_COMMAND ${_make_cmd}
18+
INSTALL_COMMAND ${_install_cmd}
19+
)
20+
endif()

deps/MPFR/MPFR.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ else ()
2525
endif ()
2626

2727
ExternalProject_Add(dep_MPFR
28-
URL https://www.mpfr.org/mpfr-current/mpfr-4.2.1.tar.bz2
28+
URL https://www.mpfr.org/mpfr-4.2.1/mpfr-4.2.1.tar.bz2
2929
URL_HASH SHA256=b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0
3030
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/MPFR
3131
BUILD_IN_SOURCE ON

deps/metartc/metartc.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
2+
orcaslicer_add_cmake_project(metartc
3+
# GIT_REPOSITORY https://github.com/aliyun/aliyun-oss-cpp-sdk.git
4+
# GIT_TAG v1.9.2
5+
URL https://github.com/CrealityOfficial/metartc/archive/refs/tags/v1.0.0.tar.gz
6+
URL_HASH SHA256=696780282b3a9324e87d451ee2c8889e3ebc93c45d06db46571208477bc93d9a
7+
#PATCH_COMMAND ${patch_command}
8+
)
9+
10+
add_dependencies(dep_metartc dep_FFmpeg)
11+
12+
if (MSVC)
13+
add_debug_dep(dep_FFmpeg)
14+
endif ()
15+
endif()

deps/wxWidgets/wxWidgets.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ endif ()
2424

2525
orcaslicer_add_cmake_project(
2626
wxWidgets
27-
GIT_REPOSITORY "https://github.com/CrealityOfficial/Orca-deps-wxWidgets.git"
28-
GIT_SHALLOW ON
27+
URL "https://github.com/CrealityOfficial/Orca-deps-wxWidgets/archive/refs/tags/v1.0.0.tar.gz"
28+
URL_HASH SHA256=74089054448d887c1b551ac98f4b46fa8960a5168df48aa77700c7a58071148c
2929
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${TIFF_PKG} ${JPEG_PKG}
3030
CMAKE_ARGS
3131
-DwxBUILD_PRECOMP=ON

0 commit comments

Comments
 (0)