mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 02:06:54 +00:00
Orca content-addresses every system filament, Bambu's included, but a printer, its AMS and its vendor's cloud know only that vendor's own catalog ids. The printer agent now translates between the two: outbound MQTT and FTP traffic, the AMS mapping sent with a print job, and the ids written into a 3mf bound for the printer all leave in the printer's own ids, while status messages, loaded projects and SD-card prints arrive in Orca's. An id with no mapping passes through unchanged, and an agent whose printers already speak Orca's ids translates nothing at all. Bambu's map is generated from BambuStudio's own shipped bundle; a missing or unreadable file leaves every lookup an identity rather than taking the app down. The profile check validates the map's shape, and profile CI now runs on the paths that can change it. docs/HLSD/filament_id.md records the places the map deliberately does not reach.
61 lines
2.3 KiB
CMake
61 lines
2.3 KiB
CMake
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
|
|
add_executable(${_TEST_NAME}_tests
|
|
${_TEST_NAME}_tests_main.cpp
|
|
test_bambu_filament_ids.cpp
|
|
test_creality_cfs_match.cpp
|
|
test_dev_mapping.cpp
|
|
test_filament_bitmap_utils.cpp
|
|
test_network_versions.cpp
|
|
test_action_source.cpp
|
|
test_plugin_host_api.cpp
|
|
test_plugin_capability_config.cpp
|
|
test_plugin_config.cpp
|
|
test_plugin_capabilities_in_use.cpp
|
|
test_plugin_install.cpp
|
|
test_plugin_lifecycle.cpp
|
|
test_slicing_pipeline_bindings.cpp
|
|
test_slicing_pipeline_config.cpp
|
|
test_plugin_sort.cpp
|
|
test_plugin_cloud_metadata.cpp
|
|
test_plugin_audit.cpp
|
|
../fff_print/test_helpers.cpp
|
|
)
|
|
|
|
if (MSVC)
|
|
target_link_libraries(${_TEST_NAME}_tests Setupapi.lib)
|
|
endif ()
|
|
|
|
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r_gui libslic3r pybind11::embed Catch2::Catch2WithMain)
|
|
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
|
|
|
|
orcaslicer_copy_test_dlls()
|
|
|
|
if (WIN32)
|
|
add_custom_command(TARGET ${_TEST_NAME}_tests POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:${_TEST_NAME}_tests>/python"
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_PREFIX_PATH}/libpython" "$<TARGET_FILE_DIR:${_TEST_NAME}_tests>/python"
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
"${CMAKE_PREFIX_PATH}/libpython/python${_bundled_python_abi}.dll"
|
|
"${CMAKE_PREFIX_PATH}/libpython/vcruntime140.dll"
|
|
"${CMAKE_PREFIX_PATH}/libpython/vcruntime140_1.dll"
|
|
"$<TARGET_FILE_DIR:${_TEST_NAME}_tests>"
|
|
COMMENT "Copying Python runtime for slic3rutils plugin host API tests"
|
|
VERBATIM
|
|
)
|
|
elseif (APPLE)
|
|
target_link_options(${_TEST_NAME}_tests PRIVATE
|
|
"LINKER:-rpath,@executable_path/python/lib")
|
|
|
|
add_custom_command(TARGET ${_TEST_NAME}_tests POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E rm -rf
|
|
"$<TARGET_FILE_DIR:${_TEST_NAME}_tests>/python"
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
"${CMAKE_PREFIX_PATH}/libpython"
|
|
"$<TARGET_FILE_DIR:${_TEST_NAME}_tests>/python"
|
|
COMMENT "Copying Python runtime for macOS plugin host API tests"
|
|
VERBATIM
|
|
)
|
|
endif()
|
|
|
|
orcaslicer_discover_tests(${_TEST_NAME}_tests)
|