mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-14 12:37:46 +00:00
Merge branch 'dev_snapmaker_2.2.0_beta2_alves' of https://github.com/Snapmaker/OrcaSlicer into dev_snapmaker_2.2.0_beta2_alves
# Conflicts: # CMakeLists.txt # src/CMakeLists.txt
This commit is contained in:
45
.github/workflows/sentry_cli.yml
vendored
45
.github/workflows/sentry_cli.yml
vendored
@@ -35,18 +35,53 @@ jobs:
|
|||||||
name: ${{ inputs.pdb-artifact-name }}
|
name: ${{ inputs.pdb-artifact-name }}
|
||||||
path: ./symbols
|
path: ./symbols
|
||||||
|
|
||||||
|
- name: "[Windows] Extract PDB archive"
|
||||||
|
if: inputs.os == 'windows-latest'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$archive = Get-ChildItem -Path ./symbols -Filter "*.7z" -File | Select-Object -First 1
|
||||||
|
if ($archive) {
|
||||||
|
Write-Host "Found archive: $($archive.FullName)"
|
||||||
|
Write-Host "Extracting to ./symbols/extracted ..."
|
||||||
|
7z x "$($archive.FullName)" -o"./symbols/extracted" -y
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "::error::Failed to extract archive with exit code $LASTEXITCODE"
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
Write-Host "Extraction complete. Contents:"
|
||||||
|
Get-ChildItem -Path ./symbols/extracted -Recurse | ForEach-Object { Write-Host " $($_.FullName)" }
|
||||||
|
} else {
|
||||||
|
Write-Host "No .7z archive found, assuming PDB files are already extracted"
|
||||||
|
Get-ChildItem -Path ./symbols -Recurse | ForEach-Object { Write-Host " Found: $($_.FullName)" }
|
||||||
|
}
|
||||||
|
|
||||||
- name: "[Windows] Upload PDB to Sentry (sentry-cli)"
|
- name: "[Windows] Upload PDB to Sentry (sentry-cli)"
|
||||||
if: inputs.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
env:
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
SENTRY_LOG_LEVEL: debug
|
||||||
run: |
|
run: |
|
||||||
$pdbArchive = Get-ChildItem -Path ./symbols -Filter "*.7z" -File | Select-Object -First 1
|
# Determine upload path - prefer extracted folder if it exists
|
||||||
if ($pdbArchive) {
|
$uploadPath = "./symbols"
|
||||||
Write-Host "Uploading PDB archive: $($pdbArchive.FullName)"
|
if (Test-Path "./symbols/extracted") {
|
||||||
sentry-cli.exe --auth-token $env:SENTRY_AUTH_TOKEN upload-dif --org "${{ secrets.SENTRY_ORG }}" --project "${{ secrets.SENTRY_PROJECT }}" "$($pdbArchive.FullName)" 2>&1 | Out-Host
|
$uploadPath = "./symbols/extracted"
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdbFiles = Get-ChildItem -Path $uploadPath -Filter "*.pdb" -File -Recurse
|
||||||
|
if ($pdbFiles.Count -gt 0) {
|
||||||
|
Write-Host "Found $($pdbFiles.Count) PDB file(s) to upload from $uploadPath :"
|
||||||
|
$pdbFiles | ForEach-Object { Write-Host " - $($_.FullName)" }
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "Starting Sentry upload with debug logging..."
|
||||||
|
sentry-cli.exe --log-level=debug --auth-token $env:SENTRY_AUTH_TOKEN upload-dif --org "${{ secrets.SENTRY_ORG }}" --project "${{ secrets.SENTRY_PROJECT }}" $uploadPath 2>&1 | Out-Host
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "::error::Sentry upload failed with exit code $LASTEXITCODE"
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Host "No PDB archive found in symbols folder"
|
Write-Host "::error::No PDB files found in $uploadPath"
|
||||||
|
Get-ChildItem -Path ./symbols -Recurse | ForEach-Object { Write-Host " Found: $($_.FullName)" }
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,14 @@ 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)
|
||||||
option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0)
|
option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0)
|
||||||
option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0)
|
option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0)
|
||||||
option(SLIC3R_SENTRY "Enable Sentry crash reporting" 1)
|
|
||||||
|
# Sentry crash reporting - enabled only on Windows by default
|
||||||
|
if (WIN32)
|
||||||
|
set(SLIC3R_SENTRY_DEFAULT ON)
|
||||||
|
else()
|
||||||
|
set(SLIC3R_SENTRY_DEFAULT OFF)
|
||||||
|
endif()
|
||||||
|
option(SLIC3R_SENTRY "Enable Sentry crash reporting SDK" ${SLIC3R_SENTRY_DEFAULT})
|
||||||
# If SLIC3R_FHS is 1 -> SLIC3R_DESKTOP_INTEGRATION is always 0, othrewise variable.
|
# If SLIC3R_FHS is 1 -> SLIC3R_DESKTOP_INTEGRATION is always 0, othrewise variable.
|
||||||
CMAKE_DEPENDENT_OPTION(SLIC3R_DESKTOP_INTEGRATION "Allow perfoming desktop integration during runtime" 1 "NOT SLIC3R_FHS" 0)
|
CMAKE_DEPENDENT_OPTION(SLIC3R_DESKTOP_INTEGRATION "Allow perfoming desktop integration during runtime" 1 "NOT SLIC3R_FHS" 0)
|
||||||
|
|
||||||
@@ -535,7 +542,9 @@ find_package(TBB REQUIRED)
|
|||||||
|
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
find_package(Sentry REQUIRED)
|
if (SLIC3R_SENTRY)
|
||||||
|
find_package(Sentry REQUIRED)
|
||||||
|
endif()
|
||||||
find_package(Freetype REQUIRED)
|
find_package(Freetype REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
@@ -545,19 +554,21 @@ target_link_libraries(libcurl INTERFACE CURL::libcurl)
|
|||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
target_link_libraries(libcurl INTERFACE ZLIB::ZLIB)
|
target_link_libraries(libcurl INTERFACE ZLIB::ZLIB)
|
||||||
|
|
||||||
add_library(sentry INTERFACE)
|
if (SLIC3R_SENTRY)
|
||||||
target_link_libraries(sentry INTERFACE sentry::sentry)
|
add_library(sentry INTERFACE)
|
||||||
|
target_link_libraries(sentry INTERFACE sentry::sentry)
|
||||||
|
|
||||||
# Add sentry library directory and link sentry.lib explicitly for Windows
|
# Add sentry library directory and link sentry.lib explicitly for Windows
|
||||||
if (WIN32 AND CMAKE_PREFIX_PATH)
|
if (WIN32 AND CMAKE_PREFIX_PATH)
|
||||||
# Try to find sentry.lib in the install prefix
|
# Try to find sentry.lib in the install prefix
|
||||||
file(GLOB _sentry_lib "${CMAKE_PREFIX_PATH}/lib/sentry.lib")
|
file(GLOB _sentry_lib "${CMAKE_PREFIX_PATH}/lib/sentry.lib")
|
||||||
if (_sentry_lib)
|
if (_sentry_lib)
|
||||||
target_link_directories(sentry INTERFACE "${CMAKE_PREFIX_PATH}/lib")
|
target_link_directories(sentry INTERFACE "${CMAKE_PREFIX_PATH}/lib")
|
||||||
target_link_libraries(sentry INTERFACE "sentry.lib")
|
target_link_libraries(sentry INTERFACE "sentry.lib")
|
||||||
message(STATUS "Found sentry.lib at: ${CMAKE_PREFIX_PATH}/lib")
|
message(STATUS "Found sentry.lib at: ${CMAKE_PREFIX_PATH}/lib")
|
||||||
else()
|
else()
|
||||||
message(WARNING "sentry.lib not found in ${CMAKE_PREFIX_PATH}/lib. Sentry SDK may not have been built yet.")
|
message(WARNING "sentry.lib not found in ${CMAKE_PREFIX_PATH}/lib. Sentry SDK may not have been built yet.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -746,7 +757,7 @@ function(Snapmaker_Orca_copy_dlls target config postfix output_dlls)
|
|||||||
DESTINATION ${_out_dir})
|
DESTINATION ${_out_dir})
|
||||||
|
|
||||||
# Copy Sentry and Crashpad artifacts if they were built by deps
|
# Copy Sentry and Crashpad artifacts if they were built by deps
|
||||||
if (EXISTS "${CMAKE_PREFIX_PATH}/bin/sentry.dll")
|
if (SLIC3R_SENTRY AND EXISTS "${CMAKE_PREFIX_PATH}/bin/sentry.dll")
|
||||||
file(COPY "${CMAKE_PREFIX_PATH}/bin/sentry.dll"
|
file(COPY "${CMAKE_PREFIX_PATH}/bin/sentry.dll"
|
||||||
"${CMAKE_PREFIX_PATH}/bin/crashpad_handler.exe"
|
"${CMAKE_PREFIX_PATH}/bin/crashpad_handler.exe"
|
||||||
DESTINATION ${_out_dir}
|
DESTINATION ${_out_dir}
|
||||||
@@ -815,12 +826,20 @@ function(Snapmaker_Orca_copy_dlls target config postfix output_dlls)
|
|||||||
${_out_dir}/TKXSBase.dll
|
${_out_dir}/TKXSBase.dll
|
||||||
|
|
||||||
${_out_dir}/freetype.dll
|
${_out_dir}/freetype.dll
|
||||||
${_out_dir}/sentry.dll
|
|
||||||
${_out_dir}/crashpad_handler.exe
|
|
||||||
|
|
||||||
PARENT_SCOPE
|
PARENT_SCOPE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add Sentry DLLs to the output list if Sentry is enabled
|
||||||
|
if (SLIC3R_SENTRY)
|
||||||
|
set(${output_dlls}
|
||||||
|
${${output_dlls}}
|
||||||
|
${_out_dir}/sentry.dll
|
||||||
|
${_out_dir}/crashpad_handler.exe
|
||||||
|
PARENT_SCOPE
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
deps/CMakeLists.txt
vendored
10
deps/CMakeLists.txt
vendored
@@ -62,6 +62,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|||||||
option(DEP_WX_GTK3 "Build wxWidgets against GTK3" OFF)
|
option(DEP_WX_GTK3 "Build wxWidgets against GTK3" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Sentry crash reporting - enabled only on Windows by default
|
||||||
|
if (WIN32)
|
||||||
|
set(SLIC3R_SENTRY_DEFAULT ON)
|
||||||
|
else()
|
||||||
|
set(SLIC3R_SENTRY_DEFAULT OFF)
|
||||||
|
endif()
|
||||||
|
option(SLIC3R_SENTRY "Enable Sentry crash reporting SDK" ${SLIC3R_SENTRY_DEFAULT})
|
||||||
|
|
||||||
set(IS_CROSS_COMPILE FALSE)
|
set(IS_CROSS_COMPILE FALSE)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
@@ -315,7 +323,7 @@ if (NOT OPENSSL_FOUND OR NOT CURL_FOUND)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(SENTRY_PKG "")
|
set(SENTRY_PKG "")
|
||||||
if (NOT SENTRY_FOUND)
|
if (SLIC3R_SENTRY AND NOT SENTRY_FOUND)
|
||||||
include(Sentry/Sentry.cmake)
|
include(Sentry/Sentry.cmake)
|
||||||
set(SENTRY_PKG dep_Sentry)
|
set(SENTRY_PKG dep_Sentry)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -189,8 +189,11 @@ if (WIN32)
|
|||||||
target_compile_definitions(Snapmaker_Orca_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
target_compile_definitions(Snapmaker_Orca_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
||||||
add_dependencies(Snapmaker_Orca_app_gui Snapmaker_Orca)
|
add_dependencies(Snapmaker_Orca_app_gui Snapmaker_Orca)
|
||||||
set_target_properties(Snapmaker_Orca_app_gui PROPERTIES OUTPUT_NAME "snapmaker-orca")
|
set_target_properties(Snapmaker_Orca_app_gui PROPERTIES OUTPUT_NAME "snapmaker-orca")
|
||||||
target_include_directories(Snapmaker_Orca_app_gui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
if (SLIC3R_SENTRY)
|
||||||
target_link_libraries(Snapmaker_Orca_app_gui PRIVATE boost_headeronly sentry::sentry)
|
target_link_libraries(Snapmaker_Orca_app_gui PRIVATE boost_headeronly sentry::sentry)
|
||||||
|
else()
|
||||||
|
target_link_libraries(Snapmaker_Orca_app_gui PRIVATE boost_headeronly)
|
||||||
|
endif()
|
||||||
if (SLIC3R_SENTRY)
|
if (SLIC3R_SENTRY)
|
||||||
target_compile_definitions(Snapmaker_Orca_app_gui PRIVATE SLIC3R_SENTRY)
|
target_compile_definitions(Snapmaker_Orca_app_gui PRIVATE SLIC3R_SENTRY)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1021,11 +1021,6 @@ PreferencesDialog::PreferencesDialog(wxWindow *parent, wxWindowID id, const wxSt
|
|||||||
: DPIDialog(parent, id, _L("Preferences"), pos, size, style)
|
: DPIDialog(parent, id, _L("Preferences"), pos, size, style)
|
||||||
{
|
{
|
||||||
SetBackgroundColour(*wxWHITE);
|
SetBackgroundColour(*wxWHITE);
|
||||||
|
|
||||||
wxPanel* pPanel = new wxPanel(nullptr);
|
|
||||||
delete pPanel;
|
|
||||||
delete pPanel;
|
|
||||||
|
|
||||||
create();
|
create();
|
||||||
wxGetApp().UpdateDlgDarkUI(this);
|
wxGetApp().UpdateDlgDarkUI(this);
|
||||||
Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent& event) {
|
Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent& event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user